|
@@ -1,10 +1,12 @@
|
|
|
package com.fdkankan.manage.controller.external;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.fdkankan.manage.aop.EncryptFilter;
|
|
|
import com.fdkankan.manage.common.ResultData;
|
|
|
import com.fdkankan.manage.entity.JyUser;
|
|
|
import com.fdkankan.manage.service.IJyUserService;
|
|
|
import com.fdkankan.manage.service.IUserService;
|
|
|
+import com.fdkankan.manage.util.RsaUtils;
|
|
|
import com.fdkankan.manage.vo.request.UserParam;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
@@ -22,24 +24,26 @@ public class ExternalAPIController {
|
|
|
IUserService userService;
|
|
|
|
|
|
@PostMapping("/getByRyId")
|
|
|
- @EncryptFilter(decryptRequest = true, encryptResponse = false)
|
|
|
- public ResultData getByRyId(@RequestBody UserParam param){
|
|
|
-
|
|
|
+ public ResultData getByRyId(@RequestBody String str){
|
|
|
+ String bodyDec = RsaUtils.decipher(str);
|
|
|
+ UserParam param = JSONObject.parseObject(bodyDec, UserParam.class);
|
|
|
return ResultData.ok(jyUserService.getByRyId(param.getRyId()));
|
|
|
}
|
|
|
|
|
|
@PostMapping("/addUcenterUser")
|
|
|
- @EncryptFilter(decryptRequest = true, encryptResponse = false)
|
|
|
- public ResultData addUcenterUser(@RequestBody UserParam userParam){
|
|
|
- userService.addUcenterUser(userParam);
|
|
|
+ public ResultData addUcenterUser(@RequestBody String str){
|
|
|
+ String bodyDec = RsaUtils.decipher(str);
|
|
|
+ UserParam param = JSONObject.parseObject(bodyDec, UserParam.class);
|
|
|
+ userService.addUcenterUser(param);
|
|
|
return ResultData.ok();
|
|
|
}
|
|
|
|
|
|
|
|
|
@PostMapping("/delUcenterUser")
|
|
|
- @EncryptFilter(decryptRequest = true, encryptResponse = false)
|
|
|
- public ResultData delUcenterUser(@RequestBody UserParam userParam){
|
|
|
- userService.delUcenterUser(userParam);
|
|
|
+ public ResultData delUcenterUser(@RequestBody String str){
|
|
|
+ String bodyDec = RsaUtils.decipher(str);
|
|
|
+ UserParam param = JSONObject.parseObject(bodyDec, UserParam.class);
|
|
|
+ userService.delUcenterUser(param);
|
|
|
return ResultData.ok();
|
|
|
}
|
|
|
|