commit
0225b91e92
@ -111,12 +111,14 @@ public class SysOrderNutritionistReplaceRecordController extends BaseController
|
|||||||
return AjaxResult.error("开始时间不能小于"+ DateUtils.dateTime(sysOrder.getCommissStartTime()));
|
return AjaxResult.error("开始时间不能小于"+ DateUtils.dateTime(sysOrder.getCommissStartTime()));
|
||||||
}
|
}
|
||||||
//更换的售后或营养师不能与原订单一致
|
//更换的售后或营养师不能与原订单一致
|
||||||
if(sysOrderNutritionistReplaceRecord.getNutritionistId() != null && sysOrder.getNutritionistId().longValue() == sysOrderNutritionistReplaceRecord.getNutritionistId().longValue()){
|
// if(sysOrderNutritionistReplaceRecord.getNutritionistId() != null && sysOrder.getNutritionistId().longValue() == sysOrderNutritionistReplaceRecord.getNutritionistId().longValue()){
|
||||||
return AjaxResult.error("更换的营养师与原订单营养师不能相同");
|
// return AjaxResult.error("更换的营养师与原订单营养师不能相同");
|
||||||
}
|
// }
|
||||||
if(sysOrderNutritionistReplaceRecord.getAfterSaleId() != null && sysOrder.getAfterSaleId().longValue() == sysOrderNutritionistReplaceRecord.getAfterSaleId().longValue()){
|
|
||||||
return AjaxResult.error("更换的售后与原订单售后不能相同");
|
// if(sysOrderNutritionistReplaceRecord.getAfterSaleId() != null && sysOrder.getAfterSaleId().longValue() == sysOrderNutritionistReplaceRecord.getAfterSaleId().longValue()){
|
||||||
}
|
// return AjaxResult.error("更换的售后与原订单售后不能相同");
|
||||||
|
// }
|
||||||
|
|
||||||
//体验单、二开售后提成单都不支持更换营养师和售后
|
//体验单、二开售后提成单都不支持更换营养师和售后
|
||||||
if(sysOrder.getAfterSaleCommissOrder().intValue() == 1 || "2".equals(sysOrder.getOrderType())){
|
if(sysOrder.getAfterSaleCommissOrder().intValue() == 1 || "2".equals(sysOrder.getOrderType())){
|
||||||
return AjaxResult.error("二开提成单、体验单不支持更换营养师、售后");
|
return AjaxResult.error("二开提成单、体验单不支持更换营养师、售后");
|
||||||
|
@ -3,11 +3,9 @@ package com.stdiet.web.controller.custom;
|
|||||||
import com.aliyun.vod20170321.models.GetPlayInfoResponseBody;
|
import com.aliyun.vod20170321.models.GetPlayInfoResponseBody;
|
||||||
import com.aliyun.vod20170321.models.GetVideoInfoResponseBody;
|
import com.aliyun.vod20170321.models.GetVideoInfoResponseBody;
|
||||||
import com.aliyun.vod20170321.models.GetVideoListResponseBody;
|
import com.aliyun.vod20170321.models.GetVideoListResponseBody;
|
||||||
import com.itextpdf.io.util.DateTimeUtil;
|
|
||||||
import com.stdiet.common.core.controller.BaseController;
|
import com.stdiet.common.core.controller.BaseController;
|
||||||
import com.stdiet.common.core.domain.AjaxResult;
|
import com.stdiet.common.core.domain.AjaxResult;
|
||||||
import com.stdiet.common.core.page.TableDataInfo;
|
import com.stdiet.common.core.page.TableDataInfo;
|
||||||
import com.stdiet.common.enums.BusinessType;
|
|
||||||
import com.stdiet.common.exception.file.FileNameLengthLimitExceededException;
|
import com.stdiet.common.exception.file.FileNameLengthLimitExceededException;
|
||||||
import com.stdiet.common.utils.AliyunVideoUtils;
|
import com.stdiet.common.utils.AliyunVideoUtils;
|
||||||
import com.stdiet.common.utils.DateUtils;
|
import com.stdiet.common.utils.DateUtils;
|
||||||
@ -22,9 +20,7 @@ import com.stdiet.custom.dto.response.MessageNoticeResponse;
|
|||||||
import com.stdiet.custom.dto.response.NutritionalVideoResponse;
|
import com.stdiet.custom.dto.response.NutritionalVideoResponse;
|
||||||
import com.stdiet.custom.page.WxLogInfo;
|
import com.stdiet.custom.page.WxLogInfo;
|
||||||
import com.stdiet.custom.service.*;
|
import com.stdiet.custom.service.*;
|
||||||
import org.aspectj.weaver.loadtime.Aj;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
@ -40,23 +36,21 @@ import java.util.*;
|
|||||||
public class WechatAppletController extends BaseController {
|
public class WechatAppletController extends BaseController {
|
||||||
|
|
||||||
|
|
||||||
|
public static final String[] imageName = {"breakfastImages", "lunchImages", "dinnerImages", "extraMealImages", "bodyImages"};
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysCustomerCaseService sysCustomerCaseService;
|
private ISysCustomerCaseService sysCustomerCaseService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysWxUserLogService sysWxUserLogService;
|
private ISysWxUserLogService sysWxUserLogService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysWxUserInfoService sysWxUserInfoService;
|
private ISysWxUserInfoService sysWxUserInfoService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysOrderService sysOrderService;
|
private ISysOrderService sysOrderService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysNutritionQuestionService sysNutritionQuestionService;
|
private ISysNutritionQuestionService sysNutritionQuestionService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysAskNutritionQuestionService sysAskNutritionQuestionService;
|
private ISysAskNutritionQuestionService sysAskNutritionQuestionService;
|
||||||
|
@Autowired
|
||||||
|
private ISysCustomerService iSysCustomerService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysMessageNoticeService sysMessageNoticeService;
|
private ISysMessageNoticeService sysMessageNoticeService;
|
||||||
@ -71,8 +65,7 @@ public class WechatAppletController extends BaseController {
|
|||||||
* 查询微信小程序中展示的客户案例
|
* 查询微信小程序中展示的客户案例
|
||||||
*/
|
*/
|
||||||
@GetMapping("/caseList")
|
@GetMapping("/caseList")
|
||||||
public TableDataInfo caseList(SysCustomerCase sysCustomerCase)
|
public TableDataInfo caseList(SysCustomerCase sysCustomerCase) {
|
||||||
{
|
|
||||||
startPage();
|
startPage();
|
||||||
sysCustomerCase.setKeywordArray(StringUtils.isNotEmpty(sysCustomerCase.getKeyword()) ? sysCustomerCase.getKeyword().split(",") : null);
|
sysCustomerCase.setKeywordArray(StringUtils.isNotEmpty(sysCustomerCase.getKeyword()) ? sysCustomerCase.getKeyword().split(",") : null);
|
||||||
List<CustomerCaseResponse> list = sysCustomerCaseService.getWxCustomerCaseList(sysCustomerCase);
|
List<CustomerCaseResponse> list = sysCustomerCaseService.getWxCustomerCaseList(sysCustomerCase);
|
||||||
@ -85,12 +78,11 @@ public class WechatAppletController extends BaseController {
|
|||||||
* 查询客户案例文件列表
|
* 查询客户案例文件列表
|
||||||
*/
|
*/
|
||||||
@GetMapping("/getFileByCaseId")
|
@GetMapping("/getFileByCaseId")
|
||||||
public AjaxResult getFileByCaseId(@RequestParam("caseId")String caseId)
|
public AjaxResult getFileByCaseId(@RequestParam("caseId") String caseId) {
|
||||||
{
|
|
||||||
Long id = StringUtils.isNotEmpty(caseId) ? Long.parseLong(AesUtils.decrypt(caseId, null)) : null;
|
Long id = StringUtils.isNotEmpty(caseId) ? Long.parseLong(AesUtils.decrypt(caseId, null)) : null;
|
||||||
CustomerCaseResponse customerCaseResponse = new CustomerCaseResponse();
|
CustomerCaseResponse customerCaseResponse = new CustomerCaseResponse();
|
||||||
customerCaseResponse.setId(caseId);
|
customerCaseResponse.setId(caseId);
|
||||||
if(id != null){
|
if (id != null) {
|
||||||
List<SysCustomerCaseFile> list = sysCustomerCaseService.getFileListByCaseId(id);
|
List<SysCustomerCaseFile> list = sysCustomerCaseService.getFileListByCaseId(id);
|
||||||
List<String> fileUrl = new ArrayList<>();
|
List<String> fileUrl = new ArrayList<>();
|
||||||
for (SysCustomerCaseFile caseFile : list) {
|
for (SysCustomerCaseFile caseFile : list) {
|
||||||
@ -98,7 +90,7 @@ public class WechatAppletController extends BaseController {
|
|||||||
}
|
}
|
||||||
List<String> downUrlList = AliyunOSSUtils.generatePresignedUrl(fileUrl);
|
List<String> downUrlList = AliyunOSSUtils.generatePresignedUrl(fileUrl);
|
||||||
customerCaseResponse.setFileList(downUrlList);
|
customerCaseResponse.setFileList(downUrlList);
|
||||||
}else{
|
} else {
|
||||||
customerCaseResponse.setFileList(new ArrayList<>());
|
customerCaseResponse.setFileList(new ArrayList<>());
|
||||||
}
|
}
|
||||||
return AjaxResult.success(customerCaseResponse);
|
return AjaxResult.success(customerCaseResponse);
|
||||||
@ -106,26 +98,27 @@ public class WechatAppletController extends BaseController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 同步客户信息
|
* 同步客户信息
|
||||||
|
*
|
||||||
* @param sysWxUserInfo
|
* @param sysWxUserInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("/synchroCustomerInfo")
|
@PostMapping("/synchroCustomerInfo")
|
||||||
public AjaxResult synchroCustomerInfo(@RequestBody SysWxUserInfo sysWxUserInfo) {
|
public AjaxResult synchroCustomerInfo(@RequestBody SysWxUserInfo sysWxUserInfo) {
|
||||||
if(StringUtils.isEmpty(sysWxUserInfo.getOpenid()) || StringUtils.isEmpty(sysWxUserInfo.getPhone())){
|
if (StringUtils.isEmpty(sysWxUserInfo.getOpenid()) || StringUtils.isEmpty(sysWxUserInfo.getPhone())) {
|
||||||
return AjaxResult.error("手机号为空");
|
return AjaxResult.error("手机号为空");
|
||||||
}
|
}
|
||||||
// 查询微信用户
|
// 查询微信用户
|
||||||
SysWxUserInfo userInfo = sysWxUserInfoService.selectSysWxUserInfoById(sysWxUserInfo.getOpenid());
|
SysWxUserInfo userInfo = sysWxUserInfoService.selectSysWxUserInfoById(sysWxUserInfo.getOpenid());
|
||||||
if(userInfo != null){
|
if (userInfo != null) {
|
||||||
//更新数据
|
//更新数据
|
||||||
sysWxUserInfoService.updateSysWxUserInfo(sysWxUserInfo);
|
sysWxUserInfoService.updateSysWxUserInfo(sysWxUserInfo);
|
||||||
}else{
|
} else {
|
||||||
sysWxUserInfoService.insertSysWxUserInfo(sysWxUserInfo);
|
sysWxUserInfoService.insertSysWxUserInfo(sysWxUserInfo);
|
||||||
}
|
}
|
||||||
Map<String,Object> result = new HashMap<>();
|
Map<String, Object> result = new HashMap<>();
|
||||||
//根据手机号查询返回用户加密ID
|
//根据手机号查询返回用户加密ID
|
||||||
SysCustomer customer = sysCustomerService.getCustomerByPhone(sysWxUserInfo.getPhone());
|
SysCustomer customer = sysCustomerService.getCustomerByPhone(sysWxUserInfo.getPhone());
|
||||||
result.put("customerId", customer != null ? AesUtils.encrypt(customer.getId()+"", null) : null);
|
result.put("customerId", customer != null ? AesUtils.encrypt(customer.getId() + "", null) : null);
|
||||||
//查询未读消息数量
|
//查询未读消息数量
|
||||||
SysMessageNotice messageParam = new SysMessageNotice();
|
SysMessageNotice messageParam = new SysMessageNotice();
|
||||||
messageParam.setReadType(0);
|
messageParam.setReadType(0);
|
||||||
@ -137,27 +130,28 @@ public class WechatAppletController extends BaseController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 微信小程序获取客户打卡记录
|
* 微信小程序获取客户打卡记录
|
||||||
|
*
|
||||||
* @param sysWxUserLog
|
* @param sysWxUserLog
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/getPunchLogs")
|
@GetMapping(value = "/getPunchLogs")
|
||||||
public AjaxResult getPunchLogs(SysWxUserLog sysWxUserLog) {
|
public AjaxResult getPunchLogs(SysWxUserLog sysWxUserLog) {
|
||||||
if(StringUtils.isEmpty(sysWxUserLog.getPhone()) && StringUtils.isEmpty(sysWxUserLog.getOpenid())){
|
if (StringUtils.isEmpty(sysWxUserLog.getPhone()) && StringUtils.isEmpty(sysWxUserLog.getOpenid())) {
|
||||||
return AjaxResult.error(5001, "缺少参数");
|
return AjaxResult.error(5001, "缺少参数");
|
||||||
}
|
}
|
||||||
//查询是否下单
|
//查询是否下单
|
||||||
SysCustomer param = new SysCustomer();
|
SysCustomer param = new SysCustomer();
|
||||||
param.setPhone(sysWxUserLog.getPhone());
|
param.setPhone(sysWxUserLog.getPhone());
|
||||||
int orderCount = sysOrderService.getOrderCountByCustomer(param);
|
int orderCount = sysOrderService.getOrderCountByCustomer(param);
|
||||||
if(orderCount > 0){
|
if (orderCount > 0) {
|
||||||
Map<String, Object> result = new HashMap<>();
|
Map<String, Object> result = new HashMap<>();
|
||||||
//今日是否已打卡
|
//今日是否已打卡
|
||||||
boolean isPunch = false;
|
boolean isPunch = false;
|
||||||
startPage();
|
startPage();
|
||||||
List<WxLogInfo> list = sysWxUserLogService.getWxLogInfoList(sysWxUserLog);
|
List<WxLogInfo> list = sysWxUserLogService.getWxLogInfoList(sysWxUserLog);
|
||||||
if(list.size() > 0){
|
if (list.size() > 0) {
|
||||||
WxLogInfo lastLog = list.get(0);
|
WxLogInfo lastLog = list.get(0);
|
||||||
if(lastLog.getDate() != null && ChronoUnit.DAYS.between(DateUtils.stringToLocalDate(lastLog.getDate(), "yyyy-MM-dd"), LocalDate.now()) == 0) {
|
if (lastLog.getDate() != null && ChronoUnit.DAYS.between(DateUtils.stringToLocalDate(lastLog.getDate(), "yyyy-MM-dd"), LocalDate.now()) == 0) {
|
||||||
isPunch = true;
|
isPunch = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -171,13 +165,14 @@ public class WechatAppletController extends BaseController {
|
|||||||
result.put("isPunch", isPunch);
|
result.put("isPunch", isPunch);
|
||||||
result.put("tableDataInfo", tableDataInfo);
|
result.put("tableDataInfo", tableDataInfo);
|
||||||
return AjaxResult.success(result);
|
return AjaxResult.success(result);
|
||||||
}else{
|
} else {
|
||||||
return AjaxResult.error(5002, "未查询到相关订单信息");
|
return AjaxResult.error(5002, "未查询到相关订单信息");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 今日是否打卡
|
* 今日是否打卡
|
||||||
|
*
|
||||||
* @param openid
|
* @param openid
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -192,6 +187,7 @@ public class WechatAppletController extends BaseController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 微信小程序打卡
|
* 微信小程序打卡
|
||||||
|
*
|
||||||
* @param sysWxUserLog
|
* @param sysWxUserLog
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -202,24 +198,22 @@ public class WechatAppletController extends BaseController {
|
|||||||
if (userInfo == null || StringUtils.isEmpty(userInfo.getPhone())) {
|
if (userInfo == null || StringUtils.isEmpty(userInfo.getPhone())) {
|
||||||
return AjaxResult.error("打卡失败");
|
return AjaxResult.error("打卡失败");
|
||||||
}
|
}
|
||||||
if(sysWxUserLog.getId() == null){
|
if (sysWxUserLog.getId() == null) {
|
||||||
//查询今日是否已打卡
|
//查询今日是否已打卡
|
||||||
if(sysWxUserLog.getLogTime() == null){
|
if (sysWxUserLog.getLogTime() == null) {
|
||||||
sysWxUserLog.setLogTime(new Date());
|
sysWxUserLog.setLogTime(new Date());
|
||||||
}
|
}
|
||||||
int count = sysWxUserLogService.checkWxLogInfoCount(sysWxUserLog);
|
int count = sysWxUserLogService.checkWxLogInfoCount(sysWxUserLog);
|
||||||
if(count > 0){
|
if (count > 0) {
|
||||||
return AjaxResult.error("今日已打卡,不可重复打卡");
|
return AjaxResult.error("今日已打卡,不可重复打卡");
|
||||||
}
|
}
|
||||||
return toAjax(sysWxUserLogService.insertSysWxUserLog(sysWxUserLog));
|
return toAjax(sysWxUserLogService.insertSysWxUserLog(sysWxUserLog));
|
||||||
}else{
|
} else {
|
||||||
return toAjax(sysWxUserLogService.updateSysWxUserLog(sysWxUserLog));
|
return toAjax(sysWxUserLogService.updateSysWxUserLog(sysWxUserLog));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final String[] imageName = {"breakfastImages", "lunchImages", "dinnerImages", "extraMealImages", "bodyImages"};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取微信用户记录详细信息
|
* 获取微信用户记录详细信息
|
||||||
*/
|
*/
|
||||||
@ -230,7 +224,7 @@ public class WechatAppletController extends BaseController {
|
|||||||
SysWxUserLog param = new SysWxUserLog();
|
SysWxUserLog param = new SysWxUserLog();
|
||||||
param.setId(Long.parseLong(id));
|
param.setId(Long.parseLong(id));
|
||||||
sysWxUserLog = sysWxUserLogService.getWxLogInfoDetailById(param);
|
sysWxUserLog = sysWxUserLogService.getWxLogInfoDetailById(param);
|
||||||
if(sysWxUserLog == null){
|
if (sysWxUserLog == null) {
|
||||||
return AjaxResult.error("打卡记录不存在");
|
return AjaxResult.error("打卡记录不存在");
|
||||||
}
|
}
|
||||||
Map<String, List<String>> imageUrlMap = new HashMap<>();
|
Map<String, List<String>> imageUrlMap = new HashMap<>();
|
||||||
@ -247,10 +241,10 @@ public class WechatAppletController extends BaseController {
|
|||||||
imageUrlMap.put(imageName[3], extraMealImagesUrlList);
|
imageUrlMap.put(imageName[3], extraMealImagesUrlList);
|
||||||
|
|
||||||
List<String> bodyImagesUrlList = StringUtils.isNotEmpty(sysWxUserLog.getBodyImages()) ? Arrays.asList(sysWxUserLog.getBodyImages().split("\\|")) : new ArrayList<>();
|
List<String> bodyImagesUrlList = StringUtils.isNotEmpty(sysWxUserLog.getBodyImages()) ? Arrays.asList(sysWxUserLog.getBodyImages().split("\\|")) : new ArrayList<>();
|
||||||
imageUrlMap.put(imageName[4], bodyImagesUrlList );
|
imageUrlMap.put(imageName[4], bodyImagesUrlList);
|
||||||
|
|
||||||
//生成预览链接
|
//生成预览链接
|
||||||
Map<String,List<String>> downUrlList = AliyunOSSUtils.generatePresignedUrl(imageUrlMap);
|
Map<String, List<String>> downUrlList = AliyunOSSUtils.generatePresignedUrl(imageUrlMap);
|
||||||
|
|
||||||
sysWxUserLog.setBreakfastImagesUrl(downUrlList.get(imageName[0]));
|
sysWxUserLog.setBreakfastImagesUrl(downUrlList.get(imageName[0]));
|
||||||
sysWxUserLog.setLunchImagesUrl(downUrlList.get(imageName[1]));
|
sysWxUserLog.setLunchImagesUrl(downUrlList.get(imageName[1]));
|
||||||
@ -262,7 +256,7 @@ public class WechatAppletController extends BaseController {
|
|||||||
List<String> allUrlList = new ArrayList<>();
|
List<String> allUrlList = new ArrayList<>();
|
||||||
|
|
||||||
for (String key : imageName) {
|
for (String key : imageName) {
|
||||||
if(!"bodyImages".equals(key)){
|
if (!"bodyImages".equals(key)) {
|
||||||
allUrlList.addAll(downUrlList.get(key));
|
allUrlList.addAll(downUrlList.get(key));
|
||||||
allImagesList.addAll(imageUrlMap.get(key));
|
allImagesList.addAll(imageUrlMap.get(key));
|
||||||
}
|
}
|
||||||
@ -275,12 +269,13 @@ public class WechatAppletController extends BaseController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 处理返回值的ID加密
|
* 处理返回值的ID加密
|
||||||
|
*
|
||||||
* @param list
|
* @param list
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private void dealIdEnc(List<CustomerCaseResponse> list){
|
private void dealIdEnc(List<CustomerCaseResponse> list) {
|
||||||
for (CustomerCaseResponse cus : list) {
|
for (CustomerCaseResponse cus : list) {
|
||||||
cus.setId(AesUtils.encrypt(cus.getId()+"", null));
|
cus.setId(AesUtils.encrypt(cus.getId() + "", null));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -318,9 +313,9 @@ public class WechatAppletController extends BaseController {
|
|||||||
* 获取小程序展示的营养小知识列表
|
* 获取小程序展示的营养小知识列表
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/getNutritionQuestionList")
|
@GetMapping(value = "/getNutritionQuestionList")
|
||||||
public AjaxResult getNutritionQuestionList(SysNutritionQuestion sysNutritionQuestion, @RequestParam(value = "pageNum", defaultValue = "1") int pageNum, @RequestParam(value = "pageSize", defaultValue = "10")int pageSize) {
|
public AjaxResult getNutritionQuestionList(SysNutritionQuestion sysNutritionQuestion, @RequestParam(value = "pageNum", defaultValue = "1") int pageNum, @RequestParam(value = "pageSize", defaultValue = "10") int pageSize) {
|
||||||
sysNutritionQuestion.setShowFlag(1);
|
sysNutritionQuestion.setShowFlag(1);
|
||||||
Map<String,Object> result = sysNutritionQuestionService.getNutritionQuestionListByKey(sysNutritionQuestion, pageNum, pageSize);
|
Map<String, Object> result = sysNutritionQuestionService.getNutritionQuestionListByKey(sysNutritionQuestion, pageNum, pageSize);
|
||||||
return AjaxResult.success(result);
|
return AjaxResult.success(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -328,9 +323,8 @@ public class WechatAppletController extends BaseController {
|
|||||||
* 新增营养小知识提问
|
* 新增营养小知识提问
|
||||||
*/
|
*/
|
||||||
@PostMapping("/addAskNutritionQuestion")
|
@PostMapping("/addAskNutritionQuestion")
|
||||||
public AjaxResult addAskNutritionQuestion(@RequestBody SysAskNutritionQuestion sysAskNutritionQuestion)
|
public AjaxResult addAskNutritionQuestion(@RequestBody SysAskNutritionQuestion sysAskNutritionQuestion) {
|
||||||
{
|
if (StringUtils.isEmpty(sysAskNutritionQuestion.getOpenid()) || StringUtils.isEmpty(sysAskNutritionQuestion.getQuestion())) {
|
||||||
if(StringUtils.isEmpty(sysAskNutritionQuestion.getOpenid()) || StringUtils.isEmpty(sysAskNutritionQuestion.getQuestion())){
|
|
||||||
return AjaxResult.error("添加失败");
|
return AjaxResult.error("添加失败");
|
||||||
}
|
}
|
||||||
return toAjax(sysAskNutritionQuestionService.insertSysAskNutritionQuestion(sysAskNutritionQuestion));
|
return toAjax(sysAskNutritionQuestionService.insertSysAskNutritionQuestion(sysAskNutritionQuestion));
|
||||||
@ -342,9 +336,9 @@ public class WechatAppletController extends BaseController {
|
|||||||
@GetMapping(value = "/getCustomerMessage")
|
@GetMapping(value = "/getCustomerMessage")
|
||||||
public TableDataInfo getCustomerMessage(SysMessageNotice sysMessageNotice) {
|
public TableDataInfo getCustomerMessage(SysMessageNotice sysMessageNotice) {
|
||||||
startPage();
|
startPage();
|
||||||
if(StringUtils.isNotEmpty(sysMessageNotice.getCustomerId())){
|
if (StringUtils.isNotEmpty(sysMessageNotice.getCustomerId())) {
|
||||||
sysMessageNotice.setMessageCustomer(Long.parseLong(AesUtils.decrypt(sysMessageNotice.getCustomerId(), null)));
|
sysMessageNotice.setMessageCustomer(Long.parseLong(AesUtils.decrypt(sysMessageNotice.getCustomerId(), null)));
|
||||||
}else{
|
} else {
|
||||||
sysMessageNotice.setMessageCustomer(0L);
|
sysMessageNotice.setMessageCustomer(0L);
|
||||||
}
|
}
|
||||||
List<MessageNoticeResponse> list = sysMessageNoticeService.getCustomerMessage(sysMessageNotice);
|
List<MessageNoticeResponse> list = sysMessageNoticeService.getCustomerMessage(sysMessageNotice);
|
||||||
@ -355,7 +349,7 @@ public class WechatAppletController extends BaseController {
|
|||||||
* 更新用户通知消息已读状态
|
* 更新用户通知消息已读状态
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/updateMessageReadStatus")
|
@GetMapping(value = "/updateMessageReadStatus")
|
||||||
public AjaxResult updateMessageReadStatus(@RequestParam("id")Long id) {
|
public AjaxResult updateMessageReadStatus(@RequestParam("id") Long id) {
|
||||||
SysMessageNotice sysMessageNotice = new SysMessageNotice();
|
SysMessageNotice sysMessageNotice = new SysMessageNotice();
|
||||||
sysMessageNotice.setReadType(1);
|
sysMessageNotice.setReadType(1);
|
||||||
sysMessageNotice.setId(id);
|
sysMessageNotice.setId(id);
|
||||||
@ -386,21 +380,58 @@ public class WechatAppletController extends BaseController {
|
|||||||
public AjaxResult getVideoDetailById(@RequestParam(value = "videoId") String videoId) {
|
public AjaxResult getVideoDetailById(@RequestParam(value = "videoId") String videoId) {
|
||||||
AjaxResult result = AjaxResult.success();
|
AjaxResult result = AjaxResult.success();
|
||||||
NutritionalVideoResponse nutritionalVideoResponse = new NutritionalVideoResponse();
|
NutritionalVideoResponse nutritionalVideoResponse = new NutritionalVideoResponse();
|
||||||
try{
|
try {
|
||||||
GetPlayInfoResponseBody playInfoResponseBody = AliyunVideoUtils.getVideoVisitDetail(videoId);
|
GetPlayInfoResponseBody playInfoResponseBody = AliyunVideoUtils.getVideoVisitDetail(videoId);
|
||||||
GetVideoInfoResponseBody videoInfoResponseBody = AliyunVideoUtils.getVideoById(videoId);
|
GetVideoInfoResponseBody videoInfoResponseBody = AliyunVideoUtils.getVideoById(videoId);
|
||||||
List<GetPlayInfoResponseBody.GetPlayInfoResponseBodyPlayInfoListPlayInfo> playList = playInfoResponseBody.playInfoList.playInfo;
|
List<GetPlayInfoResponseBody.GetPlayInfoResponseBodyPlayInfoListPlayInfo> playList = playInfoResponseBody.playInfoList.playInfo;
|
||||||
if(playList != null && playList.size() > 0){
|
if (playList != null && playList.size() > 0) {
|
||||||
nutritionalVideoResponse.setPlayUrl(playList.get(0).getPlayURL());
|
nutritionalVideoResponse.setPlayUrl(playList.get(0).getPlayURL());
|
||||||
}
|
}
|
||||||
nutritionalVideoResponse.setDescription(videoInfoResponseBody.video.getDescription());
|
nutritionalVideoResponse.setDescription(videoInfoResponseBody.video.getDescription());
|
||||||
nutritionalVideoResponse.setTags(videoInfoResponseBody.video.getTags());
|
nutritionalVideoResponse.setTags(videoInfoResponseBody.video.getTags());
|
||||||
nutritionalVideoResponse.setTitle(videoInfoResponseBody.video.getTitle());
|
nutritionalVideoResponse.setTitle(videoInfoResponseBody.video.getTitle());
|
||||||
//nutritionalVideoResponse.setCreateTime(sysNutritionalVideo.getCreateTime() == null ? "" : DateUtils.dateTime(sysNutritionalVideo.getCreateTime()));
|
//nutritionalVideoResponse.setCreateTime(sysNutritionalVideo.getCreateTime() == null ? "" : DateUtils.dateTime(sysNutritionalVideo.getCreateTime()));
|
||||||
}catch (Exception e){
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
result.put("videoDetail", nutritionalVideoResponse);
|
result.put("videoDetail", nutritionalVideoResponse);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/login")
|
||||||
|
public AjaxResult login(@RequestBody SysWxUserInfo sysWxUserInfo) {
|
||||||
|
if (StringUtils.isEmpty(sysWxUserInfo.getOpenid())) {
|
||||||
|
return AjaxResult.error("缺少参数:openid");
|
||||||
|
}
|
||||||
|
SysWxUserInfo curWxUserInfo = sysWxUserInfoService.selectSysWxUserInfoById(sysWxUserInfo.getOpenid());
|
||||||
|
|
||||||
|
// 第一次尝试匹配,搜索sys_wx_user_info表,尝试查找cus_id,此时不需要手机号
|
||||||
|
if (StringUtils.isEmpty(sysWxUserInfo.getPhone()) && (StringUtils.isNull(curWxUserInfo) || StringUtils.isNull(curWxUserInfo.getCusId()))) {
|
||||||
|
// 如果没找到任何信息,此时为未登录过的新用户 || 没有cusId,没有创建用户信息
|
||||||
|
return AjaxResult.error(5000, "需要手机号进一步匹配");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 第二次尝试匹配,带上手机号,先去sys_customer查找,找到就更新sys_wx_user_info表,并返回一系列登录后的数据
|
||||||
|
if (StringUtils.isNotEmpty(sysWxUserInfo.getPhone())) {
|
||||||
|
SysCustomer sysCustomer = iSysCustomerService.getCustomerByPhone(sysWxUserInfo.getPhone());
|
||||||
|
if (StringUtils.isNull(sysCustomer)) {
|
||||||
|
return AjaxResult.error(5003, "未查到用户信息,请联系销售顾问");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StringUtils.isNull(curWxUserInfo)) {
|
||||||
|
// 新增sys_wx_user_info
|
||||||
|
sysWxUserInfo.setCusId(sysCustomer.getId());
|
||||||
|
sysWxUserInfo.setCreateTime(DateUtils.getNowDate());
|
||||||
|
sysWxUserInfoService.insertSysWxUserInfo(sysWxUserInfo);
|
||||||
|
} else {
|
||||||
|
// 更新sys_wx_user_info数据,
|
||||||
|
curWxUserInfo.setCusId(sysCustomer.getId());
|
||||||
|
curWxUserInfo.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
sysWxUserInfoService.updateSysWxUserInfo(curWxUserInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 并返回一系列登录后的数据
|
||||||
|
return AjaxResult.success(curWxUserInfo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
package com.stdiet.custom.domain;
|
package com.stdiet.custom.domain;
|
||||||
|
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
|
||||||
import com.stdiet.common.annotation.Excel;
|
import com.stdiet.common.annotation.Excel;
|
||||||
import com.stdiet.common.core.domain.BaseEntity;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 微信用户对象 sys_wx_user_info
|
* 微信用户对象 sys_wx_user_info
|
||||||
@ -11,144 +12,77 @@ import com.stdiet.common.core.domain.BaseEntity;
|
|||||||
* @author wonder
|
* @author wonder
|
||||||
* @date 2020-11-28
|
* @date 2020-11-28
|
||||||
*/
|
*/
|
||||||
public class SysWxUserInfo extends BaseEntity
|
@Data
|
||||||
{
|
public class SysWxUserInfo {
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** 微信openid */
|
/**
|
||||||
|
* 微信openid
|
||||||
|
*/
|
||||||
private String openid;
|
private String openid;
|
||||||
|
|
||||||
/** 昵称 */
|
@JsonIgnore
|
||||||
|
private Long cusId;
|
||||||
|
|
||||||
|
private String customerId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 昵称
|
||||||
|
*/
|
||||||
@Excel(name = "昵称")
|
@Excel(name = "昵称")
|
||||||
private String nickName;
|
private String nickName;
|
||||||
|
|
||||||
/** 微信appid */
|
/**
|
||||||
|
* 微信appid
|
||||||
|
*/
|
||||||
@Excel(name = "微信appid")
|
@Excel(name = "微信appid")
|
||||||
private String appid;
|
private String appid;
|
||||||
|
|
||||||
/** 电话 */
|
/**
|
||||||
|
* 电话
|
||||||
|
*/
|
||||||
@Excel(name = "电话")
|
@Excel(name = "电话")
|
||||||
private String phone;
|
private String phone;
|
||||||
|
|
||||||
/** 用户头像 */
|
/**
|
||||||
|
* 用户头像
|
||||||
|
*/
|
||||||
@Excel(name = "用户头像")
|
@Excel(name = "用户头像")
|
||||||
private String avatarUrl;
|
private String avatarUrl;
|
||||||
|
|
||||||
/** 用户性别(0男 1女 2未知) */
|
/**
|
||||||
|
* 用户性别(0男 1女 2未知)
|
||||||
|
*/
|
||||||
@Excel(name = "用户性别", readConverterExp = "0=男,1=女,2=未知")
|
@Excel(name = "用户性别", readConverterExp = "0=男,1=女,2=未知")
|
||||||
private String sex;
|
private String sex;
|
||||||
|
|
||||||
/** 城市 */
|
/**
|
||||||
|
* 城市
|
||||||
|
*/
|
||||||
@Excel(name = "城市")
|
@Excel(name = "城市")
|
||||||
private String city;
|
private String city;
|
||||||
|
|
||||||
/** 省份 */
|
/**
|
||||||
|
* 省份
|
||||||
|
*/
|
||||||
@Excel(name = "省份")
|
@Excel(name = "省份")
|
||||||
private String province;
|
private String province;
|
||||||
|
|
||||||
/** 国家 */
|
private String language;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 国家
|
||||||
|
*/
|
||||||
@Excel(name = "国家")
|
@Excel(name = "国家")
|
||||||
private String country;
|
private String country;
|
||||||
|
|
||||||
public void setOpenid(String openid)
|
private Date createTime;
|
||||||
{
|
|
||||||
this.openid = openid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getOpenid()
|
private String createBy;
|
||||||
{
|
|
||||||
return openid;
|
|
||||||
}
|
|
||||||
public void setNickName(String nickName)
|
|
||||||
{
|
|
||||||
this.nickName = nickName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getNickName()
|
private Date updateTime;
|
||||||
{
|
|
||||||
return nickName;
|
|
||||||
}
|
|
||||||
public void setAppid(String appid)
|
|
||||||
{
|
|
||||||
this.appid = appid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAppid()
|
private String updateBy;
|
||||||
{
|
|
||||||
return appid;
|
|
||||||
}
|
|
||||||
public void setPhone(String phone)
|
|
||||||
{
|
|
||||||
this.phone = phone;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPhone()
|
private String remark;
|
||||||
{
|
|
||||||
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();
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -69,7 +69,10 @@ public class SysCustomerServiceImpl implements ISysCustomerService {
|
|||||||
@Override
|
@Override
|
||||||
public int insertSysCustomer(SysCustomer sysCustomer) {
|
public int insertSysCustomer(SysCustomer sysCustomer) {
|
||||||
sysCustomer.setCreateTime(DateUtils.getNowDate());
|
sysCustomer.setCreateTime(DateUtils.getNowDate());
|
||||||
return sysCustomerMapper.insertSysCustomer(sysCustomer);
|
sysCustomerMapper.insertSysCustomer(sysCustomer);
|
||||||
|
SysCustomer mCustomer = new SysCustomer();
|
||||||
|
mCustomer.setId(sysCustomer.getId());
|
||||||
|
return sysCustomerMapper.updateSysCustomer(mCustomer);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -279,6 +279,9 @@ public class SysRecipesPlanServiceImpl implements ISysRecipesPlanService {
|
|||||||
planStartDate = serverEndDate;
|
planStartDate = serverEndDate;
|
||||||
breakFlag = false;
|
breakFlag = false;
|
||||||
}
|
}
|
||||||
|
if(planEndDate == planStartDate && StringUtils.isNotEmpty(pauseResult)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
//暂停日期
|
//暂停日期
|
||||||
sysRecipesPlan.setPauseDate(pauseResult[3]);
|
sysRecipesPlan.setPauseDate(pauseResult[3]);
|
||||||
sysRecipesPlan.setStartDate(DateUtils.localDateToDate(planStartDate));
|
sysRecipesPlan.setStartDate(DateUtils.localDateToDate(planStartDate));
|
||||||
|
@ -129,6 +129,7 @@
|
|||||||
<update id="updateSysCustomer" parameterType="SysCustomer">
|
<update id="updateSysCustomer" parameterType="SysCustomer">
|
||||||
update sys_customer
|
update sys_customer
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="id != null">out_id = md5(#{id}),</if>
|
||||||
<if test="name != null">name = #{name},</if>
|
<if test="name != null">name = #{name},</if>
|
||||||
<if test="phone != null">phone = #{phone},</if>
|
<if test="phone != null">phone = #{phone},</if>
|
||||||
<if test="fansTime != null">fans_time = #{fansTime},</if>
|
<if test="fansTime != null">fans_time = #{fansTime},</if>
|
||||||
|
@ -80,6 +80,7 @@
|
|||||||
insert into sys_customer_physical_signs
|
insert into sys_customer_physical_signs
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="customerId != null">customer_id,</if>
|
<if test="customerId != null">customer_id,</if>
|
||||||
|
<if test="customerId != null">out_id,</if>
|
||||||
<if test="sex != null">sex,</if>
|
<if test="sex != null">sex,</if>
|
||||||
<if test="age != null">age,</if>
|
<if test="age != null">age,</if>
|
||||||
<if test="tall != null">tall,</if>
|
<if test="tall != null">tall,</if>
|
||||||
@ -117,6 +118,7 @@
|
|||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="customerId != null">#{customerId},</if>
|
<if test="customerId != null">#{customerId},</if>
|
||||||
|
<if test="customerId != null">md5#{customerId},</if>
|
||||||
<if test="sex != null">#{sex},</if>
|
<if test="sex != null">#{sex},</if>
|
||||||
<if test="age != null">#{age},</if>
|
<if test="age != null">#{age},</if>
|
||||||
<if test="tall != null">#{tall},</if>
|
<if test="tall != null">#{tall},</if>
|
||||||
@ -158,6 +160,7 @@
|
|||||||
update sys_customer_physical_signs
|
update sys_customer_physical_signs
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
<if test="customerId != null">customer_id = #{customerId},</if>
|
<if test="customerId != null">customer_id = #{customerId},</if>
|
||||||
|
<if test="customerId != null">out_id = md5(#{customerId}),</if>
|
||||||
<if test="sex != null">sex = #{sex},</if>
|
<if test="sex != null">sex = #{sex},</if>
|
||||||
<if test="age != null">age = #{age},</if>
|
<if test="age != null">age = #{age},</if>
|
||||||
<if test="tall != null">tall = #{tall},</if>
|
<if test="tall != null">tall = #{tall},</if>
|
||||||
|
@ -206,6 +206,7 @@
|
|||||||
<if test="orderId != null">order_id,</if>
|
<if test="orderId != null">order_id,</if>
|
||||||
<if test="customer != null and customer != ''">customer,</if>
|
<if test="customer != null and customer != ''">customer,</if>
|
||||||
<if test="cusId != null">cus_id,</if>
|
<if test="cusId != null">cus_id,</if>
|
||||||
|
<if test="cusId != null">out_id,</if>
|
||||||
<if test="phone != null">phone,</if>
|
<if test="phone != null">phone,</if>
|
||||||
<if test="payTypeId != null">pay_type_id,</if>
|
<if test="payTypeId != null">pay_type_id,</if>
|
||||||
<if test="reviewStatus != null">review_status,</if>
|
<if test="reviewStatus != null">review_status,</if>
|
||||||
@ -248,6 +249,7 @@
|
|||||||
<if test="orderId != null">#{orderId},</if>
|
<if test="orderId != null">#{orderId},</if>
|
||||||
<if test="customer != null and customer != ''">#{customer},</if>
|
<if test="customer != null and customer != ''">#{customer},</if>
|
||||||
<if test="cusId != null">#{cusId},</if>
|
<if test="cusId != null">#{cusId},</if>
|
||||||
|
<if test="cusId != null">md5(#{cusId}),</if>
|
||||||
<if test="phone != null">#{phone},</if>
|
<if test="phone != null">#{phone},</if>
|
||||||
<if test="payTypeId != null">#{payTypeId},</if>
|
<if test="payTypeId != null">#{payTypeId},</if>
|
||||||
<if test="reviewStatus != null">#{reviewStatus},</if>
|
<if test="reviewStatus != null">#{reviewStatus},</if>
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
|
|
||||||
<resultMap type="SysWxUserInfo" id="SysWxUserInfoResult">
|
<resultMap type="SysWxUserInfo" id="SysWxUserInfoResult">
|
||||||
<result property="openid" column="openid"/>
|
<result property="openid" column="openid"/>
|
||||||
|
<result property="cusId" column="cus_id"/>
|
||||||
|
<result property="customerId" column="out_id"/>
|
||||||
<result property="nickName" column="nick_name"/>
|
<result property="nickName" column="nick_name"/>
|
||||||
<result property="appid" column="appid"/>
|
<result property="appid" column="appid"/>
|
||||||
<result property="phone" column="phone"/>
|
<result property="phone" column="phone"/>
|
||||||
@ -19,10 +21,11 @@
|
|||||||
<result property="updateBy" column="update_by"/>
|
<result property="updateBy" column="update_by"/>
|
||||||
<result property="updateTime" column="update_time"/>
|
<result property="updateTime" column="update_time"/>
|
||||||
<result property="remark" column="remark"/>
|
<result property="remark" column="remark"/>
|
||||||
|
<result property="language" column="language"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectSysWxUserInfoVo">
|
<sql id="selectSysWxUserInfoVo">
|
||||||
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
|
select * from sys_wx_user_info
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectSysWxUserInfoList" parameterType="SysWxUserInfo" resultMap="SysWxUserInfoResult">
|
<select id="selectSysWxUserInfoList" parameterType="SysWxUserInfo" resultMap="SysWxUserInfoResult">
|
||||||
@ -54,6 +57,8 @@
|
|||||||
<if test="openid != null">openid,</if>
|
<if test="openid != null">openid,</if>
|
||||||
<if test="nickName != null">nick_name,</if>
|
<if test="nickName != null">nick_name,</if>
|
||||||
<if test="appid != null">appid,</if>
|
<if test="appid != null">appid,</if>
|
||||||
|
<if test="cusId != null">cus_id,</if>
|
||||||
|
<if test="cusId != null">out_id,</if>
|
||||||
<if test="phone != null">phone,</if>
|
<if test="phone != null">phone,</if>
|
||||||
<if test="avatarUrl != null">avatar_url,</if>
|
<if test="avatarUrl != null">avatar_url,</if>
|
||||||
<if test="sex != null">sex,</if>
|
<if test="sex != null">sex,</if>
|
||||||
@ -65,11 +70,14 @@
|
|||||||
<if test="updateBy != null">update_by,</if>
|
<if test="updateBy != null">update_by,</if>
|
||||||
<if test="updateTime != null">update_time,</if>
|
<if test="updateTime != null">update_time,</if>
|
||||||
<if test="remark != null">remark,</if>
|
<if test="remark != null">remark,</if>
|
||||||
|
<if test="language != null">language,</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>
|
||||||
<if test="nickName != null">#{nickName},</if>
|
<if test="nickName != null">#{nickName},</if>
|
||||||
<if test="appid != null">#{appid},</if>
|
<if test="appid != null">#{appid},</if>
|
||||||
|
<if test="cusId != null">#{cusId},</if>
|
||||||
|
<if test="cusId != null">md5(#{cusId}),</if>
|
||||||
<if test="phone != null">#{phone},</if>
|
<if test="phone != null">#{phone},</if>
|
||||||
<if test="avatarUrl != null">#{avatarUrl},</if>
|
<if test="avatarUrl != null">#{avatarUrl},</if>
|
||||||
<if test="sex != null">#{sex},</if>
|
<if test="sex != null">#{sex},</if>
|
||||||
@ -81,6 +89,7 @@
|
|||||||
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
<if test="updateTime != null">#{updateTime},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
<if test="remark != null">#{remark},</if>
|
<if test="remark != null">#{remark},</if>
|
||||||
|
<if test="language != null">#{language},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@ -89,6 +98,8 @@
|
|||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
<if test="nickName != null">nick_name = #{nickName},</if>
|
<if test="nickName != null">nick_name = #{nickName},</if>
|
||||||
<if test="appid != null">appid = #{appid},</if>
|
<if test="appid != null">appid = #{appid},</if>
|
||||||
|
<if test="cusId != null">cus_id = #{cusId},</if>
|
||||||
|
<if test="cusId != null">out_id = md5(#{cusId}),</if>
|
||||||
<if test="phone != null">phone = #{phone},</if>
|
<if test="phone != null">phone = #{phone},</if>
|
||||||
<if test="avatarUrl != null">avatar_url = #{avatarUrl},</if>
|
<if test="avatarUrl != null">avatar_url = #{avatarUrl},</if>
|
||||||
<if test="sex != null">sex = #{sex},</if>
|
<if test="sex != null">sex = #{sex},</if>
|
||||||
@ -100,6 +111,7 @@
|
|||||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
<if test="remark != null">remark = #{remark},</if>
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="language != null">language = #{language},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where openid = #{openid}
|
where openid = #{openid}
|
||||||
</update>
|
</update>
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
<div v-loading="loading">
|
<div v-loading="loading">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<MenuDetail :value="menuData" :date="curDate" />
|
<MenuDetail :value="menuData" :date="curDate" />
|
||||||
|
<div class="bei_an">粤ICP备2020073675</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -204,6 +205,13 @@ export default {
|
|||||||
.content {
|
.content {
|
||||||
height: calc(100vh - 44px);
|
height: calc(100vh - 44px);
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
|
||||||
|
.bei_an {
|
||||||
|
text-align: center;
|
||||||
|
padding: 8px;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #8c8c8c;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user