Browse Source

修改枚举类

shiyi 3 years ago
parent
commit
86de6cf302
29 changed files with 111 additions and 111 deletions
  1. 11 11
      core/src/main/java/com/sp/director/ienum/BaseReviewIenum.java
  2. 2 2
      core/src/main/java/com/sp/director/ienum/EffectiveState.java
  3. 5 5
      core/src/main/java/com/sp/director/ienum/GenderEnum.java
  4. 3 3
      core/src/main/java/com/sp/director/ienum/IosPayStatusEnum.java
  5. 5 5
      core/src/main/java/com/sp/director/ienum/OrderStatusEnum.java
  6. 4 4
      core/src/main/java/com/sp/director/ienum/PayStatusEnum.java
  7. 7 7
      core/src/main/java/com/sp/director/ienum/SubscriptionStatus.java
  8. 2 2
      core/src/main/java/com/sp/director/ienum/UserSubscriptionErrorStatus.java
  9. 2 2
      core/src/main/java/com/sp/director/ienum/UserSubscriptionErrorTypeEnum.java
  10. 1 1
      core/src/main/java/com/sp/director/module/invite/dao/impl/UserInviteDaoImpl.java
  11. 1 1
      core/src/main/java/com/sp/director/module/invite/service/impl/UserInviteServiceImpl.java
  12. 1 1
      core/src/main/java/com/sp/director/module/order/constraint/impl/AppleOrderConstraintImpl.java
  13. 2 2
      core/src/main/java/com/sp/director/module/order/service/impl/OrderProcessServiceImpl.java
  14. 6 6
      core/src/main/java/com/sp/director/module/order/service/impl/OrderServiceImpl.java
  15. 1 1
      core/src/main/java/com/sp/director/module/pay/applepay/dao/impl/UserIosSubscriptionErrorDetailDaoImpl.java
  16. 3 3
      core/src/main/java/com/sp/director/module/pay/applepay/dao/impl/UserSubscriptionDetailDaoImpl.java
  17. 29 29
      core/src/main/java/com/sp/director/module/pay/applepay/service/impl/ApplePayServiceImpl.java
  18. 1 1
      core/src/main/java/com/sp/director/module/pay/applepay/service/impl/UserIosSubscriptionErrorDetailServiceImpl.java
  19. 1 1
      core/src/main/java/com/sp/director/module/pay/applepay/service/impl/UserSubscriptionDetailServiceImpl.java
  20. 1 1
      core/src/main/java/com/sp/director/module/report/dao/impl/ReportDaoImpl.java
  21. 1 1
      core/src/main/java/com/sp/director/module/report/service/impl/ReportServiceImpl.java
  22. 9 9
      core/src/main/java/com/sp/director/module/script/dao/impl/ScriptContentVerifyDaoImpl.java
  23. 5 5
      core/src/main/java/com/sp/director/module/script/dao/impl/ScriptVerifyDaoImpl.java
  24. 2 2
      core/src/main/java/com/sp/director/module/script/help/ScriptRoleHelper.java
  25. 1 1
      core/src/main/java/com/sp/director/module/script/service/impl/ScriptContentServiceImpl.java
  26. 1 1
      core/src/main/java/com/sp/director/module/script/service/impl/ScriptContentVerifyServiceImpl.java
  27. 2 2
      core/src/main/java/com/sp/director/module/script/service/impl/ScriptVerifyServiceImpl.java
  28. 1 1
      core/src/main/java/com/sp/director/module/video/service/impl/UserVideoServiceImpl.java
  29. 1 1
      logic/src/test/java/com/sp/module/video/VideoTest.java

+ 11 - 11
core/src/main/java/com/sp/director/ienum/BaseReviewIenum.java

