暂存
This commit is contained in:
parent
b1305e4e79
commit
90f79a689c
@ -76,12 +76,14 @@ public class WechatAppletController extends BaseController {
|
|||||||
private ISysServicesTopicService iSysServicesTopicService;
|
private ISysServicesTopicService iSysServicesTopicService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysVideoClassifyService sysVideoClassifyService;
|
private ISysVideoClassifyService sysVideoClassifyService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysWxBannerImageService sysWxBannerImageService;
|
private ISysWxBannerImageService sysWxBannerImageService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysPunchThumbsupService sysPunchThumbsupService;
|
private ISysPunchThumbsupService sysPunchThumbsupService;
|
||||||
|
@Autowired
|
||||||
|
private ISysCustomerHealthyService sysCustomerHealthyService;
|
||||||
|
@Autowired
|
||||||
|
private ISysCustomerPhysicalSignsService sysCustomerPhysicalSignsService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询微信小程序中展示的客户案例
|
* 查询微信小程序中展示的客户案例
|
||||||
@ -446,9 +448,20 @@ public class WechatAppletController extends BaseController {
|
|||||||
return AjaxResult.error(5001, "信息缺失或者过期需要重新登录");
|
return AjaxResult.error(5001, "信息缺失或者过期需要重新登录");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SysCustomerHealthy customerHealthy = sysCustomerHealthyService.selectSysCustomerHealthyByCustomerId(curWxUserInfo.getCusId());
|
||||||
|
if (customerHealthy == null) {
|
||||||
|
SysCustomerPhysicalSigns customerPhysicalSigns = sysCustomerPhysicalSignsService.selectSysCustomerPhysicalSignsByCusId(curWxUserInfo.getCusId());
|
||||||
|
if (customerPhysicalSigns != null) {
|
||||||
|
curWxUserInfo.setSex(customerPhysicalSigns.getSex().toString());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
curWxUserInfo.setSex(customerHealthy.getSex().toString());
|
||||||
|
}
|
||||||
|
|
||||||
curWxUserInfo.setCustomerId(AesUtils.encrypt(curWxUserInfo.getCusId().toString()));
|
curWxUserInfo.setCustomerId(AesUtils.encrypt(curWxUserInfo.getCusId().toString()));
|
||||||
curWxUserInfo.setCusId(null);
|
curWxUserInfo.setCusId(null);
|
||||||
|
|
||||||
|
|
||||||
// 并返回一系列登录后的数据
|
// 并返回一系列登录后的数据
|
||||||
return AjaxResult.success(curWxUserInfo);
|
return AjaxResult.success(curWxUserInfo);
|
||||||
}
|
}
|
||||||
@ -715,16 +728,19 @@ public class WechatAppletController extends BaseController {
|
|||||||
public TableDataInfo getCommunityPunch() {
|
public TableDataInfo getCommunityPunch() {
|
||||||
startPage();
|
startPage();
|
||||||
List<CommunityPunchReponse> list = sysWxUserLogService.getCommunityPunch(new SysWxUserLog());
|
List<CommunityPunchReponse> list = sysWxUserLogService.getCommunityPunch(new SysWxUserLog());
|
||||||
// if (list != null && list.size() > 0) {
|
|
||||||
// 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 getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@GetMapping("/getCustomerActivity")
|
||||||
|
public TableDataInfo getCustomerActivity(@RequestParam String openid){
|
||||||
|
startPage();
|
||||||
|
return getDataTable(sysWxUserLogService.getCommunityPunchByOpenid(openid));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 打卡社区点赞
|
* 打卡社区点赞
|
||||||
*
|
*
|
||||||
|
@ -3,7 +3,6 @@ package com.stdiet.custom.domain;
|
|||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.stdiet.common.annotation.Excel;
|
import com.stdiet.common.annotation.Excel;
|
||||||
import com.stdiet.common.core.domain.BaseEntity;
|
import com.stdiet.common.core.domain.BaseEntity;
|
||||||
import com.stdiet.common.utils.StringUtils;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
@ -65,6 +64,9 @@ public class SysWxUserLog extends BaseEntity {
|
|||||||
|
|
||||||
private String sportDesc;
|
private String sportDesc;
|
||||||
|
|
||||||
|
@Excel(name = "是否生理期", readConverterExp = "Y=是,N=否")
|
||||||
|
private String menstrualPeriod;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户头像
|
* 用户头像
|
||||||
*/
|
*/
|
||||||
@ -89,155 +91,126 @@ public class SysWxUserLog extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
@Excel(name = "排便情况", readConverterExp = "Y=是,N=否")
|
@Excel(name = "排便情况", readConverterExp = "Y=是,N=否")
|
||||||
private String defecation;
|
private String defecation;
|
||||||
|
|
||||||
public void setDefecation(String defecation) {
|
|
||||||
if (defecation.equals("Y") || defecation.equals("N")) {
|
|
||||||
this.defecation = defecation.equals("Y") ? "是" : "否";
|
|
||||||
// this.defecation = defecation.equals("Y") ? "顺畅" : "其他";
|
|
||||||
} else {
|
|
||||||
this.defecation = defecation;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private String defecationDesc;
|
private String defecationDesc;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 饮水量
|
* 饮水量
|
||||||
*/
|
*/
|
||||||
@Excel(name = "饮水量")
|
@Excel(name = "饮水量")
|
||||||
private Long water;
|
private Long water;
|
||||||
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
private Date logTime;
|
private Date logTime;
|
||||||
|
|
||||||
//客户ID
|
//客户ID
|
||||||
private Long customerId;
|
private Long customerId;
|
||||||
|
|
||||||
//建议
|
//建议
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 非持久化字段,客户姓名
|
* 非持久化字段,客户姓名
|
||||||
*/
|
*/
|
||||||
@Excel(name = "姓名")
|
@Excel(name = "姓名")
|
||||||
private String customerName;
|
private String customerName;
|
||||||
|
|
||||||
//营养师ID
|
//营养师ID
|
||||||
private Long nutritionistId;
|
private Long nutritionistId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 非持久化字段,营养师
|
* 非持久化字段,营养师
|
||||||
*/
|
*/
|
||||||
@Excel(name = "营养师")
|
@Excel(name = "营养师")
|
||||||
private String nutritionist;
|
private String nutritionist;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 情绪
|
* 情绪
|
||||||
*/
|
*/
|
||||||
@Excel(name = "情绪")
|
@Excel(name = "情绪")
|
||||||
private String emotion;
|
private String emotion;
|
||||||
|
|
||||||
private String emotionDesc;
|
private String emotionDesc;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 食谱之外的食物
|
* 食谱之外的食物
|
||||||
*/
|
*/
|
||||||
@Excel(name = "食谱之外的食物")
|
@Excel(name = "食谱之外的食物")
|
||||||
private String slyEatFood;
|
private String slyEatFood;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否便秘(Y是 N否)
|
* 是否便秘(Y是 N否)
|
||||||
*/
|
*/
|
||||||
@Excel(name = "是否便秘", readConverterExp = "Y=是,N=否")
|
@Excel(name = "是否便秘", readConverterExp = "Y=是,N=否")
|
||||||
private String constipation;
|
private String constipation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 食材描述
|
* 食材描述
|
||||||
*/
|
*/
|
||||||
@Excel(name = "食材描述")
|
@Excel(name = "食材描述")
|
||||||
private String ingredientDesc;
|
private String ingredientDesc;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 早餐照片
|
* 早餐照片
|
||||||
*/
|
*/
|
||||||
@Excel(name = "早餐照片")
|
@Excel(name = "早餐照片")
|
||||||
private String breakfastImages;
|
private String breakfastImages;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 午餐照片
|
* 午餐照片
|
||||||
*/
|
*/
|
||||||
@Excel(name = "午餐照片")
|
@Excel(name = "午餐照片")
|
||||||
private String lunchImages;
|
private String lunchImages;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 午餐照片
|
* 午餐照片
|
||||||
*/
|
*/
|
||||||
@Excel(name = "午餐照片")
|
@Excel(name = "午餐照片")
|
||||||
private String dinnerImages;
|
private String dinnerImages;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 加餐照片
|
* 加餐照片
|
||||||
*/
|
*/
|
||||||
@Excel(name = "加餐照片")
|
@Excel(name = "加餐照片")
|
||||||
private String extraMealImages;
|
private String extraMealImages;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 体型对比照
|
* 体型对比照
|
||||||
*/
|
*/
|
||||||
@Excel(name = "体型对比照")
|
@Excel(name = "体型对比照")
|
||||||
private String bodyImages;
|
private String bodyImages;
|
||||||
|
|
||||||
private String bodyDesc;
|
private String bodyDesc;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 服务建议
|
* 服务建议
|
||||||
*/
|
*/
|
||||||
@Excel(name = "服务建议")
|
@Excel(name = "服务建议")
|
||||||
private String suggest;
|
private String suggest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 目标体重
|
* 目标体重
|
||||||
*/
|
*/
|
||||||
@Excel(name = "目标体重")
|
@Excel(name = "目标体重")
|
||||||
private BigDecimal targetWeight;
|
private BigDecimal targetWeight;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 执行评分,五分制
|
* 执行评分,五分制
|
||||||
*/
|
*/
|
||||||
@Excel(name = "执行评分,五分制")
|
@Excel(name = "执行评分,五分制")
|
||||||
private BigDecimal executionScore;
|
private BigDecimal executionScore;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 点评
|
* 点评
|
||||||
*/
|
*/
|
||||||
@Excel(name = "点评")
|
@Excel(name = "点评")
|
||||||
private String comment;
|
private String comment;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 点赞数量
|
* 点赞数量
|
||||||
*/
|
*/
|
||||||
@Excel(name = "点赞数量")
|
@Excel(name = "点赞数量")
|
||||||
private Long thumbsupNum;
|
private Long thumbsupNum;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 健康宣言
|
* 健康宣言
|
||||||
*/
|
*/
|
||||||
@Excel(name = "健康宣言")
|
@Excel(name = "健康宣言")
|
||||||
private String healthManifesto;
|
private String healthManifesto;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除标识 0未删除 1已删除
|
* 删除标识 0未删除 1已删除
|
||||||
*/
|
*/
|
||||||
private Long delFlag;
|
private Long delFlag;
|
||||||
|
|
||||||
//售后营养师ID
|
//售后营养师ID
|
||||||
private Long afterNutritionistId;
|
private Long afterNutritionistId;
|
||||||
|
|
||||||
//售后营养师
|
//售后营养师
|
||||||
@Excel(name = "售后营养师")
|
@Excel(name = "售后营养师")
|
||||||
private String afterNutritionist;
|
private String afterNutritionist;
|
||||||
|
|
||||||
//图片预览路径
|
//图片预览路径
|
||||||
private Map<String, List<String>> imagesUrl;
|
private Map<String, List<String>> imagesUrl;
|
||||||
|
|
||||||
|
public void setDefecation(String defecation) {
|
||||||
|
if (defecation.equals("Y") || defecation.equals("N")) {
|
||||||
|
// this.defecation = defecation.equals("Y") ? "是" : "否";
|
||||||
|
this.defecation = defecation.equals("Y") ? "顺畅" : "其他";
|
||||||
|
} else {
|
||||||
|
this.defecation = defecation;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -100,6 +100,8 @@ public interface SysWxUserLogMapper
|
|||||||
*/
|
*/
|
||||||
List<CommunityPunchReponse> getCommunityPunch(SysWxUserLog sysWxUserLog);
|
List<CommunityPunchReponse> getCommunityPunch(SysWxUserLog sysWxUserLog);
|
||||||
|
|
||||||
|
List<CommunityPunchReponse> getCommunityPunchByOpenid(String openid);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据打卡社区
|
* 根据打卡社区
|
||||||
* @param sysWxUserLog
|
* @param sysWxUserLog
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package com.stdiet.custom.page;
|
package com.stdiet.custom.page;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.stdiet.common.utils.StringUtils;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
@ -53,6 +52,11 @@ public class WxLogInfo {
|
|||||||
*/
|
*/
|
||||||
private String constipation;
|
private String constipation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否生理期
|
||||||
|
*/
|
||||||
|
private String menstrualPeriod;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 食材描述
|
* 食材描述
|
||||||
*/
|
*/
|
||||||
@ -123,8 +127,8 @@ public class WxLogInfo {
|
|||||||
|
|
||||||
public void setDefecation(String defecation) {
|
public void setDefecation(String defecation) {
|
||||||
if (defecation.equals("Y") || defecation.equals("N")) {
|
if (defecation.equals("Y") || defecation.equals("N")) {
|
||||||
this.defecation = defecation.equals("Y") ? "是" : "否";
|
// this.defecation = defecation.equals("Y") ? "是" : "否";
|
||||||
// this.defecation = defecation.equals("Y") ? "顺畅" : "其他";
|
this.defecation = defecation.equals("Y") ? "顺畅" : "其他";
|
||||||
} else {
|
} else {
|
||||||
this.defecation = defecation;
|
this.defecation = defecation;
|
||||||
}
|
}
|
||||||
@ -146,4 +150,8 @@ public class WxLogInfo {
|
|||||||
this.constipation = constipation.equals("Y") ? "是" : "否";
|
this.constipation = constipation.equals("Y") ? "是" : "否";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setMenstrualPeriod(String menstrualPeriod) {
|
||||||
|
this.menstrualPeriod = menstrualPeriod.equals("Y") ? "是" : "否";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -102,6 +102,8 @@ public interface ISysWxUserLogService
|
|||||||
*/
|
*/
|
||||||
List<CommunityPunchReponse> getCommunityPunch(SysWxUserLog sysWxUserLog);
|
List<CommunityPunchReponse> getCommunityPunch(SysWxUserLog sysWxUserLog);
|
||||||
|
|
||||||
|
List<CommunityPunchReponse> getCommunityPunchByOpenid(String openid);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据打卡社区
|
* 根据打卡社区
|
||||||
* @param sysWxUserLog
|
* @param sysWxUserLog
|
||||||
|
@ -1,25 +1,14 @@
|
|||||||
package com.stdiet.custom.service.impl;
|
package com.stdiet.custom.service.impl;
|
||||||
|
|
||||||
import java.util.List;
|
import com.stdiet.custom.domain.SysWxUserLog;
|
||||||
|
|
||||||
import com.stdiet.common.config.AliyunOSSConfig;
|
|
||||||
import com.stdiet.common.exception.file.FileNameLengthLimitExceededException;
|
|
||||||
import com.stdiet.common.utils.DateUtils;
|
|
||||||
import com.stdiet.common.utils.file.FileUploadUtils;
|
|
||||||
import com.stdiet.common.utils.file.MimeTypeUtils;
|
|
||||||
import com.stdiet.common.utils.oss.AliyunOSSUtils;
|
|
||||||
import com.stdiet.custom.domain.SysMessageNotice;
|
|
||||||
import com.stdiet.custom.domain.SysWxUserInfo;
|
|
||||||
import com.stdiet.custom.domain.entityEnum.MessageNoticeEnum;
|
|
||||||
import com.stdiet.custom.dto.response.CommunityPunchReponse;
|
import com.stdiet.custom.dto.response.CommunityPunchReponse;
|
||||||
|
import com.stdiet.custom.mapper.SysWxUserLogMapper;
|
||||||
import com.stdiet.custom.page.WxLogInfo;
|
import com.stdiet.custom.page.WxLogInfo;
|
||||||
import com.stdiet.custom.service.ISysMessageNoticeService;
|
import com.stdiet.custom.service.ISysWxUserLogService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.stdiet.custom.mapper.SysWxUserLogMapper;
|
|
||||||
import com.stdiet.custom.domain.SysWxUserLog;
|
import java.util.List;
|
||||||
import com.stdiet.custom.service.ISysWxUserLogService;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 微信用户记录Service业务层处理
|
* 微信用户记录Service业务层处理
|
||||||
@ -110,6 +99,7 @@ public class SysWxUserLogServiceImpl implements ISysWxUserLogService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据openid和手机号查询打卡记录
|
* 根据openid和手机号查询打卡记录
|
||||||
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@ -119,6 +109,7 @@ public class SysWxUserLogServiceImpl implements ISysWxUserLogService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据日期和openid查询打卡记录
|
* 根据日期和openid查询打卡记录
|
||||||
|
*
|
||||||
* @param sysWxUserLog
|
* @param sysWxUserLog
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -128,6 +119,7 @@ public class SysWxUserLogServiceImpl implements ISysWxUserLogService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据客户ID查询对应打卡体重数据
|
* 根据客户ID查询对应打卡体重数据
|
||||||
|
*
|
||||||
* @param sysWxUserLog
|
* @param sysWxUserLog
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -137,6 +129,7 @@ public class SysWxUserLogServiceImpl implements ISysWxUserLogService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据ID查询打卡详情
|
* 根据ID查询打卡详情
|
||||||
|
*
|
||||||
* @param sysWxUserLog
|
* @param sysWxUserLog
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -146,6 +139,7 @@ public class SysWxUserLogServiceImpl implements ISysWxUserLogService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询打卡社区记录
|
* 查询打卡社区记录
|
||||||
|
*
|
||||||
* @param sysWxUserLog
|
* @param sysWxUserLog
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -153,8 +147,14 @@ public class SysWxUserLogServiceImpl implements ISysWxUserLogService {
|
|||||||
return sysWxUserLogMapper.getCommunityPunch(sysWxUserLog);
|
return sysWxUserLogMapper.getCommunityPunch(sysWxUserLog);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<CommunityPunchReponse> getCommunityPunchByOpenid(String openid) {
|
||||||
|
return sysWxUserLogMapper.getCommunityPunchByOpenid(openid);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据打卡社区
|
* 根据打卡社区
|
||||||
|
*
|
||||||
* @param sysWxUserLog
|
* @param sysWxUserLog
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -164,6 +164,7 @@ public class SysWxUserLogServiceImpl implements ISysWxUserLogService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询打卡社区总共打卡人数
|
* 查询打卡社区总共打卡人数
|
||||||
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public int getPunchCustomerTotalNum() {
|
public int getPunchCustomerTotalNum() {
|
||||||
|
@ -8,9 +8,9 @@
|
|||||||
<result property="id" column="id"/>
|
<result property="id" column="id"/>
|
||||||
<result property="customerId" column="customer_id"/>
|
<result property="customerId" column="customer_id"/>
|
||||||
<!-- 非持久化字段,客户姓名 -->
|
<!-- 非持久化字段,客户姓名 -->
|
||||||
<result property="name" column="name"></result>
|
<result property="name" column="name"/>
|
||||||
<!-- 非持久化字段,客户手机号 -->
|
<!-- 非持久化字段,客户手机号 -->
|
||||||
<result property="phone" column="phone"></result>
|
<result property="phone" column="phone"/>
|
||||||
<result property="conditioningProjectId" column="conditioning_project_id"/>
|
<result property="conditioningProjectId" column="conditioning_project_id"/>
|
||||||
<!-- 非持久化字段,调理项目名称 -->
|
<!-- 非持久化字段,调理项目名称 -->
|
||||||
<result property="conditioningProject" column="conditioning_project"/>
|
<result property="conditioningProject" column="conditioning_project"/>
|
||||||
@ -111,7 +111,7 @@
|
|||||||
<result property="otherPhysicalSigns" column="other_physical_signs"/>
|
<result property="otherPhysicalSigns" column="other_physical_signs"/>
|
||||||
<result property="bloodData" column="blood_data"/>
|
<result property="bloodData" column="blood_data"/>
|
||||||
<result property="moistureDate" column="moisture_date"/>
|
<result property="moistureDate" column="moisture_date"/>
|
||||||
<result property="remark" column="remark"></result>
|
<result property="remark" column="remark"/>
|
||||||
<result property="guidance" column="guidance"/>
|
<result property="guidance" column="guidance"/>
|
||||||
<result property="createTime" column="create_time"/>
|
<result property="createTime" column="create_time"/>
|
||||||
<result property="createBy" column="create_by"/>
|
<result property="createBy" column="create_by"/>
|
||||||
@ -121,7 +121,7 @@
|
|||||||
<result property="avoidFood" column="avoid_food" typeHandler="com.stdiet.custom.typehandler.ArrayJsonHandler"/>
|
<result property="avoidFood" column="avoid_food" typeHandler="com.stdiet.custom.typehandler.ArrayJsonHandler"/>
|
||||||
<!-- column是传的参数, select是调用的查询 -->
|
<!-- column是传的参数, select是调用的查询 -->
|
||||||
<association property="signList" column="physical_signs_id" select="getSignByIds"/>
|
<association property="signList" column="physical_signs_id" select="getSignByIds"/>
|
||||||
<association property="healthyExtend" column="id" select="getHealthyExtendedByHealthyId"></association>
|
<association property="healthyExtend" column="id" select="getHealthyExtendedByHealthyId"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectSysCustomerHealthyVo">
|
<sql id="selectSysCustomerHealthyVo">
|
||||||
@ -134,7 +134,8 @@
|
|||||||
<include refid="selectSysCustomerHealthyVo"/>,sc.name,sc.phone,cp.dict_label as conditioning_project
|
<include refid="selectSysCustomerHealthyVo"/>,sc.name,sc.phone,cp.dict_label as conditioning_project
|
||||||
from sys_customer_healthy as sch
|
from sys_customer_healthy as sch
|
||||||
LEFT JOIN sys_customer sc on sc.id = sch.customer_id
|
LEFT JOIN sys_customer sc on sc.id = sch.customer_id
|
||||||
LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'conditioning_project') AS cp ON cp.dict_value = sch.conditioning_project_id
|
LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'conditioning_project') AS cp ON
|
||||||
|
cp.dict_value = sch.conditioning_project_id
|
||||||
where sch.del_flag = 0 and sc.del_flag = 0
|
where sch.del_flag = 0 and sc.del_flag = 0
|
||||||
<if test="conditioningProjectId != null ">and sch.conditioning_project_id = #{conditioningProjectId}</if>
|
<if test="conditioningProjectId != null ">and sch.conditioning_project_id = #{conditioningProjectId}</if>
|
||||||
<if test="name != null and name != ''">
|
<if test="name != null and name != ''">
|
||||||
@ -147,7 +148,8 @@
|
|||||||
<include refid="selectSysCustomerHealthyVo"/>,sc.name,sc.phone,cp.dict_label as conditioning_project
|
<include refid="selectSysCustomerHealthyVo"/>,sc.name,sc.phone,cp.dict_label as conditioning_project
|
||||||
from sys_customer_healthy as sch
|
from sys_customer_healthy as sch
|
||||||
left join sys_customer sc on sc.id = sch.customer_id
|
left join sys_customer sc on sc.id = sch.customer_id
|
||||||
LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'conditioning_project') AS cp ON cp.dict_value = sch.conditioning_project_id
|
LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'conditioning_project') AS cp ON
|
||||||
|
cp.dict_value = sch.conditioning_project_id
|
||||||
where sch.del_flag = 0 and sc.del_flag = 0 and sch.id = #{id}
|
where sch.del_flag = 0 and sc.del_flag = 0 and sch.id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@ -156,7 +158,8 @@
|
|||||||
<include refid="selectSysCustomerHealthyVo"/>,sc.name,sc.phone,cp.dict_label as conditioning_project
|
<include refid="selectSysCustomerHealthyVo"/>,sc.name,sc.phone,cp.dict_label as conditioning_project
|
||||||
from sys_customer_healthy as sch
|
from sys_customer_healthy as sch
|
||||||
left join sys_customer sc on sc.id = sch.customer_id
|
left join sys_customer sc on sc.id = sch.customer_id
|
||||||
LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'conditioning_project') AS cp ON cp.dict_value = sch.conditioning_project_id
|
LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'conditioning_project') AS cp ON
|
||||||
|
cp.dict_value = sch.conditioning_project_id
|
||||||
where sch.del_flag = 0 and sc.del_flag = 0 and sch.customer_id = #{customerId} order by sch.id desc limit 1
|
where sch.del_flag = 0 and sc.del_flag = 0 and sch.customer_id = #{customerId} order by sch.id desc limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@ -380,7 +383,9 @@
|
|||||||
<if test="updateTime != null">#{updateTime},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
<if test="delFlag != null">#{delFlag},</if>
|
<if test="delFlag != null">#{delFlag},</if>
|
||||||
<if test="avoidFood != null">#{avoid_food, jdbcType=OTHER, typeHandler=com.stdiet.custom.typehandler.ArrayJsonHandler},</if>
|
<if test="avoidFood != null">
|
||||||
|
#{avoid_food, jdbcType=OTHER, typeHandler=com.stdiet.custom.typehandler.ArrayJsonHandler},
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@ -450,7 +455,9 @@
|
|||||||
<if test="motionTime != null">motion_time = #{motionTime},</if>
|
<if test="motionTime != null">motion_time = #{motionTime},</if>
|
||||||
<if test="aerobicMotionClassify != null">aerobic_motion_classify = #{aerobicMotionClassify},</if>
|
<if test="aerobicMotionClassify != null">aerobic_motion_classify = #{aerobicMotionClassify},</if>
|
||||||
<if test="anaerobicMotionClassify != null">anaerobic_motion_classify = #{anaerobicMotionClassify},</if>
|
<if test="anaerobicMotionClassify != null">anaerobic_motion_classify = #{anaerobicMotionClassify},</if>
|
||||||
<if test="anaerobicAerobicMotionClassify != null">anaerobic_aerobic_motion_classify = #{anaerobicAerobicMotionClassify},</if>
|
<if test="anaerobicAerobicMotionClassify != null">anaerobic_aerobic_motion_classify =
|
||||||
|
#{anaerobicAerobicMotionClassify},
|
||||||
|
</if>
|
||||||
<if test="otherMotionClassify != null">other_motion_classify = #{otherMotionClassify},</if>
|
<if test="otherMotionClassify != null">other_motion_classify = #{otherMotionClassify},</if>
|
||||||
<if test="motionField != null">motion_field = #{motionField},</if>
|
<if test="motionField != null">motion_field = #{motionField},</if>
|
||||||
<if test="otherMotionField != null">other_motion_field = #{otherMotionField},</if>
|
<if test="otherMotionField != null">other_motion_field = #{otherMotionField},</if>
|
||||||
@ -461,7 +468,8 @@
|
|||||||
<if test="stayupLateFlag != null">stayup_late_flag = #{stayupLateFlag},</if>
|
<if test="stayupLateFlag != null">stayup_late_flag = #{stayupLateFlag},</if>
|
||||||
<if test="stayupLateWeekNum != null">stayup_late_week_num = #{stayupLateWeekNum},</if>
|
<if test="stayupLateWeekNum != null">stayup_late_week_num = #{stayupLateWeekNum},</if>
|
||||||
<if test="familyIllnessHistory != null">family_illness_history = #{familyIllnessHistory},</if>
|
<if test="familyIllnessHistory != null">family_illness_history = #{familyIllnessHistory},</if>
|
||||||
<if test="otherFamilyIllnessHistory != null">other_family_illness_history = #{otherFamilyIllnessHistory},</if>
|
<if test="otherFamilyIllnessHistory != null">other_family_illness_history = #{otherFamilyIllnessHistory},
|
||||||
|
</if>
|
||||||
<if test="operationHistory != null">operation_history = #{operationHistory},</if>
|
<if test="operationHistory != null">operation_history = #{operationHistory},</if>
|
||||||
<if test="otherOperationHistory != null">other_operation_history = #{otherOperationHistory},</if>
|
<if test="otherOperationHistory != null">other_operation_history = #{otherOperationHistory},</if>
|
||||||
<if test="nearOperationFlag != null">near_operation_flag = #{nearOperationFlag},</if>
|
<if test="nearOperationFlag != null">near_operation_flag = #{nearOperationFlag},</if>
|
||||||
@ -493,7 +501,9 @@
|
|||||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||||
<if test="avoidFood != null">avoid_food = #{avoidFood, jdbcType=OTHER, typeHandler=com.stdiet.custom.typehandler.ArrayJsonHandler},</if>
|
<if test="avoidFood != null">avoid_food =
|
||||||
|
#{avoidFood, jdbcType=OTHER, typeHandler=com.stdiet.custom.typehandler.ArrayJsonHandler},
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
@ -537,8 +547,10 @@
|
|||||||
<select id="selectDictDataByTypeAndValue" parameterType="SysDictData" resultMap="SysDictDataResult">
|
<select id="selectDictDataByTypeAndValue" parameterType="SysDictData" resultMap="SysDictDataResult">
|
||||||
select dict_code, dict_sort, dict_label, dict_value, dict_type from sys_dict_data
|
select dict_code, dict_sort, dict_label, dict_value, dict_type from sys_dict_data
|
||||||
where status = '0' and dict_type = #{dictType}
|
where status = '0' and dict_type = #{dictType}
|
||||||
and dict_value in <foreach collection="dictValueList" item="item" index="index"
|
and dict_value in
|
||||||
open="(" separator="," close=")">#{item}</foreach>
|
<foreach collection="dictValueList" item="item" index="index"
|
||||||
|
open="(" separator="," close=")">#{item}
|
||||||
|
</foreach>
|
||||||
order by dict_sort asc
|
order by dict_sort asc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -46,11 +46,12 @@
|
|||||||
<result property="thumbsupNum" column="thumbsup_num"/>
|
<result property="thumbsupNum" column="thumbsup_num"/>
|
||||||
<result property="healthManifesto" column="health_manifesto"/>
|
<result property="healthManifesto" column="health_manifesto"/>
|
||||||
<result property="delFlag" column="del_flag"/>
|
<result property="delFlag" column="del_flag"/>
|
||||||
|
<result property="menstrualPeriod" column="menstrual_period"/>
|
||||||
<!-- 非持久字段 -->
|
<!-- 非持久字段 -->
|
||||||
<result property="customerName" column="customer_name"></result>
|
<result property="customerName" column="customer_name"/>
|
||||||
<!-- 营养师 -->
|
<!-- 营养师 -->
|
||||||
<result property="nutritionist" column="nutritionist"></result>
|
<result property="nutritionist" column="nutritionist"/>
|
||||||
<result property="afterNutritionist" column="after_nutritionist"></result>
|
<result property="afterNutritionist" column="after_nutritionist"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap type="com.stdiet.custom.page.WxLogInfo" id="WxLogInfo">
|
<resultMap type="com.stdiet.custom.page.WxLogInfo" id="WxLogInfo">
|
||||||
@ -74,15 +75,20 @@
|
|||||||
<result property="remark" column="remark"/>
|
<result property="remark" column="remark"/>
|
||||||
<result property="ingredientDesc" column="ingredient_desc"/>
|
<result property="ingredientDesc" column="ingredient_desc"/>
|
||||||
<!-- <result property="breakfastImages" column="breakfast_images"/>-->
|
<!-- <result property="breakfastImages" column="breakfast_images"/>-->
|
||||||
<result property="breakfastImagesUrl" column="breakfast_images" typeHandler="com.stdiet.custom.typehandler.ImagesHandler"/>
|
<result property="breakfastImagesUrl" column="breakfast_images"
|
||||||
|
typeHandler="com.stdiet.custom.typehandler.ImagesHandler"/>
|
||||||
<!-- <result property="lunchImages" column="lunch_images"/>-->
|
<!-- <result property="lunchImages" column="lunch_images"/>-->
|
||||||
<result property="lunchImagesUrl" column="lunch_images" typeHandler="com.stdiet.custom.typehandler.ImagesHandler"/>
|
<result property="lunchImagesUrl" column="lunch_images"
|
||||||
|
typeHandler="com.stdiet.custom.typehandler.ImagesHandler"/>
|
||||||
<!-- <result property="dinnerImages" column="dinner_images"/>-->
|
<!-- <result property="dinnerImages" column="dinner_images"/>-->
|
||||||
<result property="dinnerImagesUrl" column="dinner_images" typeHandler="com.stdiet.custom.typehandler.ImagesHandler"/>
|
<result property="dinnerImagesUrl" column="dinner_images"
|
||||||
|
typeHandler="com.stdiet.custom.typehandler.ImagesHandler"/>
|
||||||
<!-- <result property="extraMealImages" column="extra_meal_images"/>-->
|
<!-- <result property="extraMealImages" column="extra_meal_images"/>-->
|
||||||
<result property="extraMealImagesUrl" column="extra_meal_images" typeHandler="com.stdiet.custom.typehandler.ImagesHandler"/>
|
<result property="extraMealImagesUrl" column="extra_meal_images"
|
||||||
|
typeHandler="com.stdiet.custom.typehandler.ImagesHandler"/>
|
||||||
<!-- <result property="bodyImages" column="body_images"/>-->
|
<!-- <result property="bodyImages" column="body_images"/>-->
|
||||||
<result property="bodyImagesUrl" column="body_images" typeHandler="com.stdiet.custom.typehandler.ImagesHandler"/>
|
<result property="bodyImagesUrl" column="body_images"
|
||||||
|
typeHandler="com.stdiet.custom.typehandler.ImagesHandler"/>
|
||||||
<result property="bodyDesc" column="body_desc"/>
|
<result property="bodyDesc" column="body_desc"/>
|
||||||
<result property="suggest" column="suggest"/>
|
<result property="suggest" column="suggest"/>
|
||||||
<result property="targetWeight" column="target_weight"/>
|
<result property="targetWeight" column="target_weight"/>
|
||||||
@ -90,11 +96,12 @@
|
|||||||
<result property="comment" column="comment"/>
|
<result property="comment" column="comment"/>
|
||||||
<result property="thumbsupNum" column="thumbsup_num"/>
|
<result property="thumbsupNum" column="thumbsup_num"/>
|
||||||
<result property="healthManifesto" column="health_manifesto"/>
|
<result property="healthManifesto" column="health_manifesto"/>
|
||||||
|
<result property="menstrualPeriod" column="menstrual_period"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectSysWxUserLogVo">
|
<sql id="selectSysWxUserLogVo">
|
||||||
select id,openid, weight, appid, phone, log_time, sleep_time, wakeup_time, sport, sport_desc, avatar_url, diet, diet_desc, insomnia, defecation, defecation_desc, water, create_by, create_time, update_by, update_time, remark,
|
select id,openid, weight, appid, phone, log_time, sleep_time, wakeup_time, sport, sport_desc, avatar_url, diet, diet_desc, insomnia, defecation, defecation_desc, water, create_by, create_time, update_by, update_time, remark,
|
||||||
emotion, emotion_desc,sly_eat_food,constipation,ingredient_desc,breakfast_images,lunch_images,dinner_images,extra_meal_images,body_images,body_desc,suggest,execution_score,comment,health_manifesto
|
emotion, emotion_desc,sly_eat_food,constipation,ingredient_desc,breakfast_images,lunch_images,dinner_images,extra_meal_images,body_images,body_desc,suggest,execution_score,comment,health_manifesto,menstrual_period
|
||||||
from sys_wx_user_log
|
from sys_wx_user_log
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
@ -106,8 +113,10 @@
|
|||||||
<select id="selectSysWxUserLogList" parameterType="SysWxUserLog" resultMap="SysWxUserLogResult">
|
<select id="selectSysWxUserLogList" parameterType="SysWxUserLog" resultMap="SysWxUserLogResult">
|
||||||
SELECT
|
SELECT
|
||||||
wxlog.id,wxinfo.appid,wxinfo.openid,wxinfo.avatar_url,wxinfo.phone,wxlog.weight,wxlog.log_time,wxlog.sleep_time,
|
wxlog.id,wxinfo.appid,wxinfo.openid,wxinfo.avatar_url,wxinfo.phone,wxlog.weight,wxlog.log_time,wxlog.sleep_time,
|
||||||
wxlog.wakeup_time,wxlog.defecation, wxlog.defecation_desc, wxlog.water, wxlog.insomnia,wxlog.sport, wxlog.sport_desc,wxlog.diet, wxlog.diet_desc,wxlog.remark,
|
wxlog.wakeup_time,wxlog.defecation, wxlog.defecation_desc, wxlog.water, wxlog.insomnia,wxlog.sport,
|
||||||
wxlog.emotion, wxlog.emotion_desc,wxlog.sly_eat_food,wxlog.constipation,wxlog.ingredient_desc,wxlog.breakfast_images,
|
wxlog.sport_desc,wxlog.diet, wxlog.diet_desc,wxlog.remark,
|
||||||
|
wxlog.emotion, wxlog.menstrual_period,
|
||||||
|
wxlog.emotion_desc,wxlog.sly_eat_food,wxlog.constipation,wxlog.ingredient_desc,wxlog.breakfast_images,
|
||||||
wxlog.lunch_images,wxlog.dinner_images,wxlog.extra_meal_images,wxlog.body_images,wxlog.body_desc,
|
wxlog.lunch_images,wxlog.dinner_images,wxlog.extra_meal_images,wxlog.body_images,wxlog.body_desc,
|
||||||
wxlog.suggest,wxlog.execution_score,wxlog.comment,sc.name as customer_name, su.nick_name as nutritionist,
|
wxlog.suggest,wxlog.execution_score,wxlog.comment,sc.name as customer_name, su.nick_name as nutritionist,
|
||||||
su_atferSale.nick_name as after_nutritionist, wxlog.health_manifesto, wxlog.log_time
|
su_atferSale.nick_name as after_nutritionist, wxlog.health_manifesto, wxlog.log_time
|
||||||
@ -205,6 +214,7 @@
|
|||||||
<if test="thumbsupNum != null">thumbsup_num,</if>
|
<if test="thumbsupNum != null">thumbsup_num,</if>
|
||||||
<if test="healthManifesto != null">health_manifesto,</if>
|
<if test="healthManifesto != null">health_manifesto,</if>
|
||||||
<if test="delFlag != null">del_flag,</if>
|
<if test="delFlag != null">del_flag,</if>
|
||||||
|
<if test="menstrualPeriod != null">menstrual_period,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="openid != null">#{openid},</if>
|
<if test="openid != null">#{openid},</if>
|
||||||
@ -246,6 +256,7 @@
|
|||||||
<if test="thumbsupNum != null">#{thumbsupNum},</if>
|
<if test="thumbsupNum != null">#{thumbsupNum},</if>
|
||||||
<if test="healthManifesto != null">#{healthManifesto},</if>
|
<if test="healthManifesto != null">#{healthManifesto},</if>
|
||||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||||
|
<if test="menstrualPeriod != null">menstrual_period = #{menstrualPeriod},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@ -288,6 +299,7 @@
|
|||||||
<if test="thumbsupNum != null">thumbsup_num = #{thumbsupNum},</if>
|
<if test="thumbsupNum != null">thumbsup_num = #{thumbsupNum},</if>
|
||||||
<if test="healthManifesto != null">health_manifesto = #{healthManifesto},</if>
|
<if test="healthManifesto != null">health_manifesto = #{healthManifesto},</if>
|
||||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||||
|
<if test="menstrualPeriod != null">menstrual_period = #{menstrualPeriod},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
@ -305,9 +317,11 @@
|
|||||||
|
|
||||||
<!-- 根据openid和手机号查询对应打卡记录 -->
|
<!-- 根据openid和手机号查询对应打卡记录 -->
|
||||||
<select id="getWxLogInfoList" parameterType="SysWxUserLog" resultMap="WxLogInfo">
|
<select id="getWxLogInfoList" parameterType="SysWxUserLog" resultMap="WxLogInfo">
|
||||||
SELECT wxlog.id,wxlog.weight,wxlog.log_time,wxlog.sleep_time, wxlog.wakeup_time,wxlog.defecation, wxlog.defecation_desc, wxlog.water, wxlog.insomnia,wxlog.sport, wxlog.sport_desc,wxlog.diet, wxlog.diet_desc,
|
SELECT wxlog.id,wxlog.weight,wxlog.log_time,wxlog.sleep_time, wxlog.wakeup_time,wxlog.defecation, wxlog.defecation_desc,
|
||||||
wxlog.emotion, wxlog.emotion_desc,wxlog.sly_eat_food,wxlog.constipation,wxlog.ingredient_desc,wxlog.breakfast_images,wxlog.lunch_images,wxlog.dinner_images,wxlog.extra_meal_images,wxlog.body_images, wxlog.body_desc
|
wxlog.water, wxlog.insomnia,wxlog.sport, wxlog.sport_desc,wxlog.diet, wxlog.diet_desc,
|
||||||
,wxlog.remark,wxlog.execution_score,wxlog.comment, wxlog.health_manifesto
|
wxlog.emotion, wxlog.emotion_desc,wxlog.sly_eat_food,wxlog.constipation,wxlog.ingredient_desc,wxlog.breakfast_images,
|
||||||
|
wxlog.lunch_images,wxlog.dinner_images,wxlog.extra_meal_images,wxlog.body_images, wxlog.body_desc,
|
||||||
|
wxlog.remark,wxlog.execution_score,wxlog.comment, wxlog.health_manifesto, wxlog.menstrual_period
|
||||||
FROM sys_wx_user_log wxlog
|
FROM sys_wx_user_log wxlog
|
||||||
where wxlog.del_flag = 0 and wxlog.openid = #{openid}
|
where wxlog.del_flag = 0 and wxlog.openid = #{openid}
|
||||||
order by wxlog.log_time asc
|
order by wxlog.log_time asc
|
||||||
@ -350,9 +364,11 @@
|
|||||||
|
|
||||||
<!-- 根据openid和手机号查询对应打卡记录 -->
|
<!-- 根据openid和手机号查询对应打卡记录 -->
|
||||||
<select id="getWxLogInfoDetailById" parameterType="SysWxUserLog" resultMap="WxLogInfo">
|
<select id="getWxLogInfoDetailById" parameterType="SysWxUserLog" resultMap="WxLogInfo">
|
||||||
SELECT wxlog.id,wxlog.weight,wxlog.log_time,wxlog.sleep_time, wxlog.wakeup_time,wxlog.defecation, wxlog.defecation_desc, wxlog.water, wxlog.insomnia,wxlog.sport, wxlog.sport_desc,wxlog.diet, wxlog.diet_desc,
|
SELECT wxlog.id,wxlog.weight,wxlog.log_time,wxlog.sleep_time, wxlog.wakeup_time,wxlog.defecation, wxlog.defecation_desc,
|
||||||
wxlog.emotion, wxlog.emotion_desc,wxlog.sly_eat_food,wxlog.constipation,wxlog.ingredient_desc,wxlog.breakfast_images,wxlog.lunch_images,wxlog.dinner_images,wxlog.extra_meal_images,wxlog.body_images, wxlog.body_desc
|
wxlog.water, wxlog.insomnia,wxlog.sport, wxlog.sport_desc,wxlog.diet, wxlog.diet_desc,
|
||||||
,wxlog.remark,wxlog.execution_score,wxlog.comment
|
wxlog.emotion, wxlog.emotion_desc,wxlog.sly_eat_food,wxlog.constipation,wxlog.ingredient_desc,wxlog.breakfast_images,
|
||||||
|
wxlog.lunch_images,wxlog.dinner_images,wxlog.extra_meal_images,wxlog.body_images, wxlog.body_desc,
|
||||||
|
wxlog.remark,wxlog.execution_score,wxlog.comment,wxlog.menstrual_period
|
||||||
FROM sys_wx_user_log wxlog left join sys_wx_user_info wxinfo on wxinfo.openid = wxlog.openid
|
FROM sys_wx_user_log wxlog left join sys_wx_user_info wxinfo on wxinfo.openid = wxlog.openid
|
||||||
where wxlog.del_flag = 0 and wxlog.id = #{id}
|
where wxlog.del_flag = 0 and wxlog.id = #{id}
|
||||||
order by wxlog.log_time desc
|
order by wxlog.log_time desc
|
||||||
@ -365,11 +381,10 @@
|
|||||||
<result property="nickName" column="nick_name"/>
|
<result property="nickName" column="nick_name"/>
|
||||||
<result property="avatarUrl" column="avatar_url"/>
|
<result property="avatarUrl" column="avatar_url"/>
|
||||||
<result property="logTime" column="log_time"/>
|
<result property="logTime" column="log_time"/>
|
||||||
<result property="weight" column="weight"/>
|
|
||||||
<result property="comment" column="comment"/>
|
<result property="comment" column="comment"/>
|
||||||
<result property="healthManifesto" column="health_manifesto"/>
|
<result property="healthManifesto" column="health_manifesto"/>
|
||||||
<association property="thumbsupNum" column="id" select="getPunchThumbsupCount"/>
|
<association property="thumbsupNum" column="id" select="getPunchThumbsupCount"/>
|
||||||
<!-- 查询最近五天体重 -->
|
<!-- 查询体重 -->
|
||||||
<association property="weightData" column="{id=openid}" select="getRecentWeight"/>
|
<association property="weightData" column="{id=openid}" select="getRecentWeight"/>
|
||||||
<!-- 查询点赞的openid -->
|
<!-- 查询点赞的openid -->
|
||||||
<association property="thumbsupUser" column="id" select="getPunchThumbsupList"/>
|
<association property="thumbsupUser" column="id" select="getPunchThumbsupList"/>
|
||||||
@ -378,7 +393,33 @@
|
|||||||
<!-- 查询打卡社区内容 -->
|
<!-- 查询打卡社区内容 -->
|
||||||
<select id="getCommunityPunch" resultMap="punchReponseMap" parameterType="SysWxUserLog">
|
<select id="getCommunityPunch" resultMap="punchReponseMap" parameterType="SysWxUserLog">
|
||||||
SELECT * FROM
|
SELECT * FROM
|
||||||
(SELECT id, openid, `comment`, health_manifesto, log_time FROM sys_wx_user_log WHERE TO_DAYS(log_time) = TO_DAYS(NOW()) AND del_flag = 0) AS wxlog
|
(SELECT id, openid, `comment`, health_manifesto, log_time FROM sys_wx_user_log
|
||||||
|
WHERE TO_DAYS(log_time) = TO_DAYS(NOW()) AND del_flag = 0) AS wxlog
|
||||||
|
LEFT JOIN (SELECT openid, nick_name, avatar_url FROM sys_wx_user_info) AS wxinfo
|
||||||
|
USING(openid)
|
||||||
|
ORDER BY log_time DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<resultMap id="punchReponseMap2" type="com.stdiet.custom.dto.response.CommunityPunchReponse">
|
||||||
|
<result property="id" column="id" typeHandler="com.stdiet.custom.typehandler.EncryptedIdHandler"/>
|
||||||
|
<result property="openid" column="openid"/>
|
||||||
|
<result property="nickName" column="nick_name"/>
|
||||||
|
<result property="avatarUrl" column="avatar_url"/>
|
||||||
|
<result property="logTime" column="log_time"/>
|
||||||
|
<result property="comment" column="comment"/>
|
||||||
|
<result property="healthManifesto" column="health_manifesto"/>
|
||||||
|
<association property="thumbsupNum" column="id" select="getPunchThumbsupCount"/>
|
||||||
|
<!-- 查询体重 -->
|
||||||
|
<!-- <association property="weightData" column="{id=openid}" select="getRecentWeight"/>-->
|
||||||
|
<!-- 查询点赞的openid -->
|
||||||
|
<association property="thumbsupUser" column="id" select="getPunchThumbsupList"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 客户活动-->
|
||||||
|
<select id="getCommunityPunchByOpenid" resultMap="punchReponseMap2" parameterType="String">
|
||||||
|
SELECT * FROM
|
||||||
|
(SELECT id, openid, `comment`, health_manifesto, log_time FROM sys_wx_user_log
|
||||||
|
WHERE openid = #{openid} AND del_flag = 0) AS wxlog
|
||||||
LEFT JOIN (SELECT openid, nick_name, avatar_url FROM sys_wx_user_info) AS wxinfo
|
LEFT JOIN (SELECT openid, nick_name, avatar_url FROM sys_wx_user_info) AS wxinfo
|
||||||
USING(openid)
|
USING(openid)
|
||||||
ORDER BY log_time DESC
|
ORDER BY log_time DESC
|
||||||
|
Loading…
x
Reference in New Issue
Block a user