Browse Source

移动端议题项目模块接口BUG修改

dev
liuchuang 6 years ago
parent
commit
3c85eee974
  1. 4
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiCommentController.java
  2. 3
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/comment/EventCommentDao.xml
  3. 38
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/issue/IssueDao.xml
  4. 35
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml

4
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiCommentController.java

@ -30,7 +30,7 @@ public class ApiCommentController {
* @return
*/
@PostMapping("submit")
public Result submit(@LoginUser TokenDto userDetail, CommentFormDTO commentFormDTO) {
public Result submit(@LoginUser TokenDto userDetail, @RequestBody CommentFormDTO commentFormDTO) {
return commentService.submit(userDetail,commentFormDTO);
}
@ -38,7 +38,7 @@ public class ApiCommentController {
* 评论/
*/
@PostMapping("statement")
public Result statement(@LoginUser TokenDto userDetail, CommentStatementFormDTO commentStatementFormDTO) {
public Result statement(@LoginUser TokenDto userDetail, @RequestBody CommentStatementFormDTO commentStatementFormDTO) {
return commentService.statement(userDetail,commentStatementFormDTO);
}
/**

3
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/comment/EventCommentDao.xml

@ -163,10 +163,9 @@
WHERE
comm.DEL_FLAG = '0'
AND comm.EVENT_ID = #{eventId}
GROUP BY
comm.ID
ORDER BY
statementNum DESC
LIMIT 1
</select>
</mapper>

38
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/issue/IssueDao.xml

@ -184,22 +184,36 @@
LEFT JOIN epdc_event_category cate ON issue.ISSUE_CATEGORY_ID = cate.id
AND cate.DEL_FLAG = '0'
WHERE
issue.DEL_FLAG = '0'
AND (issue.ISSUE_STATE = 0 OR issue.ISSUE_STATE = 2)
AND issue.GRID_ID = #{deptId}
<![CDATA[ AND DATE_FORMAT(issue.DISTRIBUTE_TIME,'%Y-%m-%d %H:%i:%s') >= ]]> #{someMonthsAgo}
<![CDATA[ AND DATE_FORMAT(issue.DISTRIBUTE_TIME,'%Y-%m-%d %H:%i:%s') <= ]]> #{timestamp}
<if test='searchContent != null and searchContent != ""'>
AND issue.ISSUE_CONTENT LIKE CONCAT('%',#{searchContent},'%')
</if>
<if test='categoryId != null and categoryId != ""'>
AND issue.ISSUE_CATEGORY_ID = #{categoryId}
</if>
issue.ID IN (
SELECT temp.ID FROM (
SELECT
t1.id
FROM
epdc_issue t1
LEFT JOIN epdc_events t2
ON t1.EVENT_ID = t2.ID
AND t2.DEL_FLAG = '0'
WHERE t1.DEL_FLAG = '0'
AND t1.ISSUE_STATE IN ( 0, 2 )
AND t1.GRID_ID = #{deptId}
<![CDATA[ AND DATE_FORMAT(t1.DISTRIBUTE_TIME,'%Y-%m-%d %H:%i:%s') >= ]]> #{someMonthsAgo}
<![CDATA[ AND DATE_FORMAT(t1.DISTRIBUTE_TIME,'%Y-%m-%d %H:%i:%s') <= ]]> #{timestamp}
<if test='searchContent != null and searchContent != ""'>
AND t1.ISSUE_CONTENT LIKE CONCAT('%',#{searchContent},'%')
</if>
<if test='categoryId != null and categoryId != ""'>
AND t1.ISSUE_CATEGORY_ID = #{categoryId}
</if>
ORDER BY
<if test='orderType == "1"'>( t2.APPROVE_NUM + t2.OPPOSE_NUM + t2.COMMENT_NUM + t2.BROWSE_NUM ) DESC,</if>
t1.DISTRIBUTE_TIME DESC
LIMIT #{pageIndex},#{pageSize}
) temp
)
ORDER BY
<if test='orderType == "1"'>statementNum DESC,</if>
issue.DISTRIBUTE_TIME DESC,
img.CREATED_TIME
LIMIT #{pageIndex},#{pageSize}
</select>
<resultMap id="issueDetailMap" type="com.elink.esua.epdc.dto.issue.result.IssueDetailResultDTO">

35
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml

@ -75,20 +75,33 @@
AND hp.DEL_FLAG = '0'
AND hp.CREATED_TIME = ( SELECT MAX( a.CREATED_TIME ) FROM epdc_item_handle_process a WHERE a.DEL_FLAG = '0' AND a.ITEM_ID = hp.ITEM_ID )
WHERE
item.DEL_FLAG = '0'
AND item.GRID_ID = #{deptId}
<![CDATA[ AND DATE_FORMAT(item.CREATED_TIME,'%Y-%m-%d %H:%i:%s') >= ]]> #{someMonthsAgo}
<![CDATA[ AND DATE_FORMAT(item.CREATED_TIME,'%Y-%m-%d %H:%i:%s') <= ]]> #{timestamp}
<if test='searchContent != null and searchContent != ""'>
AND item.ITEM_CONTENT LIKE CONCAT('%',#{searchContent},'%')
</if>
<if test='categoryId != null and categoryId != ""'>
AND item.ISSUE_CATEGORY_ID = #{categoryId}
</if>
item.ID IN (
SELECT temp.ID FROM (
SELECT
t1.id
FROM
epdc_item t1
LEFT JOIN epdc_events t2
ON t1.EVENT_ID = t2.ID
AND t2.DEL_FLAG = '0'
WHERE t1.DEL_FLAG = '0'
AND t1.GRID_ID = #{deptId}
<![CDATA[ AND DATE_FORMAT(t1.CREATED_TIME,'%Y-%m-%d %H:%i:%s') >= ]]> #{someMonthsAgo}
<![CDATA[ AND DATE_FORMAT(t1.CREATED_TIME,'%Y-%m-%d %H:%i:%s') <= ]]> #{timestamp}
<if test='searchContent != null and searchContent != ""'>
AND t1.ITEM_CONTENT LIKE CONCAT('%',#{searchContent},'%')
</if>
<if test='categoryId != null and categoryId != ""'>
AND t1.ISSUE_CATEGORY_ID = #{categoryId}
</if>
ORDER BY
t1.CREATED_TIME DESC
LIMIT #{pageIndex},#{pageSize}
) temp
)
ORDER BY
item.CREATED_TIME DESC,
img.CREATED_TIME
LIMIT #{pageIndex},#{pageSize}
</select>
<resultMap id="itemDetailMap" type="com.elink.esua.epdc.dto.item.result.ItemDetailResultDTO">

Loading…
Cancel
Save