Commit a1c9171f by xieshixiang

Merge remote-tracking branch 'origin/dev' into dev

parents 74b1f5bd ce05e5bf
......@@ -48,6 +48,7 @@ public class BindInfoControlller extends BaseController {
* @date: 2020/6/19 10:27
*/
@PostMapping("bind")
@BodyDecryptAnnotation
@ResponseEncryptAnnotation
public Response<String> bindInfo(@RequestBody BindInfo info) {
if (info == null) {
......@@ -66,6 +67,8 @@ public class BindInfoControlller extends BaseController {
* @date: 2020/6/19 10:27
*/
@PostMapping("unbind")
@BodyDecryptAnnotation
@ResponseEncryptAnnotation
public Response unbindInfo(@RequestBody @Validated UnBindReq req) {
return service.unbindInfo(req) ? ResponseGenerator.success() : ResponseGenerator.fail("解绑失败");
}
......
package com.hikcreate.edl.pub.web.mobile.api.controller;
import com.hikcreate.common.sdk.response.apiparam.Response;
import com.hikcreate.common.sdk.response.apiparam.ResponseGenerator;
import com.hikcreate.edl.common.sdk.util.EncryptStringAes;
import com.hikcreate.edl.pub.web.mobile.infra.core.annotatiion.BodyDecryptAnnotation;
import com.hikcreate.edl.pub.web.mobile.infra.core.annotatiion.HeaderDecryptAnnotation;
import com.hikcreate.edl.pub.web.mobile.infra.core.annotatiion.ResponseEncryptAnnotation;
import com.hikcreate.edl.pub.web.mobile.infra.core.configbean.SignKeyConfigBean;
import com.hikcreate.edl.pub.web.mobile.infra.model.param.response.TestRes;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
* @author lixian
* @description
* @date 2020/6/18 17:57
**/
@Slf4j
@RestController
@RequestMapping("/test")
public class TestController {
@Autowired
SignKeyConfigBean signKeyConfigBean;
@GetMapping(value = "encrypt")
public String encrypt( String plain) {
return EncryptStringAes.encryptAes(plain, signKeyConfigBean.getKey());
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment