From a383ef99f782e88850fbe49c55dc7065a480e9f8 Mon Sep 17 00:00:00 2001 From: huangdeliang Date: Sat, 31 Jul 2021 19:03:27 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=89=93=E5=8D=A1=E7=82=B9=E8=B5=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../stdiet/custom/domain/SysWxUserLog.java | 9 ++++--- .../com/stdiet/custom/page/WxLogInfo.java | 3 ++- .../mapper/custom/SysWxUserLogMapper.xml | 26 +++++++++++++------ 3 files changed, 26 insertions(+), 12 deletions(-) diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysWxUserLog.java b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysWxUserLog.java index 6dd30e03e..732c0fba8 100644 --- a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysWxUserLog.java +++ b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysWxUserLog.java @@ -76,6 +76,7 @@ public class SysWxUserLog extends BaseEntity { */ @Excel(name = "饮食情况", readConverterExp = "Y=是,N=否") private String diet; + private String dietDesc; /** * 熬夜失眠(Y是 N否) @@ -90,9 +91,9 @@ public class SysWxUserLog extends BaseEntity { private String defecation; public void setDefecation(String defecation) { - if (StringUtils.isAlpha(defecation)) { -// this.defecation = defecation.equals("Y") ? "是" : "否"; - this.defecation = defecation.equals("Y") ? "顺畅" : "其他"; + if (defecation.equals("Y") || defecation.equals("N")) { + this.defecation = defecation.equals("Y") ? "是" : "否"; +// this.defecation = defecation.equals("Y") ? "顺畅" : "其他"; } else { this.defecation = defecation; } @@ -186,6 +187,8 @@ public class SysWxUserLog extends BaseEntity { @Excel(name = "体型对比照") private String bodyImages; + private String bodyDesc; + /** * 服务建议 */ diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/page/WxLogInfo.java b/stdiet-custom/src/main/java/com/stdiet/custom/page/WxLogInfo.java index faca143a8..f707b0d3d 100644 --- a/stdiet-custom/src/main/java/com/stdiet/custom/page/WxLogInfo.java +++ b/stdiet-custom/src/main/java/com/stdiet/custom/page/WxLogInfo.java @@ -86,6 +86,7 @@ public class WxLogInfo { * 体型对比照 */ // private String bodyImages; + private String bodyDesc; /** * 服务建议 @@ -122,7 +123,7 @@ public class WxLogInfo { private String healthManifesto; public void setDefecation(String defecation) { - if (StringUtils.isAlpha(defecation)) { + if (defecation.equals("Y") || defecation.equals("N")) { this.defecation = defecation.equals("Y") ? "是" : "否"; // this.defecation = defecation.equals("Y") ? "顺畅" : "其他"; } else { diff --git a/stdiet-custom/src/main/resources/mapper/custom/SysWxUserLogMapper.xml b/stdiet-custom/src/main/resources/mapper/custom/SysWxUserLogMapper.xml index bfb4944fb..4dccb316c 100644 --- a/stdiet-custom/src/main/resources/mapper/custom/SysWxUserLogMapper.xml +++ b/stdiet-custom/src/main/resources/mapper/custom/SysWxUserLogMapper.xml @@ -18,6 +18,7 @@ + @@ -37,6 +38,7 @@ + @@ -59,6 +61,7 @@ + @@ -80,6 +83,7 @@ + @@ -89,8 +93,8 @@ - select id,openid, weight, appid, phone, log_time, sleep_time, wakeup_time, sport, sport_desc, avatar_url, diet, 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,suggest,execution_score,comment,health_manifesto + 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 from sys_wx_user_log @@ -102,9 +106,9 @@ - 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.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 + 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, + 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 FROM sys_wx_user_log wxlog where wxlog.del_flag = 0 and wxlog.openid = #{openid} @@ -340,8 +350,8 @@