知行学院电脑端
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.

34 lines
1.1 KiB

package com.hxgk.zxxy.controller;
import com.hxgk.zxxy.model.entity.ManCont;
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;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
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){
UserDetail userDetail = userService.getUserDetailFromRedis(userInfo);
return ApiResponse.success(userDetail);
}
@GetMapping(value = "getByKey")
public ApiResponse<Object> getManContByKey(@DecryptedBody(value = "key", required = true) String key){
ManCont manCont = userService.getManContByKey(key);
return ApiResponse.success(manCont);
}
}