问答中心增加校验,如果是提问人或回答人可看全部数据,如不是只能看归档数据

This commit is contained in:
SUNJIABIN
2023-04-10 20:22:35 +08:00
parent 97b086509a
commit c32f8c6cf4
4 changed files with 19 additions and 4 deletions
@@ -74,7 +74,7 @@
</select>
<select id="getAskQuestionsByakId" resultType="com.adc.da.slrs.StandardQA.entity.Reply">
SELECT reply.ID, reply.REPLY,reply.REPLY_TIME,t2.UNAME ANSWERER,reply.APPENDIX_ID,APPENDIX_NAME,reply.state
SELECT reply.ID, reply.REPLY,reply.REPLY_TIME,t2.UNAME as ANSWERER,t2.USID as `answererId`,reply.APPENDIX_ID,APPENDIX_NAME,reply.state
FROM reply
LEFT JOIN ts_user t2 ON t2.USID = reply.ANSWERER
<where>
@@ -274,6 +274,7 @@
<if test="id != null and id !=''">
AND reply.ASK_ID = #{id}
</if>
limit 1
</where>
</select>
@@ -286,6 +287,7 @@
<if test="id != null and id !=''">
AND reply.ASK_ID = #{id}
</if>
limit 1
</where>
</select>
@@ -297,7 +299,7 @@
<if test="id !=null and id !=''">
AND reply.ASK_ID = #{id}
</if>
AND reply.state = '1'
AND reply.state = 'yes'
</where>
order by reply.REPLY_TIME
</select>