|
|
@@ -433,12 +433,13 @@ public class CmsGroupRelationController {
|
|
|
*/
|
|
|
@PostMapping("/post/gpt/cardKey")
|
|
|
public Result<String> postGptCardKey(@RequestBody GptRechargeCardKeyReq req) {
|
|
|
- List<GptRechargeCardKey> cardKey = req.getCardKey();
|
|
|
- cardKey.forEach(card -> {
|
|
|
+ Integer type = req.getType();
|
|
|
+ List<String> cardKey = req.getCardKey();
|
|
|
+ cardKey.forEach(key -> {
|
|
|
try {
|
|
|
GptRechargeCardKey gptRechargeCardKey = new GptRechargeCardKey();
|
|
|
- gptRechargeCardKey.setCardKey(card.getCardKey());
|
|
|
- gptRechargeCardKey.setType(card.getType());
|
|
|
+ gptRechargeCardKey.setCardKey(key);
|
|
|
+ gptRechargeCardKey.setType(type);
|
|
|
gptRechargeCardKeyMapper.insert(gptRechargeCardKey);
|
|
|
} catch (DuplicateKeyException e) {
|
|
|
|