张延森 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
         if (StringUtils.isEmpty(makeCardParam.getCardNo())) {
398
         if (StringUtils.isEmpty(makeCardParam.getCardNo())) {
399
             return ResponseBean.error("卡号不能为空");
399
             return ResponseBean.error("卡号不能为空");
400
         } else {
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
             TaPetIdentity taPetIdentity = iTaPetIdentityService.getExistBy("card_no", makeCardParam.getCardNo(), false, true);
410
             TaPetIdentity taPetIdentity = iTaPetIdentityService.getExistBy("card_no", makeCardParam.getCardNo(), false, true);
411
             if (null != taPetIdentity) {
411
             if (null != taPetIdentity) {