Parcourir la source

Merge remote-tracking branch 'origin/master_saas' into master_saas

zouxuan il y a 3 ans
Parent
commit
62512bb1a5

+ 11 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/SysCouponQueryInfo.java

@@ -16,6 +16,17 @@ public class SysCouponQueryInfo extends QueryInfo {
     @ApiModelProperty("状态:0停用,1启用")
     private Integer status;
 
+    @ApiModelProperty("优惠券类型")
+    private String typeDetail;
+
+    public String getTypeDetail() {
+        return typeDetail;
+    }
+
+    public void setTypeDetail(String typeDetail) {
+        this.typeDetail = typeDetail;
+    }
+
     public CouponTypeEnum getType() {
         return type;
     }

+ 2 - 3
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentPaymentOrderServiceImpl.java

@@ -1120,12 +1120,12 @@ public class StudentPaymentOrderServiceImpl extends BaseServiceImpl<Long, Studen
         } else {
             studentPaymentOrder.setPaymentChannel("ADAPAY");
         }
-        studentPaymentOrder.setVersion(1);
+        studentPaymentOrder.setVersion(0);
         studentPaymentOrder.setOrganId(student.getOrganId());
         studentPaymentOrder.setRoutingOrganId(student.getOrganId());
         studentPaymentOrder.setTenantId(student.getTenantId());
         studentPaymentOrderService.insert(studentPaymentOrder);
-        studentPaymentOrder.setVersion(0);
+        studentPaymentOrder.setVersion(studentPaymentOrder.getVersion() +1);
 
         // 余额支付
         BigDecimal amount = studentPaymentOrder.getActualAmount();
@@ -1146,7 +1146,6 @@ public class StudentPaymentOrderServiceImpl extends BaseServiceImpl<Long, Studen
         studentPaymentOrderService.update(studentPaymentOrder);
         studentPaymentOrder.setVersion(studentPaymentOrder.getVersion() + 1);
 
-        studentPaymentOrder.setVersion(0);
         studentGoodsSell.setCouponMarketAmount(studentPaymentOrder.getCouponRemitFee());
         studentGoodsSell.setOrganId(student.getOrganId());
         studentGoodsSell.setTotalAmount(studentPaymentOrder.getActualAmount());

+ 3 - 0
mec-biz/src/main/resources/config/mybatis/SysCouponMapper.xml

@@ -152,6 +152,9 @@
 			<if test="search != null and search != ''">
 				AND (id_=#{search} OR name_ LIKE CONCAT('%', #{search}, '%'))
 			</if>
+			<if test="typeDetail != null and typeDetail != ''">
+				and #{typeDetail} = type_detail_
+			</if>
 		</where>
 	</sql>
 

+ 1 - 0
mec-mall/mall-portal/src/main/java/com/yonge/cooleshow/portal/service/impl/OmsPortalOrderServiceImpl.java

@@ -416,6 +416,7 @@ public class OmsPortalOrderServiceImpl implements OmsPortalOrderService {
         BigDecimal balanceAmount1 = MapUtil.get(data, "balanceAmount", BigDecimal.class);
         if (BigDecimal.ZERO.compareTo(balanceAmount1) !=0 ) {
             order.setIntegrationAmount(balanceAmount1);
+            order.setPayAmount(orderParam.getOrderAmount().subtract(balanceAmount1));
             orderMapper.updateByPrimaryKey(order);
         }
         result.put("pay",data);