新增电子秤接口

This commit is contained in:
huangdeliang 2021-08-25 18:07:12 +08:00
parent 1ebe65aee2
commit a311f872f1
3 changed files with 13 additions and 1 deletions
stdiet-custom/src/main
java/com/stdiet/custom
resources/mapper/custom

@ -1,5 +1,7 @@
package com.stdiet.custom.domain;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.stdiet.common.annotation.Excel;
import com.stdiet.common.core.domain.BaseEntity;
@ -206,6 +208,8 @@ public class SysWxUserLog extends BaseEntity {
//图片预览路径
private Map<String, List<String>> imagesUrl;
private JSONArray scaleBodyData;
public void setDefecation(String defecation) {
if (defecation.equals("Y") || defecation.equals("N")) {
// this.defecation = defecation.equals("Y") ? "" : "";

@ -1,5 +1,6 @@
package com.stdiet.custom.page;
import com.alibaba.fastjson.JSONArray;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
@ -125,6 +126,8 @@ public class WxLogInfo {
private String healthManifesto;
private JSONArray scaleBodyData;
public void setDefecation(String defecation) {
if (defecation.equals("Y") || defecation.equals("N")) {
// this.defecation = defecation.equals("Y") ? "" : "";

@ -52,6 +52,7 @@
<!-- 营养师 -->
<result property="nutritionist" column="nutritionist"/>
<result property="afterNutritionist" column="after_nutritionist"/>
<result column="scale_body_data" property="scaleBodyData" typeHandler="com.stdiet.custom.typehandler.ArrayJsonHandler"/>
</resultMap>
<resultMap type="com.stdiet.custom.page.WxLogInfo" id="WxLogInfo">
@ -97,6 +98,7 @@
<result property="thumbsupNum" column="thumbsup_num"/>
<result property="healthManifesto" column="health_manifesto"/>
<result property="menstrualPeriod" column="menstrual_period"/>
<result column="scale_body_data" property="scaleBodyData" typeHandler="com.stdiet.custom.typehandler.ArrayJsonHandler"/>
</resultMap>
<sql id="selectSysWxUserLogVo">
@ -215,6 +217,7 @@
<if test="healthManifesto != null">health_manifesto,</if>
<if test="delFlag != null">del_flag,</if>
<if test="menstrualPeriod != null">menstrual_period,</if>
<if test="scaleBodyData != null">scale_body_data</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="openid != null">#{openid},</if>
@ -257,6 +260,7 @@
<if test="healthManifesto != null">#{healthManifesto},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="menstrualPeriod != null">#{menstrualPeriod},</if>
<if test="scaleBodyData != null">#{scaleBodyData, jdbcType=OTHER, typeHandler=com.stdiet.custom.typehandler.ArrayJsonHandler},</if>
</trim>
</insert>
@ -300,6 +304,7 @@
<if test="healthManifesto != null">health_manifesto = #{healthManifesto},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="menstrualPeriod != null">menstrual_period = #{menstrualPeriod},</if>
<if test="scaleBodyData != null">scale_body_data = #{scaleBodyData, jdbcType=OTHER, typeHandler=com.stdiet.custom.typehandler.ArrayJsonHandler}</if>
</trim>
where id = #{id}
</update>
@ -321,7 +326,7 @@
wxlog.water, wxlog.insomnia,wxlog.sport, wxlog.sport_desc,wxlog.diet, wxlog.diet_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.remark,wxlog.execution_score,wxlog.comment, wxlog.health_manifesto, wxlog.menstrual_period
wxlog.remark,wxlog.execution_score,wxlog.comment, wxlog.health_manifesto, wxlog.menstrual_period, wxlog.scale_body_data
FROM sys_wx_user_log wxlog
where wxlog.del_flag = 0 and wxlog.openid = #{openid}
order by wxlog.log_time asc