Преглед изворни кода

Merge commit 'refs/tags/jenkins-back-end-727^{}' into release

release_toaliyun_real
hupeng пре 7 година
родитељ
комит
c8fc3ed318
3 измењених фајлова са 35 додато и 23 уклоњено
  1. +0
    -4
      mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java
  2. +21
    -5
      mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java
  3. +14
    -14
      mallinkService/src/main/resources/mapper/WxOrderMapper.xml

+ 0
- 4
mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java Прегледај датотеку

@@ -407,10 +407,6 @@ public class WxFlowServiceImpl implements WxFlowService {
String str = getVariableByKey(variables,"contractType");
if(StringUtils.isNotBlank(str)){
contractType = Integer.parseInt(str);

if(3 == contractType){ //物业合同
wxPropertyContractService.updatePropertyContractStatus(businessId);
}
}
updateBusinessStatus(businessId,flowType,contractType,EnumRentContractAppStatus.FINISH.getCode(),supplement);



+ 21
- 5
mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java Прегледај датотеку

@@ -1085,30 +1085,46 @@ public class WxOrderServiceImpl implements WxOrderService {

public void queryOrderSummary(String tenantId, Map<String, Object> result) {
String systemTime = DateUtils.getSystemTime("yyyy-MM-dd");
//全部商户个
//
Map<String, Object> params = new HashMap<>();
params.put("tenantId", tenantId);
String thirtyTime = DateUtils.getTimeBefore(29, new Date());
params.put("startdate", thirtyTime + " 00:00:00");
params.put("enddate", systemTime + " 23:59:59");
Long allOrderSummary=wxOrderMapper.queryOrderForSum(params);
params.put("order_status", "1");
Long allPayOrderSummary=wxOrderMapper.queryOrderForSum(params);
params.put("order_status", "4");
Long allRefundOrderSummary=wxOrderMapper.queryOrderForSum(params);
Long allOrderSummary = allPayOrderSummary - allRefundOrderSummary;
result.put("allOrderSummary",allOrderSummary);
//今日
params.put("startdate", systemTime + " 00:00:00");
params.put("enddate", systemTime + " 23:59:59");
Long todayOrderSummary=wxOrderMapper.queryOrderForSum(params);
params.put("order_status", "1");
Long todayPayOrderSummary=wxOrderMapper.queryOrderForSum(params);
params.put("order_status", "4");
Long todayRefundOrderSummary=wxOrderMapper.queryOrderForSum(params);
Long todayOrderSummary=todayPayOrderSummary-todayRefundOrderSummary;
result.put("todayOrderSummary",todayOrderSummary);
//昨日
String yesterday = DateUtils.getTimeBefore(1, new Date());
params.put("startdate", yesterday + " 00:00:00");
params.put("enddate", yesterday + " 23:59:59");
Long yesterdayOrderSummary=wxOrderMapper.queryOrderForSum(params);
params.put("order_status", "1");
Long yesterdayPayOrderSummary=wxOrderMapper.queryOrderForSum(params);
params.put("order_status", "4");
Long yesterdayRefundOrderSummary=wxOrderMapper.queryOrderForSum(params);
Long yesterdayOrderSummary = yesterdayPayOrderSummary - yesterdayRefundOrderSummary;
result.put("yesterdayOrderSummary",yesterdayOrderSummary);
//上周
String lastweek = DateUtils.getTimeBefore(7, new Date());
params.put("startdate", lastweek + " 00:00:00");
params.put("enddate", lastweek + " 23:59:59");
Long lastweekOrderSummary=wxOrderMapper.queryOrderForSum(params);
params.put("order_status", "1");
Long lastweekPayOrderSummary=wxOrderMapper.queryOrderForSum(params);
params.put("order_status", "4");
Long lastweekRefundOrderSummary=wxOrderMapper.queryOrderForSum(params);
Long lastweekOrderSummary=lastweekPayOrderSummary - lastweekRefundOrderSummary;
result.put("lastweekOrderSummary",lastweekOrderSummary);
//商户数日环比
if (yesterdayOrderSummary > 0) {


+ 14
- 14
mallinkService/src/main/resources/mapper/WxOrderMapper.xml Прегледај датотеку

@@ -471,7 +471,7 @@
o.order_status,o.create_date,o.update_date,o.detail,'[多商户交易]' merchant_name,cubi.`name` c_user_name,cubi.phone
from
(
select o.* from wx_order o where o.type=0 and o.id in(
select o.* from wx_order o where o.type=0 and o.order_status in (1,4) and o.id in(
select o.id from wx_order o left join wx_coupon_merchant cm
on o.product_id=cm.product_id group by o.id having count(o.id)>1)) o
left join wx_c_user_basic_info cubi on o.c_user_id=cubi.id
@@ -480,7 +480,7 @@
o.order_status,o.create_date,o.update_date,o.detail,m.`name` merchant_name,cubi.`name` c_user_name,cubi.phone
from(
select o.*,cm.merchant_id from (
select o.* from wx_order o where o.type=0 and o.id not in(
select o.* from wx_order o where o.type=0 and o.order_status in (1,4) and o.id not in(
select o.id from wx_order o left join wx_coupon_merchant cm
on o.product_id=cm.product_id group by o.id having count(o.id)>1)
) o
@@ -488,7 +488,7 @@
union all
select o.*,mbu.merchant_id from wx_order o
left join wx_merchant_b_user mbu on o.product_id=mbu.id
where type in (1,2))o
where o.type in (1,2) and o.order_status in (1,4) ) o
left join wx_merchant m on o.merchant_id=m.id
left join wx_c_user_basic_info cubi on o.c_user_id=cubi.id
union all
@@ -496,7 +496,7 @@
o.order_status,o.create_date,o.update_date,o.detail,m.`name` merchant_name,cubi.`name` c_user_name,cubi.phone
from wx_order o left join wx_merchant m on o.product_id=m.id
left join wx_c_user_basic_info cubi on o.c_user_id=cubi.id
where o.type=3
where o.type=3 and o.order_status in (1,4)
) o
<where>
<if test="tenantId!=null">
@@ -516,49 +516,49 @@
<select id="queryOrderForMerchantCount" resultType="Long" parameterType="hashmap">
select count(*) merchantCount from (
select distinct merchant_id from (
select o.*,m.`name` merchantName from (
select o.*, m.`name` merchantName from (
select o.*,cm.merchant_id from wx_order o
left join wx_coupon_merchant cm on o.product_id=cm.product_id
where type in (0,3)) o
where o.type in (0,3) and o.order_status in (1,4)) o
left join wx_merchant m on o.merchant_id=m.id
union all
select o.*,m.`name` merchantName from (
select o.*,mbu.merchant_id from wx_order o
left join wx_merchant_b_user mbu on o.product_id=mbu.id
where type in (1,2)) o
where o.type in (1,2) and o.order_status in (1,4)) o
left join wx_merchant m on o.merchant_id=m.id
) o
<where>
<if test="tenantId!=null">
and tenant_id =#{tenantId}
and o.tenant_id =#{tenantId}
</if>
<if test="startdate!=null and enddate!=null">
and create_date between #{startdate} and #{enddate}
and o.create_date between #{startdate} and #{enddate}
</if>
</where>
) o
</select>
<select id="queryOrderForSum" resultType="Long" parameterType="hashmap">
select ifnull(sum(payment),0) payment from (
select ifnull(sum(o.payment),0) payment from (
select o.*,m.`name` merchantName from (
select o.*,cm.merchant_id from wx_order o
left join wx_coupon_merchant cm on o.product_id=cm.product_id
where type in (0,3)) o
where o.type in (0,3) and o.order_status = #{order_status}) o
left join wx_merchant m on o.merchant_id=m.id
union all
select o.*,m.`name` merchantName from (
select o.*,mbu.merchant_id from wx_order o
left join wx_merchant_b_user mbu on o.product_id=mbu.id
where type in (1,2)) o
where o.type in (1,2) and o.order_status = #{order_status}) o
left join wx_merchant m on o.merchant_id=m.id
) o
<where>
<if test="tenantId!=null">
and tenant_id =#{tenantId}
and o.tenant_id =#{tenantId}
</if>
<if test="startdate!=null and enddate!=null">
and create_date between #{startdate} and #{enddate}
and o.create_date between #{startdate} and #{enddate}
</if>
</where>
</select>


Loading…
Откажи
Сачувај