diff --git a/sql/ry_20200920.sql b/sql/ry_20200920.sql index 299099a62..f81727db5 100644 --- a/sql/ry_20200920.sql +++ b/sql/ry_20200920.sql @@ -769,11 +769,11 @@ create table sys_order ( drop table if exists sys_wx_user_info; create table sys_wx_user_info ( openid varchar(100) not null comment '微信openid', + appid varchar(100) comment '微信appid', nick_name varchar(30) comment '昵称', phone varchar(30) comment '电话', avatar_url varchar(255) comment '用户头像', - gender tinyint comment '性别', - path varchar(255) comment '文件路径', + sex char(1) comment '用户性别(0男 1女 2未知)', city varchar(16) comment '城市', province varchar(16) comment '省份', country varchar(16) comment '国家', @@ -790,14 +790,17 @@ create table sys_wx_user_info ( -- ---------------------------- drop table if exists sys_wx_user_log; create table sys_wx_user_log ( - openid varchar(100) not null comment '微信openid', + openid varchar(100) not null default 'manual' comment '微信openid', + appid varchar(100) comment '微信appid', weight decimal(10,2) comment '体重', + phone varchar(30) comment '电话', sleep_time datetime comment '睡觉时间', + avatar_url varchar(255) comment '用户头像', wakeup_time datetime comment '起床时间', - sport tinyint comment '运动情况', - diet tinyint comment '饮食情况', - sleep_quality tinyint comment '睡眠质量', - defecation tinyint comment '排便情况', + sport char(1) comment '运动情况(Y是 N否)', + diet char(1) comment '饮食情况(Y是 N否)', + insomnia char(1) comment '熬夜失眠(Y是 N否)', + defecation char(1) comment '排便情况', water tinyint comment '饮水量', create_by varchar(64) default '' comment '创建者', create_time datetime comment '创建时间', diff --git a/sql/wxuser/info.sql b/sql/wxuser/info.sql new file mode 100644 index 000000000..b29fdb7c4 --- /dev/null +++ b/sql/wxuser/info.sql @@ -0,0 +1,22 @@ +-- 菜单 SQL +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('微信用户', '2039', '1', 'info', 'custom/wxUserInfo/index', 1, 0, 'C', '0', '0', 'custom:info:list', 'wechat', 'wonder', '2020-11-28', 'wonder', '2020-11-28', '微信用户菜单'); + +-- 按钮父菜单ID +SELECT @parentId := LAST_INSERT_ID(); + +-- 按钮 SQL +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('微信用户查询', @parentId, '1', '#', '', 1, 0, 'F', '0', '0', 'custom:info:query', '#', 'wonder', '2020-11-28', 'wonder', '2020-11-28', ''); + +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('微信用户新增', @parentId, '2', '#', '', 1, 0, 'F', '0', '0', 'custom:info:add', '#', 'wonder', '2020-11-28', 'wonder', '2020-11-28', ''); + +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('微信用户修改', @parentId, '3', '#', '', 1, 0, 'F', '0', '0', 'custom:info:edit', '#', 'wonder', '2020-11-28', 'wonder', '2020-11-28', ''); + +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('微信用户删除', @parentId, '4', '#', '', 1, 0, 'F', '0', '0', 'custom:info:remove', '#', 'wonder', '2020-11-28', 'wonder', '2020-11-28', ''); + +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('微信用户导出', @parentId, '5', '#', '', 1, 0, 'F', '0', '0', 'custom:info:export', '#', 'wonder', '2020-11-28', 'wonder', '2020-11-28', ''); \ No newline at end of file diff --git a/sql/wxuser/log.sql b/sql/wxuser/log.sql new file mode 100644 index 000000000..ed60add5b --- /dev/null +++ b/sql/wxuser/log.sql @@ -0,0 +1,22 @@ +-- 菜单 SQL +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('微信用户记录', '2039', '1', 'log', 'custom/wxUserLog/index', 1, 0, 'C', '0', '0', 'custom:log:list', 'log', 'wonder', '2020-11-28', 'wonder', '2020-11-28', '微信用户记录菜单'); + +-- 按钮父菜单ID +SELECT @parentId := LAST_INSERT_ID(); + +-- 按钮 SQL +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('微信用户记录查询', @parentId, '1', '#', '', 1, 0, 'F', '0', '0', 'custom:log:query', '#', 'wonder', '2020-11-28', 'wonder', '2020-11-28', ''); + +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('微信用户记录新增', @parentId, '2', '#', '', 1, 0, 'F', '0', '0', 'custom:log:add', '#', 'wonder', '2020-11-28', 'wonder', '2020-11-28', ''); + +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('微信用户记录修改', @parentId, '3', '#', '', 1, 0, 'F', '0', '0', 'custom:log:edit', '#', 'wonder', '2020-11-28', 'wonder', '2020-11-28', ''); + +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('微信用户记录删除', @parentId, '4', '#', '', 1, 0, 'F', '0', '0', 'custom:log:remove', '#', 'wonder', '2020-11-28', 'wonder', '2020-11-28', ''); + +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('微信用户记录导出', @parentId, '5', '#', '', 1, 0, 'F', '0', '0', 'custom:log:export', '#', 'wonder', '2020-11-28', 'wonder', '2020-11-28', ''); \ No newline at end of file diff --git a/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysWxUserInfoController.java b/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysWxUserInfoController.java new file mode 100644 index 000000000..59be66f3c --- /dev/null +++ b/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysWxUserInfoController.java @@ -0,0 +1,111 @@ +package com.stdiet.web.controller.custom; + +import java.util.List; + +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.stdiet.common.annotation.Log; +import com.stdiet.common.core.controller.BaseController; +import com.stdiet.common.core.domain.AjaxResult; +import com.stdiet.common.enums.BusinessType; +import com.stdiet.custom.domain.SysWxUserInfo; +import com.stdiet.custom.service.ISysWxUserInfoService; +import com.stdiet.common.utils.poi.ExcelUtil; +import com.stdiet.common.core.page.TableDataInfo; + +/** + * 微信用户Controller + * + * @author wonder + * @date 2020-11-28 + */ +@RestController +@RequestMapping("/custom/wxUserInfo") +public class SysWxUserInfoController extends BaseController { + @Autowired + private ISysWxUserInfoService sysWxUserInfoService; + + /** + * 查询微信用户列表 + */ + @PreAuthorize("@ss.hasPermi('custom:wxUserInfo:list')") + @GetMapping("/list") + public TableDataInfo list(SysWxUserInfo sysWxUserInfo) { + startPage(); + List list = sysWxUserInfoService.selectSysWxUserInfoList(sysWxUserInfo); + return getDataTable(list); + } + + /** + * 导出微信用户列表 + */ + @PreAuthorize("@ss.hasPermi('custom:wxUserInfo:export')") + @Log(title = "微信用户", businessType = BusinessType.EXPORT) + @GetMapping("/export") + public AjaxResult export(SysWxUserInfo sysWxUserInfo) { + List list = sysWxUserInfoService.selectSysWxUserInfoList(sysWxUserInfo); + ExcelUtil util = new ExcelUtil(SysWxUserInfo.class); + return util.exportExcel(list, "wxUserInfo"); + } + + /** + * 获取微信用户详细信息 + */ + @PreAuthorize("@ss.hasPermi('custom:wxUserInfo:query')") + @GetMapping(value = "/{openid}") + public AjaxResult getInfo(@PathVariable("openid") String openid) { + return AjaxResult.success(sysWxUserInfoService.selectSysWxUserInfoById(openid)); + } + + /** + * 新增微信用户 + */ + @PreAuthorize("@ss.hasPermi('custom:wxUserInfo:add')") + @Log(title = "微信用户", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody SysWxUserInfo sysWxUserInfo) { + return toAjax(sysWxUserInfoService.insertSysWxUserInfo(sysWxUserInfo)); + } + + /** + * 修改微信用户 + */ + @PreAuthorize("@ss.hasPermi('custom:wxUserInfo:edit')") + @Log(title = "微信用户", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody SysWxUserInfo sysWxUserInfo) { + return toAjax(sysWxUserInfoService.updateSysWxUserInfo(sysWxUserInfo)); + } + + /** + * 删除微信用户 + */ + @PreAuthorize("@ss.hasPermi('custom:wxUserInfo:remove')") + @Log(title = "微信用户", businessType = BusinessType.DELETE) + @DeleteMapping("/{openids}") + public AjaxResult remove(@PathVariable String[] openids) { + return toAjax(sysWxUserInfoService.deleteSysWxUserInfoByIds(openids)); + } + + @PostMapping("/wx/adduser") + public AjaxResult addUser(@RequestBody SysWxUserInfo sysWxUserInfo) { + + SysWxUserInfo userInfo = sysWxUserInfoService.selectSysWxUserInfoById(sysWxUserInfo.getOpenid()); + int resultCode = 0; + if (userInfo == null) { + resultCode = sysWxUserInfoService.insertSysWxUserInfo(sysWxUserInfo); + } else { + sysWxUserInfo.setPhone(userInfo.getPhone()); + resultCode = sysWxUserInfoService.updateSysWxUserInfo(sysWxUserInfo); + } + return toAjax(resultCode); + } +} \ No newline at end of file diff --git a/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysWxUserLogController.java b/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysWxUserLogController.java new file mode 100644 index 000000000..8df2f7657 --- /dev/null +++ b/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysWxUserLogController.java @@ -0,0 +1,111 @@ +package com.stdiet.web.controller.custom; +import java.util.List; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.stdiet.common.annotation.Log; +import com.stdiet.common.core.controller.BaseController; +import com.stdiet.common.core.domain.AjaxResult; +import com.stdiet.common.enums.BusinessType; +import com.stdiet.custom.domain.SysWxUserLog; +import com.stdiet.custom.service.ISysWxUserLogService; +import com.stdiet.common.utils.poi.ExcelUtil; +import com.stdiet.common.core.page.TableDataInfo; + +/** + * 微信用户记录Controller + * + * @author wonder + * @date 2020-11-28 + */ +@RestController +@RequestMapping("/custom/wxUserLog") +public class SysWxUserLogController extends BaseController +{ + @Autowired + private ISysWxUserLogService sysWxUserLogService; + + /** + * 查询微信用户记录列表 + */ + @PreAuthorize("@ss.hasPermi('custom:wxUserLog:list')") + @GetMapping("/list") + public TableDataInfo list(SysWxUserLog sysWxUserLog) + { + startPage(); + List list = sysWxUserLogService.selectSysWxUserLogList(sysWxUserLog); + return getDataTable(list); + } + + /** + * 导出微信用户记录列表 + */ + @PreAuthorize("@ss.hasPermi('custom:wxUserLog:export')") + @Log(title = "微信用户记录", businessType = BusinessType.EXPORT) + @GetMapping("/export") + public AjaxResult export(SysWxUserLog sysWxUserLog) + { + List list = sysWxUserLogService.selectSysWxUserLogList(sysWxUserLog); + ExcelUtil util = new ExcelUtil(SysWxUserLog.class); + return util.exportExcel(list, "wxUserLog"); + } + + /** + * 获取微信用户记录详细信息 + */ + @PreAuthorize("@ss.hasPermi('custom:wxUserLog:query')") + @GetMapping(value = "/{openid}") + public AjaxResult getInfo(@PathVariable("openid") String openid) + { + return AjaxResult.success(sysWxUserLogService.selectSysWxUserLogById(openid)); + } + + /** + * 新增微信用户记录 + */ + @PreAuthorize("@ss.hasPermi('custom:wxUserLog:add')") + @Log(title = "微信用户记录", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody SysWxUserLog sysWxUserLog) + { + return toAjax(sysWxUserLogService.insertSysWxUserLog(sysWxUserLog)); + } + + /** + * 修改微信用户记录 + */ + @PreAuthorize("@ss.hasPermi('custom:wxUserLog:edit')") + @Log(title = "微信用户记录", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody SysWxUserLog sysWxUserLog) + { + return toAjax(sysWxUserLogService.updateSysWxUserLog(sysWxUserLog)); + } + + /** + * 删除微信用户记录 + */ + @PreAuthorize("@ss.hasPermi('custom:wxUserLog:remove')") + @Log(title = "微信用户记录", businessType = BusinessType.DELETE) + @DeleteMapping("/{openids}") + public AjaxResult remove(@PathVariable String[] openids) + { + return toAjax(sysWxUserLogService.deleteSysWxUserLogByIds(openids)); + } + + @GetMapping(value = "/wx/logs/{openid}") + public TableDataInfo getLogInfo(@PathVariable("openid") String openid) + { + SysWxUserLog sysWxUserLog = new SysWxUserLog(); + sysWxUserLog.setOpenid(openid); + List list = sysWxUserLogService.selectSysWxUserLogList(sysWxUserLog); + return getDataTable(list); + } +} \ No newline at end of file diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysContract.java b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysContract.java index 022115127..63cb26de7 100644 --- a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysContract.java +++ b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysContract.java @@ -220,4 +220,138 @@ public class SysContract extends BaseEntity { .toString(); } + + /** + * 微信用户对象 sys_wx_user_info + * + * @author wonder + * @date 2020-11-28 + */ + public static class SysWxUserInfo extends BaseEntity + { + private static final long serialVersionUID = 1L; + + /** 微信openid */ + private String openid; + + /** 昵称 */ + @Excel(name = "昵称") + private String nickName; + + /** 电话 */ + @Excel(name = "电话") + private String phone; + + /** 用户头像 */ + @Excel(name = "用户头像") + private String avatarUrl; + + /** 用户性别(0男 1女 2未知) */ + @Excel(name = "用户性别", readConverterExp = "0=男,1=女,2=未知") + private String sex; + + /** 城市 */ + @Excel(name = "城市") + private String city; + + /** 省份 */ + @Excel(name = "省份") + private String province; + + /** 国家 */ + @Excel(name = "国家") + private String country; + + public void setOpenid(String openid) + { + this.openid = openid; + } + + public String getOpenid() + { + return openid; + } + public void setNickName(String nickName) + { + this.nickName = nickName; + } + + public String getNickName() + { + return nickName; + } + public void setPhone(String phone) + { + this.phone = phone; + } + + public String getPhone() + { + return phone; + } + public void setAvatarUrl(String avatarUrl) + { + this.avatarUrl = avatarUrl; + } + + public String getAvatarUrl() + { + return avatarUrl; + } + public void setSex(String sex) + { + this.sex = sex; + } + + public String getSex() + { + return sex; + } + public void setCity(String city) + { + this.city = city; + } + + public String getCity() + { + return city; + } + public void setProvince(String province) + { + this.province = province; + } + + public String getProvince() + { + return province; + } + public void setCountry(String country) + { + this.country = country; + } + + public String getCountry() + { + return country; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("openid", getOpenid()) + .append("nickName", getNickName()) + .append("phone", getPhone()) + .append("avatarUrl", getAvatarUrl()) + .append("sex", getSex()) + .append("city", getCity()) + .append("province", getProvince()) + .append("country", getCountry()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .toString(); + } + } } diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysOrder.java b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysOrder.java index a75c7cee7..d62758656 100644 --- a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysOrder.java +++ b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysOrder.java @@ -42,6 +42,14 @@ public class SysOrder extends BaseEntity { @Excel(name = "金额") private BigDecimal amount; + private BigDecimal weight; + + private String status; + + private Date startTime; + + private Date pauseTime; + /** * 收款方式 */ @@ -173,6 +181,40 @@ public class SysOrder extends BaseEntity { @Excel(name = "成交时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") private Date orderTime; + public Date getStartTime() { + return startTime; + } + + public BigDecimal getWeight() { + return weight; + } + + public Date getPauseTime() { + return pauseTime; + } + + public String getStatus() { + return status; + } + + public void setStartTime(Date startTime) { + this.startTime = startTime; + } + + public void setPauseTime(Date pauseTime) { + this.pauseTime = pauseTime; + } + + public void setStatus(String status) { + this.status = status; + } + + + + public void setWeight(BigDecimal weight) { + this.weight = weight; + } + public String getServeTime() { return serveTime; } @@ -442,6 +484,10 @@ public class SysOrder extends BaseEntity { .append("serveTimeId", getServeTimeId()) .append("serveTime", getServeTime()) .append("reviewStatus", getReviewStatus()) + .append("status", getStatus()) + .append("startTime", getStartTime()) + .append("pauseTime", getPauseTime()) + .append("weight", getWeight()) .toString(); } } \ No newline at end of file diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysWxUserInfo.java b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysWxUserInfo.java new file mode 100644 index 000000000..dfcaaaaae --- /dev/null +++ b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysWxUserInfo.java @@ -0,0 +1,154 @@ +package com.stdiet.custom.domain; + +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; + +/** + * 微信用户对象 sys_wx_user_info + * + * @author wonder + * @date 2020-11-28 + */ +public class SysWxUserInfo extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 微信openid */ + private String openid; + + /** 昵称 */ + @Excel(name = "昵称") + private String nickName; + + /** 微信appid */ + @Excel(name = "微信appid") + private String appid; + + /** 电话 */ + @Excel(name = "电话") + private String phone; + + /** 用户头像 */ + @Excel(name = "用户头像") + private String avatarUrl; + + /** 用户性别(0男 1女 2未知) */ + @Excel(name = "用户性别", readConverterExp = "0=男,1=女,2=未知") + private String sex; + + /** 城市 */ + @Excel(name = "城市") + private String city; + + /** 省份 */ + @Excel(name = "省份") + private String province; + + /** 国家 */ + @Excel(name = "国家") + private String country; + + public void setOpenid(String openid) + { + this.openid = openid; + } + + public String getOpenid() + { + return openid; + } + public void setNickName(String nickName) + { + this.nickName = nickName; + } + + public String getNickName() + { + return nickName; + } + public void setAppid(String appid) + { + this.appid = appid; + } + + public String getAppid() + { + return appid; + } + public void setPhone(String phone) + { + this.phone = phone; + } + + public String getPhone() + { + return phone; + } + public void setAvatarUrl(String avatarUrl) + { + this.avatarUrl = avatarUrl; + } + + public String getAvatarUrl() + { + return avatarUrl; + } + public void setSex(String sex) + { + this.sex = sex; + } + + public String getSex() + { + return sex; + } + public void setCity(String city) + { + this.city = city; + } + + public String getCity() + { + return city; + } + public void setProvince(String province) + { + this.province = province; + } + + public String getProvince() + { + return province; + } + public void setCountry(String country) + { + this.country = country; + } + + public String getCountry() + { + return country; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("openid", getOpenid()) + .append("nickName", getNickName()) + .append("appid", getAppid()) + .append("phone", getPhone()) + .append("avatarUrl", getAvatarUrl()) + .append("sex", getSex()) + .append("city", getCity()) + .append("province", getProvince()) + .append("country", getCountry()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .toString(); + } +} \ No newline at end of file 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 new file mode 100644 index 000000000..9437b844d --- /dev/null +++ b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysWxUserLog.java @@ -0,0 +1,201 @@ +package com.stdiet.custom.domain; + +import java.math.BigDecimal; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +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; + +/** + * 微信用户记录对象 sys_wx_user_log + * + * @author wonder + * @date 2020-11-28 + */ +public class SysWxUserLog extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 微信openid */ + private String openid; + + /** 体重 */ + @Excel(name = "体重") + private BigDecimal weight; + + /** 微信appid */ + @Excel(name = "微信appid") + private String appid; + + /** 电话 */ + @Excel(name = "电话") + private String phone; + + /** 睡觉时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "睡觉时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date sleepTime; + + /** 起床时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "起床时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date wakeupTime; + + /** 运动情况 */ + @Excel(name = "运动情况") + private Long sport; + + /** 用户头像 */ + @Excel(name = "用户头像") + private String avatarUrl; + + /** 饮食情况 */ + @Excel(name = "饮食情况") + private Long diet; + + /** 熬夜失眠(Y是 N否) */ + @Excel(name = "熬夜失眠", readConverterExp = "Y=是,N=否") + private String insomnia; + + /** 排便情况 */ + @Excel(name = "排便情况") + private Long defecation; + + /** 饮水量 */ + @Excel(name = "饮水量") + private Long water; + + public void setOpenid(String openid) + { + this.openid = openid; + } + + public String getOpenid() + { + return openid; + } + public void setWeight(BigDecimal weight) + { + this.weight = weight; + } + + public BigDecimal getWeight() + { + return weight; + } + public void setAppid(String appid) + { + this.appid = appid; + } + + public String getAppid() + { + return appid; + } + public void setPhone(String phone) + { + this.phone = phone; + } + + public String getPhone() + { + return phone; + } + public void setSleepTime(Date sleepTime) + { + this.sleepTime = sleepTime; + } + + public Date getSleepTime() + { + return sleepTime; + } + public void setWakeupTime(Date wakeupTime) + { + this.wakeupTime = wakeupTime; + } + + public Date getWakeupTime() + { + return wakeupTime; + } + public void setSport(Long sport) + { + this.sport = sport; + } + + public Long getSport() + { + return sport; + } + public void setAvatarUrl(String avatarUrl) + { + this.avatarUrl = avatarUrl; + } + + public String getAvatarUrl() + { + return avatarUrl; + } + public void setDiet(Long diet) + { + this.diet = diet; + } + + public Long getDiet() + { + return diet; + } + public void setInsomnia(String insomnia) + { + this.insomnia = insomnia; + } + + public String getInsomnia() + { + return insomnia; + } + public void setDefecation(Long defecation) + { + this.defecation = defecation; + } + + public Long getDefecation() + { + return defecation; + } + public void setWater(Long water) + { + this.water = water; + } + + public Long getWater() + { + return water; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("openid", getOpenid()) + .append("weight", getWeight()) + .append("appid", getAppid()) + .append("phone", getPhone()) + .append("sleepTime", getSleepTime()) + .append("wakeupTime", getWakeupTime()) + .append("sport", getSport()) + .append("avatarUrl", getAvatarUrl()) + .append("diet", getDiet()) + .append("insomnia", getInsomnia()) + .append("defecation", getDefecation()) + .append("water", getWater()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .toString(); + } +} \ No newline at end of file diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/mapper/SysWxUserInfoMapper.java b/stdiet-custom/src/main/java/com/stdiet/custom/mapper/SysWxUserInfoMapper.java new file mode 100644 index 000000000..e2672e4e3 --- /dev/null +++ b/stdiet-custom/src/main/java/com/stdiet/custom/mapper/SysWxUserInfoMapper.java @@ -0,0 +1,61 @@ +package com.stdiet.custom.mapper; + +import java.util.List; +import com.stdiet.custom.domain.SysWxUserInfo; + +/** + * 微信用户Mapper接口 + * + * @author wonder + * @date 2020-11-28 + */ +public interface SysWxUserInfoMapper +{ + /** + * 查询微信用户 + * + * @param openid 微信用户ID + * @return 微信用户 + */ + public SysWxUserInfo selectSysWxUserInfoById(String openid); + + /** + * 查询微信用户列表 + * + * @param sysWxUserInfo 微信用户 + * @return 微信用户集合 + */ + public List selectSysWxUserInfoList(SysWxUserInfo sysWxUserInfo); + + /** + * 新增微信用户 + * + * @param sysWxUserInfo 微信用户 + * @return 结果 + */ + public int insertSysWxUserInfo(SysWxUserInfo sysWxUserInfo); + + /** + * 修改微信用户 + * + * @param sysWxUserInfo 微信用户 + * @return 结果 + */ + public int updateSysWxUserInfo(SysWxUserInfo sysWxUserInfo); + + /** + * 删除微信用户 + * + * @param openid 微信用户ID + * @return 结果 + */ + public int deleteSysWxUserInfoById(String openid); + + /** + * 批量删除微信用户 + * + * @param openids 需要删除的数据ID + * @return 结果 + */ + public int deleteSysWxUserInfoByIds(String[] openids); +} \ No newline at end of file diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/mapper/SysWxUserLogMapper.java b/stdiet-custom/src/main/java/com/stdiet/custom/mapper/SysWxUserLogMapper.java new file mode 100644 index 000000000..dc9f61b78 --- /dev/null +++ b/stdiet-custom/src/main/java/com/stdiet/custom/mapper/SysWxUserLogMapper.java @@ -0,0 +1,61 @@ +package com.stdiet.custom.mapper; + +import java.util.List; +import com.stdiet.custom.domain.SysWxUserLog; + +/** + * 微信用户记录Mapper接口 + * + * @author wonder + * @date 2020-11-28 + */ +public interface SysWxUserLogMapper +{ + /** + * 查询微信用户记录 + * + * @param openid 微信用户记录ID + * @return 微信用户记录 + */ + public SysWxUserLog selectSysWxUserLogById(String openid); + + /** + * 查询微信用户记录列表 + * + * @param sysWxUserLog 微信用户记录 + * @return 微信用户记录集合 + */ + public List selectSysWxUserLogList(SysWxUserLog sysWxUserLog); + + /** + * 新增微信用户记录 + * + * @param sysWxUserLog 微信用户记录 + * @return 结果 + */ + public int insertSysWxUserLog(SysWxUserLog sysWxUserLog); + + /** + * 修改微信用户记录 + * + * @param sysWxUserLog 微信用户记录 + * @return 结果 + */ + public int updateSysWxUserLog(SysWxUserLog sysWxUserLog); + + /** + * 删除微信用户记录 + * + * @param openid 微信用户记录ID + * @return 结果 + */ + public int deleteSysWxUserLogById(String openid); + + /** + * 批量删除微信用户记录 + * + * @param openids 需要删除的数据ID + * @return 结果 + */ + public int deleteSysWxUserLogByIds(String[] openids); +} \ No newline at end of file diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/service/ISysWxUserInfoService.java b/stdiet-custom/src/main/java/com/stdiet/custom/service/ISysWxUserInfoService.java new file mode 100644 index 000000000..e5dcc1ca8 --- /dev/null +++ b/stdiet-custom/src/main/java/com/stdiet/custom/service/ISysWxUserInfoService.java @@ -0,0 +1,61 @@ +package com.stdiet.custom.service; + +import java.util.List; +import com.stdiet.custom.domain.SysWxUserInfo; + +/** + * 微信用户Service接口 + * + * @author wonder + * @date 2020-11-28 + */ +public interface ISysWxUserInfoService +{ + /** + * 查询微信用户 + * + * @param openid 微信用户ID + * @return 微信用户 + */ + public SysWxUserInfo selectSysWxUserInfoById(String openid); + + /** + * 查询微信用户列表 + * + * @param sysWxUserInfo 微信用户 + * @return 微信用户集合 + */ + public List selectSysWxUserInfoList(SysWxUserInfo sysWxUserInfo); + + /** + * 新增微信用户 + * + * @param sysWxUserInfo 微信用户 + * @return 结果 + */ + public int insertSysWxUserInfo(SysWxUserInfo sysWxUserInfo); + + /** + * 修改微信用户 + * + * @param sysWxUserInfo 微信用户 + * @return 结果 + */ + public int updateSysWxUserInfo(SysWxUserInfo sysWxUserInfo); + + /** + * 批量删除微信用户 + * + * @param openids 需要删除的微信用户ID + * @return 结果 + */ + public int deleteSysWxUserInfoByIds(String[] openids); + + /** + * 删除微信用户信息 + * + * @param openid 微信用户ID + * @return 结果 + */ + public int deleteSysWxUserInfoById(String openid); +} \ No newline at end of file diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/service/ISysWxUserLogService.java b/stdiet-custom/src/main/java/com/stdiet/custom/service/ISysWxUserLogService.java new file mode 100644 index 000000000..f60121da4 --- /dev/null +++ b/stdiet-custom/src/main/java/com/stdiet/custom/service/ISysWxUserLogService.java @@ -0,0 +1,61 @@ +package com.stdiet.custom.service; + +import java.util.List; +import com.stdiet.custom.domain.SysWxUserLog; + +/** + * 微信用户记录Service接口 + * + * @author wonder + * @date 2020-11-28 + */ +public interface ISysWxUserLogService +{ + /** + * 查询微信用户记录 + * + * @param openid 微信用户记录ID + * @return 微信用户记录 + */ + public SysWxUserLog selectSysWxUserLogById(String openid); + + /** + * 查询微信用户记录列表 + * + * @param sysWxUserLog 微信用户记录 + * @return 微信用户记录集合 + */ + public List selectSysWxUserLogList(SysWxUserLog sysWxUserLog); + + /** + * 新增微信用户记录 + * + * @param sysWxUserLog 微信用户记录 + * @return 结果 + */ + public int insertSysWxUserLog(SysWxUserLog sysWxUserLog); + + /** + * 修改微信用户记录 + * + * @param sysWxUserLog 微信用户记录 + * @return 结果 + */ + public int updateSysWxUserLog(SysWxUserLog sysWxUserLog); + + /** + * 批量删除微信用户记录 + * + * @param openids 需要删除的微信用户记录ID + * @return 结果 + */ + public int deleteSysWxUserLogByIds(String[] openids); + + /** + * 删除微信用户记录信息 + * + * @param openid 微信用户记录ID + * @return 结果 + */ + public int deleteSysWxUserLogById(String openid); +} \ No newline at end of file diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysWxUserInfoServiceImpl.java b/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysWxUserInfoServiceImpl.java new file mode 100644 index 000000000..f86f47d70 --- /dev/null +++ b/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysWxUserInfoServiceImpl.java @@ -0,0 +1,96 @@ +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.SysWxUserInfoMapper; +import com.stdiet.custom.domain.SysWxUserInfo; +import com.stdiet.custom.service.ISysWxUserInfoService; + +/** + * 微信用户Service业务层处理 + * + * @author wonder + * @date 2020-11-28 + */ +@Service +public class SysWxUserInfoServiceImpl implements ISysWxUserInfoService +{ + @Autowired + private SysWxUserInfoMapper sysWxUserInfoMapper; + + /** + * 查询微信用户 + * + * @param openid 微信用户ID + * @return 微信用户 + */ + @Override + public SysWxUserInfo selectSysWxUserInfoById(String openid) + { + return sysWxUserInfoMapper.selectSysWxUserInfoById(openid); + } + + /** + * 查询微信用户列表 + * + * @param sysWxUserInfo 微信用户 + * @return 微信用户 + */ + @Override + public List selectSysWxUserInfoList(SysWxUserInfo sysWxUserInfo) + { + return sysWxUserInfoMapper.selectSysWxUserInfoList(sysWxUserInfo); + } + + /** + * 新增微信用户 + * + * @param sysWxUserInfo 微信用户 + * @return 结果 + */ + @Override + public int insertSysWxUserInfo(SysWxUserInfo sysWxUserInfo) + { + sysWxUserInfo.setCreateTime(DateUtils.getNowDate()); + return sysWxUserInfoMapper.insertSysWxUserInfo(sysWxUserInfo); + } + + /** + * 修改微信用户 + * + * @param sysWxUserInfo 微信用户 + * @return 结果 + */ + @Override + public int updateSysWxUserInfo(SysWxUserInfo sysWxUserInfo) + { + sysWxUserInfo.setUpdateTime(DateUtils.getNowDate()); + return sysWxUserInfoMapper.updateSysWxUserInfo(sysWxUserInfo); + } + + /** + * 批量删除微信用户 + * + * @param openids 需要删除的微信用户ID + * @return 结果 + */ + @Override + public int deleteSysWxUserInfoByIds(String[] openids) + { + return sysWxUserInfoMapper.deleteSysWxUserInfoByIds(openids); + } + + /** + * 删除微信用户信息 + * + * @param openid 微信用户ID + * @return 结果 + */ + @Override + public int deleteSysWxUserInfoById(String openid) + { + return sysWxUserInfoMapper.deleteSysWxUserInfoById(openid); + } +} \ No newline at end of file diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysWxUserLogServiceImpl.java b/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysWxUserLogServiceImpl.java new file mode 100644 index 000000000..04204985e --- /dev/null +++ b/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysWxUserLogServiceImpl.java @@ -0,0 +1,96 @@ +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.SysWxUserLogMapper; +import com.stdiet.custom.domain.SysWxUserLog; +import com.stdiet.custom.service.ISysWxUserLogService; + +/** + * 微信用户记录Service业务层处理 + * + * @author wonder + * @date 2020-11-28 + */ +@Service +public class SysWxUserLogServiceImpl implements ISysWxUserLogService +{ + @Autowired + private SysWxUserLogMapper sysWxUserLogMapper; + + /** + * 查询微信用户记录 + * + * @param openid 微信用户记录ID + * @return 微信用户记录 + */ + @Override + public SysWxUserLog selectSysWxUserLogById(String openid) + { + return sysWxUserLogMapper.selectSysWxUserLogById(openid); + } + + /** + * 查询微信用户记录列表 + * + * @param sysWxUserLog 微信用户记录 + * @return 微信用户记录 + */ + @Override + public List selectSysWxUserLogList(SysWxUserLog sysWxUserLog) + { + return sysWxUserLogMapper.selectSysWxUserLogList(sysWxUserLog); + } + + /** + * 新增微信用户记录 + * + * @param sysWxUserLog 微信用户记录 + * @return 结果 + */ + @Override + public int insertSysWxUserLog(SysWxUserLog sysWxUserLog) + { + sysWxUserLog.setCreateTime(DateUtils.getNowDate()); + return sysWxUserLogMapper.insertSysWxUserLog(sysWxUserLog); + } + + /** + * 修改微信用户记录 + * + * @param sysWxUserLog 微信用户记录 + * @return 结果 + */ + @Override + public int updateSysWxUserLog(SysWxUserLog sysWxUserLog) + { + sysWxUserLog.setUpdateTime(DateUtils.getNowDate()); + return sysWxUserLogMapper.updateSysWxUserLog(sysWxUserLog); + } + + /** + * 批量删除微信用户记录 + * + * @param openids 需要删除的微信用户记录ID + * @return 结果 + */ + @Override + public int deleteSysWxUserLogByIds(String[] openids) + { + return sysWxUserLogMapper.deleteSysWxUserLogByIds(openids); + } + + /** + * 删除微信用户记录信息 + * + * @param openid 微信用户记录ID + * @return 结果 + */ + @Override + public int deleteSysWxUserLogById(String openid) + { + return sysWxUserLogMapper.deleteSysWxUserLogById(openid); + } +} \ No newline at end of file diff --git a/stdiet-custom/src/main/resources/mapper/custom/SysOrderMapper.xml b/stdiet-custom/src/main/resources/mapper/custom/SysOrderMapper.xml index ff5634cd7..e8a3be7d8 100644 --- a/stdiet-custom/src/main/resources/mapper/custom/SysOrderMapper.xml +++ b/stdiet-custom/src/main/resources/mapper/custom/SysOrderMapper.xml @@ -9,6 +9,10 @@ + + + + @@ -34,7 +38,10 @@ - select o.order_id, o.review_status, o.customer, o.phone, o.amount, ser.dict_label as serve_time, o.serve_time_id, o.pay_type_id, pay.dict_label as pay_type, o.pre_sale_id, o.create_by, o.create_time, o.after_sale_id, o.update_by, o.update_time, o.nutritionist_id, o.remark, o.nutri_assis_id, o.account_id, acc.dict_label as account, o.planner_id, o.planner_assis_id, o.operator_id, o.operator_assis_id, o.recommender, o.order_time from sys_order o + select o.order_id, o.review_status, o.customer, o.phone, o.amount, o.start_time, o.pause_time, o.status, o.weight, ser.dict_label as serve_time, + o.serve_time_id, o.pay_type_id, pay.dict_label as pay_type, o.pre_sale_id, o.create_by, o.create_time, o.after_sale_id, o.update_by, o.update_time, + o.nutritionist_id, o.remark, o.nutri_assis_id, o.account_id, acc.dict_label as account, o.planner_id, o.planner_assis_id, o.operator_id, o.operator_assis_id, + o.recommender, o.order_time from sys_order o LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'cus_pay_type') AS pay ON pay.dict_value = o.pay_type_id LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'cus_account') AS acc ON acc.dict_value = o.account_id LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'cus_serve_time') AS ser ON ser.dict_value = o.serve_time_id @@ -46,6 +53,7 @@ and order_id = #{orderId} and customer = #{customer} and phone = #{phone} + and status = #{status} and pay_type_id = #{payTypeId} and pre_sale_id = #{preSaleId} and after_sale_id = #{afterSaleId} @@ -70,6 +78,7 @@ and order_id = #{orderId} and customer = #{customer} and phone = #{phone} + and status = #{status} and pay_type_id = #{payTypeId} and pre_sale_id = #{preSaleId} and after_sale_id = #{afterSaleId} @@ -101,6 +110,10 @@ customer, phone, amount, + status, + pause_time, + start_time, + weight, pay_type_id, pre_sale_id, create_by, @@ -126,6 +139,10 @@ #{customer}, #{phone}, #{amount}, + #{status}, + #{pauseTime}, + #{startTime}, + #{weight}, #{payTypeId}, #{preSaleId}, #{createBy}, @@ -154,6 +171,10 @@ customer = #{customer}, phone = #{phone}, amount = #{amount}, + weight = #{weight}, + status = #{status}, + pause_time = #{pauseTime}, + start_time = #{startTime}, pay_type_id = #{payTypeId}, pre_sale_id = #{preSaleId}, create_by = #{createBy}, diff --git a/stdiet-custom/src/main/resources/mapper/custom/SysWxUserInfoMapper.xml b/stdiet-custom/src/main/resources/mapper/custom/SysWxUserInfoMapper.xml new file mode 100644 index 000000000..a3331fcc0 --- /dev/null +++ b/stdiet-custom/src/main/resources/mapper/custom/SysWxUserInfoMapper.xml @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + select openid, nick_name, appid, phone, avatar_url, sex, city, province, country, create_by, create_time, update_by, update_time, remark from sys_wx_user_info + + + + + + + + insert into sys_wx_user_info + + openid, + nick_name, + appid, + phone, + avatar_url, + sex, + city, + province, + country, + create_by, + create_time, + update_by, + update_time, + remark, + + + #{openid}, + #{nickName}, + #{appid}, + #{phone}, + #{avatarUrl}, + #{sex}, + #{city}, + #{province}, + #{country}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + + + + + update sys_wx_user_info + + nick_name = #{nickName}, + appid = #{appid}, + phone = #{phone}, + avatar_url = #{avatarUrl}, + sex = #{sex}, + city = #{city}, + province = #{province}, + country = #{country}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + + where openid = #{openid} + + + + delete from sys_wx_user_info where openid = #{openid} + + + + delete from sys_wx_user_info where openid in + + #{openid} + + + + \ No newline at end of file diff --git a/stdiet-custom/src/main/resources/mapper/custom/SysWxUserLogMapper.xml b/stdiet-custom/src/main/resources/mapper/custom/SysWxUserLogMapper.xml new file mode 100644 index 000000000..4d6911980 --- /dev/null +++ b/stdiet-custom/src/main/resources/mapper/custom/SysWxUserLogMapper.xml @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + select openid, weight, appid, phone, 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 + + + + + + + + insert into sys_wx_user_log + + openid, + weight, + appid, + phone, + sleep_time, + wakeup_time, + sport, + avatar_url, + diet, + insomnia, + defecation, + water, + create_by, + create_time, + update_by, + update_time, + remark, + + + #{openid}, + #{weight}, + #{appid}, + #{phone}, + #{sleepTime}, + #{wakeupTime}, + #{sport}, + #{avatarUrl}, + #{diet}, + #{insomnia}, + #{defecation}, + #{water}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + + + + + update sys_wx_user_log + + weight = #{weight}, + appid = #{appid}, + phone = #{phone}, + sleep_time = #{sleepTime}, + wakeup_time = #{wakeupTime}, + sport = #{sport}, + avatar_url = #{avatarUrl}, + diet = #{diet}, + insomnia = #{insomnia}, + defecation = #{defecation}, + water = #{water}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + + where openid = #{openid} + + + + delete from sys_wx_user_log where openid = #{openid} + + + + delete from sys_wx_user_log where openid in + + #{openid} + + + + \ No newline at end of file diff --git a/stdiet-framework/src/main/java/com/stdiet/framework/config/SecurityConfig.java b/stdiet-framework/src/main/java/com/stdiet/framework/config/SecurityConfig.java index 889fcf999..1dc825216 100644 --- a/stdiet-framework/src/main/java/com/stdiet/framework/config/SecurityConfig.java +++ b/stdiet-framework/src/main/java/com/stdiet/framework/config/SecurityConfig.java @@ -98,7 +98,9 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter { "/login", "/captchaImage", "/custom/contract/sign", - "/custom/contract/file/**" + "/custom/contract/file/**", + "/custom/wxUserInfo/wx/**", + "/custom/wxUserLog/wx/**" ).anonymous() .antMatchers( HttpMethod.GET, diff --git a/stdiet-ui/src/api/custom/wxUserInfo.js b/stdiet-ui/src/api/custom/wxUserInfo.js new file mode 100644 index 000000000..e1732d97d --- /dev/null +++ b/stdiet-ui/src/api/custom/wxUserInfo.js @@ -0,0 +1,53 @@ +import request from '@/utils/request' + +// 查询微信用户列表 +export function listWxUserInfo(query) { + return request({ + url: '/custom/wxUserInfo/list', + method: 'get', + params: query + }) +} + +// 查询微信用户详细 +export function getWxUserInfo(openid) { + return request({ + url: '/custom/wxUserInfo/' + openid, + method: 'get' + }) +} + +// 新增微信用户 +export function addWxUserInfo(data) { + return request({ + url: '/custom/wxUserInfo', + method: 'post', + data: data + }) +} + +// 修改微信用户 +export function updateWxUserInfo(data) { + return request({ + url: '/custom/wxUserInfo', + method: 'put', + data: data + }) +} + +// 删除微信用户 +export function delWxUserInfo(openid) { + return request({ + url: '/custom/wxUserInfo/' + openid, + method: 'delete' + }) +} + +// 导出微信用户 +export function exportWxUserInfo(query) { + return request({ + url: '/custom/wxUserInfo/export', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/stdiet-ui/src/api/custom/wxUserLog.js b/stdiet-ui/src/api/custom/wxUserLog.js new file mode 100644 index 000000000..29a706b55 --- /dev/null +++ b/stdiet-ui/src/api/custom/wxUserLog.js @@ -0,0 +1,53 @@ +import request from '@/utils/request' + +// 查询微信用户记录列表 +export function listWxUserLog(query) { + return request({ + url: '/custom/wxUserLog/list', + method: 'get', + params: query + }) +} + +// 查询微信用户记录详细 +export function getWxUserLog(openid) { + return request({ + url: '/custom/wxUserLog/' + openid, + method: 'get' + }) +} + +// 新增微信用户记录 +export function addWxUserLog(data) { + return request({ + url: '/custom/wxUserLog', + method: 'post', + data: data + }) +} + +// 修改微信用户记录 +export function updateWxUserLog(data) { + return request({ + url: '/custom/wxUserLog', + method: 'put', + data: data + }) +} + +// 删除微信用户记录 +export function delWxUserLog(openid) { + return request({ + url: '/custom/wxUserLog/' + openid, + method: 'delete' + }) +} + +// 导出微信用户记录 +export function exportWxUserLog(query) { + return request({ + url: '/custom/wxUserLog/export', + method: 'get', + params: query + }) +} diff --git a/stdiet-ui/src/views/custom/order/index.vue b/stdiet-ui/src/views/custom/order/index.vue index 5976e23bd..9f3daddb0 100644 --- a/stdiet-ui/src/views/custom/order/index.vue +++ b/stdiet-ui/src/views/custom/order/index.vue @@ -3,10 +3,10 @@ - + - + + +