package com.ycl.controller.writ; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ycl.annotation.LogSave; import com.ycl.api.CommonResult; import com.ycl.controller.BaseController; import com.ycl.entity.writ.WritTemplate; import com.ycl.service.writ.IWritTemplateService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; /** *

* 文书模板表 前端控制器 *

* * @author lyq * @since 2022-11-14 */ @RestController @RequestMapping("/writ_template") @Api(tags = "文书模板管理") public class WritTemplateController extends BaseController { @Autowired IWritTemplateService iWritTemplateService; @GetMapping("/query") @ApiOperation(value = "查询") @LogSave(operationType = "文书模板管理", contain = "查询文书模板") public CommonResult search(@RequestParam Integer pageSize, @RequestParam Integer currentPage, @RequestParam(required = false) String name) { return CommonResult.success(iWritTemplateService.page(new Page<>(currentPage, pageSize), new LambdaQueryWrapper() .like(StringUtils.isNotBlank(name), WritTemplate::getName, name))); } }