diff --git a/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/WechatAppletController.java b/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/WechatAppletController.java index 21bf9cafb..5680b9efa 100644 --- a/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/WechatAppletController.java +++ b/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/WechatAppletController.java @@ -849,7 +849,7 @@ public class WechatAppletController extends BaseController { } /** - * 获取个人中心数据(健康宣言、消息条数、打卡社区总打卡次数、打卡次数) + * 获取个人中心数据(健康宣言、消息条数、打卡社区总打卡次数、打卡次数、提交反馈数量) * * @return */ @@ -876,10 +876,13 @@ public class WechatAppletController extends BaseController { SysWxUserLog sysWxUserLog = new SysWxUserLog(); sysWxUserLog.setCustomerId(Long.parseLong(cusId)); int punchNum = sysWxUserLogService.getPunchTotalNum(sysWxUserLog); - result.put("customerPunchNum", unReadNoticeTotal); - //查询社区打卡客户数量 + result.put("customerPunchNum", punchNum); + //查询当天社区打卡客户数量 int punchCustomerNum = sysWxUserLogService.getPunchCustomerTotalNum(); result.put("punchCustomerNum", punchCustomerNum); + //查询执行反馈条数 + int topicNum = iSysServicesTopicService.getServicesTopicNum(Long.parseLong(cusId)); + result.put("submitTopicNum", topicNum); return result; } diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/mapper/SysServicesTopicMapper.java b/stdiet-custom/src/main/java/com/stdiet/custom/mapper/SysServicesTopicMapper.java index eb910321f..ee93cf6d7 100644 --- a/stdiet-custom/src/main/java/com/stdiet/custom/mapper/SysServicesTopicMapper.java +++ b/stdiet-custom/src/main/java/com/stdiet/custom/mapper/SysServicesTopicMapper.java @@ -1,6 +1,7 @@ package com.stdiet.custom.mapper; import com.stdiet.custom.domain.SysServicesTopic; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -24,4 +25,11 @@ public interface SysServicesTopicMapper { List<SysServicesTopic> selectUnreadTopicCount(List<SysServicesTopic> topics); List<SysServicesTopic> selectTopicListByUid(SysServicesTopic topic); + + /** + * 根据客户ID查询总共提交反馈意见数量 + * @param cusId 客户ID + * @return + */ + int getServicesTopicNum(@Param("cusId")Long cusId); } diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/service/ISysServicesTopicService.java b/stdiet-custom/src/main/java/com/stdiet/custom/service/ISysServicesTopicService.java index e8059405e..4a24aa401 100644 --- a/stdiet-custom/src/main/java/com/stdiet/custom/service/ISysServicesTopicService.java +++ b/stdiet-custom/src/main/java/com/stdiet/custom/service/ISysServicesTopicService.java @@ -23,4 +23,11 @@ public interface ISysServicesTopicService { List<SysServicesTopic> selectUnreadTopicCount(List<SysServicesTopic> topic); List<SysServicesTopic> selectTopicListByUid(SysServicesTopic topic); + + /** + * 根据客户ID查询总共提交反馈意见数量 + * @param cusId 客户ID + * @return + */ + int getServicesTopicNum(Long cusId); } diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysServicesTopicServiceImp.java b/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysServicesTopicServiceImp.java index c8f2836e2..898a18a29 100644 --- a/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysServicesTopicServiceImp.java +++ b/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysServicesTopicServiceImp.java @@ -219,4 +219,14 @@ public class SysServicesTopicServiceImp implements ISysServicesTopicService { public List<SysServicesTopic> selectTopicListByUid(SysServicesTopic topic) { return servicesTopicMapper.selectTopicListByUid(topic); } + + /** + * 根据客户ID查询总共提交反馈意见数量 + * @param cusId 客户ID + * @return + */ + @Override + public int getServicesTopicNum(Long cusId){ + return servicesTopicMapper.getServicesTopicNum(cusId); + } } diff --git a/stdiet-custom/src/main/resources/mapper/custom/SysServicesTopicMapper.xml b/stdiet-custom/src/main/resources/mapper/custom/SysServicesTopicMapper.xml index 272a804dc..404f0c8e8 100644 --- a/stdiet-custom/src/main/resources/mapper/custom/SysServicesTopicMapper.xml +++ b/stdiet-custom/src/main/resources/mapper/custom/SysServicesTopicMapper.xml @@ -320,4 +320,9 @@ </choose> </foreach> </select> + + <!-- 根据客户ID查询总共提交反馈意见数量 --> + <select id="getServicesTopicNum" parameterType="Long" resultType="int"> + select count(1) from sys_services_topic where del_flag = 0 and uid = #{cusId} + </select> </mapper> \ No newline at end of file diff --git a/stdiet-custom/src/main/resources/mapper/custom/SysWxUserLogMapper.xml b/stdiet-custom/src/main/resources/mapper/custom/SysWxUserLogMapper.xml index 7e526d82a..faed261e5 100644 --- a/stdiet-custom/src/main/resources/mapper/custom/SysWxUserLogMapper.xml +++ b/stdiet-custom/src/main/resources/mapper/custom/SysWxUserLogMapper.xml @@ -364,9 +364,9 @@ where wxlog.del_flag = 0 and wxinfo.cus_id = #{customerId} </select> - <!-- 查询打卡社区总共几个人在打卡 --> + <!-- 查询当天打卡社区总共几个人在打卡 --> <select id="getPunchCustomerTotalNum" resultType="int"> - select count(1) from (select openid from sys_wx_user_log wxlog where wxlog.del_flag = 0 group by openid) num_table + select count(wxlog.openid) from sys_wx_user_log wxlog where wxlog.del_flag = 0 and to_days(log_time) = to_days(now()) </select>