commit
13d21550c8
@ -2,7 +2,6 @@ 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;
|
||||
@ -79,10 +78,10 @@ public class WechatAppletController extends BaseController {
|
||||
*/
|
||||
@GetMapping("/getFileByCaseId")
|
||||
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)) : -1L;
|
||||
CustomerCaseResponse customerCaseResponse = new CustomerCaseResponse();
|
||||
customerCaseResponse.setId(caseId);
|
||||
if (id != null) {
|
||||
if (id != -1) {
|
||||
List<SysCustomerCaseFile> list = sysCustomerCaseService.getFileListByCaseId(id);
|
||||
List<String> fileUrl = new ArrayList<>();
|
||||
for (SysCustomerCaseFile caseFile : list) {
|
||||
@ -336,11 +335,9 @@ public class WechatAppletController extends BaseController {
|
||||
@GetMapping(value = "/getCustomerMessage")
|
||||
public TableDataInfo getCustomerMessage(SysMessageNotice sysMessageNotice) {
|
||||
startPage();
|
||||
if (StringUtils.isNotEmpty(sysMessageNotice.getCustomerId())) {
|
||||
sysMessageNotice.setMessageCustomer(Long.parseLong(AesUtils.decrypt(sysMessageNotice.getCustomerId(), null)));
|
||||
} else {
|
||||
sysMessageNotice.setMessageCustomer(0L);
|
||||
}
|
||||
Long cusId = StringUtils.isNotEmpty(sysMessageNotice.getCustomerId()) ? Long.parseLong(AesUtils.decrypt(sysMessageNotice.getCustomerId())) : 0L;
|
||||
|
||||
sysMessageNotice.setMessageCustomer(cusId);
|
||||
List<MessageNoticeResponse> list = sysMessageNoticeService.getCustomerMessage(sysMessageNotice);
|
||||
return getDataTable(list);
|
||||
}
|
||||
@ -431,6 +428,8 @@ public class WechatAppletController extends BaseController {
|
||||
}
|
||||
}
|
||||
|
||||
curWxUserInfo.setCustomerId(AesUtils.encrypt(curWxUserInfo.getCusId().toString()));
|
||||
|
||||
// 并返回一系列登录后的数据
|
||||
return AjaxResult.success(curWxUserInfo);
|
||||
}
|
||||
|
@ -18,10 +18,16 @@ public class AesUtils {
|
||||
private static final String DEFAULT_CIPHER_ALGORITHM = "AES/ECB/PKCS5Padding"; //默认的加密算法
|
||||
private static final String DEFAULT_KEY = "Yhokm#876OTG!c";
|
||||
|
||||
|
||||
public static String encrypt(String content) {
|
||||
return encrypt(content, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* AES 加密操作
|
||||
* @param content 待加密内容
|
||||
* @param key 加密密码
|
||||
*
|
||||
* @param content 待加密内容
|
||||
* @param key 加密密码
|
||||
* @return 返回Base64转码后的加密数据
|
||||
*/
|
||||
public static String encrypt(String content, String key) {
|
||||
@ -44,8 +50,14 @@ public class AesUtils {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public static String decrypt(String content) {
|
||||
return decrypt(content, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* AES 解密操作
|
||||
*
|
||||
* @param content
|
||||
* @param key
|
||||
* @return
|
||||
|
@ -69,10 +69,7 @@ public class SysCustomerServiceImpl implements ISysCustomerService {
|
||||
@Override
|
||||
public int insertSysCustomer(SysCustomer sysCustomer) {
|
||||
sysCustomer.setCreateTime(DateUtils.getNowDate());
|
||||
sysCustomerMapper.insertSysCustomer(sysCustomer);
|
||||
SysCustomer mCustomer = new SysCustomer();
|
||||
mCustomer.setId(sysCustomer.getId());
|
||||
return sysCustomerMapper.updateSysCustomer(mCustomer);
|
||||
return sysCustomerMapper.insertSysCustomer(sysCustomer);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -129,7 +129,6 @@
|
||||
<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,7 +80,6 @@
|
||||
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>
|
||||
@ -118,7 +117,6 @@
|
||||
</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>
|
||||
@ -160,7 +158,6 @@
|
||||
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,7 +206,6 @@
|
||||
<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>
|
||||
@ -249,7 +248,6 @@
|
||||
<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>
|
||||
|
@ -8,7 +8,6 @@
|
||||
<result property="id" column="id"/>
|
||||
<result property="orderId" column="order_id"/>
|
||||
<result property="cusId" column="cus_id"/>
|
||||
<result property="outId" column="out_id"/>
|
||||
<result property="pauseStartDate" column="pause_start_date"/>
|
||||
<result property="pauseEndDate" column="pause_end_date"/>
|
||||
<result property="reason" column="reason"/>
|
||||
@ -25,7 +24,7 @@
|
||||
</sql>
|
||||
|
||||
<sql id="selectSysOrderPauseVo">
|
||||
select id, order_id, cus_id, out_id, pause_start_date, pause_end_date, reason, remarks, create_time, create_by, update_time, update_by, del_flag from sys_recipes_pause sop
|
||||
select id, order_id, cus_id, pause_start_date, pause_end_date, reason, remarks, create_time, create_by, update_time, update_by, del_flag from sys_recipes_pause sop
|
||||
</sql>
|
||||
|
||||
<select id="selectSysOrderPauseList" parameterType="SysOrderPause" resultMap="SysOrderPauseResult">
|
||||
@ -37,7 +36,6 @@
|
||||
where sop.del_flag = 0
|
||||
<if test="orderId != null ">and sop.order_id = #{orderId}</if>
|
||||
<if test="cusId != null ">and sop.cus_id = #{cusId}</if>
|
||||
<if test="outId != null ">and sop.out_id = #{outId}</if>
|
||||
<if test="pauseStartDate != null ">and sop.pause_start_date = #{pauseStartDate}</if>
|
||||
<if test="pauseEndDate != null ">and sop.pause_end_date = #{pauseEndDate}</if>
|
||||
<if test="reason != null and reason != ''">and sop.reason = #{reason}</if>
|
||||
@ -86,7 +84,7 @@
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="orderId != null">order_id = #{orderId},</if>
|
||||
<if test="cusId != null">cus_id = #{cusId},</if>
|
||||
<if test="outId != null">out_id = #{outId},</if>
|
||||
<if test="cusId != null">out_id = md5(#{cusId}),</if>
|
||||
<if test="pauseStartDate != null">pause_start_date = #{pauseStartDate},</if>
|
||||
<if test="pauseEndDate != null">pause_end_date = #{pauseEndDate},</if>
|
||||
<if test="reason != null">reason = #{reason},</if>
|
||||
|
@ -7,7 +7,6 @@
|
||||
<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"/>
|
||||
@ -58,7 +57,6 @@
|
||||
<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>
|
||||
@ -77,7 +75,6 @@
|
||||
<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>
|
||||
@ -99,7 +96,6 @@
|
||||
<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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user