Forráskód Böngészése

规格有效天数

zoujiajian 3 éve
szülő
commit
949678413e
19 módosított fájl, 131 hozzáadás és 24 törlés
  1. 8 0
      netflix-dao/src/main/java/com/cyksj/model/entity/GoodsDonSku.java
  2. 5 0
      netflix-dao/src/main/java/com/cyksj/model/manage/request/ReqGoodsSkuInsert.java
  3. 5 0
      netflix-dao/src/main/java/com/cyksj/model/views/GoodsDonFrontSkuView.java
  4. 3 0
      netflix-dao/src/main/java/com/cyksj/model/views/GoodsDonSkuView.java
  5. 6 0
      netflix-dao/src/main/java/com/cyksj/model/views/GoodsFrontListView.java
  6. 6 0
      netflix-dao/src/main/java/com/cyksj/model/views/GoodsHomePageView.java
  7. 9 3
      netflix-service/src/main/java/com/cyksj/service/distribute/equipment/impl/EquipmentDistributeFrontServiceImpl.java
  8. 7 1
      netflix-service/src/main/java/com/cyksj/service/distribute/equipment/impl/EquipmentDistributeServiceImpl.java
  9. 7 2
      netflix-service/src/main/java/com/cyksj/service/exchange/impl/ExchangeCodeServiceImpl.java
  10. 6 2
      netflix-service/src/main/java/com/cyksj/service/mange/group/CmsGroupServiceImpl.java
  11. 8 3
      netflix-service/src/main/java/com/cyksj/service/mange/impl/CmsOrderDonServiceImpl.java
  12. 2 1
      netflix-service/src/main/java/com/cyksj/service/order/OrderCommonService.java
  13. 13 3
      netflix-service/src/main/java/com/cyksj/service/order/impl/OrderCommonServiceImpl.java
  14. 14 4
      netflix-service/src/main/java/com/cyksj/service/order/impl/OrderDonServiceImpl.java
  15. 1 1
      netflix-service/src/main/java/com/cyksj/service/relation/GroupRelationFrontService.java
  16. 7 2
      netflix-service/src/main/java/com/cyksj/service/relation/impl/GroupRelationFrontServiceImpl.java
  17. 2 0
      netflix-web/src/main/java/com/cyksj/web/controller/goods/GoodsDonController.java
  18. 22 2
      netflix-web/src/main/java/com/cyksj/web/controller/manage/goods/CmsGoodsDonSkuController.java
  19. 0 0
      netflix-web/src/main/resources/application-dev.yml

+ 8 - 0
netflix-dao/src/main/java/com/cyksj/model/entity/GoodsDonSku.java

@@ -1,5 +1,6 @@
 package com.cyksj.model.entity;
 
+import com.baomidou.mybatisplus.annotation.FieldStrategy;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.ejlchina.searcher.bean.DbField;
 import com.ejlchina.searcher.bean.SearchBean;