@@ -12,13 +12,13 @@ import java.util.List;
  **/
 public enum BaseReviewIenum implements IEnum {
     INIT(0,"未认证/初始化状态"),
-    Review(1,"待审核"),
-    Pass(2,"审核通过"),
-    Refuse(3,"拒绝"),
-    Obtained(4,"下架"),
-    ToRecommand(5,"待推荐"),
-    Recommand(6,"已推荐"),
-    NotRecommand(7,"不推荐");
+    REVIEW(1,"待审核"),
+    PASS(2,"审核通过"),
+    REFUSE(3,"拒绝"),
+    OBTAINED(4,"下架"),
+    TO_RECOMMAND(5,"待推荐"),
+    RECOMMAND(6,"已推荐"),
+    NOT_RECOMMAND(7,"不推荐");
 
     @EnumValue
     private Integer num;
@@ -45,9 +45,9 @@ public enum BaseReviewIenum implements IEnum {
      * @date 2020/8/28 10:55
      */
     public static List<BaseReviewIenum> getNormalUserVisitStatusList(){
-        return Arrays.asList(BaseReviewIenum.Pass,
-                BaseReviewIenum.NotRecommand,
-                BaseReviewIenum.ToRecommand,
-                BaseReviewIenum.Recommand);
+        return Arrays.asList(BaseReviewIenum.PASS,
+                BaseReviewIenum.NOT_RECOMMAND,
+                BaseReviewIenum.TO_RECOMMAND,
+                BaseReviewIenum.RECOMMAND);
     }
 }

+ 2 - 2
core/src/main/java/com/sp/director/ienum/EffectiveState.java

@@ -10,8 +10,8 @@ import com.baomidou.mybatisplus.annotation.EnumValue;
  **/
 public enum EffectiveState implements IEnum {
 
-    Invalid(0, "无效"),
-    Valid(1, "有效");
+    INVALID(0, "无效"),
+    VALID(1, "有效");
 
     private String name;
 

+ 5 - 5
core/src/main/java/com/sp/director/ienum/GenderEnum.java

@@ -4,8 +4,8 @@ import com.baomidou.mybatisplus.annotation.EnumValue;
 
 public enum  GenderEnum implements IEnum {
 
-    Male(0,"男"),Female(1,"女"),
-    Other(2, "其他/不限/所有");
+    MALE(0,"男"),FEMALE(1,"女"),
+    OTHER(2, "其他/不限/所有");
 
     @EnumValue
     private int num;
@@ -27,10 +27,10 @@ public enum  GenderEnum implements IEnum {
     }
 
     public static GenderEnum getReverseGender(GenderEnum gender){
-        if(gender.equals(Male)){
-            return Female;
+        if(gender.equals(MALE)){
+            return FEMALE;
         }else{
-            return Male;
+            return MALE;
         }
     }
 }

+ 3 - 3
core/src/main/java/com/sp/director/ienum/IosPayStatusEnum.java

@@ -8,9 +8,9 @@ import com.baomidou.mybatisplus.annotation.EnumValue;
  * @Descrption
  **/
 public enum IosPayStatusEnum implements IEnum {
-    Success(0,"处理成功"),
-    Fail(1,"处理失败"),
-    Processed(2, "已经处理过");
+    SUCCESS(0,"处理成功"),
+    FAIL(1,"处理失败"),
+    PROCESSED(2, "已经处理过");
 
     @EnumValue
     private Integer num;

+ 5 - 5
core/src/main/java/com/sp/director/ienum/OrderStatusEnum.java

@@ -9,11 +9,11 @@ import com.baomidou.mybatisplus.annotation.EnumValue;
 
 public enum OrderStatusEnum implements IEnum {
 	
-	Todo(1, "待处理")
-	,Notify(2, "通知处理中")
-	,Finish(3, "已处理")
-	,Close(4, "已关闭")
-	, ErrorProcessed(5, "异常已处理")
+	TODO(1, "待处理")
+	,NOTIFY(2, "通知处理中")
+	,FINISH(3, "已处理")
+	,CLOSE(4, "已关闭")
+	, ERROR_PROCESSED(5, "异常已处理")
 	/**
 	 * //需要人工干预,通知相关负责人。
 	**/

+ 4 - 4
core/src/main/java/com/sp/director/ienum/PayStatusEnum.java

@@ -8,10 +8,10 @@ import com.baomidou.mybatisplus.annotation.EnumValue;
  */
 public enum PayStatusEnum implements IEnum {
 	
-	Topay(1, "待支付")
-	,Payed(2, "已支付")
-	,Refund(3,"已退款")
-	,abnormal(4,"订单异常");
+	TO_PAY(1, "待支付")
+	,PAYED(2, "已支付")
+	,REFUND(3,"已退款")
+	,ABNORMAL(4,"订单异常");
 
 	@EnumValue
 	private int num;

+ 7 - 7
core/src/main/java/com/sp/director/ienum/SubscriptionStatus.java

@@ -11,34 +11,34 @@ public enum SubscriptionStatus implements IEnum {
     /**
      * 支付后订阅状态为订阅中
     **/
-    Subscription(0,"订阅中"),
+    SUBSCRIPTION(0,"订阅中"),
     /**
      * 在订阅到期最后一天定时器校验如果未扣款成功,则为等待扣费状态
     **/
-    ToPay(1,"等待扣费"),
+    TOPAY(1,"等待扣费"),
     /**
      * 如果auto_renew_status为0,则关闭订阅
     **/
-    UnSubscription(2,"关闭订阅"),
+    UN_SUBSCRIPTION(2,"关闭订阅"),
 
     /**
      * 通过服务器通知的方式,如果确定
     **/
-    Cancel(3,"已退款"),
+    CANCEL(3,"已退款"),
     /**
      * auto_renew_status 为1并且 is_in_billing_retry_period 为1则扣款失败
     **/
-    DebitFailed(4, "扣款失败"),
+    DEBITFAILED(4, "扣款失败"),
 
     /**
      * 执行逻辑出错,获取向苹果校验票据出现异常
     **/
-    Exception(5,"异常"),
+    EXCEPTION(5,"异常"),
 
     /**
      * 订阅过期 测试环境中会默认续订6次
     **/
-    ExpirationIntent(6,"订阅到期");
+    EXPIRATIONINTENT(6,"订阅到期");
     @EnumValue
     private Integer num;
     private String name;

+ 2 - 2
core/src/main/java/com/sp/director/ienum/UserSubscriptionErrorStatus.java

@@ -8,8 +8,8 @@ import com.baomidou.mybatisplus.annotation.EnumValue;
  * @Date: 2020/1/15 17:18
  **/
 public enum UserSubscriptionErrorStatus implements IEnum {
-    Pending(0,"待处理"),
-    Processed(1,"已处理");
+    PENDING(0,"待处理"),
+    PROCESSED(1,"已处理");
 
     @EnumValue
     private Integer num;

+ 2 - 2
core/src/main/java/com/sp/director/ienum/UserSubscriptionErrorTypeEnum.java

@@ -9,8 +9,8 @@ import com.baomidou.mybatisplus.annotation.EnumValue;
  * @Version V3
  **/
 public enum UserSubscriptionErrorTypeEnum implements IEnum {
-    UserIdNotFound(0,"用户id未找到"),
-    ProcessException(1,"业务执行错误");
+    USERID_NOT_FOUND(0,"用户id未找到"),
+    PROCESS_EXCEPTION(1,"业务执行错误");
 
     @EnumValue
     private Integer num;

+ 1 - 1
core/src/main/java/com/sp/director/module/invite/dao/impl/UserInviteDaoImpl.java

@@ -24,7 +24,7 @@ public class UserInviteDaoImpl extends BaseDAOImpl<UserInviteMapper, UserInvite>
     public void updateEffective(Long recordId) {
         UpdateWrapper<UserInvite> uw = new UpdateWrapper<>();
         uw.lambda().eq(UserInvite::getId,recordId)
-                    .set(UserInvite::getEffectiveState, EffectiveState.Valid);
+                    .set(UserInvite::getEffectiveState, EffectiveState.VALID);
         this.update(uw);
     }
 }

+ 1 - 1
core/src/main/java/com/sp/director/module/invite/service/impl/UserInviteServiceImpl.java

@@ -29,7 +29,7 @@ public class UserInviteServiceImpl implements IUserInviteService {
         userInvite.setUserId(userId);
         userInvite.setInvitedUserId(invitedUserId);
         userInvite.setCreateTime(LocalDateTime.now());
-        userInvite.setEffectiveState(EffectiveState.Invalid);
+        userInvite.setEffectiveState(EffectiveState.INVALID);
         userInviteDao.save(userInvite);
         return userInvite.getId();
     }

+ 1 - 1
core/src/main/java/com/sp/director/module/order/constraint/impl/AppleOrderConstraintImpl.java

@@ -30,7 +30,7 @@ public class AppleOrderConstraintImpl extends AbstractOrderConstraint {
     public OrderConstraint doIOSPayOrderConstraint(Long userId, String deviceToken, Long payItemId, PayTypeEnum payType) {
         OrderConstraint orderConstraint = OrderConstraint.defaultOrderConstraint();
         PayItem payItem = payItemService.getPayItemById(payItemId);
-        int count = userSubscriptionDetailDao.queryUserSubscription(userId, payItem.getProductId(), SubscriptionStatus.Subscription);
+        int count = userSubscriptionDetailDao.queryUserSubscription(userId, payItem.getProductId(), SubscriptionStatus.SUBSCRIPTION);
         if (count > 0) {
             orderConstraint.setConstraint(true);
             orderConstraint.setMessage("您已订阅");

+ 2 - 2
core/src/main/java/com/sp/director/module/order/service/impl/OrderProcessServiceImpl.java

@@ -50,14 +50,14 @@ public class OrderProcessServiceImpl implements IOrderProcessService {
         if(order == null) {
             throw new ServiceException("订单不存在");
         }
-        if(order.getPayStatus().equals(PayStatusEnum.Payed)) {
+        if(order.getPayStatus().equals(PayStatusEnum.PAYED)) {
             if(order.getPayType().equals(payType)
                     && order.getPayNo().equals(payNo)) {
                 log.error("支付结果重复回调,重复消费!订单号为:{}",order.getOrderNo());
                 return;
             }
         }
-        if(order.getOrderStatus() != OrderStatusEnum.Todo) {
+        if(order.getOrderStatus() != OrderStatusEnum.TODO) {
             throw new ServiceException("订单状态异常");
         }
         boolean r = orderService.updateOrderPayed(orderNo, payType, payNo, payAppId, paySellerId);

+ 6 - 6
core/src/main/java/com/sp/director/module/order/service/impl/OrderServiceImpl.java

@@ -72,11 +72,11 @@ public class OrderServiceImpl implements IOrderService {
                 .set(Order::getPayAppId, payAppId)
                 .set(Order::getPaySellerId, paySellerId)
                 .set(Order::getPayType, payType.getNum())
-                .set(Order::getOrderStatus, OrderStatusEnum.Notify.getNum())
-                .set(Order::getPayStatus, PayStatusEnum.Payed.getNum())
+                .set(Order::getOrderStatus, OrderStatusEnum.NOTIFY.getNum())
+                .set(Order::getPayStatus, PayStatusEnum.PAYED.getNum())
                 .eq(Order::getOrderNo, orderNo)
-                .eq(Order::getPayStatus, PayStatusEnum.Topay)
-                .eq(Order::getOrderStatus, OrderStatusEnum.Todo);
+                .eq(Order::getPayStatus, PayStatusEnum.TO_PAY)
+                .eq(Order::getOrderStatus, OrderStatusEnum.TODO);
         boolean result = orderDao.update(updateWrapper);
         log.info("订单:{}完成支付", orderNo);
         return result;
@@ -101,9 +101,9 @@ public class OrderServiceImpl implements IOrderService {
         order.setBusiOrderType(orderParam.getOrderType());
         order.setBusiOrderName(bussOrderType.getOrderTypeName());
         //设置订单状态
-        order.setOrderStatus(OrderStatusEnum.Todo);
+        order.setOrderStatus(OrderStatusEnum.TODO);
         //设置订单支付状态
-        order.setPayStatus(PayStatusEnum.Topay);
+        order.setPayStatus(PayStatusEnum.TO_PAY);
         //设置支付总金额
         order.setTotalAmount(payItem.getCurrentPrice());
         //设置支付标题

+ 1 - 1
core/src/main/java/com/sp/director/module/pay/applepay/dao/impl/UserIosSubscriptionErrorDetailDaoImpl.java

@@ -33,7 +33,7 @@ public class UserIosSubscriptionErrorDetailDaoImpl extends BaseDAOImpl<UserIosSu
     public UserIosSubscriptionErrorDetail getSubscriptionInfoByTransactionId(String payNo) {
         QueryWrapper<UserIosSubscriptionErrorDetail> qw = new QueryWrapper<>();
         qw.lambda().eq(UserIosSubscriptionErrorDetail::getTransactionId, payNo)
-                .eq(UserIosSubscriptionErrorDetail::getStatus, UserSubscriptionErrorStatus.Pending);
+                .eq(UserIosSubscriptionErrorDetail::getStatus, UserSubscriptionErrorStatus.PENDING);
         UserIosSubscriptionErrorDetail detail = this.getOne(qw);
         return detail;
     }

+ 3 - 3
core/src/main/java/com/sp/director/module/pay/applepay/dao/impl/UserSubscriptionDetailDaoImpl.java

@@ -40,7 +40,7 @@ public class UserSubscriptionDetailDaoImpl extends BaseDAOImpl<UserSubscriptionD
         uw.lambda().eq(UserSubscriptionDetail::getOriginalTransactionId, originalTransactionId)
                 .set(UserSubscriptionDetail::getProductId, productId)
                 .set(UserSubscriptionDetail::getExpireTime, expireDate)
-                .set(UserSubscriptionDetail::getStatus, SubscriptionStatus.Subscription)
+                .set(UserSubscriptionDetail::getStatus, SubscriptionStatus.SUBSCRIPTION)
                 .set(UserSubscriptionDetail::getUpdateTime, LocalDateTime.now());
         this.update(uw);
     }
@@ -71,7 +71,7 @@ public class UserSubscriptionDetailDaoImpl extends BaseDAOImpl<UserSubscriptionD
         LambdaQueryWrapper<UserSubscriptionDetail> wrapper =
                 qw.lambda().eq(UserSubscriptionDetail::getOriginalTransactionId, originalTransactionId)
                 .notIn(UserSubscriptionDetail::getStatus,
-                        Arrays.asList(SubscriptionStatus.Cancel, SubscriptionStatus.UnSubscription));
+                        Arrays.asList(SubscriptionStatus.CANCEL, SubscriptionStatus.UN_SUBSCRIPTION));
         if(userId != null){
             wrapper.eq(UserSubscriptionDetail::getUserId, userId);
         }
@@ -128,7 +128,7 @@ public class UserSubscriptionDetailDaoImpl extends BaseDAOImpl<UserSubscriptionD
         uw.lambda().eq(UserSubscriptionDetail::getOriginalTransactionId,originalTransactionId)
                 .set(UserSubscriptionDetail::getExpireTime,
                         new Date(Long.valueOf(subscription.get("expires_date_ms").toString())))
-                .set(UserSubscriptionDetail::getStatus, SubscriptionStatus.Subscription)
+                .set(UserSubscriptionDetail::getStatus, SubscriptionStatus.SUBSCRIPTION)
                 .set(UserSubscriptionDetail::getProductId, payItem.getProductId())
                 .set(UserSubscriptionDetail::getAutoRenewChangeTime,
                         new Date(Long.valueOf(subscription.get("original_purchase_date_ms").toString())))

+ 29 - 29
core/src/main/java/com/sp/director/module/pay/applepay/service/impl/ApplePayServiceImpl.java

@@ -206,7 +206,7 @@ public class ApplePayServiceImpl implements IApplePayService {
                 break;
             case "REFUND":
                 log.error("苹果消耗类型订单退款通知");
-                this.doRefund(obj);
+                this.dorefund(obj);
                 break;
             default:
                 log.error("苹果通知未处理的状态");
@@ -220,7 +220,7 @@ public class ApplePayServiceImpl implements IApplePayService {
      * @author 十一
      * @date 2020/10/16 16:58
      */
-    private void doRefund(JSONObject obj) {
+    private void dorefund(JSONObject obj) {
         Object receiptInfo = obj.get("latest_receipt_info");
         if (receiptInfo != null) {
             HashMap receiptInfoMap = JSON.parseObject(receiptInfo.toString(), HashMap.class);
@@ -229,7 +229,7 @@ public class ApplePayServiceImpl implements IApplePayService {
             if (originalTransactionId != null) {
                 // 更新订单状态为退款状态
                 Order order = orderDao.getByPayNo(originalTransactionId.toString());
-                order.setPayStatus(PayStatusEnum.Refund);
+                order.setPayStatus(PayStatusEnum.REFUND);
                 LocalDateTime cancelTime;
                 if (cancellationDateMs != null) {
                     cancelTime = LocalDateTime.ofEpochSecond(Long.valueOf(cancellationDateMs.toString()),
@@ -278,7 +278,7 @@ public class ApplePayServiceImpl implements IApplePayService {
             log.warn("{}订阅关闭", obj.get("notification_type").toString());
             //如果订阅已经关闭
             userSubscriptionDetailService.updateUserSubscriptionDetailStatus(originalTransactionId,
-                    productId, SubscriptionStatus.DebitFailed, null);
+                    productId, SubscriptionStatus.DEBITFAILED, null);
             return;
         }
         //解析latest_receipt_info
@@ -323,7 +323,7 @@ public class ApplePayServiceImpl implements IApplePayService {
         String originalTransactionId = infoMap.get("original_transaction_id").toString();
         log.warn("{}订阅失败通知", originalTransactionId);
         userSubscriptionDetailService.updateUserSubscriptionDetailStatus(originalTransactionId,
-                productId, SubscriptionStatus.DebitFailed, null);
+                productId, SubscriptionStatus.DEBITFAILED, null);
     }
 
     /**
@@ -335,7 +335,7 @@ public class ApplePayServiceImpl implements IApplePayService {
     @Override
     public Boolean checkSubscription(UserLoginInfo userLoginInfo, String productId) {
         Boolean result = userSubscriptionDetailService.checkSubscription(userLoginInfo.getUserId(),
-                productId, SubscriptionStatus.Subscription);
+                productId, SubscriptionStatus.SUBSCRIPTION);
         return result;
     }
 
@@ -351,9 +351,9 @@ public class ApplePayServiceImpl implements IApplePayService {
         // auto_renew_status_change_date_ms订阅改变的时间
         Date autorenewStatusChangeDate = new Date(Long.valueOf(obj.get("auto_renew_status_change_date_ms").toString()));
         if (closeStatus.equals(obj.get("auto_renew_status").toString())) {
-            autoRenewStatus = SubscriptionStatus.UnSubscription;
+            autoRenewStatus = SubscriptionStatus.UN_SUBSCRIPTION;
         } else {
-            autoRenewStatus = SubscriptionStatus.Subscription;
+            autoRenewStatus = SubscriptionStatus.SUBSCRIPTION;
         }
         String info;
         Object latestReceiptInfo = obj.get("latest_receipt_info");
@@ -364,7 +364,7 @@ public class ApplePayServiceImpl implements IApplePayService {
         HashMap infoMap = JSON.parseObject(info, HashMap.class);
         String productId = infoMap.get("product_id").toString();
         String originalTransactionId = infoMap.get("original_transaction_id").toString();
-        if (autoRenewStatus.equals(SubscriptionStatus.UnSubscription)) {
+        if (autoRenewStatus.equals(SubscriptionStatus.UN_SUBSCRIPTION)) {
             log.warn("{}订阅关闭", obj.get("notification_type").toString());
         }
         userSubscriptionDetailService.updateUserSubscriptionDetailStatus(originalTransactionId,
@@ -418,11 +418,11 @@ public class ApplePayServiceImpl implements IApplePayService {
 //        IosPayContent content = iosPayContentService.getByProductId(productId);
         //更新订单状态为已退款状态
         Date cancelTime = new Date(Long.valueOf(cancellationDateMs));
-        orderDao.updateOrderStatus(transactionId, PayStatusEnum.Refund, cancelTime);
+        orderDao.updateOrderStatus(transactionId, PayStatusEnum.REFUND, cancelTime);
         log.warn("{}订阅取消通知", originalTransactionId);
         //设置订阅详情的状态为已退款
         userSubscriptionDetailService.updateUserSubscriptionDetailStatus(originalTransactionId,
-                productId, SubscriptionStatus.Cancel, null);
+                productId, SubscriptionStatus.CANCEL, null);
     }
 
 
@@ -449,7 +449,7 @@ public class ApplePayServiceImpl implements IApplePayService {
             for (TransactionalUserIdParam transactionalUserIdParam : list) {
                 VerifyVO vo = new VerifyVO();
                 vo.setProductId(transactionalUserIdParam.getProductId());
-                vo.setStatus(IosPayStatusEnum.Fail);
+                vo.setStatus(IosPayStatusEnum.FAIL);
                 vo.setTransactionalId(transactionalUserIdParam.getTransactionalId());
                 resultList.add(vo);
             }
@@ -485,7 +485,7 @@ public class ApplePayServiceImpl implements IApplePayService {
             vo.setTransactionalId(transactionalUserIdParam.getTransactionalId());
             // 用于判断用户伪造票据的问题
             if (inappListMap.size() == 0) {
-                vo.setStatus(IosPayStatusEnum.Fail);
+                vo.setStatus(IosPayStatusEnum.FAIL);
                 resultList.add(vo);
                 continue;
             }
@@ -528,13 +528,13 @@ public class ApplePayServiceImpl implements IApplePayService {
                             // 处理逻辑并且发送通知
                             process(payItem, order, originalTransactionId, purchaseDateMs, expiresDateMs);
                             // 判断是否是消费型订单,只需要判断expires_date_ms是否为空,并且当前订单的用户id不为空
-                            if (expiresDateMs != null && !order.getPayStatus().equals(PayStatusEnum.abnormal)) {
+                            if (expiresDateMs != null && !order.getPayStatus().equals(PayStatusEnum.ABNORMAL)) {
                                 // 处理订阅型票据
                                 processSubscriptionReceipt(payItem, currentUserId, param, obj, pendingRenewalInfo);
                             }
-                            vo.setStatus(IosPayStatusEnum.Success);
+                            vo.setStatus(IosPayStatusEnum.SUCCESS);
                             // 更改订单状态为已处理
-                            order.setOrderStatus(OrderStatusEnum.Finish);
+                            order.setOrderStatus(OrderStatusEnum.FINISH);
                             orderDao.updateById(order);
                         } else {
                             // 判断下一期订阅的productId和客户端提交的productId是否一致,如果一致,则更新下一期订阅的类型
@@ -548,7 +548,7 @@ public class ApplePayServiceImpl implements IApplePayService {
                                             transactionalUserIdParam.getProductId());
                                 }
                             }
-                            vo.setStatus(IosPayStatusEnum.Success);
+                            vo.setStatus(IosPayStatusEnum.SUCCESS);
                         }
                         resultList.add(vo);
                         // 如果是用户未找到
@@ -558,18 +558,18 @@ public class ApplePayServiceImpl implements IApplePayService {
                         if (order != null) {
                             order.setOrderStatus(OrderStatusEnum.Error);
                         }
-                        vo.setStatus(IosPayStatusEnum.Success);
+                        vo.setStatus(IosPayStatusEnum.SUCCESS);
                         resultList.add(vo);
                         log.error("用户id为空,标记当前支付异常{}", transactionId);
 
                         // 为了避免发生错误的时候异常订单信息会被回滚,新开事务保证不会回滚
                         IApplePayService service = (IApplePayService) AopContext.currentProxy();
                         service.updateOrderStatusAndSaveExceptionInfo(order,
-                                UserSubscriptionErrorTypeEnum.ProcessException,
+                                UserSubscriptionErrorTypeEnum.PROCESS_EXCEPTION,
                                 param.getReceiptData(),
                                 obj);
                     } catch (DuplicateKeyException e) {
-                        vo.setStatus(IosPayStatusEnum.Success);
+                        vo.setStatus(IosPayStatusEnum.SUCCESS);
                         resultList.add(vo);
                         log.error("重复校验新的支付单号{},用户id{}", transactionId, currentUserId, e);
                     } catch (Exception e) {
@@ -582,11 +582,11 @@ public class ApplePayServiceImpl implements IApplePayService {
                         // 为了避免发生错误的时候异常订单信息会被回滚,新开事务保证不会回滚
                         IApplePayService service = (IApplePayService) AopContext.currentProxy();
                         service.updateOrderStatusAndSaveExceptionInfo(order,
-                                UserSubscriptionErrorTypeEnum.ProcessException,
+                                UserSubscriptionErrorTypeEnum.PROCESS_EXCEPTION,
                                 param.getReceiptData(),
                                 obj);
 
-                        vo.setStatus(IosPayStatusEnum.Fail);
+                        vo.setStatus(IosPayStatusEnum.FAIL);
                         resultList.add(vo);
                         log.error("票据{}验证失败,原始票据为{}",
                                 obj.get("transaction_id").toString(),
@@ -604,10 +604,10 @@ public class ApplePayServiceImpl implements IApplePayService {
                         && pendingRenewalInfo.toString().contains(transactionalUserIdParam.getProductId())) {
                     log.error("{}单号找不到,当前订阅状态为订阅降级,用户订阅详情是{}",
                             transactionalUserIdParam.getTransactionalId(), pendingRenewalInfo.toString());
-                    vo.setStatus(IosPayStatusEnum.Success);
+                    vo.setStatus(IosPayStatusEnum.SUCCESS);
                 } else {
                     log.error("{}单号找不到,异常", transactionalUserIdParam.getTransactionalId());
-                    vo.setStatus(IosPayStatusEnum.Fail);
+                    vo.setStatus(IosPayStatusEnum.FAIL);
                 }
                 resultList.add(vo);
             }
@@ -640,7 +640,7 @@ public class ApplePayServiceImpl implements IApplePayService {
             VerifyVO vo = new VerifyVO();
             vo.setProductId(p.getProductId());
             vo.setTransactionalId(p.getTransactionalId());
-            vo.setStatus(IosPayStatusEnum.Fail);
+            vo.setStatus(IosPayStatusEnum.FAIL);
             resultList.add(vo);
         }
         return resultList;
@@ -767,13 +767,13 @@ public class ApplePayServiceImpl implements IApplePayService {
         order.setCreateTime(LocalDateTime.now());
         order.setPayType(PayTypeEnum.IOSPay);
         order.setPayNo(payNo);
-        order.setPayStatus(PayStatusEnum.Payed);
+        order.setPayStatus(PayStatusEnum.PAYED);
         if (param != null) {
             order.setDeviceToken(param.getDeviceToken());
         }
         order.setUserId(currentUserId);
         //设置状态为待处理
-        order.setOrderStatus(OrderStatusEnum.Todo);
+        order.setOrderStatus(OrderStatusEnum.TODO);
         //保存支付订单
         orderDao.save(order);
         return order;
@@ -802,13 +802,13 @@ public class ApplePayServiceImpl implements IApplePayService {
                     .set(UserSubscriptionDetail::getExpireTime, new Date(purchaseDateMs))
                     .set(UserSubscriptionDetail::getProductId, detail.getProductId())
                     .set(UserSubscriptionDetail::getUpdateTime, new Date())
-                    .set(UserSubscriptionDetail::getStatus, SubscriptionStatus.Subscription)
+                    .set(UserSubscriptionDetail::getStatus, SubscriptionStatus.SUBSCRIPTION)
                     .set(UserSubscriptionDetail::getUserId, userId);
             userSubscriptionDetailDao.update(uw);
         } else {
             UserSubscriptionDetail detailInfo = new UserSubscriptionDetail();
             detailInfo.setProductId(detail.getProductId());
-            detailInfo.setStatus(SubscriptionStatus.Subscription);
+            detailInfo.setStatus(SubscriptionStatus.SUBSCRIPTION);
             detailInfo.setUpdateTime(new Date());
             detailInfo.setAutoRenewProductId(productId);
             detailInfo.setExpireTime(new Date(purchaseDateMs));

+ 1 - 1
core/src/main/java/com/sp/director/module/pay/applepay/service/impl/UserIosSubscriptionErrorDetailServiceImpl.java

@@ -60,7 +60,7 @@ public class UserIosSubscriptionErrorDetailServiceImpl
         detail.setType(type);
         detail.setOriginalTransactionId(obj.get("original_transaction_id").toString());
         detail.setTransactionId(obj.get("transaction_id").toString());
-        detail.setStatus(UserSubscriptionErrorStatus.Pending);
+        detail.setStatus(UserSubscriptionErrorStatus.PENDING);
         detail.setReceiptId(receiptId);
         detail.setProductId(obj.get("product_id").toString());
         userIosSubscriptionErrorDetailDao.save(detail);

+ 1 - 1
core/src/main/java/com/sp/director/module/pay/applepay/service/impl/UserSubscriptionDetailServiceImpl.java

@@ -96,7 +96,7 @@ public class UserSubscriptionDetailServiceImpl implements IUserSubscriptionDetai
         detail.setReceiptId(receiptId);
         detail.setAutoRenewProductId(productId);
         detail.setProductId(productId);
-        detail.setStatus(SubscriptionStatus.Subscription);
+        detail.setStatus(SubscriptionStatus.SUBSCRIPTION);
         detail.setUserId(userId);
         detail.setTransactionId(subscription.get("transaction_id").toString());
         detail.setUpdateTime(new Date());

+ 1 - 1
core/src/main/java/com/sp/director/module/report/dao/impl/ReportDaoImpl.java

@@ -42,7 +42,7 @@ public class ReportDaoImpl extends BaseDAOImpl<ReportMapper, Report> implements
         report.setReportContent(content);
         report.setReportedId(targetId);
         report.setReportUserId(userId);
-        report.setStatus(BaseReviewIenum.Review);
+        report.setStatus(BaseReviewIenum.REVIEW);
         report.setUpdateTime(now);
         report.setType(type);
         this.save(report);

+ 1 - 1
core/src/main/java/com/sp/director/module/report/service/impl/ReportServiceImpl.java

@@ -48,7 +48,7 @@ public class ReportServiceImpl implements IReportService {
             }
             reportDao.addReport(userId, reportParam.getTargetId(), reportParam.getType(),content);
             // 如果之前的举报信息还未处理,更新操作时间
-        }else if(report.getStatus().equals(BaseReviewIenum.Review)){
+        }else if(report.getStatus().equals(BaseReviewIenum.REVIEW)){
             reportDao.updateReportRecord(userId, reportParam.getTargetId(), reportParam.getType());
         }
     }

+ 9 - 9
core/src/main/java/com/sp/director/module/script/dao/impl/ScriptContentVerifyDaoImpl.java

@@ -39,7 +39,7 @@ public class ScriptContentVerifyDaoImpl extends BaseDAOImpl<ScriptContentVerifyM
                     .set(ScriptContentVerify::getSerialNum,scriptContent.getSerialNum())
                     .set(ScriptContentVerify::getTitle,scriptContent.getTitle())
                     .set(ScriptContentVerify::getTitle,scriptContent.getTitle())
-                    .set(ScriptContentVerify::getVerifyState, BaseReviewIenum.Review);
+                    .set(ScriptContentVerify::getVerifyState, BaseReviewIenum.REVIEW);
         this.update(uw);
     }
 
@@ -49,7 +49,7 @@ public class ScriptContentVerifyDaoImpl extends BaseDAOImpl<ScriptContentVerifyM
         QueryWrapper<ScriptContentVerify> qw = new QueryWrapper<>();
         qw.lambda().eq(ScriptContentVerify::getScriptId,scriptId)
                     .eq(ScriptContentVerify::getLogicDelete,LogicDeleteEnum.NORMAL)
-                    .eq(ScriptContentVerify::getVerifyState,BaseReviewIenum.Review);
+                    .eq(ScriptContentVerify::getVerifyState,BaseReviewIenum.REVIEW);
         List<ScriptContentVerify> list = this.list(qw);
         return list.stream().map(ScriptContentVerify::getChapterId).collect(Collectors.toList());
     }
@@ -72,7 +72,7 @@ public class ScriptContentVerifyDaoImpl extends BaseDAOImpl<ScriptContentVerifyM
     public void logicDeleteVerifyPassRecord(List<Long> chapterList) {
         UpdateWrapper<ScriptContentVerify> uw = new UpdateWrapper<>();
         uw.lambda().eq(ScriptContentVerify::getLogicDelete,LogicDeleteEnum.NORMAL)
-                .eq(ScriptContentVerify::getVerifyState,BaseReviewIenum.Pass)
+                .eq(ScriptContentVerify::getVerifyState,BaseReviewIenum.PASS)
                 .in(ScriptContentVerify::getChapterId,chapterList)
                 .set(ScriptContentVerify::getLogicDelete,LogicDeleteEnum.DELETE)
                 .set(ScriptContentVerify::getUpdateTime,LocalDateTime.now());
@@ -83,9 +83,9 @@ public class ScriptContentVerifyDaoImpl extends BaseDAOImpl<ScriptContentVerifyM
     public void refuseScriptContentNotInChapterList(List<Long> chapterList) {
         UpdateWrapper<ScriptContentVerify> uw = new UpdateWrapper<>();
         uw.lambda().eq(ScriptContentVerify::getLogicDelete,LogicDeleteEnum.NORMAL)
-                .eq(ScriptContentVerify::getVerifyState,BaseReviewIenum.Review)
+                .eq(ScriptContentVerify::getVerifyState,BaseReviewIenum.REVIEW)
                 .notIn(ScriptContentVerify::getChapterId,chapterList)
-                .set(ScriptContentVerify::getVerifyState,BaseReviewIenum.Refuse)
+                .set(ScriptContentVerify::getVerifyState,BaseReviewIenum.REFUSE)
                 .set(ScriptContentVerify::getUpdateTime,LocalDateTime.now());
         this.update(uw);
     }
@@ -94,9 +94,9 @@ public class ScriptContentVerifyDaoImpl extends BaseDAOImpl<ScriptContentVerifyM
     public void passScriptContentByChapterList(List<Long> chapterList) {
         UpdateWrapper<ScriptContentVerify> uw = new UpdateWrapper<>();
         uw.lambda().eq(ScriptContentVerify::getLogicDelete,LogicDeleteEnum.NORMAL)
-                .eq(ScriptContentVerify::getVerifyState,BaseReviewIenum.Review)
+                .eq(ScriptContentVerify::getVerifyState,BaseReviewIenum.REVIEW)
                 .in(ScriptContentVerify::getChapterId,chapterList)
-                .set(ScriptContentVerify::getVerifyState,BaseReviewIenum.Pass)
+                .set(ScriptContentVerify::getVerifyState,BaseReviewIenum.PASS)
                 .set(ScriptContentVerify::getUpdateTime,LocalDateTime.now());
         this.update(uw);
     }
@@ -106,8 +106,8 @@ public class ScriptContentVerifyDaoImpl extends BaseDAOImpl<ScriptContentVerifyM
         UpdateWrapper<ScriptContentVerify> uw = new UpdateWrapper<>();
         uw.lambda().eq(ScriptContentVerify::getLogicDelete,LogicDeleteEnum.NORMAL)
                     .eq(ScriptContentVerify::getScriptId,scriptId)
-                    .eq(ScriptContentVerify::getVerifyState,BaseReviewIenum.Review)
-                    .set(ScriptContentVerify::getVerifyState,BaseReviewIenum.Refuse)
+                    .eq(ScriptContentVerify::getVerifyState,BaseReviewIenum.REVIEW)
+                    .set(ScriptContentVerify::getVerifyState,BaseReviewIenum.REFUSE)
                     .set(ScriptContentVerify::getUpdateTime,LocalDateTime.now());
         if(chapterIdList != null && !chapterIdList.isEmpty()){
             uw.lambda().in(ScriptContentVerify::getChapterId, chapterIdList);

+ 5 - 5
core/src/main/java/com/sp/director/module/script/dao/impl/ScriptVerifyDaoImpl.java

@@ -36,7 +36,7 @@ public class ScriptVerifyDaoImpl extends BaseDAOImpl<ScriptVerifyMapper, ScriptV
         QueryWrapper<ScriptVerify> qw = new QueryWrapper<>();
         qw.lambda().eq(ScriptVerify::getScriptId, scriptId)
                 .eq(ScriptVerify::getLogicDelete, LogicDeleteEnum.NORMAL)
-                .eq(ScriptVerify::getVerifyState, BaseReviewIenum.Review);
+                .eq(ScriptVerify::getVerifyState, BaseReviewIenum.REVIEW);
         int count = this.count(qw);
         return count > 0;
     }
@@ -46,7 +46,7 @@ public class ScriptVerifyDaoImpl extends BaseDAOImpl<ScriptVerifyMapper, ScriptV
         QueryWrapper<ScriptVerify> qw = new QueryWrapper<>();
         qw.lambda().eq(ScriptVerify::getScriptId, scriptId)
                 .eq(ScriptVerify::getLogicDelete, LogicDeleteEnum.NORMAL)
-                .eq(ScriptVerify::getVerifyState, BaseReviewIenum.Review);
+                .eq(ScriptVerify::getVerifyState, BaseReviewIenum.REVIEW);
         return this.getOne(qw);
     }
 
@@ -87,7 +87,7 @@ public class ScriptVerifyDaoImpl extends BaseDAOImpl<ScriptVerifyMapper, ScriptV
     @Override
     public void updateScriptVerifyRecord(Script script, ScriptVerify scriptVerify) {
         scriptVerify.setUpdateTime(LocalDateTime.now());
-        scriptVerify.setVerifyState(BaseReviewIenum.Review);
+        scriptVerify.setVerifyState(BaseReviewIenum.REVIEW);
         scriptVerify.setTitle(script.getTitle());
         scriptVerify.setTagName(script.getTagName());
         scriptVerify.setScriptType(script.getScriptType());
@@ -96,7 +96,7 @@ public class ScriptVerifyDaoImpl extends BaseDAOImpl<ScriptVerifyMapper, ScriptV
         scriptVerify.setCoverImg(script.getCoverImg());
         scriptVerify.setUpdateTime(LocalDateTime.now());
         scriptVerify.setLogicDelete(LogicDeleteEnum.NORMAL);
-        scriptVerify.setVerifyState(BaseReviewIenum.Review);
+        scriptVerify.setVerifyState(BaseReviewIenum.REVIEW);
         scriptVerify.setScriptId(script.getId());
         this.updateById(scriptVerify);
     }
@@ -116,7 +116,7 @@ public class ScriptVerifyDaoImpl extends BaseDAOImpl<ScriptVerifyMapper, ScriptV
         scriptVerify.setTagName(script.getTagName());
         scriptVerify.setTitle(script.getTitle());
         scriptVerify.setId(null);
-        scriptVerify.setVerifyState(BaseReviewIenum.Review);
+        scriptVerify.setVerifyState(BaseReviewIenum.REVIEW);
         this.save(scriptVerify);
     }
 

+ 2 - 2
core/src/main/java/com/sp/director/module/script/help/ScriptRoleHelper.java

@@ -23,14 +23,14 @@ public class ScriptRoleHelper {
         ScriptRole role = new ScriptRole();
         role.setId(1000L);
         role.setPosition(PositionEnum.LEFT);
-        role.setGender(GenderEnum.Other);
+        role.setGender(GenderEnum.OTHER);
         role.setRoleNickName("旁白描述");
         role.setHeadImg(HEAD_IMG);
         SCRIPT_ROLE_LIST.add(role);
         ScriptRole role1 = new ScriptRole();
         role1.setId(2000L);
         role1.setPosition(PositionEnum.LEFT);
-        role1.setGender(GenderEnum.Other);
+        role1.setGender(GenderEnum.OTHER);
         role1.setRoleNickName("场景描述");
         role1.setHeadImg(HEAD_IMG);
         SCRIPT_ROLE_LIST.add(role1);

+ 1 - 1
core/src/main/java/com/sp/director/module/script/service/impl/ScriptContentServiceImpl.java

@@ -265,7 +265,7 @@ public class ScriptContentServiceImpl extends AbstractScriptContentIntroductionS
                 // 新增审核记录
                 scriptVerifyDao.addScriptVerifyRecord(script);
             }
-        } else if (!scriptContentVerify.getVerifyState().equals(BaseReviewIenum.Refuse)) {
+        } else if (!scriptContentVerify.getVerifyState().equals(BaseReviewIenum.REFUSE)) {
             log.error("章节发布异常,已存在发布过的章节:{}", scriptContent.getId());
             throw new BusinessException();
         }

+ 1 - 1
core/src/main/java/com/sp/director/module/script/service/impl/ScriptContentVerifyServiceImpl.java

@@ -81,7 +81,7 @@ public class ScriptContentVerifyServiceImpl  implements IScriptContentVerifyServ
         contentVerify.setTitle(scriptContent.getTitle());
         contentVerify.setScriptId(scriptContent.getScriptId());
         contentVerify.setUpdateTime(LocalDateTime.now());
-        contentVerify.setVerifyState(BaseReviewIenum.Review);
+        contentVerify.setVerifyState(BaseReviewIenum.REVIEW);
         contentVerify.setSerialNum(scriptContent.getSerialNum());
         contentVerify.setLogicDelete(LogicDeleteEnum.NORMAL);
         return contentVerify;

+ 2 - 2
core/src/main/java/com/sp/director/module/script/service/impl/ScriptVerifyServiceImpl.java

@@ -59,7 +59,7 @@ public class ScriptVerifyServiceImpl implements IScriptVerifyService {
     public void verifyScriptRecord(Long scriptId, List<Long> chapterList) {
         // 如果chapterList为空,说明全部审核不通过
         if(chapterList.isEmpty()){
-            scriptVerifyDao.verifyScript(scriptId, BaseReviewIenum.Refuse);
+            scriptVerifyDao.verifyScript(scriptId, BaseReviewIenum.REFUSE);
             scriptContentVerifyDao.verifyRefuseScriptContentRecord(scriptId, null);
         // 即使chapterList只有一条通过的,也算通过
         }else{
@@ -74,7 +74,7 @@ public class ScriptVerifyServiceImpl implements IScriptVerifyService {
             scriptPublicService.addPublicRecord(scriptVerify);
             // 逻辑删除
             scriptVerify.setLogicDelete(LogicDeleteEnum.DELETE);
-            scriptVerify.setVerifyState(BaseReviewIenum.Pass);
+            scriptVerify.setVerifyState(BaseReviewIenum.PASS);
             scriptVerifyDao.updateById(scriptVerify);
 
             // 操作章节

+ 1 - 1
core/src/main/java/com/sp/director/module/video/service/impl/UserVideoServiceImpl.java

@@ -40,7 +40,7 @@ public class UserVideoServiceImpl implements IUserVideoService {
         userVideo.setVideoUrl(param.getVideoUrl());
         userVideo.setContent(param.getContent());
         userVideo.setLogicDelete(LogicDeleteEnum.NORMAL);
-        userVideo.setStatus(BaseReviewIenum.Review);
+        userVideo.setStatus(BaseReviewIenum.REVIEW);
         userVideo.setVideoCover(param.getVideoCover());
         userVideo.setWidth(param.getWidth());
         userVideo.setHeight(param.getHeight());

+ 1 - 1
logic/src/test/java/com/sp/module/video/VideoTest.java

@@ -64,7 +64,7 @@ public class VideoTest {
 
     @Test
     public void verifyVideo(){
-        userVideoRecommendService.verifyUserVideo(videoId, BaseReviewIenum.Pass,null);
+        userVideoRecommendService.verifyUserVideo(videoId, BaseReviewIenum.PASS,null);
         log.error("审核视频:{}",videoId);
     }