张延森 3 년 전
부모
커밋
5cacb2d9fb
1개의 변경된 파일8개의 추가작업 그리고 8개의 파일을 삭제
  1. 8
    8
      src/main/java/com/njyunzhi/pet_identity/controller/TaApplicationController.java

+ 8
- 8
src/main/java/com/njyunzhi/pet_identity/controller/TaApplicationController.java 파일 보기

@@ -398,14 +398,14 @@ public class TaApplicationController extends BaseController {
398 398
         if (StringUtils.isEmpty(makeCardParam.getCardNo())) {
399 399
             return ResponseBean.error("卡号不能为空");
400 400
         } else {
401
-//            TaCardNo taCardNo = iTaCardNoService.getUnuseCard(makeCardParam.getCardNo());
402
-//            if (taCardNo != null) {
403
-//                return ResponseBean.error("卡号无效或者已使用");
404
-//            }
405
-//
406
-//            // 将卡号置为已使用
407
-//            taCardNo.setStatus(Constants.STATUS_NORMAL);
408
-//            iTaCardNoService.updateById(taCardNo);
401
+            TaCardNo taCardNo = iTaCardNoService.getUnuseCard(makeCardParam.getCardNo());
402
+            if (taCardNo != null) {
403
+                return ResponseBean.error("卡号无效或者已使用");
404
+            }
405
+
406
+            // 将卡号置为已使用
407
+            taCardNo.setStatus(Constants.STATUS_NORMAL);
408
+            iTaCardNoService.updateById(taCardNo);
409 409
 
410 410
             TaPetIdentity taPetIdentity = iTaPetIdentityService.getExistBy("card_no", makeCardParam.getCardNo(), false, true);
411 411
             if (null != taPetIdentity) {