fixbug unread notice

master
kira 6 years ago
parent 1aabaa91ad
commit 3b388a57b2

@ -1160,6 +1160,7 @@ public class RetailAppServiceImp implements RetailAppService {
JSONObject unReadParams = new JSONObject();
unReadParams.put("client_id", client_id);
unReadParams.put("status", 0);
unReadParams.put("is_to_app",0);
int counts = noticePartnerMapper.countNoticePartner(unReadParams);
notice.put("unReadCounts", counts);
notice.put("type", "notice");

@ -28,4 +28,12 @@
LEFT JOIN sys_accounts a ON a.account_id = nc.read_id
WHERE nc.status = '1' AND nc.notice_id = #{notice_id}
</select>
<select id="countNoticePartner" resultType="int">
select count(*) from sys_notice_client c left join sys_notice n on n.notice_id = c.notice_id
where c.`status` = #{status} and c.client_id = #{client_id}
<if test="is_to_app!=null">
and n.is_to_app=#{is_to_app}
</if>
</select>
</mapper>
Loading…
Cancel
Save