|
|
@@ -35,6 +35,7 @@ import com.ejlchina.searcher.util.MapBuilder;
|
|
|
import com.ejlchina.searcher.util.MapUtils;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.dao.DuplicateKeyException;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
@@ -296,7 +297,10 @@ public class CmsGroupRelationController {
|
|
|
*/
|
|
|
@PostMapping("/post/gpt/cardKey")
|
|
|
public Result<String> postGptCardKey(@RequestBody GptRechargeCardKey gptRechargeCardKey) {
|
|
|
- gptRechargeCardKeyMapper.insert(gptRechargeCardKey);
|
|
|
+ try {
|
|
|
+ gptRechargeCardKeyMapper.insert(gptRechargeCardKey);
|
|
|
+ } catch (DuplicateKeyException e) {
|
|
|
+ }
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult();
|
|
|
}
|
|
|
|