소스 검색

Merge remote-tracking branch 'origin/master'

chenbiao 1 년 전
부모
커밋
09e97605b7

+ 1 - 0
netflix-dao/src/main/java/com/cyksj/model/views/RenewalView.java

@@ -229,6 +229,7 @@ public class RenewalView {
      * 关联邮箱 接收邮件
      */
     @DbField("a.relate_email")
+    @JsonIgnore
     private String relateEmail;
 
     /**

+ 13 - 2
netflix-service/src/main/java/com/cyksj/service/order/impl/OrderDonServiceImpl.java

@@ -396,6 +396,17 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
 				throw new BusinessRuntimeException("您有未支付订单.");
 			}
 		}
+		if (goodsId != null && goodsId == 1) {
+			List<Long> userIdList = userBindRelationService.getRelationUserIdList(userId, null);
+			Integer selectCount = orderDonMapper.selectCount(Wrappers.lambdaQuery(OrderDon.class)
+					.in(OrderDon::getUserId, userIdList)
+					.eq(OrderDon::getGoodsId, 1)
+					.notIn(OrderDon::getStatus, Constant.noOrderAllStatus)
+					.ge(OrderDon::getCreatedTime, DateUtil.offsetMonth(DateTime.now(), -1)));
+			if (selectCount > 0) {
+				throw BusinessRuntimeException.getInstance("奈飞近30天内限购一单");
+			}
+		}
 		GroupsRelation relation = null;
 		String orderPhone = payRequest.getPhone();
 		if (StrUtil.isNotBlank(orderPhone)) {
@@ -1285,9 +1296,9 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
 					.eq(OrderDon::getGoodsId, 1)
 					.ne(OrderDon::getId, orderDon.getId())
 					.notIn(OrderDon::getStatus, Constant.noOrderAllStatus)
-					.ge(OrderDon::getCreatedTime, DateUtil.beginOfMonth(DateTime.now())));
+					.ge(OrderDon::getCreatedTime, DateUtil.offsetMonth(DateTime.now(), -1)));
 			//超过2单 自动退款
-			if (count > 1) {
+			if (count > 0) {
 				notifyRefundOrder(orderDon, goodsDon, sku);
 				return;
 			}

+ 4 - 0
netflix-service/src/main/java/com/cyksj/service/relation/impl/GroupRelationFrontServiceImpl.java

@@ -293,6 +293,10 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
 			}
 			if (ticket.getSkuNum() != null && ticket.getSkuNum() == 1) {
 
+			}
+			//奈飞、gpt
+			if (ticket.getGoodsId() == 1 || ticket.getGoodsId() == 18) {
+				ticket.setEmail(null);
 			}
 			//设置镜像车票信息
 			setMirrorTicketInfo(ticket);

+ 5 - 0
netflix-web/src/main/java/com/cyksj/web/controller/manage/CmsUserController.java

@@ -87,6 +87,8 @@ public class CmsUserController{
 
     private final UserDoubleVerifyCodeChangeRecordMapper userDoubleVerifyCodeChangeRecordMapper;
 
+    private final List<Long> no_blacks_userIds = List.of(375274l, 545599l, 523937l, 507498l, 604146l, 613437l, 651728l, 614100l, 604148l);
+
     @GetMapping("/get")
     public Result<SearchResult<UserView>> get(Long id, String otherPhone, Long sharedId, String userid, Long businessId, String sort, String order, Boolean isCert, Boolean isAbroad) {
         MapBuilder builder = MapUtils.flatBuilder(request.getParameterMap());
@@ -159,6 +161,9 @@ public class CmsUserController{
     @PutMapping("/put/black/status/{id}")
     @SaCheckPermission("user:black")
     public Result<String> putBlackStatus(@PathVariable Long id) {
+        if (no_blacks_userIds.contains(id)) {
+            throw BusinessRuntimeException.getInstance("张凯已处理");
+        }
         User user = userMapper.selectById(id);
         Optional.ofNullable(user).ifPresent(u -> {
             u.setIsBlack(!u.getIsBlack());