小程序接口优化

This commit is contained in:
xiezhijun 2021-07-16 14:22:13 +08:00
parent ac08473149
commit bf948fc88e
6 changed files with 38 additions and 5 deletions

View File

@ -849,7 +849,7 @@ public class WechatAppletController extends BaseController {
} }
/** /**
* 获取个人中心数据健康宣言消息条数打卡社区总打卡次数打卡次数 * 获取个人中心数据健康宣言消息条数打卡社区总打卡次数打卡次数提交反馈数量
* *
* @return * @return
*/ */
@ -876,10 +876,13 @@ public class WechatAppletController extends BaseController {
SysWxUserLog sysWxUserLog = new SysWxUserLog(); SysWxUserLog sysWxUserLog = new SysWxUserLog();
sysWxUserLog.setCustomerId(Long.parseLong(cusId)); sysWxUserLog.setCustomerId(Long.parseLong(cusId));
int punchNum = sysWxUserLogService.getPunchTotalNum(sysWxUserLog); int punchNum = sysWxUserLogService.getPunchTotalNum(sysWxUserLog);
result.put("customerPunchNum", unReadNoticeTotal); result.put("customerPunchNum", punchNum);
//查询社区打卡客户数量 //查询当天社区打卡客户数量
int punchCustomerNum = sysWxUserLogService.getPunchCustomerTotalNum(); int punchCustomerNum = sysWxUserLogService.getPunchCustomerTotalNum();
result.put("punchCustomerNum", punchCustomerNum); result.put("punchCustomerNum", punchCustomerNum);
//查询执行反馈条数
int topicNum = iSysServicesTopicService.getServicesTopicNum(Long.parseLong(cusId));
result.put("submitTopicNum", topicNum);
return result; return result;
} }

View File

@ -1,6 +1,7 @@
package com.stdiet.custom.mapper; package com.stdiet.custom.mapper;
import com.stdiet.custom.domain.SysServicesTopic; import com.stdiet.custom.domain.SysServicesTopic;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
@ -24,4 +25,11 @@ public interface SysServicesTopicMapper {
List<SysServicesTopic> selectUnreadTopicCount(List<SysServicesTopic> topics); List<SysServicesTopic> selectUnreadTopicCount(List<SysServicesTopic> topics);
List<SysServicesTopic> selectTopicListByUid(SysServicesTopic topic); List<SysServicesTopic> selectTopicListByUid(SysServicesTopic topic);
/**
* 根据客户ID查询总共提交反馈意见数量
* @param cusId 客户ID
* @return
*/
int getServicesTopicNum(@Param("cusId")Long cusId);
} }

View File

@ -23,4 +23,11 @@ public interface ISysServicesTopicService {
List<SysServicesTopic> selectUnreadTopicCount(List<SysServicesTopic> topic); List<SysServicesTopic> selectUnreadTopicCount(List<SysServicesTopic> topic);
List<SysServicesTopic> selectTopicListByUid(SysServicesTopic topic); List<SysServicesTopic> selectTopicListByUid(SysServicesTopic topic);
/**
* 根据客户ID查询总共提交反馈意见数量
* @param cusId 客户ID
* @return
*/
int getServicesTopicNum(Long cusId);
} }

View File

@ -219,4 +219,14 @@ public class SysServicesTopicServiceImp implements ISysServicesTopicService {
public List<SysServicesTopic> selectTopicListByUid(SysServicesTopic topic) { public List<SysServicesTopic> selectTopicListByUid(SysServicesTopic topic) {
return servicesTopicMapper.selectTopicListByUid(topic); return servicesTopicMapper.selectTopicListByUid(topic);
} }
/**
* 根据客户ID查询总共提交反馈意见数量
* @param cusId 客户ID
* @return
*/
@Override
public int getServicesTopicNum(Long cusId){
return servicesTopicMapper.getServicesTopicNum(cusId);
}
} }

View File

@ -320,4 +320,9 @@
</choose> </choose>
</foreach> </foreach>
</select> </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> </mapper>

View File

@ -364,9 +364,9 @@
where wxlog.del_flag = 0 and wxinfo.cus_id = #{customerId} where wxlog.del_flag = 0 and wxinfo.cus_id = #{customerId}
</select> </select>
<!-- 查询打卡社区总共几个人在打卡 --> <!-- 查询当天打卡社区总共几个人在打卡 -->
<select id="getPunchCustomerTotalNum" resultType="int"> <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> </select>