开通会员接口
This commit is contained in:
@@ -201,11 +201,11 @@ public class LoginContoller {
|
||||
String data = WxMaCryptUtils.decrypt(sessionKey, encryptedData, ivStr);
|
||||
try {
|
||||
if (ObjectUtil.isNotEmpty(data) && JSONObject.parseObject(data).containsKey("phoneNumber")) {
|
||||
if (!map.containsKey("shopId") || ObjectUtil.isEmpty(map.get("shopId"))) {
|
||||
// if (!map.containsKey("shopId") || ObjectUtil.isEmpty(map.get("shopId"))) {
|
||||
return Result.success(CodeEnum.SUCCESS, JSONObject.parseObject(data).get("phoneNumber"));
|
||||
}
|
||||
log.info("登录传参 获取手机号成功 sessionKey:{}\n encryptedData:{} \nivStr:{} \n data:{},",sessionKey,encryptedData,ivStr,JSONObject.parseObject(data).get("phoneNumber"));
|
||||
return loginService.upPhone(openId,JSONObject.parseObject(data).get("phoneNumber").toString(),map.get("shopId").toString());
|
||||
// }
|
||||
// log.info("登录传参 获取手机号成功 sessionKey:{}\n encryptedData:{} \nivStr:{} \n data:{},",sessionKey,encryptedData,ivStr,JSONObject.parseObject(data).get("phoneNumber"));
|
||||
// return loginService.upPhone(openId,JSONObject.parseObject(data).get("phoneNumber").toString(),map.get("shopId").toString());
|
||||
}
|
||||
} catch (Exception e){
|
||||
// e.printStackTrace();
|
||||
@@ -277,6 +277,7 @@ public class LoginContoller {
|
||||
String userId = TokenUtil.parseParamFromToken(token).getString("userId");
|
||||
userInfo.setId(Integer.valueOf(userId));
|
||||
userInfo.setUpdatedAt(System.currentTimeMillis());
|
||||
// log.info("更新用户信息 param,{}",JSONObject.toJSONString(userInfo));
|
||||
return loginService.upUserInfo(userInfo);
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import com.chaozhanggui.system.cashierservice.entity.TbShopUser;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbUserInfo;
|
||||
import com.chaozhanggui.system.cashierservice.entity.vo.IntegralFlowVo;
|
||||
import com.chaozhanggui.system.cashierservice.entity.vo.IntegralVo;
|
||||
import com.chaozhanggui.system.cashierservice.entity.vo.OpenMemberVo;
|
||||
import com.chaozhanggui.system.cashierservice.service.UserService;
|
||||
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
|
||||
import com.chaozhanggui.system.cashierservice.sign.Result;
|
||||
@@ -61,6 +62,12 @@ public class UserContoller {
|
||||
// jsonObject.put("data",object);
|
||||
// return jsonObject;
|
||||
// }
|
||||
|
||||
@PostMapping("/openMember")
|
||||
public Result openMember(@RequestBody OpenMemberVo memberVo){
|
||||
return userService.openMember(memberVo);
|
||||
}
|
||||
|
||||
@GetMapping("/shopUserInfo")
|
||||
public Result shopUserInfo(@RequestParam("userId") String userId, @RequestHeader("openId") String openId, @RequestParam("shopId") String shopId) throws Exception {
|
||||
TbShopUser shopUser = new TbShopUser();
|
||||
|
||||
Reference in New Issue
Block a user