From 503da018813cb8f2e01ff27016b7b0f056b000ad Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Fri, 21 Jul 2023 15:53:20 +0800
Subject: [PATCH] 订单支付后生成对应的课程单

---
 src/main/java/cc/mrbird/febs/mall/dto/PayOrderDto.java                          |    5 
 src/main/java/cc/mrbird/febs/mall/service/impl/AdminMallGoodsService.java       |   14 ++
 src/main/java/cc/mrbird/febs/rabbit/enumerates/RabbitQueueEnum.java             |    1 
 src/main/java/cc/mrbird/febs/mall/entity/MallGoods.java                         |    2 
 src/main/java/cc/mrbird/febs/rabbit/consumer/AgentConsumer.java                 |   10 +
 src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallOrderInfoServiceImpl.java |    6 +
 src/main/java/cc/mrbird/febs/mall/dto/AddMallGoodsDto.java                      |    3 
 src/main/java/cc/mrbird/febs/mall/service/IAgentService.java                    |    2 
 src/main/java/cc/mrbird/febs/mall/entity/MallMemberClass.java                   |   27 ++++
 src/main/java/cc/mrbird/febs/common/configure/RabbitConfigure.java              |   18 +++
 src/main/resources/templates/febs/views/modules/goods/goodsAddNew.html          |   27 +++-
 src/main/java/cc/mrbird/febs/mall/service/impl/AgentServiceImpl.java            |  101 +++++++++++++---
 src/main/java/cc/mrbird/febs/mall/mapper/MallMemberClassMapper.java             |    7 +
 src/main/java/cc/mrbird/febs/mall/mapper/MallMemberHouseMapper.java             |    7 +
 src/main/java/cc/mrbird/febs/mall/entity/MallMemberHouse.java                   |   36 ++++++
 src/main/java/cc/mrbird/febs/rabbit/constants/QueueConstants.java               |    2 
 src/main/java/cc/mrbird/febs/rabbit/producter/AgentProducer.java                |    5 
 src/main/resources/templates/febs/views/modules/goods/goodsUpdateNew.html       |   27 ++++
 src/main/java/cc/mrbird/febs/mall/dto/MallGoodsUpdateDto.java                   |    3 
 src/main/java/cc/mrbird/febs/mall/entity/MallOrderInfo.java                     |    5 
 20 files changed, 281 insertions(+), 27 deletions(-)

diff --git a/src/main/java/cc/mrbird/febs/common/configure/RabbitConfigure.java b/src/main/java/cc/mrbird/febs/common/configure/RabbitConfigure.java
index 3f42d91..f956599 100644
--- a/src/main/java/cc/mrbird/febs/common/configure/RabbitConfigure.java
+++ b/src/main/java/cc/mrbird/febs/common/configure/RabbitConfigure.java
@@ -194,4 +194,22 @@
     }
     /** 支付后同意验证 end**/
 
+
+    /** 支付后生成我的课程或者我的民宿卷 start**/
+    @Bean
+    public DirectExchange rollSendExchange() {
+        return new DirectExchange(RabbitQueueEnum.YWG_ROLL_SEND.getExchange());
+    }
+
+    @Bean
+    public Queue rollSendQueue() {
+        return new Queue(RabbitQueueEnum.YWG_ROLL_SEND.getQueue());
+    }
+
+    @Bean
+    public Binding rollSendBind() {
+        return BindingBuilder.bind(rollSendQueue()).to(rollSendExchange()).with(RabbitQueueEnum.YWG_ROLL_SEND.getRoute());
+    }
+    /** 支付后生成我的课程或者我的民宿卷 end**/
+
 }
diff --git a/src/main/java/cc/mrbird/febs/mall/dto/AddMallGoodsDto.java b/src/main/java/cc/mrbird/febs/mall/dto/AddMallGoodsDto.java
index dd3ce15..ccdeb00 100644
--- a/src/main/java/cc/mrbird/febs/mall/dto/AddMallGoodsDto.java
+++ b/src/main/java/cc/mrbird/febs/mall/dto/AddMallGoodsDto.java
@@ -95,4 +95,7 @@
     private String levelTwoPrice;
     private String levelThreePrice;
 
