小程序打卡
This commit is contained in:
		| @@ -8,6 +8,7 @@ import org.apache.commons.lang3.builder.ToStringBuilder; | ||||
| import org.apache.commons.lang3.builder.ToStringStyle; | ||||
| import com.stdiet.common.annotation.Excel; | ||||
| import com.stdiet.common.core.domain.BaseEntity; | ||||
| import org.springframework.web.multipart.MultipartFile; | ||||
|  | ||||
| /** | ||||
|  * 微信用户记录对象 sys_wx_user_log | ||||
| @@ -86,4 +87,36 @@ public class SysWxUserLog extends BaseEntity | ||||
|      */ | ||||
|     @Excel(name = "营养师") | ||||
|     private String nutritionist; | ||||
|  | ||||
|     /** 情绪 */ | ||||
|     @Excel(name = "情绪") | ||||
|     private String emotion; | ||||
|  | ||||
|     /** 食谱之外的食物 */ | ||||
|     @Excel(name = "食谱之外的食物") | ||||
|     private String slyEatFood; | ||||
|  | ||||
|     /** 是否便秘(Y是 N否) */ | ||||
|     @Excel(name = "是否便秘", readConverterExp = "Y=是,N=否") | ||||
|     private String constipation; | ||||
|  | ||||
|     /** 早餐照片 */ | ||||
|     @Excel(name = "早餐照片") | ||||
|     private String breakfastImages; | ||||
|  | ||||
|     /** 午餐照片 */ | ||||
|     @Excel(name = "午餐照片") | ||||
|     private String lunchImages; | ||||
|  | ||||
|     /** 午餐照片 */ | ||||
|     @Excel(name = "午餐照片") | ||||
|     private String dinnerImages; | ||||
|  | ||||
|     /** 加餐照片 */ | ||||
|     @Excel(name = "加餐照片") | ||||
|     private String extraMealImages; | ||||
|  | ||||
|     /** 体型对比照 */ | ||||
|     @Excel(name = "体型对比照") | ||||
|     private String bodyImages; | ||||
| } | ||||
| @@ -5,6 +5,7 @@ import java.util.List; | ||||
| import com.stdiet.custom.domain.SysWxUserInfo; | ||||
| import com.stdiet.custom.domain.SysWxUserLog; | ||||
| import com.stdiet.custom.page.WxLogInfo; | ||||
| import org.springframework.web.multipart.MultipartFile; | ||||
|  | ||||
| /** | ||||
|  * 微信用户记录Service接口 | ||||
| @@ -79,4 +80,11 @@ public interface ISysWxUserLogService | ||||
|      */ | ||||
|     SysWxUserLog selectSysWxUserLogByDateAndOpenId(SysWxUserLog sysWxUserLog); | ||||
|  | ||||
|     /** | ||||
|      * 上传打卡日志中照片 | ||||
|      * @param sysWxUserLog | ||||
|      * @return | ||||
|      */ | ||||
|     SysWxUserLog uploadLogImage(SysWxUserLog sysWxUserLog); | ||||
|  | ||||
| } | ||||
| @@ -2,6 +2,7 @@ package com.stdiet.custom.service.impl; | ||||
|  | ||||
| import java.util.List; | ||||
| import com.stdiet.common.utils.DateUtils; | ||||
| import com.stdiet.common.utils.SecurityUtils; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.stereotype.Service; | ||||
| import com.stdiet.custom.mapper.SysOrderNutritionistReplaceRecordMapper; | ||||
| @@ -54,6 +55,7 @@ public class SysOrderNutritionistReplaceRecordServiceImpl implements ISysOrderNu | ||||
|     public int insertSysOrderNutritionistReplaceRecord(SysOrderNutritionistReplaceRecord sysOrderNutritionistReplaceRecord) | ||||
|     { | ||||
|         sysOrderNutritionistReplaceRecord.setCreateTime(DateUtils.getNowDate()); | ||||
|         sysOrderNutritionistReplaceRecord.setCreateBy(SecurityUtils.getLoginUser().getUser().getUserId()+""); | ||||
|         return sysOrderNutritionistReplaceRecordMapper.insertSysOrderNutritionistReplaceRecord(sysOrderNutritionistReplaceRecord); | ||||
|     } | ||||
|  | ||||
| @@ -67,6 +69,7 @@ public class SysOrderNutritionistReplaceRecordServiceImpl implements ISysOrderNu | ||||
|     public int updateSysOrderNutritionistReplaceRecord(SysOrderNutritionistReplaceRecord sysOrderNutritionistReplaceRecord) | ||||
|     { | ||||
|         sysOrderNutritionistReplaceRecord.setUpdateTime(DateUtils.getNowDate()); | ||||
|         sysOrderNutritionistReplaceRecord.setUpdateBy(SecurityUtils.getLoginUser().getUser().getUserId()+""); | ||||
|         return sysOrderNutritionistReplaceRecordMapper.updateSysOrderNutritionistReplaceRecord(sysOrderNutritionistReplaceRecord); | ||||
|     } | ||||
|  | ||||
|   | ||||
| @@ -2,7 +2,12 @@ package com.stdiet.custom.service.impl; | ||||
|  | ||||
| import java.util.List; | ||||
|  | ||||
| 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.SysWxUserInfo; | ||||
| import com.stdiet.custom.page.WxLogInfo; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
| @@ -10,6 +15,7 @@ import org.springframework.stereotype.Service; | ||||
| import com.stdiet.custom.mapper.SysWxUserLogMapper; | ||||
| import com.stdiet.custom.domain.SysWxUserLog; | ||||
| import com.stdiet.custom.service.ISysWxUserLogService; | ||||
| import org.springframework.web.multipart.MultipartFile; | ||||
|  | ||||
| /** | ||||
|  * 微信用户记录Service业务层处理 | ||||
|   | ||||
| @@ -25,6 +25,14 @@ | ||||
|         <result property="updateBy" column="update_by"/> | ||||
|         <result property="updateTime" column="update_time"/> | ||||
|         <result property="remark" column="remark"/> | ||||
|         <result property="emotion"    column="emotion"    /> | ||||
|         <result property="slyEatFood"    column="sly_eat_food"    /> | ||||
|         <result property="constipation"    column="constipation"    /> | ||||
|         <result property="breakfastImages"    column="breakfast_images"    /> | ||||
|         <result property="lunchImages"    column="lunch_images"    /> | ||||
|         <result property="dinnerImages"    column="dinner_images"    /> | ||||
|         <result property="extraMealImages"    column="extra_meal_images"    /> | ||||
|         <result property="bodyImages"    column="body_images"    /> | ||||
|         <!-- 非持久字段 --> | ||||
|         <result property="customerName" column="customer_name"></result> | ||||
|         <!-- 营养师 --> | ||||
| @@ -41,10 +49,20 @@ | ||||
|         <result property="defecation" column="defecation"/> | ||||
|         <result property="water" column="water"/> | ||||
|         <result property="date" column="log_time"/> | ||||
|         <result property="emotion"    column="emotion"    /> | ||||
|         <result property="slyEatFood"    column="sly_eat_food"    /> | ||||
|         <result property="constipation"    column="constipation"    /> | ||||
|         <result property="breakfastImages"    column="breakfast_images"    /> | ||||
|         <result property="lunchImages"    column="lunch_images"    /> | ||||
|         <result property="dinnerImages"    column="dinner_images"    /> | ||||
|         <result property="extraMealImages"    column="extra_meal_images"    /> | ||||
|         <result property="bodyImages"    column="body_images"    /> | ||||
|     </resultMap> | ||||
|  | ||||
|     <sql id="selectSysWxUserLogVo"> | ||||
|         select id,openid, weight, appid, phone, log_time, sleep_time, wakeup_time, sport, avatar_url, diet, insomnia, defecation, water, create_by, create_time, update_by, update_time, remark from sys_wx_user_log | ||||
|         select id,openid, weight, appid, phone, log_time, sleep_time, wakeup_time, sport, avatar_url, diet, insomnia, defecation, water, create_by, create_time, update_by, update_time, remark, | ||||
|          emotion,sly_eat_food,constipation,breakfast_images,lunch_images,dinner_images,extra_meal_images,body_images | ||||
|          from sys_wx_user_log | ||||
|     </sql> | ||||
|  | ||||
|     <select id="checkWxLogInfoCount" parameterType="String" resultType="Integer"> | ||||
| @@ -112,6 +130,14 @@ | ||||
|             <if test="updateBy != null">update_by,</if> | ||||
|             <if test="updateTime != null">update_time,</if> | ||||
|             <if test="remark != null">remark,</if> | ||||
|             <if test="emotion != null">emotion,</if> | ||||
|             <if test="slyEatFood != null">sly_eat_food,</if> | ||||
|             <if test="constipation != null">constipation,</if> | ||||
|             <if test="breakfastImages != null">breakfast_images,</if> | ||||
|             <if test="lunchImages != null">lunch_images,</if> | ||||
|             <if test="dinnerImages != null">dinner_images,</if> | ||||
|             <if test="extraMealImages != null">extra_meal_images,</if> | ||||
|             <if test="bodyImages != null">body_images,</if> | ||||
|         </trim> | ||||
|         <trim prefix="values (" suffix=")" suffixOverrides=","> | ||||
|             <if test="openid != null">#{openid},</if> | ||||
| @@ -132,6 +158,14 @@ | ||||
|             <if test="updateBy != null">#{updateBy},</if> | ||||
|             <if test="updateTime != null">#{updateTime},</if> | ||||
|             <if test="remark != null">#{remark},</if> | ||||
|             <if test="emotion != null">#{emotion},</if> | ||||
|             <if test="slyEatFood != null">#{slyEatFood},</if> | ||||
|             <if test="constipation != null">#{constipation},</if> | ||||
|             <if test="breakfastImages != null">#{breakfastImages},</if> | ||||
|             <if test="lunchImages != null">#{lunchImages},</if> | ||||
|             <if test="dinnerImages != null">#{dinnerImages},</if> | ||||
|             <if test="extraMealImages != null">#{extraMealImages},</if> | ||||
|             <if test="bodyImages != null">#{bodyImages},</if> | ||||
|         </trim> | ||||
|     </insert> | ||||
|  | ||||
| @@ -156,6 +190,14 @@ | ||||
|             <if test="updateBy != null">update_by = #{updateBy},</if> | ||||
|             <if test="updateTime != null">update_time = #{updateTime},</if> | ||||
|             <if test="remark != null">remark = #{remark},</if> | ||||
|             <if test="emotion != null">emotion = #{emotion},</if> | ||||
|             <if test="slyEatFood != null">sly_eat_food = #{slyEatFood},</if> | ||||
|             <if test="constipation != null">constipation = #{constipation},</if> | ||||
|             <if test="breakfastImages != null">breakfast_images = #{breakfastImages},</if> | ||||
|             <if test="lunchImages != null">lunch_images = #{lunchImages},</if> | ||||
|             <if test="dinnerImages != null">dinner_images = #{dinnerImages},</if> | ||||
|             <if test="extraMealImages != null">extra_meal_images = #{extraMealImages},</if> | ||||
|             <if test="bodyImages != null">body_images = #{bodyImages},</if> | ||||
|         </trim> | ||||
|         where id = #{id} | ||||
|     </update> | ||||
| @@ -173,7 +215,8 @@ | ||||
|  | ||||
|     <!-- 根据openid和手机号查询对应打卡记录 --> | ||||
|     <select id="getWxLogInfoList" parameterType="SysWxUserLog" resultMap="WxLogInfo"> | ||||
|         SELECT wxlog.weight,wxlog.log_time,wxlog.sleep_time, wxlog.wakeup_time,wxlog.defecation, wxlog.water, wxlog.insomnia,wxlog.sport,wxlog.diet | ||||
|         SELECT wxlog.weight,wxlog.log_time,wxlog.sleep_time, wxlog.wakeup_time,wxlog.defecation, wxlog.water, wxlog.insomnia,wxlog.sport,wxlog.diet, | ||||
|         wxlog.emotion,wxlog.sly_eat_food,wxlog.constipation,wxlog.breakfast_images,wxlog.lunch_images,wxlog.dinner_images,wxlog.extra_meal_images,wxlog.body_images | ||||
|         FROM sys_wx_user_log wxlog left join sys_wx_user_info wxinfo on wxinfo.openid  = wxlog.openid | ||||
|         where wxinfo.openid = #{openid} or wxinfo.phone = #{phone} | ||||
|         order by wxlog.log_time desc | ||||
|   | ||||
		Reference in New Issue
	
	Block a user