瀏覽代碼

门店绑定二维码

zhangkaikai 1 年之前
父節點
當前提交
ecad5ea28e

+ 1 - 3
mp-admin/src/main/java/com/qs/mp/web/controller/api/user/UserShareController.java

@@ -65,11 +65,9 @@ public class UserShareController extends BaseApiController {
 	@PostMapping("/ticket/code/generate")
 	@ApiModelProperty("生成指定门店下盲票二维码")
 	public AjaxResult generateTicketUnderChannelCode(@RequestBody  JSONObject jsonObject) {
-		String type = jsonObject.getString("type");
 		String channelId = jsonObject.getString("channelId");// 渠道ID
 		String appId = AppSourceEnum.MSDQ.getAppId();
-		Long userId = SecurityUtils.getUserId();
-		String rst = wxUrlLinkService.generateUnlimitCode("packageOperate/store/index", channelId + "&" + userId + "&" + type, appId);;
+		String rst = wxUrlLinkService.generateUnlimitCode("packageOperate/store/index", channelId, appId);;
 		return new AjaxResult(Type.SUCCESS, "", rst);
 	}
 }

+ 2 - 1
mp-admin/src/main/java/com/qs/mp/web/controller/api/user/UserTicketController.java

@@ -384,7 +384,8 @@ public class UserTicketController extends BaseApiController {
         startPage();
         QueryWrapper<TicketBox> ticketBoxQueryWrapper = new QueryWrapper<>();
         ticketBoxQueryWrapper.eq("t1.status", TicketBoxStatusEnum.PUT_ON)
-                .eq("t1.sale_channel_type", TicketBoxSaleChannelTypeEnum.SHOP.getValue())
+                .eq("t1.sale_channel_type", TicketBoxSaleChannelTypeEnum.PART.getValue())
+                .eq("t1.type", TicketTypeEnum.ONLINE.getValue())
                 .eq("t2.channel_id", ticketBoxQueryParam.getChannelId());
 
         List<TicketBox> ticketBoxList = ticketBoxService.listBySaleChannel(ticketBoxQueryWrapper);

+ 2 - 7
mp-common/src/main/java/com/qs/mp/common/enums/TicketBoxSaleChannelTypeEnum.java

@@ -11,13 +11,8 @@ import lombok.AllArgsConstructor;
  */
 public enum TicketBoxSaleChannelTypeEnum implements IEnum<Integer> {
 
-    // 线下票渠道
-    ALL(1, "所有渠道"),
-    PART(2, "部分渠道"),
-
-    // 线上票渠道
-    HOMEPAGE(3,"首页售卖"),
-    SHOP(4,"指定门店")
+    ALL(1, "线下所有渠道 线上首页售卖"),
+    PART(2, "线下部分渠道 线上指定门店"),
     ;
 
     private int value;

+ 1 - 1
mp-service/src/main/java/com/qs/mp/admin/domain/param/TicketBoxCreateParam.java

@@ -26,7 +26,7 @@ public class TicketBoxCreateParam {
 	@ApiModelProperty(value = "图片",required=true)
 	private String picUrl;
 
-	@ApiModelProperty("销售渠道类型  1 所有渠道 2 指定渠道 3 线上票首页售卖 4 线上票指定门店售卖")
+	@ApiModelProperty("销售渠道类型  1 线下所有渠道或线上票首页售卖 2 线下指定渠道或线上票指定门店售卖")
 	private Integer saleChannelType;
 
 	@ApiModelProperty("渠道商id列表")

+ 4 - 2
mp-service/src/main/java/com/qs/mp/admin/service/impl/TicketBoxServiceImpl.java

@@ -441,7 +441,8 @@ public class TicketBoxServiceImpl extends ServiceImpl<TicketBoxMapper, TicketBox
         }
 
         // 指定渠道
-        if (TicketBoxSaleChannelTypeEnum.PART.getValue().equals(param.getSaleChannelType())) {
+        if (TicketBoxSaleChannelTypeEnum.PART.getValue().equals(param.getSaleChannelType())
+            && TicketTypeEnum.OFFLINE.getValue().equals(param.getType())) {
             List<Long> channelIdList = param.getChannelIdList();
             if (CollectionUtils.isEmpty(channelIdList)) {
                 throw new ServiceException("渠道列表为空");
@@ -476,7 +477,8 @@ public class TicketBoxServiceImpl extends ServiceImpl<TicketBoxMapper, TicketBox
         }
 
         // 线上票指定门店
-        if (TicketBoxSaleChannelTypeEnum.SHOP.getValue().equals(param.getSaleChannelType())) {
+        if (TicketBoxSaleChannelTypeEnum.PART.getValue().equals(param.getSaleChannelType())
+                && TicketTypeEnum.ONLINE.getValue().equals(param.getType())) {
             List<Long> channelIdList = param.getChannelIdList();
             if (CollectionUtils.isEmpty(channelIdList)) {
                 throw new ServiceException("门店列表为空");