+    private String houseName;
+    private String houseAddress;
+
 }
diff --git a/src/main/java/cc/mrbird/febs/mall/dto/MallGoodsUpdateDto.java b/src/main/java/cc/mrbird/febs/mall/dto/MallGoodsUpdateDto.java
index 7a0e46d..d7e6028 100644
--- a/src/main/java/cc/mrbird/febs/mall/dto/MallGoodsUpdateDto.java
+++ b/src/main/java/cc/mrbird/febs/mall/dto/MallGoodsUpdateDto.java
@@ -99,4 +99,7 @@
     private BigDecimal levelOnePrice;
     private BigDecimal levelTwoPrice;
     private BigDecimal levelThreePrice;
+
+    private String houseName;
+    private String houseAddress;
 }
diff --git a/src/main/java/cc/mrbird/febs/mall/dto/PayOrderDto.java b/src/main/java/cc/mrbird/febs/mall/dto/PayOrderDto.java
index 1515809..e997b20 100644
--- a/src/main/java/cc/mrbird/febs/mall/dto/PayOrderDto.java
+++ b/src/main/java/cc/mrbird/febs/mall/dto/PayOrderDto.java
@@ -1,11 +1,13 @@
 package cc.mrbird.febs.mall.dto;
 
+import cn.hutool.core.date.DateTime;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import javax.validation.constraints.NotBlank;
 import javax.validation.constraints.NotNull;
+import java.util.Date;
 
 /**
  * @author wzy
@@ -32,6 +34,9 @@
     @ApiModelProperty(value = "支付凭证")
     private String payImage;
 
+    @ApiModelProperty(value = "入住时间")
+    private Date useTime;
+
     @ApiModelProperty(value = "兑换卷ID")
     private Long rollId;
 }
diff --git a/src/main/java/cc/mrbird/febs/mall/entity/MallGoods.java b/src/main/java/cc/mrbird/febs/mall/entity/MallGoods.java
index 4ca77a4..ba25dab 100644
--- a/src/main/java/cc/mrbird/febs/mall/entity/MallGoods.java
+++ b/src/main/java/cc/mrbird/febs/mall/entity/MallGoods.java
@@ -130,4 +130,6 @@
     private BigDecimal levelTwoPrice;
     private BigDecimal levelThreePrice;
 
+    private String houseName;
+    private String houseAddress;
 }
diff --git a/src/main/java/cc/mrbird/febs/mall/entity/MallMemberClass.java b/src/main/java/cc/mrbird/febs/mall/entity/MallMemberClass.java
new file mode 100644
index 0000000..b2e4604
--- /dev/null
+++ b/src/main/java/cc/mrbird/febs/mall/entity/MallMemberClass.java
@@ -0,0 +1,27 @@
+package cc.mrbird.febs.mall.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+@Data
+@TableName("mall_member_class")
+public class MallMemberClass {
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id",type = IdType.AUTO)
+    private Long id;
+
+    private Long memberId;
+
+    private Long orderId;
+    //课程名称,即商品名称
+    private String className;
+    //课程图片
+    private String classPic;
+    //课程链接
+    private String classUrl;
+
+
+}
diff --git a/src/main/java/cc/mrbird/febs/mall/entity/MallMemberHouse.java b/src/main/java/cc/mrbird/febs/mall/entity/MallMemberHouse.java
new file mode 100644
index 0000000..226e12f
--- /dev/null
+++ b/src/main/java/cc/mrbird/febs/mall/entity/MallMemberHouse.java
@@ -0,0 +1,36 @@
+package cc.mrbird.febs.mall.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+@TableName("mall_member_house")
+public class MallMemberHouse {
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id",type = IdType.AUTO)
+    private Long id;
+
+    private Long memberId;
+    //创建时间
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date createTime;
+    //入住时间
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date updateTime;
+    //过期时间
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date unuseTime;
+    //1:待使用 2:已使用3:已过期
+    private Integer state;
+    //订单ID
+    private Long orderId;
+    private String houseName;
+    private String houseAddress;
+
+}
diff --git a/src/main/java/cc/mrbird/febs/mall/entity/MallOrderInfo.java b/src/main/java/cc/mrbird/febs/mall/entity/MallOrderInfo.java
index cef66a2..a52ebfc 100644
--- a/src/main/java/cc/mrbird/febs/mall/entity/MallOrderInfo.java
+++ b/src/main/java/cc/mrbird/febs/mall/entity/MallOrderInfo.java
@@ -69,6 +69,11 @@
      */
     private Date receivingTime;
 
