Commit a1741649 by 阳浪

4.21bug优化

parent b6700978
......@@ -9,6 +9,7 @@ import com.yizhi.core.application.context.ContextHolder;
import com.yizhi.core.application.context.RequestContext;
import com.yizhi.system.application.system.remote.AccountClient;
import com.yizhi.system.application.vo.AccountVO;
import com.yizhi.training.application.constant.ProjectConstant;
import com.yizhi.training.application.domain.TpComment;
import com.yizhi.training.application.domain.TpCommentReply;
import com.yizhi.training.application.service.ITpCommentReplyService;
......@@ -72,8 +73,9 @@ public class TpCommentController {
// tpComment.setContent(StringEscapeUtils.escapeJava(tpComment.getContent()));
TpComment tp=new TpComment();
if(Objects.equals(tpComment.getBizType(),2)){
tpComment.setAuditStatus("1");
tpComment.setState(1);
}
tpComment.setAuditStatus(ProjectConstant.COMMENT_AUDIT_STATUS_UP.toString());
BeanUtils.copyProperties(tpComment,tp);
Boolean f = iTpCommentService.insert(tp);
return f;
......@@ -105,14 +107,15 @@ public class TpCommentController {
}
List<Long> ids = page.getRecords().stream().map(PageCommentVo::getId).collect(Collectors.toList());
TpCommentReply reply = new TpCommentReply();
if (type != 0) {
reply.setState(0);
}
reply.setAuditStatus("0");
EntityWrapper<TpCommentReply> wrapper = new EntityWrapper<TpCommentReply>(reply);
List<String> list = new ArrayList<String>();
list.add("createTime");
wrapper.in("tp_comment_id",ids);
if (type != 0) {
reply.setState(0);
wrapper.and("state = {0} or create_by_id = {1}",0,ContextHolder.get().getAccountId());
}
wrapper.orderDesc(list);
List<TpCommentReply> replies = iTpCommentReplyService.selectList(wrapper);
......
......@@ -132,7 +132,7 @@
AND c.biz_type=#{bizType}
</if>
<if test="type != 0 ">
and c.state=0
and (c.state=0 or c.`create_by_id` = #{accountId})
</if>
GROUP BY
c.`id`
......@@ -203,7 +203,7 @@
AND c.biz_type=#{bizType}
</if>
<if test="type != 0 ">
and c.state=0
and (c.state=0 or c.`create_by_id` = #{accountId})
</if>
GROUP BY
c.`id`
......
......@@ -165,7 +165,20 @@
</if>
</where>
GROUP BY tp.id
GROUP BY tp.id,
tp.id,
tp.`logo_img`,
tp.`name`,
tp.`start_time`,
tp.`end_time`,
tp.status,
tp.visible_range,
tp.enable_enroll,
tp.enable_sign,
tp.enable_queue,
enroll.actual_price,
enroll.original_price,
enroll.enable_pay
ORDER BY tp.`create_time` DESC
</select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment