Quellcode durchsuchen

bug修改 回滚productId

张均强 vor 4 Jahren
Ursprung
Commit
a3140e4a84

+ 3 - 1
common/fire-dto/src/main/java/com/fire/dto/CustomerProduct.java

@@ -27,8 +27,10 @@ public class CustomerProduct {
     @ApiModelProperty(value = "客户编号(前端不展示)")
     private Long customerId;
 
+    @ApiModelProperty(value = "产品id")
+    private Integer productId;
 
-    @ApiModelProperty(value = "产品id(前端不展示)")
+    @ApiModelProperty(value = "产品id(前端不展示)")
     private String packageId;
 
     @ApiModelProperty(value = "产品类型(1:话费 2:流量)")

+ 1 - 0
modules/make-order/src/main/java/com/fire/order/service/impl/MakeOrderServiceImpl.java

@@ -327,6 +327,7 @@ public class MakeOrderServiceImpl implements MakeOrderService {
         order.setFlowAmount(product.getFacePrice());
         order.setAreaCode(product.getAreaNum());
         order.setPrice(product.getPrice());
+        order.setProductId(product.getProductId());
         order.setCustomerProductId(product.getCustomerProductId());
         order.setPhoneOperator(product.getOperator());
         order.setPhoneCity(phoneZone.getAreaCode());

+ 3 - 1
modules/make-order/src/main/resources/mapper/CustomerProductMapper.xml

@@ -5,6 +5,7 @@
     <resultMap type="com.fire.dto.CustomerProduct" id="CustomerProductMap">
         <result property="customerProductId" column="customer_product_id" jdbcType="INTEGER"/>
         <result property="customerId" column="customer_id" jdbcType="INTEGER"/>
+        <result property="productId" column="product_id" jdbcType="INTEGER"/>
         <result property="packageId" column="package_id" jdbcType="VARCHAR"/>
         <result property="type" column="type" jdbcType="INTEGER"/>
         <result property="price" column="price" jdbcType="NUMERIC"/>
@@ -26,7 +27,8 @@
                a.is_valid,
                b.area_name,
                b.operator,
-               b.area_num
+               b.area_num,
+               b.product_id
         from customer_product a
                  left join flow_product_info b on a.package_id = b.package_id
     </select>

+ 3 - 1
modules/make-order/src/main/resources/mapper/FlowProductInfoMapper.xml

@@ -4,6 +4,7 @@
 
     <resultMap type="com.fire.dto.FireProductInfo" id="FlowProductInfoMap">
         <result property="packageId" column="package_id" jdbcType="VARCHAR"/>
+        <result property="productId" column="product_id" jdbcType="INTEGER"/>
         <result property="productName" column="product_name" jdbcType="VARCHAR"/>
         <result property="productType" column="product_type" jdbcType="INTEGER"/>
         <result property="productPrice" column="product_price" jdbcType="NUMERIC"/>
@@ -21,7 +22,8 @@
     </select>
 
     <sql id="baseSql">
-        select package_id,
+        select product_id,
+               package_id,
                product_name,
                product_type,
                product_price,