+    /**
+     * 入住时间
+     */
+    private Date useTime;
+
     @TableField(exist = false)
     private List<MallOrderItem> items;
 
diff --git a/src/main/java/cc/mrbird/febs/mall/mapper/MallMemberClassMapper.java b/src/main/java/cc/mrbird/febs/mall/mapper/MallMemberClassMapper.java
new file mode 100644
index 0000000..1caecbe
--- /dev/null
+++ b/src/main/java/cc/mrbird/febs/mall/mapper/MallMemberClassMapper.java
@@ -0,0 +1,7 @@
+package cc.mrbird.febs.mall.mapper;
+
+import cc.mrbird.febs.mall.entity.MallMemberClass;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+public interface MallMemberClassMapper extends BaseMapper<MallMemberClass> {
+}
diff --git a/src/main/java/cc/mrbird/febs/mall/mapper/MallMemberHouseMapper.java b/src/main/java/cc/mrbird/febs/mall/mapper/MallMemberHouseMapper.java
new file mode 100644
index 0000000..992592b
--- /dev/null
+++ b/src/main/java/cc/mrbird/febs/mall/mapper/MallMemberHouseMapper.java
@@ -0,0 +1,7 @@
+package cc.mrbird.febs.mall.mapper;
+
+import cc.mrbird.febs.mall.entity.MallMemberHouse;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+public interface MallMemberHouseMapper extends BaseMapper<MallMemberHouse> {
+}
diff --git a/src/main/java/cc/mrbird/febs/mall/service/IAgentService.java b/src/main/java/cc/mrbird/febs/mall/service/IAgentService.java
index ce1d17e..e0f892d 100644
--- a/src/main/java/cc/mrbird/febs/mall/service/IAgentService.java
+++ b/src/main/java/cc/mrbird/febs/mall/service/IAgentService.java
@@ -15,4 +15,6 @@
     void updateMemberInfo(String str);
 
     void orderGetMsg(String str);
+
+    void rollSendMsg(Long orderId);
 }
diff --git a/src/main/java/cc/mrbird/febs/mall/service/impl/AdminMallGoodsService.java b/src/main/java/cc/mrbird/febs/mall/service/impl/AdminMallGoodsService.java
index c65d6f8..e80ebd8 100644
--- a/src/main/java/cc/mrbird/febs/mall/service/impl/AdminMallGoodsService.java
+++ b/src/main/java/cc/mrbird/febs/mall/service/impl/AdminMallGoodsService.java
@@ -83,6 +83,13 @@
             }
         }
 
+        if(addMallGoodsDto.getIsNormal() == 5){
+            if(ObjectUtil.isEmpty(addMallGoodsDto.getHouseAddress())
+                    || ObjectUtil.isEmpty(addMallGoodsDto.getHouseName())){
+                return new FebsResponse().fail().message("请填写酒店信息");
+            }
+        }
+
 
         // 付费商品
         if (addMallGoodsDto.getGoodsType() != 2) {
@@ -345,6 +352,13 @@
             }
         }
 
