mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-03 10:46:38 +08:00
Merge branch 'sit-Carl' into sit-Leung
This commit is contained in:
commit
9c5f2f812b
@ -21,7 +21,7 @@ public class MemberService {
|
||||
|
||||
|
||||
|
||||
public String memberGet(MemberGetEntity memberGetEntity, HttpServletRequest request)throws Exception {
|
||||
public String memberGet(MemberGetEntity memberGetEntity)throws Exception {
|
||||
Map<String, String> paramMap = MapRemoveNullUtil.setConditionMap(memberGetEntity);
|
||||
paramMap.put("id",StringUtil.toString(memberGetEntity.getId()).equals("0")?null:StringUtil.toString(memberGetEntity.getId()));
|
||||
MapRemoveNullUtil.removeNullEntry(paramMap);
|
||||
|
@ -6,6 +6,7 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import net.lab1024.smartadmin.common.anno.OperateLog;
|
||||
import net.lab1024.smartadmin.common.constant.ResponseCodeConst;
|
||||
import net.lab1024.smartadmin.common.domain.ResponseDTO;
|
||||
import net.lab1024.smartadmin.common.heartbeat.StringUtil;
|
||||
import net.lab1024.smartadmin.constant.SwaggerTagConst;
|
||||
@ -32,6 +33,7 @@ import net.lab1024.smartadmin.util.SmartHttpUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
@ -78,7 +80,7 @@ public class TransitionController {
|
||||
switch (type)
|
||||
{
|
||||
case "get":
|
||||
result = memberService.memberGet(objectMapper.convertValue(object,MemberGetEntity.class),request);
|
||||
result = memberService.memberGet(objectMapper.convertValue(object,MemberGetEntity.class));
|
||||
break;
|
||||
case "check":
|
||||
result = memberService.memberCheck(objectMapper.convertValue(object,MemberCheckEntity.class));
|
||||
@ -101,6 +103,26 @@ public class TransitionController {
|
||||
return result;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "登录或注册", notes = "会员查询,登录注册")
|
||||
@PostMapping("royalcanin/regOrLogin")
|
||||
public ResponseDTO<String> regOrLogin(@RequestParam String phoneNumber) throws Exception {
|
||||
MemberCheckEntity memberCheckEntity = new MemberCheckEntity();
|
||||
memberCheckEntity.setMobile(phoneNumber);
|
||||
JSONObject jsonObject = JSONObject.parseObject(memberService.memberCheck(memberCheckEntity));
|
||||
if(jsonObject.getString("code").equals("103")){
|
||||
MemberGetEntity memberGetEntity = new MemberGetEntity ();
|
||||
memberGetEntity.setMobile(phoneNumber);
|
||||
return ResponseDTO.succData(memberService.memberGet(memberGetEntity),"1");
|
||||
}else if(jsonObject.getString("code").equals("0")){
|
||||
MemberAddEntity memberAddEntity = new MemberAddEntity();
|
||||
memberAddEntity.setMobile(phoneNumber);
|
||||
return ResponseDTO.succData(memberService.memberAdd(memberAddEntity),"2");
|
||||
}else{
|
||||
return ResponseDTO.wrap(ResponseCodeConst.ERROR_PARAM);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "会员地址", notes = "查询会员地址,添加会员地址,更新会员地址,删除会员地址")
|
||||
@PostMapping("royalcanin/memberAddress")
|
||||
public String transferMemberAddress(String type ,@RequestBody Object object, HttpServletRequest request) throws Exception {
|
||||
|
@ -34,4 +34,6 @@ public class GoodsEntity {
|
||||
private int isSales;
|
||||
|
||||
private int isShow;
|
||||
|
||||
private String goodUrl;
|
||||
}
|
||||
|
@ -53,9 +53,11 @@ public class GoodService {
|
||||
paramMap.remove("tagFunction");
|
||||
paramMap.remove("tagBreed");
|
||||
paramMap.remove("tagStatus");
|
||||
paramMap.put("count",StringUtil.toString(productQueryEntity.getCount()).equals("0")?null:productQueryEntity.getCount());
|
||||
MapRemoveNullUtil.removeNullEntry(paramMap);
|
||||
paramMap.put("secret","H5@2021");
|
||||
paramMap.put("channelId","15");
|
||||
paramMap.put("isSales","1");
|
||||
String sb = SmartHttpUtil.sendPostForm(url+"product/query",paramMap,null);
|
||||
JSONObject jsonObject = JSONObject.parseObject(sb);
|
||||
String result = AESUtil.decryptLinux(jsonObject.getString("data"), AESUtil.KEY);
|
||||
|
@ -15,7 +15,7 @@ public class SmartJWTUtil {
|
||||
/**
|
||||
* 过期时间一天
|
||||
*/
|
||||
private static final int EXPIRE_SECONDS = 1 * 24 * 3600;
|
||||
private static final int EXPIRE_SECONDS = 365 * 24 * 3600;
|
||||
/**
|
||||
* jwt加密字段
|
||||
*/
|
||||
@ -78,7 +78,7 @@ public class SmartJWTUtil {
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
String token = SmartJWTUtil.generateToken("884127");
|
||||
String token = SmartJWTUtil.generateToken("884159");
|
||||
System.out.println(token);
|
||||
System.out.println(SmartJWTUtil.decodeToken(token));
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ public class SmsUtil {
|
||||
SMSServiceSoap_BindingStub stub = (SMSServiceSoap_BindingStub) service.getSMSServiceSoap(protAddres);
|
||||
java.util.Calendar cal= java.util.Calendar.getInstance();
|
||||
cal.set(2021,12,31,0,0,0);
|
||||
String sMSGID = stub.sendSMS(number,8,"您好,您的验证码:" + verifyNumber + ", 5分钟有效期 !【皇家宠物食品】",cal,"7101567100151709");
|
||||
String sMSGID = stub.sendSMS(number,8,"您好,您的验证码:" + verifyNumber + ", 5分钟有效期 !",cal,"7101567100151709");
|
||||
if (sMSGID.startsWith("OK:"))
|
||||
System.out.println("Send successful!");
|
||||
System.out.println("msgId = " + sMSGID);
|
||||
|
@ -19,6 +19,7 @@
|
||||
tagUsedAge,
|
||||
category_name,
|
||||
picture,
|
||||
good_url,
|
||||
show_img_file
|
||||
from t_good_goods
|
||||
where isShow = 1
|
||||
|
@ -1640,6 +1640,7 @@ CREATE TABLE `t_good_goods` (
|
||||
`tagUsedAge` varchar(11) DEFAULT NULL COMMENT '适用阶段',
|
||||
`picture` varchar(200) DEFAULT NULL COMMENT '标品头图',
|
||||
`show_img_file` varchar(200) DEFAULT NULL COMMENT '身体头图',
|
||||
`good_url` varchar(500) DEFAULT NULL COMMENT '处方粮跳转连接',
|
||||
`isSales` int(11) DEFAULT NULL COMMENT '0:未销售,1:销售',
|
||||
`isShow` int(11) DEFAULT NULL COMMENT '0:不展示,1:展示',
|
||||
PRIMARY KEY (`id`)
|
||||
|
Loading…
Reference in New Issue
Block a user