问答中心增加校验,如果是提问人或回答人可看全部数据,如不是只能看归档数据
This commit is contained in:
@@ -266,5 +266,41 @@
|
||||
order by QUESTION_TIME desc
|
||||
</select>
|
||||
|
||||
<select id="selectByRId" resultType="java.lang.String">
|
||||
SELECT reply.ANSWERER
|
||||
FROM reply
|
||||
LEFT JOIN ts_user t2 ON t2.USID = reply.ANSWERER
|
||||
<where>
|
||||
<if test="id != null and id !=''">
|
||||
AND reply.ASK_ID = #{id}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBYAQId" resultType="java.lang.String">
|
||||
SELECT ask_questions.QUESTIONER
|
||||
FROM ask_questions
|
||||
LEFT JOIN ts_user t2 ON t2.USID = ask_questions.QUESTIONER
|
||||
left join reply on reply.ASK_ID = ask_questions.ID
|
||||
<where>
|
||||
<if test="id != null and id !=''">
|
||||
AND reply.ASK_ID = #{id}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getAskQuestionsById" 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
|
||||
FROM reply
|
||||
LEFT JOIN ts_user t2 ON t2.USID = reply.ANSWERER
|
||||
<where>
|
||||
<if test="id !=null and id !=''">
|
||||
AND reply.ASK_ID = #{id}
|
||||
</if>
|
||||
AND reply.state = '1'
|
||||
</where>
|
||||
order by reply.REPLY_TIME
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user