修改微信基础数据
This commit is contained in:
parent
a7238b5b88
commit
ca5e1bb5f1
@ -111,12 +111,14 @@ public class SysOrderNutritionistReplaceRecordController extends BaseController
|
||||
return AjaxResult.error("开始时间不能小于"+ DateUtils.dateTime(sysOrder.getCommissStartTime()));
|
||||
}
|
||||
//更换的售后或营养师不能与原订单一致
|
||||
if(sysOrderNutritionistReplaceRecord.getNutritionistId() != null && sysOrder.getNutritionistId().longValue() == sysOrderNutritionistReplaceRecord.getNutritionistId().longValue()){
|
||||
return AjaxResult.error("更换的营养师与原订单营养师不能相同");
|
||||
}
|
||||
if(sysOrderNutritionistReplaceRecord.getAfterSaleId() != null && sysOrder.getAfterSaleId().longValue() == sysOrderNutritionistReplaceRecord.getAfterSaleId().longValue()){
|
||||
return AjaxResult.error("更换的售后与原订单售后不能相同");
|
||||
}
|
||||
// if(sysOrderNutritionistReplaceRecord.getNutritionistId() != null && sysOrder.getNutritionistId().longValue() == sysOrderNutritionistReplaceRecord.getNutritionistId().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())){
|
||||
return AjaxResult.error("二开提成单、体验单不支持更换营养师、售后");
|
||||
|
@ -1,6 +1,8 @@
|
||||
package com.stdiet.web.controller.custom;
|
||||
|
||||
import com.aliyun.vod20170321.models.GetPlayInfoResponseBody;
|
||||
import com.aliyun.vod20170321.models.GetVideoInfoResponseBody;
|
||||
import com.aliyun.vod20170321.models.GetVideoListResponseBody;
|
||||
import com.stdiet.common.core.controller.BaseController;
|
||||
import com.stdiet.common.core.domain.AjaxResult;
|
||||
import com.stdiet.common.core.page.TableDataInfo;
|
||||
@ -358,13 +360,13 @@ public class WechatAppletController extends BaseController {
|
||||
* 获取视频列表
|
||||
*/
|
||||
@GetMapping(value = "/getVideoList")
|
||||
public AjaxResult getVideoList(SysNutritionalVideo sysNutritionalVideo, @RequestParam(value = "pageNum", defaultValue = "1") int pageNum, @RequestParam(value = "pageSize", defaultValue = "5")int pageSize) {
|
||||
public AjaxResult getVideoList(SysNutritionalVideo sysNutritionalVideo, @RequestParam(value = "pageNum", defaultValue = "1") int pageNum, @RequestParam(value = "pageSize", defaultValue = "5") int pageSize) {
|
||||
AjaxResult result = AjaxResult.success();
|
||||
int total = 0;
|
||||
List<NutritionalVideoResponse> nutritionalVideoList = new ArrayList<>();
|
||||
try{
|
||||
try {
|
||||
GetVideoListResponseBody videoListResponseBody = AliyunVideoUtils.getVideoListByPage(null, "Normal", pageNum, pageSize);
|
||||
if(videoListResponseBody != null){
|
||||
if (videoListResponseBody != null) {
|
||||
total = videoListResponseBody.total;
|
||||
for (GetVideoListResponseBody.GetVideoListResponseBodyVideoListVideo video : videoListResponseBody.videoList.video) {
|
||||
NutritionalVideoResponse nutritionalVideoResponse = new NutritionalVideoResponse();
|
||||
@ -376,10 +378,10 @@ public class WechatAppletController extends BaseController {
|
||||
nutritionalVideoList.add(nutritionalVideoResponse);
|
||||
}
|
||||
}
|
||||
}catch (Exception e){
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
result.put("total",total);
|
||||
result.put("total", total);
|
||||
result.put("rows", nutritionalVideoList);
|
||||
return result;
|
||||
}
|
||||
@ -392,18 +394,18 @@ public class WechatAppletController extends BaseController {
|
||||
public AjaxResult getVideoDetailById(@RequestParam(value = "videoId") String videoId) {
|
||||
AjaxResult result = AjaxResult.success();
|
||||
NutritionalVideoResponse nutritionalVideoResponse = new NutritionalVideoResponse();
|
||||
try{
|
||||
GetPlayInfoResponseBody playInfoResponseBody = AliyunVideoUtils.getVideoVisitDetail(videoId);
|
||||
GetVideoInfoResponseBody videoInfoResponseBody = AliyunVideoUtils.getVideoById(videoId);
|
||||
List<GetPlayInfoResponseBody.GetPlayInfoResponseBodyPlayInfoListPlayInfo> playList = playInfoResponseBody.playInfoList.playInfo;
|
||||
if (playList != null && playList.size() > 0) {
|
||||
nutritionalVideoResponse.setPlayUrl(playList.get(0).getPlayURL());
|
||||
}
|
||||
nutritionalVideoResponse.setDescription(videoInfoResponseBody.video.getDescription());
|
||||
nutritionalVideoResponse.setTags(videoInfoResponseBody.video.getTags());
|
||||
nutritionalVideoResponse.setTitle(videoInfoResponseBody.video.getTitle());
|
||||
//nutritionalVideoResponse.setCreateTime(sysNutritionalVideo.getCreateTime() == null ? "" : DateUtils.dateTime(sysNutritionalVideo.getCreateTime()));
|
||||
}catch (Exception e){
|
||||
try {
|
||||
GetPlayInfoResponseBody playInfoResponseBody = AliyunVideoUtils.getVideoVisitDetail(videoId);
|
||||
GetVideoInfoResponseBody videoInfoResponseBody = AliyunVideoUtils.getVideoById(videoId);
|
||||
List<GetPlayInfoResponseBody.GetPlayInfoResponseBodyPlayInfoListPlayInfo> playList = playInfoResponseBody.playInfoList.playInfo;
|
||||
if (playList != null && playList.size() > 0) {
|
||||
nutritionalVideoResponse.setPlayUrl(playList.get(0).getPlayURL());
|
||||
}
|
||||
nutritionalVideoResponse.setDescription(videoInfoResponseBody.video.getDescription());
|
||||
nutritionalVideoResponse.setTags(videoInfoResponseBody.video.getTags());
|
||||
nutritionalVideoResponse.setTitle(videoInfoResponseBody.video.getTitle());
|
||||
//nutritionalVideoResponse.setCreateTime(sysNutritionalVideo.getCreateTime() == null ? "" : DateUtils.dateTime(sysNutritionalVideo.getCreateTime()));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
result.put("videoDetail", nutritionalVideoResponse);
|
||||
@ -435,13 +437,15 @@ public class WechatAppletController extends BaseController {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
// 更新sys_wx_user_info数据,并返回一系列登录后的数据
|
||||
curWxUserInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
sysWxUserInfoService.updateSysWxUserInfo(curWxUserInfo);
|
||||
|
||||
// 并返回一系列登录后的数据
|
||||
return AjaxResult.success(curWxUserInfo);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.stdiet.custom.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.stdiet.common.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
@ -19,8 +20,11 @@ public class SysWxUserInfo {
|
||||
*/
|
||||
private String openid;
|
||||
|
||||
@JsonIgnore
|
||||
private Long cusId;
|
||||
|
||||
private String customerId;
|
||||
|
||||
/**
|
||||
* 昵称
|
||||
*/
|
||||
@ -63,6 +67,8 @@ public class SysWxUserInfo {
|
||||
@Excel(name = "省份")
|
||||
private String province;
|
||||
|
||||
private String language;
|
||||
|
||||
/**
|
||||
* 国家
|
||||
*/
|
||||
|
@ -69,7 +69,10 @@ public class SysCustomerServiceImpl implements ISysCustomerService {
|
||||
@Override
|
||||
public int insertSysCustomer(SysCustomer sysCustomer) {
|
||||
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;
|
||||
breakFlag = false;
|
||||
}
|
||||
if(planEndDate == planStartDate && StringUtils.isNotEmpty(pauseResult)) {
|
||||
continue;
|
||||
}
|
||||
//暂停日期
|
||||
sysRecipesPlan.setPauseDate(pauseResult[3]);
|
||||
sysRecipesPlan.setStartDate(DateUtils.localDateToDate(planStartDate));
|
||||
|
@ -129,6 +129,7 @@
|
||||
<update id="updateSysCustomer" parameterType="SysCustomer">
|
||||
update sys_customer
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="id != null">out_id = md5(#{id}),</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="phone != null">phone = #{phone},</if>
|
||||
<if test="fansTime != null">fans_time = #{fansTime},</if>
|
||||
|
@ -80,6 +80,7 @@
|
||||
insert into sys_customer_physical_signs
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="customerId != null">customer_id,</if>
|
||||
<if test="customerId != null">out_id,</if>
|
||||
<if test="sex != null">sex,</if>
|
||||
<if test="age != null">age,</if>
|
||||
<if test="tall != null">tall,</if>
|
||||
@ -117,6 +118,7 @@
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="customerId != null">#{customerId},</if>
|
||||
<if test="customerId != null">md5#{customerId},</if>
|
||||
<if test="sex != null">#{sex},</if>
|
||||
<if test="age != null">#{age},</if>
|
||||
<if test="tall != null">#{tall},</if>
|
||||
@ -158,6 +160,7 @@
|
||||
update sys_customer_physical_signs
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<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="age != null">age = #{age},</if>
|
||||
<if test="tall != null">tall = #{tall},</if>
|
||||
|
@ -206,6 +206,7 @@
|
||||
<if test="orderId != null">order_id,</if>
|
||||
<if test="customer != null and customer != ''">customer,</if>
|
||||
<if test="cusId != null">cus_id,</if>
|
||||
<if test="cusId != null">out_id,</if>
|
||||
<if test="phone != null">phone,</if>
|
||||
<if test="payTypeId != null">pay_type_id,</if>
|
||||
<if test="reviewStatus != null">review_status,</if>
|
||||
@ -248,6 +249,7 @@
|
||||
<if test="orderId != null">#{orderId},</if>
|
||||
<if test="customer != null and customer != ''">#{customer},</if>
|
||||
<if test="cusId != null">#{cusId},</if>
|
||||
<if test="cusId != null">md5(#{cusId}),</if>
|
||||
<if test="phone != null">#{phone},</if>
|
||||
<if test="payTypeId != null">#{payTypeId},</if>
|
||||
<if test="reviewStatus != null">#{reviewStatus},</if>
|
||||
|
@ -7,6 +7,7 @@
|
||||
<resultMap type="SysWxUserInfo" id="SysWxUserInfoResult">
|
||||
<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="appid" column="appid"/>
|
||||
<result property="phone" column="phone"/>
|
||||
@ -20,6 +21,7 @@
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="language" column="language"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysWxUserInfoVo">
|
||||
@ -56,6 +58,7 @@
|
||||
<if test="nickName != null">nick_name,</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="avatarUrl != null">avatar_url,</if>
|
||||
<if test="sex != null">sex,</if>
|
||||
@ -67,12 +70,14 @@
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="language != null">language,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="openid != null">#{openid},</if>
|
||||
<if test="nickName != null">#{nickName},</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="avatarUrl != null">#{avatarUrl},</if>
|
||||
<if test="sex != null">#{sex},</if>
|
||||
@ -84,6 +89,7 @@
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="language != null">#{language},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -93,6 +99,7 @@
|
||||
<if test="nickName != null">nick_name = #{nickName},</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="avatarUrl != null">avatar_url = #{avatarUrl},</if>
|
||||
<if test="sex != null">sex = #{sex},</if>
|
||||
@ -104,6 +111,7 @@
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="language != null">language = #{language},</if>
|
||||
</trim>
|
||||
where openid = #{openid}
|
||||
</update>
|
||||
|
@ -18,6 +18,7 @@
|
||||
<div v-loading="loading">
|
||||
<div class="content">
|
||||
<MenuDetail :value="menuData" :date="curDate" />
|
||||
<div class="bei_an">粤ICP备2020073675</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -204,6 +205,13 @@ export default {
|
||||
.content {
|
||||
height: calc(100vh - 44px);
|
||||
overflow: auto;
|
||||
|
||||
.bei_an {
|
||||
text-align: center;
|
||||
padding: 8px;
|
||||
font-size: 12px;
|
||||
color: #8c8c8c;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
Loading…
x
Reference in New Issue
Block a user