@@ -87,8 +88,15 @@ public class GoodsDonSku extends BaseEntity {
     /**
      * 月数
      */
+    @TableField(updateStrategy = FieldStrategy.IGNORED)
     private Integer months;
 
+    /**
+     * 天数
+     */
+    @TableField(updateStrategy = FieldStrategy.IGNORED)
+    private Integer days;
+
     @DbField("case when spec_val like '%月%' and spec_val not like '%年%' then 0 when spec_val like '%季%' then 1 when spec_val like '%半年%' then 2 when spec_val like '%年%' then 3 else 66 end")
     @TableField(exist = false)
     private Integer orderBy;

+ 5 - 0
netflix-dao/src/main/java/com/cyksj/model/manage/request/ReqGoodsSkuInsert.java

@@ -58,6 +58,11 @@ public class ReqGoodsSkuInsert {
          */
         private Integer num;
 
+        /**
+         * 有效天数
+         */
+        private Integer days;
+
         /**
          * 月份
          */

+ 5 - 0
netflix-dao/src/main/java/com/cyksj/model/views/GoodsDonFrontSkuView.java

@@ -54,5 +54,10 @@ public class GoodsDonFrontSkuView {
 	 */
 	private Integer months;
 
+	/**
+	 * 天数
+	 */
+	private Integer days;
+
 	private String notifyText;
 }

+ 3 - 0
netflix-dao/src/main/java/com/cyksj/model/views/GoodsDonSkuView.java

@@ -35,6 +35,9 @@ public class GoodsDonSkuView {
 	@DbField("gdk.spec_val")
 	private String specVal;
 
+	@DbField("gdk.days")
+	private Integer days;
+
 	@DbField("gdk.months")
 	private Integer months;
 

+ 6 - 0
netflix-dao/src/main/java/com/cyksj/model/views/GoodsFrontListView.java

@@ -78,6 +78,12 @@ public class GoodsFrontListView {
 	@DbIgnore
 	private Integer months;
 
+	/**
+	 * 最低规格天数
+	 */
+	@DbIgnore
+	private Integer days;
+
 	/**
 	 * 已售
 	 */

+ 6 - 0
netflix-dao/src/main/java/com/cyksj/model/views/GoodsHomePageView.java

@@ -67,6 +67,12 @@ public class GoodsHomePageView {
 	@DbIgnore
 	private Integer months;
 
+	/**
+	 * 最低规格天数
+	 */
+	@DbIgnore
+	private Integer days;
+
 	/**
 	 * 已售
 	 */

+ 9 - 3
netflix-service/src/main/java/com/cyksj/service/distribute/equipment/impl/EquipmentDistributeFrontServiceImpl.java

@@ -78,7 +78,12 @@ public class EquipmentDistributeFrontServiceImpl implements EquipmentDistributeF
 			if (expiryTime == null) {
 				throw BusinessRuntimeException.getInstance("该车位暂未发车,请发车后再领取权益");
 			}
-			DateTime updateExpiryTime = DateUtil.offset(expiryTime, DateField.MONTH, goodsDonSku.getMonths());
+			DateTime updateExpiryTime = null;
+			if (goodsDonSku.getDays() != null && goodsDonSku.getDays() > 0) {
+				updateExpiryTime = DateUtil.offset(expiryTime, DateField.MONTH, goodsDonSku.getMonths());
+			} else {
+				updateExpiryTime = DateUtil.offsetDay(expiryTime, goodsDonSku.getDays());
+			}
 			groupsRelationMapper.update(null, Wrappers.lambdaUpdate(GroupsRelation.class)
 					.eq(GroupsRelation::getId, groupsRelationView.getId())
 					.eq(GroupsRelation::getUserId, userId)
@@ -87,14 +92,15 @@ public class EquipmentDistributeFrontServiceImpl implements EquipmentDistributeF
 			relationId = groupsRelationView.getId();
 		}
 		//记录领取记录
-		saveReceiveBenefitsRecord(userId, skuId, goodsDonSku.getMonths(), relationId, orderId, 1);
+		saveReceiveBenefitsRecord(userId, skuId, goodsDonSku.getDays(), goodsDonSku.getMonths(), relationId, orderId, 1);
 		return groupsRelationView;
 	}
 
-	public void saveReceiveBenefitsRecord(Long userId, Long skuId, Integer num, Long relationId, Long orderId, Integer statusCode) {
+	public void saveReceiveBenefitsRecord(Long userId, Long skuId, Integer days, Integer num, Long relationId, Long orderId, Integer statusCode) {
 		EquipmentUserReceiveBenefitsRecord record = new EquipmentUserReceiveBenefitsRecord();
 		record.setUserId(userId);
 		record.setSkuId(skuId);
+		record.setDays(days);
 		record.setNum(num);
 		record.setOrderId(orderId);
 		record.setRelationId(relationId);

+ 7 - 1
netflix-service/src/main/java/com/cyksj/service/distribute/equipment/impl/EquipmentDistributeServiceImpl.java

@@ -179,6 +179,7 @@ public class EquipmentDistributeServiceImpl implements EquipmentDistributeServic
 		if (receiveBenefitsRecord == null) {
 			return;
 		}
+		Integer days = receiveBenefitsRecord.getDays();
 		Integer months = receiveBenefitsRecord.getNum();
 		Long relationId = receiveBenefitsRecord.getRelationId();
 		GroupsRelation relation = groupsRelationMapper.selectOne(Wrappers.lambdaQuery(GroupsRelation.class)
@@ -193,7 +194,12 @@ public class EquipmentDistributeServiceImpl implements EquipmentDistributeServic
 			groupRelationClearService.clearTicket(relation, UserTicketClearedRecord.Source.distribute);
 		} else {
 			DateTime now = DateTime.now();
-			Date finalDate = DateUtil.offset(expiryTime, DateField.MONTH, -months);
+			Date finalDate = null;
+			if (days != null && days > 0) {
+				finalDate = DateUtil.offsetDay(expiryTime, -days);
+			} else {
+				finalDate = DateUtil.offset(expiryTime, DateField.MONTH, -months);
+			}
 			if (now.isAfter(finalDate)) {
 				//过期 直接清除车票
 				groupRelationClearService.clearTicket(relation, UserTicketClearedRecord.Source.distribute);

+ 7 - 2
netflix-service/src/main/java/com/cyksj/service/exchange/impl/ExchangeCodeServiceImpl.java

@@ -296,7 +296,7 @@ public class ExchangeCodeServiceImpl extends ServiceImpl<ExchangeCodeMapper, Exc
 
 	public GroupsRelation getFinalRelation(GoodsDonSku sku, Long userId, GroupsRelation relation, Integer retryNum, List<Long> errorsRelationIds) {
 		//寻找差不多过期时间规格的车位
-		relation = groupRelationFrontService.getSimilarExpiredGroupRelation(sku.getId(), sku.getMonths(), errorsRelationIds);
+		relation = groupRelationFrontService.getSimilarExpiredGroupRelation(sku.getId(), sku.getDays(), sku.getMonths(), errorsRelationIds);
 		if (relation == null) {
 			GroupsTrips groups = groupsMapper.selectOne(Wrappers.lambdaQuery(GroupsTrips.class)
 					.eq(GroupsTrips::getSkuId, sku.getId())
@@ -341,7 +341,12 @@ public class ExchangeCodeServiceImpl extends ServiceImpl<ExchangeCodeMapper, Exc
 			relation.setStatus(GroupsRelation.Status.validity);
 			//如果续费增加时间,如果首次则设置当前时间为初始时间
 			Date expiryTime = Optional.ofNullable(relation.getExpiryTime()).orElse(new Date());
-			Date newDate = DateUtil.offset(expiryTime, DateField.MONTH, sku.getMonths() * 1);
+			Date newDate;
+			if (sku.getDays() != null && sku.getDays() > 0) {
+				newDate = DateUtil.offsetDay(expiryTime, sku.getDays() * 1);
+			} else {
+				newDate = DateUtil.offset(expiryTime, DateField.MONTH, sku.getMonths() * 1);
+			}
 			relation.setExpiryTime(newDate);
 			relation.setStartTime(relation.getStartTime() == null ? new Date() : null);
 

+ 6 - 2
netflix-service/src/main/java/com/cyksj/service/mange/group/CmsGroupServiceImpl.java

@@ -181,8 +181,12 @@ public class CmsGroupServiceImpl extends ServiceImpl<GroupsMapper,GroupsTrips> i
                     Date expiryTime = Optional.ofNullable(relation.getExpiryTime()).orElse(new Date());
                     log.info("设置账号,该用户 {} 初始时间:{} ", orderDon.getUserId(), DateUtil.format(expiryTime, "yyyy-MM-dd HH:mm:ss"));
                     GoodsDonSku donSku = skuMapper.selectById(orderDon.getSkuId());
-
-                    Date newDate = DateUtil.offset(expiryTime, DateField.MONTH, donSku.getMonths() * orderDon.getNum());
+                    Date newDate;
+                    if (donSku.getDays() != null && donSku.getDays() > 0) {
+                        newDate = DateUtil.offsetDay(expiryTime, donSku.getDays() * orderDon.getNum());
+                    } else {
+                        newDate = DateUtil.offset(expiryTime, DateField.MONTH, donSku.getMonths() * orderDon.getNum());
+                    }
                     relation.setExpiryTime(newDate);
                     log.info("设置账号,该用户 {} 过期时间:{} ", orderDon.getUserId(), DateUtil.format(newDate, "yyyy-MM-dd HH:mm:ss"));
                     relation.setStartTime(relation.getStartTime() == null ? new Date() : null);

+ 8 - 3
netflix-service/src/main/java/com/cyksj/service/mange/impl/CmsOrderDonServiceImpl.java

@@ -234,7 +234,7 @@ public class CmsOrderDonServiceImpl extends ServiceImpl<OrderDonMapper,OrderDon>
                 GoodsDon goodsDon = goodsDonMapper.selectById(orderDon.getGoodsId());
                 GoodsDonSku goodsDonSku = goodsDonSkuMapper.selectById(orderDon.getSkuId());
                 //清除车票
-                orderCommonService.clearUnrealGoodsDetail(orderDon, goodsDon.getType(), goodsDonSku.getMonths());
+                orderCommonService.clearUnrealGoodsDetail(orderDon, goodsDon.getType(), goodsDonSku);
             } catch (DuplicateKeyException e) {
 
             }
@@ -391,7 +391,12 @@ public class CmsOrderDonServiceImpl extends ServiceImpl<OrderDonMapper,OrderDon>
                 //如果续费增加时间,如果首次则设置当前时间为初始时间
                 Date expiryTime = Optional.ofNullable(newRelation.getExpiryTime()).orElse(new Date());
                 GoodsDonSku donSku = skuMapper.selectById(hasPaymentOrder.getSkuId());
-                Date newDate = DateUtil.offset(expiryTime, DateField.MONTH, donSku.getMonths() * hasPaymentOrder.getNum());
+                Date newDate;
+                if (donSku.getDays() != null && donSku.getDays() > 0) {
+                    newDate = DateUtil.offsetDay(expiryTime, donSku.getDays() * hasPaymentOrder.getNum());
+                } else {
+                    newDate = DateUtil.offset(expiryTime, DateField.MONTH, donSku.getMonths() * hasPaymentOrder.getNum());
+                }
                 newRelation.setExpiryTime(newDate);
                 newRelation.setStartTime(newRelation.getStartTime() == null ? new Date() : null);
                 relationMapper.updateById(newRelation);
@@ -538,7 +543,7 @@ public class CmsOrderDonServiceImpl extends ServiceImpl<OrderDonMapper,OrderDon>
             goodsDonStockService.upStockRelate(null, orderDon.getId(), "refund");
             try {
                 //虚物订单退款,清出车队,车票变为已过期
-                orderCommonService.clearUnrealGoodsDetail(orderDon, goodsDon.getType(), sku.getMonths());
+                orderCommonService.clearUnrealGoodsDetail(orderDon, goodsDon.getType(), sku);
             } catch (Exception e) {
                 log.error("清除车票错误:{}", StringUtil.getErrorText(e));
             }

+ 2 - 1
netflix-service/src/main/java/com/cyksj/service/order/OrderCommonService.java

@@ -1,5 +1,6 @@
 package com.cyksj.service.order;
 
+import com.cyksj.model.entity.GoodsDonSku;
 import com.cyksj.model.entity.OrderDon;
 
 /*
@@ -12,7 +13,7 @@ public interface OrderCommonService {
 	/**
 	 * 虚物订单退款,清出车队,车票变成已过期
 	 */
-	void clearUnrealGoodsDetail(OrderDon orderDon, Integer goodsType, Integer months);
+	void clearUnrealGoodsDetail(OrderDon orderDon, Integer goodsType, GoodsDonSku sku);
 
 
 	/**

+ 13 - 3
netflix-service/src/main/java/com/cyksj/service/order/impl/OrderCommonServiceImpl.java

@@ -43,7 +43,7 @@ public class OrderCommonServiceImpl implements OrderCommonService {
 	private final RedisService redisService;
 
 	@Override
-	public void clearUnrealGoodsDetail(OrderDon orderDon, Integer goodsType, Integer months) {
+	public void clearUnrealGoodsDetail(OrderDon orderDon, Integer goodsType, GoodsDonSku sku) {
 		if (goodsType == 1) {
 			//清出车队,车位变为已过期
 			Long relationId = orderDon.getRelationId();
@@ -89,7 +89,12 @@ public class OrderCommonServiceImpl implements OrderCommonService {
 					} else {
 						//续费更换后的座位 过期时间
 						if (expiryTime != null) {
-							DateTime refundExpiryTime = DateUtil.offsetMonth(expiryTime, -months * num);
+							DateTime refundExpiryTime;
+							if (sku.getDays() != null && sku.getDays() > 0) {
+								refundExpiryTime = DateUtil.offsetDay(expiryTime, -sku.getDays() * num);
+							} else {
+								refundExpiryTime = DateUtil.offsetMonth(expiryTime, -sku.getMonths() * num);
+							}
 							if (now.isBefore(refundExpiryTime)) {
 								isFlag = false;
 							}
@@ -116,7 +121,12 @@ public class OrderCommonServiceImpl implements OrderCommonService {
 					}
 				} else {
 					if (expiryTime != null) {
-						relation.setExpiryTime(DateUtil.offsetMonth(expiryTime, -months * num));
+						if (sku.getDays() != null && sku.getDays() > 0) {
+							expiryTime = DateUtil.offsetDay(expiryTime, -sku.getDays() * num);
+						} else {
+							expiryTime = DateUtil.offsetMonth(expiryTime, -sku.getMonths() * num);
+						}
+						relation.setExpiryTime(expiryTime);
 						groupsRelationMapper.updateById(relation);
 					}
 				}

+ 14 - 4
netflix-service/src/main/java/com/cyksj/service/order/impl/OrderDonServiceImpl.java

@@ -644,7 +644,12 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
 					throw BusinessRuntimeException.getInstance("季付车票只能续费季付");
 				} else if (tripsSkuId == 6) {
 					throw BusinessRuntimeException.getInstance("年付车票只能续费年付");
-				} else throw BusinessRuntimeException.getInstance("请选择对应规格的车票续费");
+				} else {
+					//天数可续费其他规格
+					if (goodsDonSkuView.getDays() == null || goodsDonSkuView.getDays() <= 0) {
+						throw BusinessRuntimeException.getInstance("请选择对应规格的车票续费");
+					}
+				}
 			} else if (tripsSkuId == 4 && tripsSkuId != renewSkuId) {
 				isChangeTicket = true;
 			}
@@ -1100,8 +1105,13 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
 					//如果续费增加时间,如果首次则设置当前时间为初始时间
 					Date expiryTime = Optional.ofNullable(relation.getExpiryTime()).orElse(new Date());
 					GoodsDonSku donSku = goodsDonSkuMapper.selectById(order.getSkuId());
-
-					Date newDate = DateUtil.offset(expiryTime, DateField.MONTH, donSku.getMonths() * order.getNum());
+					Date newDate;
+					//天数、月份
+					if (donSku.getDays() != null && donSku.getDays() > 0) {
+						newDate = DateUtil.offsetDay(expiryTime, donSku.getDays() * order.getNum());
+					} else {
+						newDate = DateUtil.offset(expiryTime, DateField.MONTH, donSku.getMonths() * order.getNum());
+					}
 					relation.setExpiryTime(newDate);
 					relation.setStartTime(relation.getStartTime() == null ? new Date() : null);
 				} else if (GroupsTrips.Status.waiting.equals(groupsTrips.getStatus())) {
@@ -1761,7 +1771,7 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
 
 		} else {
 			//寻找差不多过期时间规格的车位
-			relation = groupRelationFrontService.getSimilarExpiredGroupRelation(sku.getId(), sku.getMonths(), null);
+			relation = groupRelationFrontService.getSimilarExpiredGroupRelation(sku.getId(), sku.getDays(), sku.getMonths(), null);
 			if (relation == null) {
 				//TODO 如果没指定座位,等待逻辑确认
 				GroupsTrips groups = groupsMapper.selectOne( Wrappers.lambdaQuery(GroupsTrips.class)

+ 1 - 1
netflix-service/src/main/java/com/cyksj/service/relation/GroupRelationFrontService.java

@@ -16,5 +16,5 @@ public interface GroupRelationFrontService {
 
 	Boolean isJoinCorpWx(Long userId, Boolean isJoin, Boolean noCoupon);
 
-	GroupsRelation getSimilarExpiredGroupRelation(Long skuId, Integer months, List<Long> errorsRelationIds);
+	GroupsRelation getSimilarExpiredGroupRelation(Long skuId, Integer days, Integer months, List<Long> errorsRelationIds);
 }

+ 7 - 2
netflix-service/src/main/java/com/cyksj/service/relation/impl/GroupRelationFrontServiceImpl.java

@@ -121,8 +121,13 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
 	}
 
 	@Override
-	public GroupsRelation getSimilarExpiredGroupRelation(Long skuId, Integer months, List<Long> errorsRelationIds) {
-		DateTime expiryTime = DateUtil.offsetMonth(DateTime.now(), months);
+	public GroupsRelation getSimilarExpiredGroupRelation(Long skuId, Integer days, Integer months, List<Long> errorsRelationIds) {
+		DateTime expiryTime = null;
+		if (days != null && days > 0) {
+			expiryTime = DateUtil.offsetDay(DateTime.now(), days);
+		} else {
+			expiryTime = DateUtil.offsetMonth(DateTime.now(), months);
+		}
 		DateTime minExpiryTime = DateUtil.offsetDay(expiryTime, -5);
 		Long groupsId = groupsRelationMapper.selectSimilarExpiredRelation(skuId, minExpiryTime);
 		if (groupsId == null) {

+ 2 - 0
netflix-web/src/main/java/com/cyksj/web/controller/goods/GoodsDonController.java

@@ -189,6 +189,7 @@ public class GoodsDonController {
                     GoodsDonFrontSkuView donFrontSkuView = skuList.get(0);
                     data.setPrice(donFrontSkuView.getPrice());
                     data.setMonths(donFrontSkuView.getMonths());
+                    data.setDays(donFrontSkuView.getDays());
                 }
             });
             OrderCommentFrontView comments = beanSearcher.searchFirst(OrderCommentFrontView.class, MapUtils.builder()
@@ -241,6 +242,7 @@ public class GoodsDonController {
             if (skuView != null) {
                 data.setPrice(skuView.getPrice());
                 data.setMonths(skuView.getMonths());
+                data.setDays(skuView.getDays());
             }
         });
         redisService.setNx(h5CacheKey, dataList, RedisService.key.YH_HOME_PAGHE_CACHE.getTimeout());

+ 22 - 2
netflix-web/src/main/java/com/cyksj/web/controller/manage/goods/CmsGoodsDonSkuController.java

@@ -3,6 +3,7 @@ package com.cyksj.web.controller.manage.goods;
 import cn.hutool.core.bean.BeanUtil;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.cyksj.common.annotation.Log;
+import com.cyksj.common.exception.BusinessRuntimeException;
 import com.cyksj.common.util.Jsons;
 import com.cyksj.dto.Result;
 import com.cyksj.enums.BusinessType;
@@ -216,7 +217,12 @@ public class CmsGoodsDonSkuController {
             goodsDonSku.setSpecIds(specIds);
             goodsDonSku.setSpecVal(specVal);
             goodsDonSku.setSpecJson(specJson);
-
+            if (goods.getType() == 1) {
+                if (sku.getMonths() != null && sku.getDays() != null)
+                    throw BusinessRuntimeException.getInstance("续费天数和续费月数不能同时存在");
+                if (sku.getMonths() == null && sku.getDays() == null)
+                    throw BusinessRuntimeException.getInstance("请输入对应续费时间");
+            }
             goodsDonSkuService.save(goodsDonSku);
 
         }
@@ -234,6 +240,20 @@ public class CmsGoodsDonSkuController {
     @PutMapping(value = "/update")
     @Log(module = "平台管理/编辑规格", businessType = BusinessType.PUT, isSaveRequestData = true)
     public Result<String> skuUpdate(@RequestBody GoodsDonSku sku){
+        Long goodsId = sku.getGoodsId();
+        GoodsDon goods = goodsDonService.getById(goodsId);
+        if (goods.getType() == 1) {
+            if (sku.getMonths() != null && sku.getDays() != null)
+                throw BusinessRuntimeException.getInstance("续费天数和续费月数不能同时存在");
+            if (sku.getMonths() == null && sku.getDays() == null)
+                throw BusinessRuntimeException.getInstance("请输入对应续费时间");
+        }
+        if (sku.getMonths() == null) {
+            sku.setMonths(null);
+        }
+        if (sku.getDays() == null) {
+            sku.setDays(null);
+        }
         goodsDonSkuService.saveOrUpdate(sku);
         //给平台更新额外属性
         goodsDonService.updateGoodsSkuPrice(sku.getGoodsId(), null);
@@ -250,9 +270,9 @@ public class CmsGoodsDonSkuController {
     @DeleteMapping("/delete/{skuId}")
     @Log(module = "平台管理/删除规格", businessType = BusinessType.DELETE)
     public Result<String> skuDelete(@PathVariable Long skuId) {
-        goodsDonSkuService.removeById(skuId);
         //给平台更新额外属性
         GoodsDonSku sku = goodsDonSkuService.getById(skuId);
+        goodsDonSkuService.removeById(skuId);
         goodsDonService.updateGoodsSkuPrice(sku.getGoodsId(), null);
         Set<String> keys = redisService.keys(RedisService.key.YH_HOME_PAGHE_CACHE.getName() + "*");
         redisService.del(keys.toArray(String[]::new));

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
netflix-web/src/main/resources/application-dev.yml


Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott