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.
|
|
|
|
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 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 JsonData getUserDetailFromRedis(@RequestBody Map<String,String> userInfo){
|
|
|
|
|
UserDetail userDetail = userService.getUserDetailFromRedis(userInfo);
|
|
|
|
|
return JsonData.buildSuccess(userDetail);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@GetMapping(value = "getByKey")
|
|
|
|
|
public JsonData getManContByKey(@RequestParam(value = "key", required = true) String key){
|
|
|
|
|
ManCont manCont = userService.getManContByKey(key);
|
|
|
|
|
return JsonData.buildSuccess(manCont);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|