Merge remote-tracking branch 'origin/dev' into zs

This commit is contained in:
2024-07-30 15:09:18 +08:00
17 changed files with 12 additions and 27 deletions

View File

@@ -78,12 +78,14 @@ public class LogAspect {
Object o = redisUtils.get("online-token-"+getToken(request));
JSONObject jsonObject = null;
Integer shopId = null;
if (o!= null){
String nickName = "";
if (o != null) {
String jsonString = JSON.toJSONString(o);
jsonObject = JSONObject.parseObject(jsonString);
shopId = (Integer)jsonObject.get("shopId");
shopId = (Integer) jsonObject.get("shopId");
nickName = jsonObject.get("nickName") == null ? "" : jsonObject.get("nickName").toString();
}
logService.save(getUsername(), StringUtils.getBrowser(request), StringUtils.getIp(request),joinPoint, log, shopId);
logService.save(nickName+":"+getUsername(), StringUtils.getBrowser(request), StringUtils.getIp(request),joinPoint, log, shopId);
return result;
}
@@ -107,9 +109,10 @@ public class LogAspect {
jsonObject = JSONObject.parseObject(jsonString);
shopId = (Integer)jsonObject.get("shopId");
}
logService.save(getUsername(), StringUtils.getBrowser(request), StringUtils.getIp(request), (ProceedingJoinPoint)joinPoint, log, shopId);
logService.save(getUsername()+getUsername(), StringUtils.getBrowser(request), StringUtils.getIp(request), (ProceedingJoinPoint)joinPoint, log, shopId);
}
public String getUsername() {
try {
return SecurityUtils.getCurrentUsername();
@@ -117,6 +120,7 @@ public class LogAspect {
return "";
}
}
public String getToken(HttpServletRequest request) {
final String requestHeader = request.getHeader("Authorization");
if (requestHeader != null && requestHeader.startsWith("Bearer")) {

View File

@@ -137,6 +137,7 @@ public class SpringSecurityConfig extends WebSecurityConfigurerAdapter {
// 所有类型的接口都放行
.antMatchers(anonymousUrls.get(RequestMethodEnum.ALL.getType()).toArray(new String[0])).permitAll()
.antMatchers("/auth/appletsLogin").permitAll()
.antMatchers("/api/tbHandover").permitAll()
// 所有请求都需要认证
.anyRequest().authenticated()
.and().apply(securityConfigurerAdapter());

View File

@@ -34,7 +34,6 @@ public class TbConCheckController {
}
@GetMapping
@Log("查询盘点耗材")
@ApiOperation("查询盘点耗材")
public ResponseEntity<Object> queryTbConCheck(TbConCheckQueryCriteria criteria, Pageable pageable){
return new ResponseEntity<>(tbConCheckService.queryAll(criteria,pageable),HttpStatus.OK);

View File

@@ -37,7 +37,6 @@ public class TbConUnitController {
}
@GetMapping
@Log("查询耗材单位添加")
@ApiOperation("查询耗材单位添加")
public ResponseEntity<Object> queryTbConUnit(TbConUnitQueryCriteria criteria, Pageable pageable){
return new ResponseEntity<>(tbConUnitService.queryAll(criteria,pageable),HttpStatus.OK);

View File

@@ -41,7 +41,6 @@ public class TbConsInfoController {
}
@GetMapping
@Log("查询耗材信息")
@ApiOperation("查询耗材信息")
public ResponseEntity<Object> queryTbConsInfo(TbConsInfoQueryCriteria criteria, Pageable pageable){
pageable = PageRequest.of(pageable.getPageNumber(), pageable.getPageSize(), Sort.by("createTime").descending());

View File

@@ -34,7 +34,6 @@ public class TbConsInfoFlowController {
}
@GetMapping
@Log("查询耗材流水")
@ApiOperation("查询耗材流水")
public ResponseEntity<Object> queryTbConsInfoFlow(TbConsInfoFlowQueryCriteria criteria, Pageable pageable){
return new ResponseEntity<>(tbConsInfoFlowService.queryAll(criteria,pageable),HttpStatus.OK);

View File

@@ -34,7 +34,6 @@ public class TbConsSuppFlowController {
}
@GetMapping
@Log("查询入库记录")
@ApiOperation("查询入库记录")
public ResponseEntity<Object> queryTbConsSuppFlow(TbConsSuppFlowQueryCriteria criteria, Pageable pageable){
return new ResponseEntity<>(tbConsSuppFlowService.queryAll(criteria,pageable),HttpStatus.OK);

View File

@@ -35,7 +35,6 @@ public class TbConsTypeController {
}
@GetMapping
@Log("查询耗材类型")
@ApiOperation("查询耗材类型")
public ResponseEntity<Object> queryTbConsType(TbConsTypeQueryCriteria criteria, Pageable pageable){
return new ResponseEntity<>(tbConsTypeService.queryAll(criteria,pageable),HttpStatus.OK);

View File

@@ -33,20 +33,13 @@ public class TbHandoverController {
tbHandoverService.download(tbHandoverService.queryAll(criteria), response);
}
@GetMapping
@PostMapping
@Log("查询查询交班记录")
@ApiOperation("查询查询交班记录")
public ResponseEntity<Object> queryTbHandover(TbHandoverQueryCriteria criteria, Pageable pageable){
return new ResponseEntity<>(tbHandoverService.queryAll(criteria,pageable),HttpStatus.OK);
}
@PostMapping
@Log("新增查询交班记录")
@ApiOperation("新增查询交班记录")
public ResponseEntity<Object> createTbHandover(@Validated @RequestBody TbHandover resources){
return new ResponseEntity<>(tbHandoverService.create(resources),HttpStatus.CREATED);
}
@PutMapping
@Log("修改查询交班记录")
@ApiOperation("修改查询交班记录")

View File

@@ -37,7 +37,6 @@ public class TbProskuConController {
}
@GetMapping
@Log("查询商品规格耗材信息")
@ApiOperation("查询商品规格耗材信息")
public ResponseEntity<Object> queryTbProskuCon(TbProskuConQueryCriteria criteria, Pageable pageable){
return new ResponseEntity<>(tbProskuConService.queryAll(criteria,pageable),HttpStatus.OK);

View File

@@ -34,7 +34,6 @@ public class ViewConInfoFlowController {
}
@GetMapping
@Log("查询获取耗材流水信息")
@ApiOperation("查询获取耗材流水信息")
public ResponseEntity<Object> queryViewConInfoFlow(ViewConInfoFlowQueryCriteria criteria, Pageable pageable){
return new ResponseEntity<>(viewConInfoFlowService.queryAll(criteria,pageable),HttpStatus.OK);

View File

@@ -34,7 +34,6 @@ public class ViewConSkuController {
}
@GetMapping
@Log("查询查询耗材规格信息")
@ApiOperation("查询查询耗材规格信息")
public ResponseEntity<Object> queryViewConSku(ViewConSkuQueryCriteria criteria, Pageable pageable){
return new ResponseEntity<>(viewConSkuService.queryAll(criteria,pageable),HttpStatus.OK);

View File

@@ -34,7 +34,6 @@ public class ViewConsSuppFlowController {
}
@GetMapping
@Log("查询出入库记录")
@ApiOperation("查询出入库记录")
public ResponseEntity<Object> queryViewConsSuppFlow(ViewConsSuppFlowQueryCriteria criteria, Pageable pageable){
return new ResponseEntity<>(viewConsSuppFlowService.queryAll(criteria,pageable),HttpStatus.OK);

View File

@@ -34,7 +34,6 @@ public class ViewProductSkuShopController {
}
@GetMapping
@Log("查询商品规格信息查询")
@ApiOperation("查询商品规格信息查询")
public ResponseEntity<Object> queryViewProductSkuShop(ViewProductSkuShopQueryCriteria criteria, Pageable pageable){
return new ResponseEntity<>(viewProductSkuShopService.queryAll(criteria,pageable),HttpStatus.OK);

View File

@@ -12,8 +12,8 @@ import cn.ysk.cashier.annotation.Query;
public class TbHandoverQueryCriteria{
/** 精确 */
@Query
private String tradeDay;
@Query(type = Query.Type.BETWEEN)
private List<String> tradeDay;
/** 精确 */
@Query

View File

@@ -26,7 +26,6 @@ public class TbCouponCategoryController {
private final TbCouponCategoryService tbCouponCategoryService;
@GetMapping
@Log("查询团购卷类别")
@ApiOperation("查询团购卷类别")
public ResponseEntity<Object> queryTbCouponCategory(TbCouponCategoryQueryCriteria criteria, Pageable pageable){
return new ResponseEntity<>(tbCouponCategoryService.queryAll(criteria,pageable),HttpStatus.OK);

View File

@@ -34,7 +34,6 @@ public class ${className}Controller {
}
@GetMapping
@Log("查询${apiAlias}")
@ApiOperation("查询${apiAlias}")
public ResponseEntity<Object> query${className}(${className}QueryCriteria criteria, Pageable pageable){
return new ResponseEntity<>(${changeClassName}Service.queryAll(criteria,pageable),HttpStatus.OK);