| | |
| | | |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import opennlp.tools.dictionary.serializer.Entry; |
| | | import org.jeecg.modules.system.entity.SysUser; |
| | | import org.jeecg.modules.system.service.ISysUserService; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.core.io.ByteArrayResource; |
| | | import org.springframework.http.*; |
| | |
| | | private ICopywritingService copywritingService; |
| | | @Autowired |
| | | private ISemanticWordService semanticWordService;; |
| | | @Autowired |
| | | private ISysUserService sysUserService; |
| | | |
| | | /** |
| | | * 分页列表查询 |
| | |
| | | @Operation(summary="文案-查询发送门户文章总量") |
| | | @GetMapping(value = "/count") |
| | | public Result<IPage<Copywriting>> count(Copywriting copywriting, |
| | | @RequestParam(name="role", defaultValue="无") String role, |
| | | @RequestParam(name="user", defaultValue="无") String user, |
| | | HttpServletRequest req) { |
| | | |
| | | QueryWrapper<Copywriting> queryWrapper = QueryGenerator.initQueryWrapper(copywriting, req.getParameterMap()); |
| | |
| | | "AND semantic_word.word LIKE '%" + copywriting.getWordLike() + "%'"); |
| | | |
| | | } |
| | | |
| | | if (!user.equals("无")){ |
| | | QueryWrapper qw = new QueryWrapper<SysUser>(); |
| | | qw.eq("id", user); |
| | | String userName = ((SysUser)((Page) sysUserService.queryPageList(req, qw, 1, 1).getResult()).getRecords().get(0)).getUsername(); |
| | | queryWrapper.eq("create_by", userName); |
| | | } |
| | | long count = copywritingService.count(queryWrapper); |
| | | return Result.OK(count+""); |
| | | } |