1- package com .github .cadecode .uniboot .framework .svc .controller ;
1+ package com .github .cadecode .uniboot .framework .base . plugin .controller ;
22
33import cn .hutool .core .util .ObjectUtil ;
44import com .github .cadecode .uniboot .common .core .web .response .PageResult ;
55import com .github .cadecode .uniboot .common .plugin .mybatis .converter .BoolToIntTypeHandler ;
66import com .github .cadecode .uniboot .framework .base .annotation .ApiFormat ;
77import com .github .cadecode .uniboot .framework .base .annotation .ApiInner ;
8- import com .github .cadecode .uniboot .framework .svc .bean .po .SysLog ;
9- import com .github .cadecode .uniboot .framework .svc .bean .vo .SysLogVo .SysLogPageResVo ;
10- import com .github .cadecode .uniboot .framework .svc .bean .vo .SysLogVo .SysLogSaveReqVo ;
11- import com .github .cadecode .uniboot .framework .svc .convert .SysLogConvert ;
12- import com .github .cadecode .uniboot .framework .svc .service .SysLogService ;
8+ import com .github .cadecode .uniboot .framework .base .plugin .bean .po .PlgLog ;
9+ import com .github .cadecode .uniboot .framework .base .plugin .bean .vo .PlgLogVo ;
10+ import com .github .cadecode .uniboot .framework .base .plugin .bean .vo .PlgLogVo .PlgLogPageResVo ;
11+ import com .github .cadecode .uniboot .framework .base .plugin .bean .vo .PlgLogVo .PlgLogSaveReqVo ;
12+ import com .github .cadecode .uniboot .framework .base .plugin .convert .PlgLogConvert ;
13+ import com .github .cadecode .uniboot .framework .base .plugin .service .PlgLogService ;
1314import com .github .pagehelper .PageHelper ;
1415import com .github .pagehelper .PageInfo ;
1516import io .swagger .annotations .Api ;
2627import javax .validation .constraints .NotEmpty ;
2728import java .util .List ;
2829
29- import static com .github .cadecode .uniboot .framework .svc .bean .vo .SysLogVo .SysLogPageReqVo ;
30-
3130/**
3231 * 日志管理
3332 *
3837@ Slf4j
3938@ RequiredArgsConstructor
4039@ Api (tags = "日志管理" )
41- @ RequestMapping ("system /log" )
40+ @ RequestMapping ("plugin /log" )
4241@ RestController
4342@ Validated
44- public class SysLogController {
43+ public class PlgLogController {
4544
46- private final SysLogService logService ;
45+ private final PlgLogService logService ;
4746
4847 @ ApiOperation ("查询列表" )
4948 @ PostMapping ("page" )
50- public PageResult <SysLogPageResVo > page (@ RequestBody @ Valid SysLogPageReqVo reqVo ) {
51- PageInfo <SysLog > pageInfo = PageHelper .startPage (reqVo .getPageNumber (), reqVo .getPageSize ())
49+ public PageResult <PlgLogPageResVo > page (@ RequestBody @ Valid PlgLogVo . PlgLogPageReqVo reqVo ) {
50+ PageInfo <PlgLog > pageInfo = PageHelper .startPage (reqVo .getPageNumber (), reqVo .getPageSize ())
5251 .doSelectPageInfo (() -> logService .lambdaQuery ()
53- .ge (ObjectUtil .isNotEmpty (reqVo .getStartTime ()), SysLog ::getCreateTime , reqVo .getStartTime ())
54- .le (ObjectUtil .isNotEmpty (reqVo .getEndTime ()), SysLog ::getCreateTime , reqVo .getEndTime ())
55- .in (ObjectUtil .isNotEmpty (reqVo .getLogTypeList ()), SysLog ::getLogType , reqVo .getLogTypeList ())
56- .likeRight (ObjectUtil .isNotEmpty (reqVo .getAccessUser ()), SysLog ::getAccessUser , reqVo .getAccessUser ())
57- .like (ObjectUtil .isNotEmpty (reqVo .getUrl ()), SysLog ::getUrl , reqVo .getUrl ())
58- .eq (ObjectUtil .isNotNull (reqVo .getExceptional ()), SysLog ::getExceptional , BoolToIntTypeHandler .mapping (reqVo .getExceptional ()))
59- .orderByDesc (SysLog ::getCreateTime )
52+ .ge (ObjectUtil .isNotEmpty (reqVo .getStartTime ()), PlgLog ::getCreateTime , reqVo .getStartTime ())
53+ .le (ObjectUtil .isNotEmpty (reqVo .getEndTime ()), PlgLog ::getCreateTime , reqVo .getEndTime ())
54+ .in (ObjectUtil .isNotEmpty (reqVo .getLogTypeList ()), PlgLog ::getLogType , reqVo .getLogTypeList ())
55+ .likeRight (ObjectUtil .isNotEmpty (reqVo .getAccessUser ()), PlgLog ::getAccessUser , reqVo .getAccessUser ())
56+ .like (ObjectUtil .isNotEmpty (reqVo .getUrl ()), PlgLog ::getUrl , reqVo .getUrl ())
57+ .eq (ObjectUtil .isNotNull (reqVo .getExceptional ()), PlgLog ::getExceptional , BoolToIntTypeHandler .mapping (reqVo .getExceptional ()))
58+ .orderByDesc (PlgLog ::getCreateTime )
6059 .list ());
61- List <SysLogPageResVo > voList = SysLogConvert .INSTANCE .poToVo (pageInfo .getList ());
60+ List <PlgLogPageResVo > voList = PlgLogConvert .INSTANCE .poToVo (pageInfo .getList ());
6261 return new PageResult <>((int ) pageInfo .getTotal (), voList );
6362 }
6463
@@ -71,8 +70,8 @@ public boolean delete(@RequestBody @NotEmpty List<Long> idList) {
7170 @ ApiInner (onlyClient = true )
7271 @ ApiOperation ("添加" )
7372 @ PostMapping ("save" )
74- public boolean save (@ RequestBody @ NotEmpty List <SysLogSaveReqVo > requestList ) {
75- List <SysLog > poList = SysLogConvert .INSTANCE .voToPo (requestList );
73+ public boolean save (@ RequestBody @ NotEmpty List <PlgLogSaveReqVo > requestList ) {
74+ List <PlgLog > poList = PlgLogConvert .INSTANCE .voToPo (requestList );
7675 return logService .saveBatch (poList );
7776 }
7877}
0 commit comments