zoujiajian před 2 roky
rodič
revize
329d569994

+ 1 - 1
netflix-dao/src/main/java/com/cyksj/mapper/GroupsRelationMapper.java

@@ -30,7 +30,7 @@ public interface GroupsRelationMapper extends BaseMapper<GroupsRelation> {
 
 	Long selectSimilarExpiredRelation(@Param("skuId") Long skuId, @Param("minExpiryTime") DateTime minExpiryTime);
 
-	List<GroupsRelationView> selectRelationByGoodsId(@Param("goodsId") Long goodsId, @Param("userId") Long userId);
+	List<GroupsRelationView> selectRelationByGoodsId(@Param("goodsId") Long goodsId, @Param("userId") Long userId, @Param("yhsId") Long yhsId);
 
 	GroupsRelationView getGroupRelationViewByUserIdAndRelationId(@Param("userId") Long userId, @Param("relationId") Long relationId);
 

+ 4 - 3
netflix-dao/src/main/java/com/cyksj/model/views/YhShopUserDistributeRateView.java

@@ -13,8 +13,9 @@ import lombok.Setter;
  */
 @Getter
 @Setter
-@SearchBean(tables = "goods_don g left join yh_shop_user_plat_distribute_rate upr on upr.goods_id = g.id :uid:",
-		where = "g.type = 1 and g.deleted is true and g.status is true and upr.rate > 0")
+@SearchBean(tables = "goods_don g left join yh_shop_user_plat_distribute_rate upr on upr.goods_id = g.id and upr.rate > 0 :uid:" +
+		" left join yh_shop_general_goods_rate ygr on ygr.goods_id = g.id",
+		where = "g.type = 1 and g.deleted is true and g.status is true")
 public class YhShopUserDistributeRateView {
 
 	@DbField("g.category")
@@ -23,6 +24,6 @@ public class YhShopUserDistributeRateView {
 	@DbField("g.title")
 	private String title;
 
-	@DbField("upr.rate")
+	@DbField("ifnull(upr.rate,ygr.rate)")
 	private Integer rate;
 }

+ 1 - 0
netflix-dao/src/main/resources/mapper/GroupRelationMapper.xml

@@ -73,6 +73,7 @@
           and gr.user_id = #{userId}
           and gt.status = 'validity'
           and gr.status = 'validity'
+          and gr.yhs_id = #{yhsId}
     </select>
 
     <select id="getGroupRelationViewByUserIdAndRelationId"

+ 11 - 8
netflix-service/src/main/java/com/cyksj/service/order/impl/OrderDonServiceImpl.java

@@ -255,6 +255,9 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
 			giftCards = gcPayInfo.getGiftCards();
 		}
 		AtomicBoolean isGiftCardPay = new AtomicBoolean(false);
+		//若存在店铺id,校验店铺状态
+		String customId = payRequest.getCustomId();
+		Long yhsId = yhShopFrontService.checkShopCustomIdAndReturnShopId(customId);
 		if (CollUtil.isNotEmpty(giftCards)) {
 			goodsId = payRequest.getGoodsId();
 			isGiftCardPay.set(true);
@@ -262,7 +265,7 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
 			if (payRequest.getSkuId() == null) {
 				throw BusinessRuntimeException.getInstance("请指定对应平台规格下单");
 			}
-			sku = goodsDonSkuMapper.selectById(payRequest.getSkuId());
+			sku = adjustGoodsDonSku(yhsId, payRequest.getIsPayReal(), payRequest.getSkuId());
 			Assert.notNull(sku, "规格不存在");
 			goodsId = sku.getGoodsId();
 		}
@@ -274,9 +277,6 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
 			throw BusinessRuntimeException.getInstance("非礼品卡类型商品");
 		}
 		CouponUser couponUser = null;
