|
@@ -31,19 +31,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
|
<select id="selectEquityMessageRecordList" resultType="com.ruoyi.equity.domain.vo.EquityMessageRecordVO">
|
|
|
- select * from e_equity_message_record
|
|
|
- where user_id = #{userId} and del_flag = '0'
|
|
|
+ select * ,(select vote_status from e_send_message_record esmr where eemr.send_id =esmr.send_message_id ) as voteStatus
|
|
|
+ from e_equity_message_record eemr
|
|
|
+ where eemr.user_id = #{userId} and eemr.del_flag = '0'
|
|
|
<if test="emr.msgType != null and emr.msgType != ''"> and msg_type = #{emr.msgType}</if>
|
|
|
|
|
|
<if test="emr.selectDate != null and emr.selectDate != ''">
|
|
|
- and msg_time >= DATE(#{emr.selectDate})
|
|
|
+ and eemr.msg_time >= DATE(#{emr.selectDate})
|
|
|
</if>
|
|
|
<if test="emr.selectDate != null and emr.selectDate != ''">
|
|
|
- and msg_time < DATE(DATE_ADD(#{emr.selectDate}, INTERVAL 1 DAY))
|
|
|
+ and eemr.msg_time < DATE(DATE_ADD(#{emr.selectDate}, INTERVAL 1 DAY))
|
|
|
</if>
|
|
|
|
|
|
<if test="emr.isRead != null and emr.isRead != ''">
|
|
|
- and is_read =
|
|
|
+ and eemr.is_read =
|
|
|
<choose>
|
|
|
<when test="emr.isRead == '未读'">0</when>
|
|
|
<when test="emr.isRead == '已读'">1</when>
|
|
@@ -52,7 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<otherwise>null</otherwise>
|
|
|
</choose>
|
|
|
</if>
|
|
|
- order by create_time desc
|
|
|
+ order by eemr.create_time desc
|
|
|
<!-- <if test="userId != null and userId != ''"> and user_id = #{userId}</if>-->
|
|
|
<!-- <if test="msgContent != null and msgContent != ''"> and msg_content = #{msgContent}</if>-->
|
|
|
</select>
|