+        if(mallGoodsUpdateDto.getIsNormal() == 5){
+            if(ObjectUtil.isEmpty(mallGoodsUpdateDto.getHouseAddress())
+                    || ObjectUtil.isEmpty(mallGoodsUpdateDto.getHouseName())){
+                return new FebsResponse().fail().message("请填写酒店信息");
+            }
+        }
+
         if (mallGoodsUpdateDto.getGoodsType() != 2) {
             Long categoryId = mallGoodsUpdateDto.getCategoryId();
             if (ObjectUtil.isEmpty(categoryId)) {
diff --git a/src/main/java/cc/mrbird/febs/mall/service/impl/AgentServiceImpl.java b/src/main/java/cc/mrbird/febs/mall/service/impl/AgentServiceImpl.java
index 59f271a..d76f35a 100644
--- a/src/main/java/cc/mrbird/febs/mall/service/impl/AgentServiceImpl.java
+++ b/src/main/java/cc/mrbird/febs/mall/service/impl/AgentServiceImpl.java
@@ -10,6 +10,9 @@
 import cc.mrbird.febs.mall.mapper.*;
 import cc.mrbird.febs.mall.service.*;
 import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.date.DateField;
+import cn.hutool.core.date.DateTime;
+import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.core.util.StrUtil;
 import cn.hutool.crypto.SecureUtil;
@@ -52,6 +55,8 @@
     private final IApiMallMemberWalletService memberWalletService;
     private final MallRollPerkMapper mallRollPerkMapper;
     private final IMallMoneyFlowService mallMoneyFlowService;
+    private final MallMemberClassMapper mallMemberClassMapper;
+    private final MallMemberHouseMapper mallMemberHouseMapper;
 
     @Override
     @Transactional(rollbackFor = Exception.class)
@@ -405,28 +410,84 @@
         }
     }
 
+    @Override
+    public void rollSendMsg(Long orderId) {
+        MallOrderInfo mallOrderInfo = mallOrderInfoMapper.selectById(orderId);
+        if(ObjectUtil.isEmpty(mallOrderInfo)){
+            return;
+        }
+        Long memberId = mallOrderInfo.getMemberId();
+        MallMember mallMember = memberMapper.selectById(memberId);
+        if(ObjectUtil.isEmpty(mallMember)){
+            return;
+        }
+
+        List<MallOrderItem> mallOrderItemList = mallOrderItemMapper.selectListByOrderId(orderId);
+        if(CollUtil.isEmpty(mallOrderItemList)){
+            return;
+        }
+        MallOrderItem mallOrderItem = mallOrderItemList.get(0);
+        String goodsName = mallOrderItem.getGoodsName();
+        String skuImage = mallOrderItem.getSkuImage();
+        Long goodsId = mallOrderItem.getGoodsId();
+        MallGoods mallGoods = mallGoodsMapper.selectById(goodsId);
+        if(ObjectUtil.isEmpty(mallGoods)){
+            return;
+        }
+        Integer isNormal = mallGoods.getIsNormal();
+        if(4 == isNormal){
+            //课程卷
+            MallMemberClass mallMemberClass = new MallMemberClass();
+            mallMemberClass.setMemberId(mallMember.getId());
+            mallMemberClass.setOrderId(orderId);
+            mallMemberClass.setClassName(goodsName);
+            mallMemberClass.setClassPic(skuImage);
+            mallMemberClass.setClassUrl(skuImage);
+            mallMemberClassMapper.insert(mallMemberClass);
+            return;
+        }else if(5 == isNormal){
+            //课程卷
+            MallMemberHouse mallMemberHouse = new MallMemberHouse();
+            mallMemberHouse.setOrderId(orderId);
+            mallMemberHouse.setMemberId(memberId);
+            mallMemberHouse.setState(1);
+            mallMemberHouse.setCreateTime(DateUtil.date());
+            mallMemberHouse.setUpdateTime(mallOrderInfo.getUseTime());
+            mallMemberHouse.setUnuseTime(DateUtil.date().offset(DateField.HOUR_OF_DAY,48));
+            mallMemberHouse.setHouseName(mallGoods.getHouseName());
+            mallMemberHouse.setHouseAddress(mallGoods.getHouseAddress());
+            mallMemberHouseMapper.insert(mallMemberHouse);
+            return;
+        }else{
+            return;
+        }
+    }
+
     public static void main(String[] args) {
 
-        RestTemplate restTemplate = new RestTemplate();
-        String accessToken = "70__DR_q_qmjcMfPQEBwmjdfJFWnpml55Bq6JK2vt9MMdcRLsHaYM1BQGFWzLUISjcFC8HAYTKOaPJH93KHNvo4KIeMZkxFF2qP66nAdygUQ6c";
-        String openId = "oXL7Y6LW5KGQTbmmP5W3JljjApSo";
-        String requrl = "https://api.weixin.qq.com/sns/userinfo?access_token="+accessToken+"&openid="+openId+"&lang=zh_CN";
-        // 创建一个StringHttpMessageConverter,并设置字符集为UTF-8
-        StringHttpMessageConverter stringConverter = new StringHttpMessageConverter(Charset.forName("UTF-8"));
-        stringConverter.setSupportedMediaTypes(Collections.singletonList(MediaType.TEXT_PLAIN));
-        // 将StringHttpMessageConverter添加到RestTemplate的消息转换器列表中
-        restTemplate.getMessageConverters().add(0, stringConverter);
-        // 创建HttpHeaders对象,设置Accept头部的值为"text/plain;charset=UTF-8"
-        HttpHeaders headers = new HttpHeaders();
-        headers.setAccept(Collections.singletonList(MediaType.TEXT_PLAIN));
-        headers.set(HttpHeaders.ACCEPT_CHARSET, "UTF-8");
+        DateTime offset = DateUtil.date().offset(DateField.HOUR_OF_DAY, 48);
+        System.out.println(offset);
 
-        String responseStr = restTemplate.getForObject(requrl, String.class);
-        net.sf.json.JSONObject json = net.sf.json.JSONObject.fromObject(responseStr);
-        log.info("微信获取用户信息={}", json);
-        String nickname = json.getString("nickname");
-        String headImgUrl = json.getString("headimgurl");
-        System.out.println(nickname);
-        System.out.println(headImgUrl);
+//        RestTemplate restTemplate = new RestTemplate();
+//        String accessToken = "70__DR_q_qmjcMfPQEBwmjdfJFWnpml55Bq6JK2vt9MMdcRLsHaYM1BQGFWzLUISjcFC8HAYTKOaPJH93KHNvo4KIeMZkxFF2qP66nAdygUQ6c";
+//        String openId = "oXL7Y6LW5KGQTbmmP5W3JljjApSo";
+//        String requrl = "https://api.weixin.qq.com/sns/userinfo?access_token="+accessToken+"&openid="+openId+"&lang=zh_CN";
+//        // 创建一个StringHttpMessageConverter,并设置字符集为UTF-8
+//        StringHttpMessageConverter stringConverter = new StringHttpMessageConverter(Charset.forName("UTF-8"));
+//        stringConverter.setSupportedMediaTypes(Collections.singletonList(MediaType.TEXT_PLAIN));
+//        // 将StringHttpMessageConverter添加到RestTemplate的消息转换器列表中
+//        restTemplate.getMessageConverters().add(0, stringConverter);
+//        // 创建HttpHeaders对象,设置Accept头部的值为"text/plain;charset=UTF-8"
+//        HttpHeaders headers = new HttpHeaders();
+//        headers.setAccept(Collections.singletonList(MediaType.TEXT_PLAIN));
+//        headers.set(HttpHeaders.ACCEPT_CHARSET, "UTF-8");
+//
+//        String responseStr = restTemplate.getForObject(requrl, String.class);
+//        net.sf.json.JSONObject json = net.sf.json.JSONObject.fromObject(responseStr);
+//        log.info("微信获取用户信息={}", json);
+//        String nickname = json.getString("nickname");
+//        String headImgUrl = json.getString("headimgurl");
+//        System.out.println(nickname);
+//        System.out.println(headImgUrl);
     }
 }
diff --git a/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallOrderInfoServiceImpl.java b/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallOrderInfoServiceImpl.java
index 2db5954..fa38e24 100644
--- a/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallOrderInfoServiceImpl.java
+++ b/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallOrderInfoServiceImpl.java
@@ -404,6 +404,9 @@
             default:
 
         }
+        if(ObjectUtil.isNotEmpty(payOrderDto.getUseTime())){
+            orderInfo.setUseTime(payOrderDto.getUseTime());
+        }
 
         //订单支付成功产生一个提货码
         String takeCode = ShareCodeUtil.toSerialCode(orderInfo.getId());
@@ -414,6 +417,9 @@
         stringBuffer.append("@");
         stringBuffer.append(amountActualMsg);
         agentProducer.sendOrderGetMsg(stringBuffer.toString());
+        if("4".equals(payOrderDto.getType())){
+            agentProducer.sendRollSendMsg(orderInfo.getId());
+        }
 
 //        OrderStateDto orderStateDto = new OrderStateDto();
 //        orderStateDto.setOrderNo(orderInfo.getOrderNo());
diff --git a/src/main/java/cc/mrbird/febs/rabbit/constants/QueueConstants.java b/src/main/java/cc/mrbird/febs/rabbit/constants/QueueConstants.java
index b72a74e..4b1d407 100644
--- a/src/main/java/cc/mrbird/febs/rabbit/constants/QueueConstants.java
+++ b/src/main/java/cc/mrbird/febs/rabbit/constants/QueueConstants.java
@@ -23,4 +23,6 @@
      *  3:是否返利
      */
     public static final String YWG_ORDER_GET = "queue_ywg_order_get";