-		String customId = payRequest.getCustomId();
-		//若存在店铺id,校验店铺状态
-		Long yhsId = yhShopFrontService.checkShopCustomIdAndReturnShopId(customId);
 		if (StrUtil.isNotBlank(payRequest.getCouponExCode()) || payRequest.getCouponId() != null) {
 			CouponPopularizeDto couponPopularizeDto = checkCouponStatus(payRequest.getSkuId(), payRequest.getCouponExCode(), payRequest.getCouponId(), payRequest.getUserId(), false);
 			//记录优惠券使用状态
@@ -289,7 +289,9 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
 		Boolean isNeedTicket = checkIsNeedGroupsRelation(goodsDon);
 		Long userId = payRequest.getUserId();
 		if (userId != null) {
-			int noPayCount = count(Wrappers.lambdaQuery(OrderDon.class).eq(OrderDon::getUserId, userId).eq(OrderDon::getGoodsId, goodsId).eq(OrderDon::getStatus, OrderDon.Status.noPayment.toString()));
+			int noPayCount = count(Wrappers.lambdaQuery(OrderDon.class).eq(OrderDon::getUserId, userId).eq(OrderDon::getGoodsId, goodsId)
+					.eq(OrderDon::getYhsId, yhsId)
+					.eq(OrderDon::getStatus, OrderDon.Status.noPayment.toString()));
 			if (noPayCount > 0) {
 				throw new BusinessRuntimeException("您有未支付订单.");
 			}
@@ -819,16 +821,17 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
 		if (relationId == null || relationId <= 0 || renewSkuId == null || payRequest.getNum() == null) {
 			throw new BusinessRuntimeException("缺少必填参数");
 		}
+		String customId = payRequest.getCustomId();
+		//若存在店铺id,校验店铺状态
+		Long yhsId = yhShopFrontService.checkShopCustomIdAndReturnShopId(customId);
 		//是否有其他规格的续费订单 若有请先关闭
 		Integer count = orderDonMapper.selectCount(Wrappers.lambdaQuery(OrderDon.class)
 				.eq(OrderDon::getRelationId, payRequest.getRelationId())
+				.eq(OrderDon::getYhsId, yhsId)
 				.eq(OrderDon::getStatus, OrderDon.Status.noPayment).eq(OrderDon::getOrderType, 2));
 		if (count > 0) {
 			throw BusinessRuntimeException.getInstance("您有该车票未支付的续费订单..");
 		}
-		String customId = payRequest.getCustomId();
-		//若存在店铺id,校验店铺状态
-		Long yhsId = yhShopFrontService.checkShopCustomIdAndReturnShopId(customId);
 		GoodsDonSku sku = adjustGoodsDonSku(yhsId, false, renewSkuId);
 
 		GroupsRelation relation = groupsRelationMapper.selectById(relationId);

+ 1 - 1
netflix-service/src/main/java/com/cyksj/service/order/impl/UserRealOrderBenefitsImpl.java

@@ -71,7 +71,7 @@ public class UserRealOrderBenefitsImpl implements UserRealOrderBenefitsService {
 //					.field(GroupsRelationView::getUserId, userId)
 //					.field(GroupsRelationView::getStatus, GroupsRelation.Status.validity.name())
 //					.build());
-			List<GroupsRelationView> relationViewList = groupsRelationMapper.selectRelationByGoodsId(goodsId, userId);
+			List<GroupsRelationView> relationViewList = groupsRelationMapper.selectRelationByGoodsId(goodsId, userId, yhsId);
 			//是否有该规格车票,若无直接发放车票
 			if (CollUtil.isEmpty(relationViewList)) {
 				log.info("用户userId:{}未有skuId:{}车票,获取对应车票", userId, sku.getId());

+ 1 - 1
netflix-service/src/main/java/com/cyksj/service/shop/impl/YhShopDistributeServiceImpl.java

@@ -79,7 +79,7 @@ public class YhShopDistributeServiceImpl implements YhShopDistributeService {
 				rate = yhShopGeneralGoodsRate.getRate();
 			}
 		}
-		if (rate <= 0) {
+		if (rate == null || rate <= 0) {
 			log.info("配置店铺主userId:{}对应平台goodsId:{}的比例为0", shopUserId, order.getGoodsId());
 			return;
 		}

+ 1 - 1
netflix-service/src/main/java/com/cyksj/service/user/impl/UserServiceImpl.java

@@ -617,7 +617,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
 						.orderBy(UserTicketView::getRelationId).asc()
 						.build());
 				if (CollUtil.isEmpty(ticketViews)) {
-					GroupsRelation relationNoOrder = exchangeCodeService.getRelationNoOrder(sku, userId);
+					GroupsRelation relationNoOrder = exchangeCodeService.getRelationNoOrder(sku, userId, null);
 					giftCardUserRecordMapper.update(null, Wrappers.lambdaUpdate(GiftCardUserRecord.class)
 							.set(GiftCardUserRecord::getRelationId, relationNoOrder.getId())
 							.eq(GiftCardUserRecord::getId, giftCardUserRecord.getId()));

+ 1 - 4
netflix-web/src/main/java/com/cyksj/web/controller/goods/GoodsDonController.java

@@ -35,10 +35,7 @@ import org.springframework.web.bind.annotation.*;
 import javax.servlet.http.HttpServletRequest;
 import java.math.BigDecimal;
 import java.util.*;
-import java.util.Date;
-import java.util.List;
-import java.util.Optional;
-import java.util.Set;
+import java.util.stream.Collectors;
 
 /**
  * @author chan

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 0
netflix-web/src/main/resources/application-prd.yml


+ 10 - 1
netflix-web/src/main/resources/application-pre.yml

@@ -136,9 +136,18 @@ wx-login:
   loginUrl: https://nf.video
   cpsRedirectUri: https://nf.video/8082/api/cps/manage/wx/authLogin/baseRedirect
   cpsLoginUrl: https://cps.nf.video/yinhe/cps/loginNexte
-  baRedirectUrl: https://nf.video/8082/api/applets/market/task/bind/wx/baseRedirect
+  yhShopRedirectUri: https://nf.video/8082/api/yhShop/manage/wx/authLogin/baseRedirect
+  yhShopLoginUrl: https://shop.liuliangbang.vip/mall/admin/loginNexte
+  baRedirectUrl: https://nf.video/80821/api/applets/market/task/bind/wx/baseRedirect
   remark: 银河录像网页微信登录
 
+wx-shop-login:
+  appid: wx7c5494c38c6a78bd #todo
+  secret: 95c7c542a583b42840765d758ec49bf5 #todo
+  redirectUri: https://shop.liuliangbang.vip/8081/api/auth/wx/authLogin/baseRedirect
+  loginUrl: https://shop.liuliangbang.vip/
+  remark: 小店店铺网页微信授权
+
 yhlx:
   corpId: ww9c0ccaad2e9d3822
   corpSecret: Ov0mlArSItBrs9EuOMt5Ou_faGdplDDIvPgIhgup51E

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů