接口查询 不做日志记录

日志记录为 员工名称
This commit is contained in:
2024-07-30 14:53:14 +08:00
parent 1d0e81a55a
commit 292d2325a3
14 changed files with 8 additions and 17 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

@@ -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

@@ -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

@@ -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);