Просмотр исходного кода

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

release_toaliyun_real
hupeng 7 лет назад
Родитель
Сommit
aa2660b938
3 измененных файлов: 17 добавлений и 22 удалений
  1. +12
    -11
      mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java
  2. +4
    -10
      mallinkService/src/main/resources/mapper/WxOrderMapper.xml
  3. +1
    -1
      mallinkService/src/main/resources/mapper/WxPropertyContractMapper.xml

+ 12
- 11
mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java Просмотреть файл

@@ -1095,8 +1095,9 @@ public class WxOrderServiceImpl implements WxOrderService {
Long allPayOrderSummary=wxOrderMapper.queryOrderForSum(params); Long allPayOrderSummary=wxOrderMapper.queryOrderForSum(params);
params.put("order_status", "4"); params.put("order_status", "4");
Long allRefundOrderSummary=wxOrderMapper.queryOrderForSum(params); Long allRefundOrderSummary=wxOrderMapper.queryOrderForSum(params);
result.put("allRefundOrderSummary", allRefundOrderSummary);
Long allOrderSummary = allPayOrderSummary - allRefundOrderSummary; Long allOrderSummary = allPayOrderSummary - allRefundOrderSummary;
result.put("allOrderSummary",allOrderSummary);
result.put("allOrderSummary",allPayOrderSummary);
//今日 //今日
params.put("startdate", systemTime + " 00:00:00"); params.put("startdate", systemTime + " 00:00:00");
params.put("enddate", systemTime + " 23:59:59"); params.put("enddate", systemTime + " 23:59:59");
@@ -1104,8 +1105,8 @@ public class WxOrderServiceImpl implements WxOrderService {
Long todayPayOrderSummary=wxOrderMapper.queryOrderForSum(params); Long todayPayOrderSummary=wxOrderMapper.queryOrderForSum(params);
params.put("order_status", "4"); params.put("order_status", "4");
Long todayRefundOrderSummary=wxOrderMapper.queryOrderForSum(params); Long todayRefundOrderSummary=wxOrderMapper.queryOrderForSum(params);
Long todayOrderSummary=todayPayOrderSummary-todayRefundOrderSummary;
result.put("todayOrderSummary",todayOrderSummary);
result.put("todayRefundOrderSummary", todayRefundOrderSummary);
result.put("todayOrderSummary",todayPayOrderSummary);
//昨日 //昨日
String yesterday = DateUtils.getTimeBefore(1, new Date()); String yesterday = DateUtils.getTimeBefore(1, new Date());
params.put("startdate", yesterday + " 00:00:00"); params.put("startdate", yesterday + " 00:00:00");
@@ -1114,8 +1115,8 @@ public class WxOrderServiceImpl implements WxOrderService {
Long yesterdayPayOrderSummary=wxOrderMapper.queryOrderForSum(params); Long yesterdayPayOrderSummary=wxOrderMapper.queryOrderForSum(params);
params.put("order_status", "4"); params.put("order_status", "4");
Long yesterdayRefundOrderSummary=wxOrderMapper.queryOrderForSum(params); Long yesterdayRefundOrderSummary=wxOrderMapper.queryOrderForSum(params);
Long yesterdayOrderSummary = yesterdayPayOrderSummary - yesterdayRefundOrderSummary;
result.put("yesterdayOrderSummary",yesterdayOrderSummary);
result.put("yesterdayRefundOrderSummary", yesterdayRefundOrderSummary);
result.put("yesterdayOrderSummary",yesterdayPayOrderSummary);
//上周 //上周
String lastweek = DateUtils.getTimeBefore(7, new Date()); String lastweek = DateUtils.getTimeBefore(7, new Date());
params.put("startdate", lastweek + " 00:00:00"); params.put("startdate", lastweek + " 00:00:00");
@@ -1124,19 +1125,19 @@ public class WxOrderServiceImpl implements WxOrderService {
Long lastweekPayOrderSummary=wxOrderMapper.queryOrderForSum(params); Long lastweekPayOrderSummary=wxOrderMapper.queryOrderForSum(params);
params.put("order_status", "4"); params.put("order_status", "4");
Long lastweekRefundOrderSummary=wxOrderMapper.queryOrderForSum(params); Long lastweekRefundOrderSummary=wxOrderMapper.queryOrderForSum(params);
Long lastweekOrderSummary=lastweekPayOrderSummary - lastweekRefundOrderSummary;
result.put("lastweekOrderSummary",lastweekOrderSummary);
result.put("lastweekRefundOrderSummary", lastweekRefundOrderSummary);
result.put("lastweekOrderSummary",lastweekPayOrderSummary);
//商户数日环比 //商户数日环比
if (yesterdayOrderSummary > 0) {
double hbd = (double) (todayOrderSummary - yesterdayOrderSummary) / yesterdayOrderSummary * 100;
if (yesterdayPayOrderSummary > 0) {
double hbd = (double) (todayPayOrderSummary - yesterdayPayOrderSummary) / yesterdayPayOrderSummary * 100;
double hb = new BigDecimal(hbd).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); double hb = new BigDecimal(hbd).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
result.put("increasedPercentSummary", hb+"%"); result.put("increasedPercentSummary", hb+"%");
} else { } else {
result.put("increasedPercentSummary", "--"); result.put("increasedPercentSummary", "--");
} }
//商户数周同比 //商户数周同比
if (lastweekOrderSummary > 0) {
double hbd = (double) (todayOrderSummary - lastweekOrderSummary) / lastweekOrderSummary * 100;
if (lastweekPayOrderSummary > 0) {
double hbd = (double) (todayPayOrderSummary - lastweekPayOrderSummary) / lastweekPayOrderSummary * 100;
double hb = new BigDecimal(hbd).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); double hb = new BigDecimal(hbd).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
result.put("increasedPercentWeekSummary", hb+"%"); result.put("increasedPercentWeekSummary", hb+"%");
} else { } else {


+ 4
- 10
mallinkService/src/main/resources/mapper/WxOrderMapper.xml Просмотреть файл

@@ -535,17 +535,11 @@
<select id="queryOrderForSum" resultType="Long" parameterType="hashmap"> <select id="queryOrderForSum" resultType="Long" parameterType="hashmap">
select ifnull(sum(o.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 o.type = 0 and o.order_status = #{order_status}) o
left join wx_merchant m on o.merchant_id=m.id
select o.* from wx_order o
where o.type = 0 and o.order_status = #{order_status}
union all 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 o.type in (1,2) and o.order_status = #{order_status}) o
left join wx_merchant m on o.merchant_id=m.id
select o.* from wx_order o
where o.type in (1,2) and o.order_status = #{order_status}
) o ) o
<where> <where>
<if test="tenantId!=null"> <if test="tenantId!=null">


+ 1
- 1
mallinkService/src/main/resources/mapper/WxPropertyContractMapper.xml Просмотреть файл

@@ -177,7 +177,7 @@
select rc.*,s.shop_number from wx_rent_contract rc inner join wx_shop s on rc.shop_id=s.id select rc.*,s.shop_number from wx_rent_contract rc inner join wx_shop s on rc.shop_id=s.id
where rc.status not in(0,1,5,6,7) and rc.tenant_id=#{tenantId} where rc.status not in(0,1,5,6,7) and rc.tenant_id=#{tenantId}
and rc.id not in (select pc.rent_contract_id from ( and rc.id not in (select pc.rent_contract_id from (
select rent_contract_id from wx_property_contract where status not in(0,1,5,6,7) and tenant_id=#{tenantId}
select rent_contract_id from wx_property_contract where status not in(5,6,7) and tenant_id=#{tenantId}
) pc) ) pc)
<if test=" null != rentShopType ">and rent_shop_type = #{rentShopType}</if> <if test=" null != rentShopType ">and rent_shop_type = #{rentShopType}</if>
</select> </select>


Загрузка…
Отмена
Сохранить