|
@@ -368,14 +368,16 @@ public class CmsGroupRelationController {
|
|
|
*/
|
|
*/
|
|
|
@PostMapping("/post/gpt/cardKey")
|
|
@PostMapping("/post/gpt/cardKey")
|
|
|
public Result<String> postGptCardKey(@RequestBody GptRechargeCardKeyReq req) {
|
|
public Result<String> postGptCardKey(@RequestBody GptRechargeCardKeyReq req) {
|
|
|
- try {
|
|
|
|
|
- req.getCardKey().forEach(key -> {
|
|
|
|
|
|
|
+ List<String> cardKey = req.getCardKey();
|
|
|
|
|
+ cardKey.forEach(key -> {
|
|
|
|
|
+ try {
|
|
|
GptRechargeCardKey gptRechargeCardKey = new GptRechargeCardKey();
|
|
GptRechargeCardKey gptRechargeCardKey = new GptRechargeCardKey();
|
|
|
gptRechargeCardKey.setCardKey(key);
|
|
gptRechargeCardKey.setCardKey(key);
|
|
|
gptRechargeCardKeyMapper.insert(gptRechargeCardKey);
|
|
gptRechargeCardKeyMapper.insert(gptRechargeCardKey);
|
|
|
- });
|
|
|
|
|
- } catch (DuplicateKeyException e) {
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ } catch (DuplicateKeyException e) {
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult();
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult();
|
|
|
}
|
|
}
|
|
|
|
|
|