|
@@ -37,6 +37,8 @@ import io.swagger.annotations.ApiOperation;
|
|
|
public class UserController {
|
|
|
@Autowired
|
|
|
private UserService service;
|
|
|
+ public static String userLoginType = "User";
|
|
|
+
|
|
|
@PassToken
|
|
|
@ApiOperation("用户进入智能客服获取信息")
|
|
|
@PostMapping("/getInfo")
|
|
@@ -57,6 +59,7 @@ public class UserController {
|
|
|
user = service.getMap(nqw);
|
|
|
}
|
|
|
// 将用户转换成token
|
|
|
+ user.put("type", userLoginType);
|
|
|
String code = JwtUtil.sign(user);
|
|
|
return ResponseFormat.success(code);
|
|
|
}
|
|
@@ -68,7 +71,7 @@ public class UserController {
|
|
|
QueryWrapper oqw = new QueryWrapper<>();
|
|
|
oqw.eq("uid", data.getUid());
|
|
|
Long num = service.count(oqw);
|
|
|
- if(num>0) {
|
|
|
+ if (num > 0) {
|
|
|
throw new CustomizationException(ExceptionEnum.UID_EXIST);
|
|
|
}
|
|
|
this.service.save(data);
|