菜单isChild字段

userInfo支付密码 问题
This commit is contained in:
2024-05-23 11:16:31 +08:00
parent c594da4cb7
commit 0ce2a889c2
14 changed files with 43 additions and 52 deletions

View File

@@ -1,6 +1,5 @@
package com.chaozhanggui.system.cashierservice.controller;
import com.alibaba.fastjson.TypeReference;
import com.chaozhanggui.system.cashierservice.dao.TbPlatformDictMapper;
import com.chaozhanggui.system.cashierservice.entity.TbPlatformDict;
import com.chaozhanggui.system.cashierservice.entity.vo.DistrictVo;

View File

@@ -329,8 +329,8 @@ public class LoginContoller {
String mdPasswordString = MD5Utils.MD5Encode(authUserDto.getPassword(), "utf-8");
return loginService.appLogin(authUserDto.getUsername(), mdPasswordString);
} else {
tf = true;
// tf = loginService.validate(authUserDto.getCode(), authUserDto.getUsername());
// tf = true;
tf = loginService.validate(authUserDto.getCode(), authUserDto.getUsername());
if (tf) {
return loginService.appLogin(authUserDto.getUsername(), null);
} else {

View File

@@ -136,12 +136,14 @@ public class NotifyController {
}
private Map<String, Object> getParameterMap(HttpServletRequest request) {
private Map getParameterMap(HttpServletRequest request) {
RequestWrapper requestWrapper = new RequestWrapper(request);
String body = requestWrapper.getBody();
if (ObjectUtil.isNotEmpty(body)) {
return JSONUtil.toBean(body, Map.class);
}else {
Map<String, String[]> parameterMap = request.getParameterMap();
return parameterMap;
}
return null;
}
}

View File

@@ -55,26 +55,26 @@ public class UserContoller {
@Autowired
private TbUserInfoMapper userInfoMapper;
@GetMapping("/userInfo")
public JSONObject userInfo(@RequestParam("openId") String openId ) throws Exception {
TbUserInfo shopUser = userInfoMapper.selectByOpenId(openId);
JSONObject jsonObject = new JSONObject();
if (Objects.isNull(shopUser)){
jsonObject.put("status","fail");
jsonObject.put("msg","用户不存在");
return jsonObject;
}
String userSign = UUID.randomUUID().toString().replaceAll("-","");
String token = TokenUtil.generateJfToken(openId,userSign);
JSONObject object = new JSONObject();
object.put("token",token);
object.put("userSign",userSign);
object.put("num",shopUser.getTotalScore());
jsonObject.put("status","success");
jsonObject.put("msg","成功");
jsonObject.put("data",object);
return jsonObject;
}
// @GetMapping("/userInfo")
// public JSONObject userInfo(@RequestParam("openId") String openId ) throws Exception {
// TbUserInfo shopUser = userInfoMapper.selectByOpenId(openId);
// JSONObject jsonObject = new JSONObject();
// if (Objects.isNull(shopUser)){
// jsonObject.put("status","fail");
// jsonObject.put("msg","用户不存在");
// return jsonObject;
// }
// String userSign = UUID.randomUUID().toString().replaceAll("-","");
// String token = TokenUtil.generateJfToken(openId,userSign);
// JSONObject object = new JSONObject();
// object.put("token",token);
// object.put("userSign",userSign);
// object.put("num",shopUser.getTotalScore());
// jsonObject.put("status","success");
// jsonObject.put("msg","成功");
// jsonObject.put("data",object);
// return jsonObject;
// }
@GetMapping("/shopUserInfo")
public Result shopUserInfo(@RequestParam("userId") String userId ,@RequestParam("shopId") String shopId ) throws Exception {
TbShopUser shopUser = shopUserMapper.selectByUserIdAndShopId(userId,shopId);