增加围栏Aop日志打印
parent
8b2b84f158
commit
062629d9a1
|
@ -15,6 +15,8 @@ import com.god.base.common.domain.request.FenceAddRequest;
|
|||
import com.god.base.common.domain.request.FenceQueryRequest;
|
||||
import com.god.base.server.service.FenceService;
|
||||
import com.god.common.core.web.page.TableDataInfo;
|
||||
import com.god.common.log.annotation.Log;
|
||||
import com.god.common.log.enums.BusinessType;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
@ -42,15 +44,10 @@ public class FenceController {
|
|||
* @return
|
||||
*/
|
||||
@PostMapping("/insertFence")
|
||||
@Log(title = "添加围栏", businessType = BusinessType.INSERT)
|
||||
public Result<String> insertFence(@RequestBody @Validated FenceAddRequest fenceAddRequest){
|
||||
log.info("功能介绍新增电子围栏,请求方式;{},请求路径:{},请求参数:{}",
|
||||
request.getMethod(),
|
||||
request.getRequestURL(),
|
||||
JSONObject.toJSONString(fenceAddRequest));
|
||||
|
||||
//围栏添加
|
||||
fenceService.save(Fence.fenceBuildAdd(fenceAddRequest));
|
||||
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
@ -61,15 +58,10 @@ public class FenceController {
|
|||
* @return
|
||||
*/
|
||||
@PostMapping("/updateFence")
|
||||
@Log(title = "编辑围栏",businessType = BusinessType.UPDATE)
|
||||
public Result<String> updateFence(@RequestBody @Validated Fence fence){
|
||||
log.info("功能介绍:编辑围栏信息,请求方式:{},请求路径:{},请求参数:{}",
|
||||
request.getMethod(),
|
||||
request.getRequestURL(),
|
||||
JSONObject.toJSONString(fence));
|
||||
|
||||
//编辑电子围栏信息
|
||||
fenceService.updateById(fence);
|
||||
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
@ -80,12 +72,8 @@ public class FenceController {
|
|||
* @return
|
||||
*/
|
||||
@GetMapping("/deleteFence")
|
||||
@Log(title = "根据围栏编号删除围栏",businessType = BusinessType.DELETE)
|
||||
public Result<String> deleteFence(@RequestParam("fenceId") Integer fenceId){
|
||||
log.info("功能介绍:通过围栏编号删除围栏,请求方式:{},请求路径:{},请求参数:{}",
|
||||
request.getMethod(),
|
||||
request.getRequestURL(),
|
||||
JSONObject.toJSONString(fenceId));
|
||||
|
||||
//根据围栏编号删除围栏
|
||||
fenceService.removeById(fenceId);
|
||||
return Result.success();
|
||||
|
@ -98,16 +86,10 @@ public class FenceController {
|
|||
* @return
|
||||
*/
|
||||
@PostMapping("/fenceListAndPage")
|
||||
@Log(title = "查询围栏信息",businessType = BusinessType.FORCE)
|
||||
public Result<TableDataInfo<Fence>> fenceListAndPage(@RequestBody FenceQueryRequest fenceQueryRequest){
|
||||
log.info("功能介绍:查询围栏列表,请求方式:{},请求路径:{},请求参数:{}",
|
||||
request.getMethod(),
|
||||
request.getRequestURL(),
|
||||
JSONObject.toJSONString(fenceQueryRequest));
|
||||
|
||||
//分页查询围栏列表
|
||||
TableDataInfo<Fence> dataInfo = fenceService.fenceListAndPage(fenceQueryRequest);
|
||||
|
||||
return Result.success(dataInfo);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue