上传代码

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")
public R save(@RequestBody UserEntity userEntity){
String token ="UT_"+ UUID.randomUUID().toString().replace("-", "");
userEntity.setToken(token);
userService.save(userEntity);
return R.ok();

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

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

Loading…
Cancel
Save