diff --git a/mallinkAdmin/src/main/resources/db/migration/V201907101530__CHANGE_WX_MSG_LIMIT.sql b/mallinkAdmin/src/main/resources/db/migration/V201907101530__CHANGE_WX_MSG_LIMIT.sql
new file mode 100644
index 000000000..99b4ccce8
--- /dev/null
+++ b/mallinkAdmin/src/main/resources/db/migration/V201907101530__CHANGE_WX_MSG_LIMIT.sql
@@ -0,0 +1,2 @@
+alter table `wx_msg_limit`
+change column `type` `type` tinyint(3) DEFAULT '0' COMMENT '1: 短信-验证码(24小时10条)2:短信-营销(24小时3条) 10:prepay_id(7天内3次), 12:form_id(7天内1次), 13.open_id for 小程序统一消息限制(2天内1次),14.open_id for 公众号模板消息限制(2天内1次)';
diff --git a/mallinkService/src/main/java/com/iformall/domain/vo/WxCouponOrderBVo.java b/mallinkService/src/main/java/com/iformall/domain/vo/WxCouponOrderBVo.java
index 57216490b..31236e152 100644
--- a/mallinkService/src/main/java/com/iformall/domain/vo/WxCouponOrderBVo.java
+++ b/mallinkService/src/main/java/com/iformall/domain/vo/WxCouponOrderBVo.java
@@ -53,6 +53,14 @@ public class WxCouponOrderBVo extends WxCouponOrder{
this.cUserPhone = cUserPhone;
}
+ public String getcuserPhone() {
+ return cUserPhone;
+ }
+
+ public void setcuserPhone(String cUserPhone) {
+ this.cUserPhone = cUserPhone;
+ }
+
@Excel(name = "会员手机号", width = 20, orderNum = "13")
@io.swagger.annotations.ApiModelProperty(value="c用户绑定的手机号",name="cUserPhone")
private String cUserPhone;
@@ -108,6 +116,22 @@ public class WxCouponOrderBVo extends WxCouponOrder{
@io.swagger.annotations.ApiModelProperty(value = "补贴类型", name = "subsidyType")
private Integer subsidyType;
+ public String getbUserName() {
+ return bUserName;
+ }
+
+ public void setbUserName(String bUserName) {
+ this.bUserName = bUserName;
+ }
+
+ public String getbuserName() {
+ return bUserName;
+ }
+
+ public void setbuserName(String bUserName) {
+ this.bUserName = bUserName;
+ }
+
@io.swagger.annotations.ApiModelProperty(value="b端用户姓名",name="bUserName")
private String bUserName;
@io.swagger.annotations.ApiModelProperty(value="b端用户手机号",name="bUserPhone")
diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java
index 94d5af5c5..59d1cd53a 100644
--- a/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java
+++ b/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java
@@ -241,6 +241,7 @@ public class WxFlowServiceImpl implements WxFlowService {
if(EnumRentContractAppStatus.FINISH.getCode().intValue() == applyStatus.intValue()) {
//作废
wxCoupon.setStatus(EnumCouponStatus.COUPON_STATUS_TAKE_OFFF.getCode());
+ wxCouponService.saveOrUpdate(wxCoupon);
}
}
wxCoupon.setApprovalType(operateType);
diff --git a/mallinkService/src/main/resources/mapper/WxBillRentMapper.xml b/mallinkService/src/main/resources/mapper/WxBillRentMapper.xml
index d26360059..a5d822835 100644
--- a/mallinkService/src/main/resources/mapper/WxBillRentMapper.xml
+++ b/mallinkService/src/main/resources/mapper/WxBillRentMapper.xml
@@ -113,7 +113,9 @@
and d.`status` = #{depositStatus}
and br.`id` = #{id}
and br.`merchant_id` = #{merchantId}
- and m.`name` like concat('%',#{merchantName},'%')
+ and r.merchant_name like
+ concat('%',#{merchantName},'%')
+
and br.`is_del` = #{isDel}
and br.`rent_contract_id` = #{rentContractId}
and br.`pay_way` = #{payWay}
diff --git a/mallinkService/src/main/resources/mapper/WxBusinessMapper.xml b/mallinkService/src/main/resources/mapper/WxBusinessMapper.xml
index a4b80a443..bbc917743 100644
--- a/mallinkService/src/main/resources/mapper/WxBusinessMapper.xml
+++ b/mallinkService/src/main/resources/mapper/WxBusinessMapper.xml
@@ -86,62 +86,62 @@
round(
(select if(sum(mtd.trade_amt) is null,0,sum(mtd.trade_amt))
from wx_merchant m
- left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and mtd.create_date between #{startdate} and #{enddate} and m.status = 1)
+ left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and mtd.create_date between #{startdate} and #{enddate} and m.status = 1 and m.is_del = 0 )
/100,2) volume,
round(
(select if(sum(mtd.trade_amt) is null,0,sum(mtd.trade_amt))
from wx_merchant m
- left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and mtd.create_date between #{startdate} and #{enddate} and m.status = 1)
+ left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and mtd.create_date between #{startdate} and #{enddate} and m.status = 1 and m.is_del = 0 )
/
(select if(sum(ws.operation_area) is null,0,sum(ws.operation_area))
from wx_merchant m
left join wx_merchant_shop mtd on mtd.merchant_id = m.id
left join wx_shop ws on(mtd.shop_id = ws.id)
- where m.business_id = b.id and m.tenant_id=#{tenantId} and m.status = 1)
+ where m.business_id = b.id and m.tenant_id=#{tenantId} and m.status = 1 and m.is_del = 0 )
/100,2) sale,
round(
(select
(select if(sum(br.receive_pay) is null,0,sum(br.receive_pay)) receive_pay from wx_merchant m
- left join wx_bill_rent br on(br.merchant_id=m.id) where m.business_id = b.id and m.tenant_id=#{tenantId} and br.receive_date between #{startdate} and #{enddate} and m.status = 1)
+ left join wx_bill_rent br on(br.merchant_id=m.id) where m.business_id = b.id and m.tenant_id=#{tenantId} and br.receive_date between #{startdate} and #{enddate} and m.status = 1 and m.is_del = 0 )
+
(select if(sum(br.receive_pay) is null,0,sum(br.receive_pay)) receive_pay from wx_merchant m
- left join wx_bill_property br on(br.merchant_id=m.id) where m.business_id = b.id and m.tenant_id=#{tenantId} and br.receive_date between #{startdate} and #{enddate} and m.status = 1)
+ left join wx_bill_property br on(br.merchant_id=m.id) where m.business_id = b.id and m.tenant_id=#{tenantId} and br.receive_date between #{startdate} and #{enddate} and m.status = 1 and m.is_del = 0 )
from dual) /
(select if(sum(ws.operation_area) is null,0,sum(ws.operation_area))
from wx_merchant m
left join wx_merchant_shop mtd on mtd.merchant_id = m.id
left join wx_shop ws on(mtd.shop_id = ws.id)
- where m.business_id = b.id and m.tenant_id=#{tenantId} and m.status = 1)
+ where m.business_id = b.id and m.tenant_id=#{tenantId} and m.status = 1 and m.is_del = 0 )
/100,2) rent,
round(
round(
(select if(sum(mtd.trade_amt) is null,0,sum(mtd.trade_amt))
from wx_merchant m
- left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and mtd.create_date between #{startdate} and #{enddate} and m.status = 1)
+ left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and mtd.create_date between #{startdate} and #{enddate} and m.status = 1 and m.is_del = 0 )
/
(select if(sum(ws.operation_area) is null,0,sum(ws.operation_area))
from wx_merchant m
left join wx_merchant_shop mtd on mtd.merchant_id = m.id
left join wx_shop ws on(mtd.shop_id = ws.id)
- where m.business_id = b.id and m.tenant_id=#{tenantId} and m.status = 1)
+ where m.business_id = b.id and m.tenant_id=#{tenantId} and m.status = 1 and m.is_del = 0 )
/100,2)
/
round(
(select
(select if(sum(br.receive_pay) is null,0,sum(br.receive_pay)) receive_pay from wx_merchant m
- left join wx_bill_rent br on(br.merchant_id=m.id) where m.business_id = b.id and m.tenant_id=#{tenantId} and br.receive_date between #{startdate} and #{enddate} and m.status = 1)
+ left join wx_bill_rent br on(br.merchant_id=m.id) where m.business_id = b.id and m.tenant_id=#{tenantId} and br.receive_date between #{startdate} and #{enddate} and m.status = 1 and m.is_del = 0 )
+
(select if(sum(br.receive_pay) is null,0,sum(br.receive_pay)) receive_pay from wx_merchant m
- left join wx_bill_property br on(br.merchant_id=m.id) where m.business_id = b.id and m.tenant_id=#{tenantId} and br.receive_date between #{startdate} and #{enddate} and m.status = 1)
+ left join wx_bill_property br on(br.merchant_id=m.id) where m.business_id = b.id and m.tenant_id=#{tenantId} and br.receive_date between #{startdate} and #{enddate} and m.status = 1 and m.is_del = 0 )
from dual) /
(select if(sum(ws.operation_area) is null,0,sum(ws.operation_area))
from wx_merchant m
left join wx_merchant_shop mtd on mtd.merchant_id = m.id
left join wx_shop ws on(mtd.shop_id = ws.id)
- where m.business_id = b.id and m.status = 1)
+ where m.business_id = b.id and m.status = 1 and m.is_del = 0 )
/100,2)
,4)
rentSaleRate,
@@ -149,10 +149,10 @@
round(
(select if(sum(mtd.trade_amt) is null,0,sum(mtd.trade_amt))
from wx_merchant m
- left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and mtd.create_date between #{startdate} and #{enddate} and m.status = 1) /
- (select count(mtd.id)
+ left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and mtd.create_date between #{startdate} and #{enddate} and m.status = 1 and m.is_del = 0 ) /
+ (select sum(mtd.trade_count)
from wx_merchant m
- left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and mtd.create_date between #{startdate} and #{enddate} and m.status = 1)
+ left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and mtd.report_date between #{startdate} and #{enddate} and m.status = 1 and m.is_del = 0 )
/100,2) comPrice
from wx_business b
@@ -169,7 +169,7 @@
from wx_merchant m
left join wx_merchant_shop mtd on mtd.merchant_id = m.id
left join wx_shop ws on(mtd.shop_id = ws.id)
- where m.status = 1 and m.business_id = #{id} and m.tenant_id=#{tenantId})
+ where m.status = 1 and m.is_del = 0 and m.business_id = #{id} and m.tenant_id=#{tenantId})
/100,2) saleRate,
round(
@@ -184,7 +184,7 @@
from wx_merchant m
left join wx_merchant_shop mtd on mtd.merchant_id = m.id
left join wx_shop ws on(mtd.shop_id = ws.id)
- where m.status = 1 and m.business_id = #{id} and m.tenant_id=#{tenantId})
+ where m.status = 1 and m.is_del = 0 and m.business_id = #{id} and m.tenant_id=#{tenantId})
/100,2)
)
,2) devoteRate
@@ -194,7 +194,7 @@
left join wx_merchant_shop wmt on wmt.merchant_id = m.id
left join wx_shop ws on(wmt.shop_id = ws.id)
where m.business_id=#{id} and m.tenant_id=#{tenantId}
- and m.status = 1
+ and m.status = 1 and m.is_del = 0
and mtd.create_date between #{startdate} and #{enddate}
group by m.id
order by devoteRate desc
diff --git a/mallinkService/src/main/resources/mapper/WxCardSpendMapper.xml b/mallinkService/src/main/resources/mapper/WxCardSpendMapper.xml
index 6f85476d5..726d958a5 100644
--- a/mallinkService/src/main/resources/mapper/WxCardSpendMapper.xml
+++ b/mallinkService/src/main/resources/mapper/WxCardSpendMapper.xml
@@ -258,7 +258,7 @@
and ms.`status` = #{status}
-
+
and ou.`phone` = #{ouPhone}