package com.thhy.usercore.modules.sys.syslog.controller; import com.github.pagehelper.PageInfo; import com.thhy.general.utils.PagingUtils; import com.thhy.general.common.BasicResult; import com.thhy.usercore.modules.sys.syslog.entity.LogDto; import com.thhy.usercore.modules.sys.syslog.entity.LogVo; import com.thhy.usercore.modules.sys.syslog.entity.SysLogs; import com.thhy.usercore.modules.sys.syslog.service.ISysLogsService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletRequest; import java.io.Serializable; import java.util.List; /** * @author zhang_xiao_bo * @since 2022-04-01 */ @RestController @RequestMapping("sysLogs") public class SysLogsController { @Autowired private ISysLogsService sysLogsService; @RequestMapping("findList") public BasicResult findList(@RequestBody(required = false) LogDto logDto, HttpServletRequest req){ PagingUtils.setPageParam(req); List sysLogsList = sysLogsService.findList(logDto); PageInfo pageInfo = new PageInfo<>(sysLogsList); return BasicResult.success(pageInfo); } /*@RequestMapping("addSysLogs") public BasicResult addSysLogs(@RequestBody SysLogs sysLogs){ sysLogsService.insert(sysLogs); return BasicResult.success(); }*/ @RequestMapping("update") public BasicResult update(@RequestBody SysLogs sysLogs){ sysLogsService.update(sysLogs); return BasicResult.success(); } @RequestMapping("delete") public BasicResult delete(Serializable id){ sysLogsService.deletelogic(id); return BasicResult.success(); } }