commit
e29135db3a
stdiet-admin/src/main/java/com/stdiet/web/controller/custom
stdiet-custom/src/main
java/com/stdiet/custom
domain
dto/response
mapper
service
resources/mapper/custom
@ -77,6 +77,9 @@ public class WechatAppletController extends BaseController {
|
||||
@Autowired
|
||||
private ISysWxBannerImageService sysWxBannerImageService;
|
||||
|
||||
@Autowired
|
||||
private ISysPunchThumbsupService sysPunchThumbsupService;
|
||||
|
||||
/**
|
||||
* 查询微信小程序中展示的客户案例
|
||||
*/
|
||||
@ -794,11 +797,39 @@ public class WechatAppletController extends BaseController {
|
||||
for (CommunityPunchReponse comm : list) {
|
||||
comm.setId(AesUtils.encrypt(comm.getId()));
|
||||
comm.setCusId(AesUtils.encrypt(comm.getCusId()));
|
||||
comm.setThumbsupNum(comm.getThumbsupOpenid() != null ? comm.getThumbsupOpenid().size() : 0);
|
||||
}
|
||||
}
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 打卡社区点赞
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/thumbsupPunch")
|
||||
public AjaxResult getCommunityPunch(@RequestBody SysPunchThumbsup sysPunchThumbsup) {
|
||||
if(StringUtils.isEmpty(sysPunchThumbsup.getCusOpenid(),sysPunchThumbsup.getEncPunchId()) || sysPunchThumbsup.getThumbsupFlag() == null){
|
||||
return AjaxResult.error("缺少必要参数");
|
||||
}
|
||||
sysPunchThumbsup.setPunchId(Long.parseLong(AesUtils.decrypt(sysPunchThumbsup.getEncPunchId())));
|
||||
|
||||
SysPunchThumbsup existPunchThumbsup = sysPunchThumbsupService.getThumbsupByPunchIdAndOpenid(sysPunchThumbsup);
|
||||
if(existPunchThumbsup != null && sysPunchThumbsup.getThumbsupFlag()){
|
||||
return AjaxResult.error("已点过暂,无法重复点赞");
|
||||
}
|
||||
if(existPunchThumbsup == null && !sysPunchThumbsup.getThumbsupFlag()){
|
||||
return AjaxResult.error("还未未点赞,无法取消点赞");
|
||||
}
|
||||
int row = 0;
|
||||
try{
|
||||
row = sysPunchThumbsup.getThumbsupFlag() ? sysPunchThumbsupService.insertSysPunchThumbsup(sysPunchThumbsup) : sysPunchThumbsupService.deleteThumbsupByPunchIdAndOpenid(sysPunchThumbsup);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return toAjax(row);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改健康减脂宣言
|
||||
@ -818,7 +849,7 @@ public class WechatAppletController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取个人中心数据(健康宣言、消息条数、打卡社区总打卡次数、打卡次数)
|
||||
* 获取个人中心数据(健康宣言、消息条数、打卡社区总打卡次数、打卡次数、提交反馈数量)
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ -845,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;
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,36 @@
|
||||
package com.stdiet.custom.domain;
|
||||
|
||||
import com.stdiet.common.annotation.Excel;
|
||||
import com.stdiet.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 打卡社区点赞记录对象 sys_punch_thumbsup
|
||||
*
|
||||
* @author xzj
|
||||
* @date 2021-07-15
|
||||
*/
|
||||
@Data
|
||||
public class SysPunchThumbsup extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 打卡记录ID */
|
||||
@Excel(name = "打卡记录ID")
|
||||
private Long punchId;
|
||||
|
||||
private String encPunchId;
|
||||
|
||||
/** 客户微信openid */
|
||||
@Excel(name = "客户微信openid")
|
||||
private String cusOpenid;
|
||||
|
||||
/** 删除标识 0未删除 1已删除 */
|
||||
private Integer delFlag;
|
||||
|
||||
//操作标识 true点赞 false取消点赞
|
||||
private Boolean thumbsupFlag;
|
||||
}
|
@ -67,4 +67,9 @@ public class CommunityPunchReponse {
|
||||
* 近期打卡体重信息 logTime: 打卡日期 weight: 体重
|
||||
*/
|
||||
private List<Map<String,Object>> recentWeight;
|
||||
|
||||
/**
|
||||
* 点赞的openid
|
||||
*/
|
||||
private List<Map<String,Object>> thumbsupOpenid;
|
||||
}
|
||||
|
@ -0,0 +1,74 @@
|
||||
package com.stdiet.custom.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.stdiet.custom.domain.SysPunchThumbsup;
|
||||
|
||||
/**
|
||||
* 打卡社区点赞记录Mapper接口
|
||||
*
|
||||
* @author xzj
|
||||
* @date 2021-07-15
|
||||
*/
|
||||
public interface SysPunchThumbsupMapper
|
||||
{
|
||||
/**
|
||||
* 查询打卡社区点赞记录
|
||||
*
|
||||
* @param id 打卡社区点赞记录ID
|
||||
* @return 打卡社区点赞记录
|
||||
*/
|
||||
public SysPunchThumbsup selectSysPunchThumbsupById(Long id);
|
||||
|
||||
/**
|
||||
* 查询打卡社区点赞记录列表
|
||||
*
|
||||
* @param sysPunchThumbsup 打卡社区点赞记录
|
||||
* @return 打卡社区点赞记录集合
|
||||
*/
|
||||
public List<SysPunchThumbsup> selectSysPunchThumbsupList(SysPunchThumbsup sysPunchThumbsup);
|
||||
|
||||
/**
|
||||
* 新增打卡社区点赞记录
|
||||
*
|
||||
* @param sysPunchThumbsup 打卡社区点赞记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysPunchThumbsup(SysPunchThumbsup sysPunchThumbsup);
|
||||
|
||||
/**
|
||||
* 修改打卡社区点赞记录
|
||||
*
|
||||
* @param sysPunchThumbsup 打卡社区点赞记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysPunchThumbsup(SysPunchThumbsup sysPunchThumbsup);
|
||||
|
||||
/**
|
||||
* 删除打卡社区点赞记录
|
||||
*
|
||||
* @param id 打卡社区点赞记录ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysPunchThumbsupById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除打卡社区点赞记录
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysPunchThumbsupByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 根据punchId和openid删除对应点赞记录
|
||||
* @return
|
||||
*/
|
||||
public int deleteThumbsupByPunchIdAndOpenid(SysPunchThumbsup sysPunchThumbsup);
|
||||
|
||||
/**
|
||||
* 根据punchId、openid查询点赞记录
|
||||
* @param sysPunchThumbsup
|
||||
* @return
|
||||
*/
|
||||
SysPunchThumbsup getThumbsupByPunchIdAndOpenid(SysPunchThumbsup sysPunchThumbsup);
|
||||
}
|
@ -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);
|
||||
}
|
||||
|
@ -0,0 +1,74 @@
|
||||
package com.stdiet.custom.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.stdiet.custom.domain.SysPunchThumbsup;
|
||||
|
||||
/**
|
||||
* 打卡社区点赞记录Service接口
|
||||
*
|
||||
* @author xzj
|
||||
* @date 2021-07-15
|
||||
*/
|
||||
public interface ISysPunchThumbsupService
|
||||
{
|
||||
/**
|
||||
* 查询打卡社区点赞记录
|
||||
*
|
||||
* @param id 打卡社区点赞记录ID
|
||||
* @return 打卡社区点赞记录
|
||||
*/
|
||||
public SysPunchThumbsup selectSysPunchThumbsupById(Long id);
|
||||
|
||||
/**
|
||||
* 查询打卡社区点赞记录列表
|
||||
*
|
||||
* @param sysPunchThumbsup 打卡社区点赞记录
|
||||
* @return 打卡社区点赞记录集合
|
||||
*/
|
||||
public List<SysPunchThumbsup> selectSysPunchThumbsupList(SysPunchThumbsup sysPunchThumbsup);
|
||||
|
||||
/**
|
||||
* 新增打卡社区点赞记录
|
||||
*
|
||||
* @param sysPunchThumbsup 打卡社区点赞记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysPunchThumbsup(SysPunchThumbsup sysPunchThumbsup);
|
||||
|
||||
/**
|
||||
* 修改打卡社区点赞记录
|
||||
*
|
||||
* @param sysPunchThumbsup 打卡社区点赞记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysPunchThumbsup(SysPunchThumbsup sysPunchThumbsup);
|
||||
|
||||
/**
|
||||
* 批量删除打卡社区点赞记录
|
||||
*
|
||||
* @param ids 需要删除的打卡社区点赞记录ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysPunchThumbsupByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除打卡社区点赞记录信息
|
||||
*
|
||||
* @param id 打卡社区点赞记录ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysPunchThumbsupById(Long id);
|
||||
|
||||
/**
|
||||
* 根据punchId和openid删除对应点赞记录
|
||||
* @return
|
||||
*/
|
||||
public int deleteThumbsupByPunchIdAndOpenid(SysPunchThumbsup sysPunchThumbsup);
|
||||
|
||||
/**
|
||||
* 根据punchId、openid查询点赞记录
|
||||
* @param sysPunchThumbsup
|
||||
* @return
|
||||
*/
|
||||
SysPunchThumbsup getThumbsupByPunchIdAndOpenid(SysPunchThumbsup sysPunchThumbsup);
|
||||
}
|
@ -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);
|
||||
}
|
||||
|
115
stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysPunchThumbsupServiceImpl.java
Normal file
115
stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysPunchThumbsupServiceImpl.java
Normal file
@ -0,0 +1,115 @@
|
||||
package com.stdiet.custom.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.stdiet.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.stdiet.custom.mapper.SysPunchThumbsupMapper;
|
||||
import com.stdiet.custom.domain.SysPunchThumbsup;
|
||||
import com.stdiet.custom.service.ISysPunchThumbsupService;
|
||||
|
||||
/**
|
||||
* 打卡社区点赞记录Service业务层处理
|
||||
*
|
||||
* @author xzj
|
||||
* @date 2021-07-15
|
||||
*/
|
||||
@Service
|
||||
public class SysPunchThumbsupServiceImpl implements ISysPunchThumbsupService
|
||||
{
|
||||
@Autowired
|
||||
private SysPunchThumbsupMapper sysPunchThumbsupMapper;
|
||||
|
||||
/**
|
||||
* 查询打卡社区点赞记录
|
||||
*
|
||||
* @param id 打卡社区点赞记录ID
|
||||
* @return 打卡社区点赞记录
|
||||
*/
|
||||
@Override
|
||||
public SysPunchThumbsup selectSysPunchThumbsupById(Long id)
|
||||
{
|
||||
return sysPunchThumbsupMapper.selectSysPunchThumbsupById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询打卡社区点赞记录列表
|
||||
*
|
||||
* @param sysPunchThumbsup 打卡社区点赞记录
|
||||
* @return 打卡社区点赞记录
|
||||
*/
|
||||
@Override
|
||||
public List<SysPunchThumbsup> selectSysPunchThumbsupList(SysPunchThumbsup sysPunchThumbsup)
|
||||
{
|
||||
return sysPunchThumbsupMapper.selectSysPunchThumbsupList(sysPunchThumbsup);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增打卡社区点赞记录
|
||||
*
|
||||
* @param sysPunchThumbsup 打卡社区点赞记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSysPunchThumbsup(SysPunchThumbsup sysPunchThumbsup)
|
||||
{
|
||||
sysPunchThumbsup.setCreateTime(DateUtils.getNowDate());
|
||||
return sysPunchThumbsupMapper.insertSysPunchThumbsup(sysPunchThumbsup);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改打卡社区点赞记录
|
||||
*
|
||||
* @param sysPunchThumbsup 打卡社区点赞记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSysPunchThumbsup(SysPunchThumbsup sysPunchThumbsup)
|
||||
{
|
||||
sysPunchThumbsup.setUpdateTime(DateUtils.getNowDate());
|
||||
return sysPunchThumbsupMapper.updateSysPunchThumbsup(sysPunchThumbsup);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除打卡社区点赞记录
|
||||
*
|
||||
* @param ids 需要删除的打卡社区点赞记录ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSysPunchThumbsupByIds(Long[] ids)
|
||||
{
|
||||
return sysPunchThumbsupMapper.deleteSysPunchThumbsupByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除打卡社区点赞记录信息
|
||||
*
|
||||
* @param id 打卡社区点赞记录ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSysPunchThumbsupById(Long id)
|
||||
{
|
||||
return sysPunchThumbsupMapper.deleteSysPunchThumbsupById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据punchId和openid删除对应点赞记录
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public int deleteThumbsupByPunchIdAndOpenid(SysPunchThumbsup sysPunchThumbsup){
|
||||
return sysPunchThumbsupMapper.deleteThumbsupByPunchIdAndOpenid(sysPunchThumbsup);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据punchId、openid查询点赞记录
|
||||
* @param sysPunchThumbsup
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public SysPunchThumbsup getThumbsupByPunchIdAndOpenid(SysPunchThumbsup sysPunchThumbsup){
|
||||
return sysPunchThumbsupMapper.getThumbsupByPunchIdAndOpenid(sysPunchThumbsup);
|
||||
}
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.stdiet.custom.mapper.SysPunchThumbsupMapper">
|
||||
|
||||
<resultMap type="SysPunchThumbsup" id="SysPunchThumbsupResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="punchId" column="punch_id" />
|
||||
<result property="cusOpenid" column="cus_openid" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysPunchThumbsupVo">
|
||||
select id, punch_id, cus_openid, create_time, update_time, del_flag from sys_punch_thumbsup
|
||||
</sql>
|
||||
|
||||
<select id="selectSysPunchThumbsupList" parameterType="SysPunchThumbsup" resultMap="SysPunchThumbsupResult">
|
||||
<include refid="selectSysPunchThumbsupVo"/> where del_flag = 0
|
||||
</select>
|
||||
|
||||
<select id="selectSysPunchThumbsupById" parameterType="Long" resultMap="SysPunchThumbsupResult">
|
||||
<include refid="selectSysPunchThumbsupVo"/>
|
||||
where id = #{id} and del_flag = 0
|
||||
</select>
|
||||
|
||||
<insert id="insertSysPunchThumbsup" parameterType="SysPunchThumbsup" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sys_punch_thumbsup
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="punchId != null">punch_id,</if>
|
||||
<if test="cusOpenid != null">cus_openid,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="punchId != null">#{punchId},</if>
|
||||
<if test="cusOpenid != null">#{cusOpenid},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysPunchThumbsup" parameterType="SysPunchThumbsup">
|
||||
update sys_punch_thumbsup
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="punchId != null">punch_id = #{punchId},</if>
|
||||
<if test="cusOpenid != null">cus_openid = #{cusOpenid},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteSysPunchThumbsupById" parameterType="Long">
|
||||
update sys_punch_thumbsup set del_flag = 1 where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteSysPunchThumbsupByIds" parameterType="String">
|
||||
update sys_punch_thumbsup set del_flag = 1 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<update id="deleteThumbsupByPunchIdAndOpenid" parameterType="SysPunchThumbsup">
|
||||
update sys_punch_thumbsup set del_flag = 1 where punch_id = #{punchId} and cus_openid =#{cusOpenid}
|
||||
</update>
|
||||
|
||||
<select id="getThumbsupByPunchIdAndOpenid" parameterType="SysPunchThumbsup" resultMap="SysPunchThumbsupResult">
|
||||
<include refid="selectSysPunchThumbsupVo"/> where del_flag = 0 and punch_id = #{punchId} and cus_openid =#{cusOpenid} limit 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -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>
|
@ -331,6 +331,8 @@
|
||||
<result property="healthManifesto" column="health_manifesto"/>
|
||||
<!-- 查询最近五天体重 -->
|
||||
<association property="recentWeight" column="{cusId=cus_id,logTime=log_time}" select="getRecentWeight"/>
|
||||
<!-- 查询点赞的openid -->
|
||||
<association property="thumbsupOpenid" column="id" select="getPunchThumbsupList"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 查询打卡社区内容 -->
|
||||
@ -341,6 +343,12 @@
|
||||
order by wxlog.log_time desc
|
||||
</select>
|
||||
|
||||
<!-- 查询打卡社区中点赞的openid -->
|
||||
<select id="getPunchThumbsupList" parameterType="Long" resultType="Map">
|
||||
select cus_openid as openid from sys_punch_thumbsup
|
||||
where punch_id = #{id} and del_flag = 0
|
||||
</select>
|
||||
|
||||
<!-- 查询最近一周的打卡体重 -->
|
||||
<select id="getRecentWeight" resultType="Map">
|
||||
select DATE_FORMAT(wxlog.log_time,'%Y-%m-%d') as logTime,wxlog.weight as weight from sys_wx_user_log wxlog
|
||||
@ -356,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>
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user