|
@@ -18,6 +18,7 @@ import org.dromara.common.core.domain.model.ResultInfo;
|
|
|
import org.dromara.common.core.enums.CardOperateEnum;
|
|
import org.dromara.common.core.enums.CardOperateEnum;
|
|
|
import org.dromara.common.core.enums.ResultCodeEnum;
|
|
import org.dromara.common.core.enums.ResultCodeEnum;
|
|
|
import org.dromara.common.core.exception.ApiException;
|
|
import org.dromara.common.core.exception.ApiException;
|
|
|
|
|
+import org.dromara.common.message.kafka.aop.annotation.SyncDataToLocal;
|
|
|
import org.dromara.common.web.core.BaseController;
|
|
import org.dromara.common.web.core.BaseController;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
@@ -28,6 +29,8 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
import java.text.MessageFormat;
|
|
import java.text.MessageFormat;
|
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
+import static org.dromara.common.message.kafka.constant.MessageEventTypeConstants.*;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* @ClassName CardApiController
|
|
* @ClassName CardApiController
|
|
|
* @Description 提供给自助客户端对卡片操作的接口
|
|
* @Description 提供给自助客户端对卡片操作的接口
|
|
@@ -47,6 +50,7 @@ public class CardApiController extends BaseController {
|
|
|
private final IPtCardService cardService;
|
|
private final IPtCardService cardService;
|
|
|
|
|
|
|
|
@PostMapping("/api/v1/new")
|
|
@PostMapping("/api/v1/new")
|
|
|
|
|
+ @SyncDataToLocal(eventType = CARD_OPERATION, sender = CARD_CENTER_SENDER)
|
|
|
public ReturnResult initNewCard(@RequestBody Map<String, Object> initParam) {
|
|
public ReturnResult initNewCard(@RequestBody Map<String, Object> initParam) {
|
|
|
PtCardBo bo = getInitInfo(initParam);
|
|
PtCardBo bo = getInitInfo(initParam);
|
|
|
InitCardVo initCardVo = new InitCardVo();
|
|
InitCardVo initCardVo = new InitCardVo();
|
|
@@ -57,6 +61,7 @@ public class CardApiController extends BaseController {
|
|
|
throw new ApiException(result.getData().getDetail(), result.getData().getCode());
|
|
throw new ApiException(result.getData().getDetail(), result.getData().getCode());
|
|
|
}
|
|
}
|
|
|
@PostMapping("/api/v1/change")
|
|
@PostMapping("/api/v1/change")
|
|
|
|
|
+ @SyncDataToLocal(eventType = CARD_OPERATION, sender = CARD_CENTER_SENDER)
|
|
|
public ReturnResult initChangeCard(@RequestBody Map<String, Object> initParam) {
|
|
public ReturnResult initChangeCard(@RequestBody Map<String, Object> initParam) {
|
|
|
PtCardBo bo = getInitInfo(initParam);
|
|
PtCardBo bo = getInitInfo(initParam);
|
|
|
InitCardVo initCardVo = new InitCardVo();
|
|
InitCardVo initCardVo = new InitCardVo();
|
|
@@ -67,6 +72,7 @@ public class CardApiController extends BaseController {
|
|
|
throw new ApiException(result.getData().getDetail(), result.getData().getCode());
|
|
throw new ApiException(result.getData().getDetail(), result.getData().getCode());
|
|
|
}
|
|
}
|
|
|
@PostMapping("/api/v1/reissue")
|
|
@PostMapping("/api/v1/reissue")
|
|
|
|
|
+ @SyncDataToLocal(eventType = CARD_OPERATION, sender = CARD_CENTER_SENDER)
|
|
|
public ReturnResult initReissueCard(@RequestBody Map<String, Object> initParam) {
|
|
public ReturnResult initReissueCard(@RequestBody Map<String, Object> initParam) {
|
|
|
PtCardBo bo = getInitInfo(initParam);
|
|
PtCardBo bo = getInitInfo(initParam);
|
|
|
InitCardVo initCardVo = new InitCardVo();
|
|
InitCardVo initCardVo = new InitCardVo();
|