Răsfoiți Sursa

区分镜像店铺车票

zoujiajian 1 an în urmă
părinte
comite
f89722b708

+ 6 - 0
netflix-dao/src/main/java/com/cyksj/model/entity/GroupsRelation.java

@@ -74,6 +74,12 @@ public class GroupsRelation extends BaseEntity {
 
     private Long yhsId;
 
+    /**
+     * 店铺类型
+     * 0无 1.普通店铺 2.镜像店铺
+     */
+    private Integer cmt;
+
     /**
      * 获取权益时的订单id
      */

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

@@ -159,6 +159,13 @@ public class RenewalView {
     @DbField("gr.yhs_id")
     private Long yhsId;
 
+    /**
+     * 店铺类型
+     * 0无 1.普通店铺 2.镜像店铺
+     */
+    @DbField("gr.mp_id")
+    private Integer cmt;
+
     /**
      * 车票获取类型 默认1购买,2.体验
      */

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

@@ -18,6 +18,7 @@
         submit_time = null,
         operator = null,
         yhs_id = 0,
+        cmt = 0,
         aq_type = 1
         where id = #{entity.id}
         <if test="expireTime != null">

+ 1 - 0
netflix-service/src/main/java/com/cyksj/service/exchange/impl/ExchangeCodeServiceImpl.java

@@ -451,6 +451,7 @@ public class ExchangeCodeServiceImpl extends ServiceImpl<ExchangeCodeMapper, Exc
 				relation.setStatus(GroupsRelation.Status.validity);
 			}
 			relation.setYhsId(yhsId);
+			relation.setCmt(1);
 			groupsRelationMapper.updateById(relation);
 
 			Long skuId = sku.getId();

+ 1 - 0
netflix-service/src/main/java/com/cyksj/service/mange/impl/CmsOrderDonServiceImpl.java

@@ -743,6 +743,7 @@ public class CmsOrderDonServiceImpl extends ServiceImpl<OrderDonMapper,OrderDon>
         newRelation.setStartTime(relation.getStartTime());
         newRelation.setExpiryTime(relation.getExpiryTime());
         newRelation.setYhsId(yhsId);
+        newRelation.setCmt(relation.getCmt());
         newRelation.setCustomerService(relation.getCustomerService());
         if (newRelation.getStatus() != GroupsRelation.Status.outside) {
             newRelation.setStatus(GroupsRelation.Status.validity);

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

@@ -592,6 +592,17 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
 		setOrderDonPayTile(isGiftCardPay, gcPayInfo, giftCards, orderDon, goodsDon, sku, dpSkuIds);
 		//下单手机号
 		orderDon.setPhone(orderPhone);
+		//镜像店铺订单 区分车票
+		if (payRequest.getCmt() == 2) {
+			UserMirrorShop userMirrorShop = userMirrorShopMapper.selectOne(Wrappers.lambdaQuery(UserMirrorShop.class)
+					.eq(UserMirrorShop::getCustomId, customId)
+					.last("limit 1"));
+			if (userMirrorShop != null) {
+				relation.setCmt(2);
+				relation.setYhsId(userMirrorShop.getId());
+				groupsRelationMapper.updateById(relation);
+			}
+		}
 		this.saveOrUpdate(orderDon);
 
 		if (orderDon.getIsDp()) {

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

@@ -18,7 +18,7 @@ import java.util.List;
  *创建时间:2022/12/29 15:42
  */
 public interface GroupRelationFrontService {
-	SearchResult<RenewalView> getMyTicket(long userId, Boolean isLoginPopularize, String customId, String account);
+	SearchResult<RenewalView> getMyTicket(long userId, Boolean isLoginPopularize, String customId, String account, Integer cmt);
 
 	Boolean isJoinCorpWx(Long userId, Boolean isJoin, Boolean noCoupon);
 

+ 12 - 1
netflix-service/src/main/java/com/cyksj/service/relation/impl/GroupRelationFrontServiceImpl.java

@@ -22,6 +22,7 @@ import com.cyksj.mapper.manage.distribute.DistributeGeneralSkuRateMapper;
 import com.cyksj.mapper.manage.distribute.UserDistributeMapper;
 import com.cyksj.mapper.manage.distribute.UserPlatDistributeRateMapper;
 import com.cyksj.mapper.manage.distribute.UserPlatSkuDistributeRateMapper;
+import com.cyksj.mapper.mirrorshop.UserMirrorShopMapper;
 import com.cyksj.mapper.renew.RenewUpgradePackageMapper;
 import com.cyksj.mapper.sys.SysEmailMapper;
 import com.cyksj.model.entity.*;
@@ -155,8 +156,10 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
 
 	private final AccountMapper accountMapper;
 
+	private final UserMirrorShopMapper userMirrorShopMapper;
+
 	@Override
-	public SearchResult<RenewalView> getMyTicket(long userId, Boolean isLoginPopularize, String customId, String account) {
+	public SearchResult<RenewalView> getMyTicket(long userId, Boolean isLoginPopularize, String customId, String account, Integer cmt) {
 		User u = userMapper.selectById(userId);
 		if (u == null) throw BusinessRuntimeException.getGatewayApiCode(GatewayApiCode.CMS_TOKEN_VALID);
 		if (u.getIsBlack()) {
@@ -164,6 +167,14 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
 		}
 		List<Long> userIds = userBindRelationService.getRelationUserIdList(userId, u);
 		MapBuilder builder = MapUtils.flatBuilder(request.getParameterMap());
+		if (cmt != null && cmt == 2 && StrUtil.isNotBlank(customId)) {
+			UserMirrorShop userMirrorShop = userMirrorShopMapper.selectOne(Wrappers.lambdaQuery(UserMirrorShop.class)
+					.eq(UserMirrorShop::getCustomId, customId)
+					.last("limit 1"));
+			if (userMirrorShop != null) {
+				builder.field(RenewalView::getCmt, cmt).field(RenewalView::getYhsId, userMirrorShop.getId());
+			}
+		}
 		//Long yhsId = yhShopFrontService.getYhsIdByCustomId(customId);
 		DateTime now = DateTime.now();
 		if (StrUtil.isNotBlank(account)) {

+ 2 - 2
netflix-web/src/main/java/com/cyksj/web/controller/group/GroupRelationController.java

@@ -136,9 +136,9 @@ public class GroupRelationController {
     private final static Sequence SEQUENCE = new Sequence(0);
 
     @RequestMapping("/get/renewal")
-    public Result<SearchResult<RenewalView>> get(Boolean isLoginPopularize, String customId, String account) {
+    public Result<SearchResult<RenewalView>> get(Boolean isLoginPopularize, String customId, String account, Integer cmt) {
         long userId = StpUserUtil.getLoginIdAsLong();
-        SearchResult<RenewalView> list = groupRelationFrontService.getMyTicket(userId, isLoginPopularize, customId, account);
+        SearchResult<RenewalView> list = groupRelationFrontService.getMyTicket(userId, isLoginPopularize, customId, account, cmt);
         return GatewayResponse.SUCCESS.newBuilder().toResult(list);
     }
 

+ 0 - 1
netflix-web/src/main/java/com/cyksj/web/controller/mirror/MidjourneyController.java

@@ -19,7 +19,6 @@ import com.cyksj.web.util.StpUserUtil;
 import com.ejlchina.searcher.BeanSearcher;
 import com.ejlchina.searcher.SearchResult;
 import com.ejlchina.searcher.param.Operator;
-import com.ejlchina.searcher.util.MapBuilder;
 import com.ejlchina.searcher.util.MapUtils;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;