master
parent
668d375836
commit
2ba21016d6
@ -1,7 +1,14 @@
|
|||||||
package com.zh.project0512.mapper;
|
package com.zh.project0512.mapper;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.zh.project0512.model.AppMessage;
|
import com.zh.project0512.model.AppMessage;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
public interface AppMessageMapper extends BaseMapper<AppMessage> {
|
public interface AppMessageMapper extends BaseMapper<AppMessage> {
|
||||||
|
@Select("SELECT IFNULL(SUM(settled = 0),0) as unSettledNum,IFNULL(SUM(settled = 1),0) as settledNum,IFNULL(SUM(settled in (0,1)),0) as total\n" +
|
||||||
|
"FROM appMessage as t1\n" +
|
||||||
|
"LEFT JOIN user as t2 on t1.receiverId = t2.id\n" +
|
||||||
|
"WHERE settled = 0 and t2.openid =#{openid}")
|
||||||
|
JSONObject countUnsettledMsg(String openid);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in new issue