| | |
| | | PageFactory.page(pageNo, pageSize), |
| | | Wrappers.<PsychologicalColumn>lambdaQuery() |
| | | .eq(PsychologicalColumn::getIsDelete,DeleteEnum.NOT_DELETE.getCode()) |
| | | .like(StrUtil.isNotBlank(title), PsychologicalColumn::getArticleTitle,DeleteEnum.NOT_DELETE.getCode()) |
| | | .like(StrUtil.isNotBlank(title), PsychologicalColumn::getArticleTitle, title) |
| | | .orderByDesc(PsychologicalColumn::getReleaseTime) |
| | | ); |
| | | return new SuccessResponseData<>(PageResultFactory.createPageResult(page)); |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "pageNo", value = "分页:第几页(从1开始)", dataTypeClass = Integer.class, paramType = "query"), |
| | | @ApiImplicitParam(name = "pageSize", value = "分页:每页大小(默认10)", dataTypeClass = Integer.class, paramType = "query"), |
| | | @ApiImplicitParam(name = "title", value = "帮助内容", dataTypeClass = Integer.class, paramType = "query") |
| | | @ApiImplicitParam(name = "title", value = "标题", dataTypeClass = String.class, paramType = "query"), |
| | | @ApiImplicitParam(name = "content", value = "内容", dataTypeClass = String.class, paramType = "query") |
| | | } ) |
| | | public ResponseData<PageResult<Help>> page(Integer pageNo, Integer pageSize,String title) { |
| | | LambdaQueryWrapper<Help> lambdaQueryWrapper = new LambdaQueryWrapper<Help>().eq(Help::getIsDelete,false) |
| | | .orderByAsc(Help::getSort); |
| | | lambdaQueryWrapper.like(StrUtil.isNotBlank(title),Help::getTitle,title).or().like(StrUtil.isNotBlank(title),Help::getContent,title); |
| | | public ResponseData<PageResult<Help>> page(Integer pageNo, Integer pageSize, String title, String content) { |
| | | LambdaQueryWrapper<Help> lambdaQueryWrapper = new LambdaQueryWrapper<Help>().eq(Help::getIsDelete, false).orderByAsc(Help::getSort); |
| | | lambdaQueryWrapper.like(StrUtil.isNotBlank(title), Help::getTitle, title); |
| | | lambdaQueryWrapper.like(StrUtil.isNotBlank(content), Help::getContent, content); |
| | | Page<Help> page = this.helpService.page(PageFactory.page(pageNo, pageSize), lambdaQueryWrapper); |
| | | return new SuccessResponseData<>(PageResultFactory.createPageResult(page)); |
| | | } |
| | |
| | | |
| | | <sql id="getWorkerByLineStatusAndPostType"> |
| | | toc_customer o |
| | | LEFT JOIN im_user_status im ON o.customer_id = im.userid |
| | | LEFT JOIN im_user_status ius ON o.customer_id = ius.userid |
| | | <where> |
| | | AND o.status_flag = 1 |
| | | <if test="lineStatus != null and lineStatus != ''"> |
| | | AND im.`status` = #{lineStatus} |
| | | AND ius.`status` = #{lineStatus} |
| | | </if> |
| | | <if test="postType != null"> |
| | | AND FIND_IN_SET( #{postType}, post_types ) |
| | |
| | | |
| | | <select id="randomWorkerByLineStatusAndPostNeWorkerId" resultType="cn.stylefeng.roses.kernel.customer.modular.entity.Customer"> |
| | | SELECT customer_id FROM toc_customer o |
| | | LEFT JOIN im_user_status im ON o.customer_id = im.userid |
| | | LEFT JOIN im_user_status ius ON o.customer_id = ius.userid |
| | | <where> |
| | | AND o.status_flag = 1 |
| | | <if test="lineStatus != null and lineStatus != ''"> |
| | | AND im.`status` = #{lineStatus} |
| | | AND ius.`status` = #{lineStatus} |
| | | </if> |
| | | <if test="postType != null"> |
| | | AND FIND_IN_SET( #{postType}, post_types ) |
| | |
| | | <if test="postId != null"> |
| | | AND FIND_IN_SET( #{postId}, post_ids ) |
| | | </if> |
| | | <if test="workStatus != null"> |
| | | AND o.work_status = #{workStatus} |
| | | </if> |
| | | <if test="eqWorkerIdList != null and eqWorkerIdList.size != 0"> |
| | | AND o.customer_id IN |
| | | <foreach collection="eqWorkerIdList" item="item" open="(" separator="," close=")"> |