+
+    public static final String YWG_ROLL_SEND = "queue_ywg_roll_send";
 }
diff --git a/src/main/java/cc/mrbird/febs/rabbit/consumer/AgentConsumer.java b/src/main/java/cc/mrbird/febs/rabbit/consumer/AgentConsumer.java
index bcdb7d9..2c420a4 100644
--- a/src/main/java/cc/mrbird/febs/rabbit/consumer/AgentConsumer.java
+++ b/src/main/java/cc/mrbird/febs/rabbit/consumer/AgentConsumer.java
@@ -112,4 +112,14 @@
             log.error("支付后同意验证:", e);
         }
     }
+
+    @RabbitListener(queues = QueueConstants.YWG_ROLL_SEND)
+    public void rollSendMsg(Long orderId) {
+        log.info("支付后生成我的课程或者我的民宿卷:{}", orderId);
+        try {
+            agentService.rollSendMsg(orderId);
+        } catch (Exception e) {
+            log.error("支付后生成我的课程或者我的民宿卷:", e);
+        }
+    }
 }
diff --git a/src/main/java/cc/mrbird/febs/rabbit/enumerates/RabbitQueueEnum.java b/src/main/java/cc/mrbird/febs/rabbit/enumerates/RabbitQueueEnum.java
index ce13aaa..883ebf8 100644
--- a/src/main/java/cc/mrbird/febs/rabbit/enumerates/RabbitQueueEnum.java
+++ b/src/main/java/cc/mrbird/febs/rabbit/enumerates/RabbitQueueEnum.java
@@ -6,6 +6,7 @@
 @Getter
 public enum RabbitQueueEnum {
 
+    YWG_ROLL_SEND("exchange_ywg_roll_send", "route_key_ywg_roll_send",QueueConstants.YWG_ROLL_SEND),
     YWG_ORDER_GET("exchange_ywg_order_get", "route_key_ywg_order_get",QueueConstants.YWG_ORDER_GET),
     YWG_MEMBER_INFO("exchange_ywg_member_info", "route_key_ywg_member_info",QueueConstants.YWG_MEMBER_INFO),
     YWG_MEMBER_SUB_SCAN("exchange_ywg_member_sub_scan", "route_key_ywg_member_sub_scan",QueueConstants.YWG_MEMBER_SUB_SCAN),
diff --git a/src/main/java/cc/mrbird/febs/rabbit/producter/AgentProducer.java b/src/main/java/cc/mrbird/febs/rabbit/producter/AgentProducer.java
index 1cdaf61..166de17 100644
--- a/src/main/java/cc/mrbird/febs/rabbit/producter/AgentProducer.java
+++ b/src/main/java/cc/mrbird/febs/rabbit/producter/AgentProducer.java
@@ -102,4 +102,9 @@
          */
         rabbitTemplate.convertAndSend(RabbitQueueEnum.YWG_ORDER_GET.getExchange(), RabbitQueueEnum.YWG_ORDER_GET.getRoute(), str);
     }
+
+    public void sendRollSendMsg(Long orderId) {
+        log.info("支付后生成我的课程或者我的民宿卷:{}", orderId);
+        rabbitTemplate.convertAndSend(RabbitQueueEnum.YWG_ROLL_SEND.getExchange(), RabbitQueueEnum.YWG_ROLL_SEND.getRoute(), orderId);
+    }
 }
diff --git a/src/main/resources/templates/febs/views/modules/goods/goodsAddNew.html b/src/main/resources/templates/febs/views/modules/goods/goodsAddNew.html
index db71eb2..5724f53 100644
--- a/src/main/resources/templates/febs/views/modules/goods/goodsAddNew.html
+++ b/src/main/resources/templates/febs/views/modules/goods/goodsAddNew.html
@@ -106,13 +106,19 @@
                                             </div>
                                         </div>
 
