知行学院电脑端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.1 KiB

3 years ago
package com.hxgk.zxxy.controller;
3 years ago
import com.hxgk.zxxy.model.entity.ManCont;
3 years ago
import com.hxgk.zxxy.model.entity.UserDetail;
import com.hxgk.zxxy.service.UserService;
import com.hxgk.zxxy.utils.JsonData;
import com.hxgk.zxxy.utils.sm4.ApiResponse;
import com.hxgk.zxxy.utils.sm4.DecryptedBody;
3 years ago
import org.springframework.beans.factory.annotation.Autowired;
3 years ago
import org.springframework.web.bind.annotation.*;
3 years ago
import java.util.Map;
@RestController
@RequestMapping("user")
public class UserController {
@Autowired
private UserService userService;
@RequestMapping(value = "detail")
public ApiResponse<Object> getUserDetailFromRedis(@DecryptedBody Map<String,String> userInfo){
3 years ago
UserDetail userDetail = userService.getUserDetailFromRedis(userInfo);
return ApiResponse.success(userDetail);
3 years ago
}
3 years ago
@GetMapping(value = "getByKey")
public ApiResponse<Object> getManContByKey(@DecryptedBody(value = "key", required = true) String key){
3 years ago
ManCont manCont = userService.getManContByKey(key);
return ApiResponse.success(manCont);
3 years ago
}
3 years ago
}