上传代码

hehai
zhiyong.ning 4 years ago
parent 8048632ec5
commit 55fbcf072a
  1. 2
      src/main/java/com/msdw/tms/controller/UserController.java
  2. 7
      src/main/java/com/msdw/tms/controller/UserInfoController.java
  3. 2
      src/main/java/com/msdw/tms/entity/UserEntity.java

@ -63,6 +63,8 @@ public class UserController implements UserControllerApi {
*/ */
@PostMapping("/save") @PostMapping("/save")
public R save(@RequestBody UserEntity userEntity){ public R save(@RequestBody UserEntity userEntity){
String token ="UT_"+ UUID.randomUUID().toString().replace("-", "");
userEntity.setToken(token);
userService.save(userEntity); userService.save(userEntity);
return R.ok(); return R.ok();

@ -16,10 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.Arrays; import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@RestController @RestController
@RequestMapping("tms/userInfo") @RequestMapping("tms/userInfo")
@ -61,6 +58,8 @@ public class UserInfoController implements UserInfoControllerApi {
@Transactional @Transactional
@PostMapping("/add") @PostMapping("/add")
public R save(@RequestBody UserInfoEntity userInfoEntity){ public R save(@RequestBody UserInfoEntity userInfoEntity){
String token ="UT_"+ UUID.randomUUID().toString().replace("-", "");
userInfoEntity.setToken(token);
userInfoEntity.setSchoolId(2105); userInfoEntity.setSchoolId(2105);
Integer schoolId = userInfoEntity.getSchoolId(); Integer schoolId = userInfoEntity.getSchoolId();
Integer integer = userInfoService.queryStudentAccount(userInfoEntity.getAccount(),schoolId); Integer integer = userInfoService.queryStudentAccount(userInfoEntity.getAccount(),schoolId);

@ -55,5 +55,7 @@ public class UserEntity implements Serializable {
private String useravatars; private String useravatars;
//是否删除 //是否删除
private Integer isdel; private Integer isdel;
//token
private String token;
} }

Loading…
Cancel
Save