-<!--                                        <div class="layui-form-item febs-hide tc-set">-->
-<!--                                            <label class="layui-form-label">静态倍数</label>-->
-<!--                                            <div class="layui-input-block">-->
-<!--                                                <input type="text" name="staticMulti" placeholder="请输入静态倍数" autocomplete="off" class="layui-input">-->
-<!--                                                <div class="layui-form-mid layui-word-aux">支付后,赠送(购买金额*静态倍数)的赠送积分</div>-->
-<!--                                            </div>-->
-<!--                                        </div>-->
+                                        <div class="layui-form-item febs-hide house-set">
+                                            <label class="layui-form-label">酒店名称:</label>
+                                            <div class="layui-input-block">
+                                                <input type="text" name="houseName" autocomplete="off" class="layui-input">
+                                            </div>
+                                        </div>
+
+                                        <div class="layui-form-item febs-hide house-set">
+                                            <label class="layui-form-label">酒店地址:</label>
+                                            <div class="layui-input-block">
+                                                <input type="text" name="houseAddress" autocomplete="off" class="layui-input">
+                                            </div>
+                                        </div>
 
 <!--                                        <div class="layui-form-item febs-hide tc-set">-->
 <!--                                            <label class="layui-form-label">静态占比(%)</label>-->
@@ -763,6 +769,13 @@
                     $(this).hide();
                 }
             })
+            $('.house-set').each(function() {
+                if (data.value == 5) {
+                    $(this).show();
+                } else {
+                    $(this).hide();
+                }
+            })
         });
     });
 </script>
\ No newline at end of file
diff --git a/src/main/resources/templates/febs/views/modules/goods/goodsUpdateNew.html b/src/main/resources/templates/febs/views/modules/goods/goodsUpdateNew.html
index 2c50f4a..1134308 100644
--- a/src/main/resources/templates/febs/views/modules/goods/goodsUpdateNew.html
+++ b/src/main/resources/templates/febs/views/modules/goods/goodsUpdateNew.html
@@ -115,6 +115,20 @@
                                             </div>
                                         </div>
 
+                                        <div class="layui-form-item febs-hide house-set">
+                                            <label class="layui-form-label">酒店名称:</label>
+                                            <div class="layui-input-block">
+                                                <input type="text" name="houseName" autocomplete="off" class="layui-input">
+                                            </div>
+                                        </div>
+
+                                        <div class="layui-form-item febs-hide house-set">
+                                            <label class="layui-form-label">酒店地址:</label>
+                                            <div class="layui-input-block">
+                                                <input type="text" name="houseAddress" autocomplete="off" class="layui-input">
+                                            </div>
+                                        </div>
+
 <!--                                        <div class="layui-form-item febs-hide tc-set">-->
 <!--                                            <label class="layui-form-label">静态倍数</label>-->
 <!--                                            <div class="layui-input-block">-->
@@ -777,6 +791,8 @@
                 "levelOnePrice": goodsInfo.levelOnePrice,
                 "levelTwoPrice": goodsInfo.levelTwoPrice,
                 "levelThreePrice": goodsInfo.levelThreePrice,
+                "houseName": goodsInfo.houseName,
+                "houseAddress": goodsInfo.houseAddress,
                 "costPrice": goodsInfo.costPrice,
                 "isSku": goodsInfo.isSku,
                 "thumb": goodsInfo.thumb,
@@ -797,6 +813,10 @@
 
             if (goodsInfo.isNormal == 2) {
                 $(".tc-set").show();
+            }
+
+            if (goodsInfo.isNormal == 5) {
+                $(".house-set").show();
             }
 
             if (goodsInfo.levelTwoPrice == 1) {
@@ -889,6 +909,13 @@
                     $(this).hide();
                 }
             })
+            $('.house-set').each(function() {
+                if (data.value == 5) {
+                    $(this).show();
+                } else {
+                    $(this).hide();
+                }
+            })
         });
 
         form.on('radio(hasRoll)', function(data){

--
Gitblit v1.9.1