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

[解单][添加][开发解单api]

release_toaliyun_real
luozukai 7 лет назад
Родитель
Сommit
40e15b5ff3
7 измененных файлов: 16 добавлений и 39 удалений
  1. +0
    -6
      mallinkAdmin/src/main/java/com/iformall/tenant/TenantInfoImpl.java
  2. +10
    -0
      mallinkService/src/main/java/com/iformall/domain/dto/MarkingCouponDataReportDto.java
  3. +3
    -3
      mallinkService/src/main/java/com/iformall/domain/po/BaseEntity.java
  4. +1
    -0
      mallinkService/src/main/java/com/iformall/service/impl/MarkingDataReportServiceImpl.java
  5. +1
    -1
      mallinkService/src/main/resources/mapper/WxCouponActionLogMapper.xml
  6. +0
    -28
      mallinkService/src/main/resources/mapper/WxCouponMapper.xml
  7. +1
    -1
      mallinkService/src/main/resources/mapper/WxOrderGroupMapper.xml

+ 0
- 6
mallinkAdmin/src/main/java/com/iformall/tenant/TenantInfoImpl.java Просмотреть файл

@@ -75,10 +75,6 @@ public class TenantInfoImpl implements TenantInfo {
if ("wx_msg_record".equals(tableName)) {
return true;
}

if ("wx_coupon".equals(tableName)) {
return true;
}
return false;
}

@@ -92,8 +88,6 @@ public class TenantInfoImpl implements TenantInfo {
return true;
if ("com.iformall.mapper.WxShopMapper.rentRateHistory".equals(ms.getId()))
return true;
if ("com.iformall.mapper.WxCouponMapper.findCouponData".equals(ms.getId()))
return true;
return false;
}
}

+ 10
- 0
mallinkService/src/main/java/com/iformall/domain/dto/MarkingCouponDataReportDto.java Просмотреть файл

@@ -1,7 +1,9 @@
package com.iformall.domain.dto;

import com.iformall.common.SortColumn;
import com.iformall.domain.po.BaseEntity;

import javax.persistence.Transient;
import java.util.Date;

/**
@@ -17,6 +19,14 @@ public class MarkingCouponDataReportDto extends BaseEntity{
private String tenantId;
private Integer channelType;

@Transient
@SortColumn(column = "xTime")
private String xTime;
@Transient
@SortColumn(column = "sendCount")
private Integer sendCount;


@Override
public String getSortColumns() {
super.setSortColumns(this.sortColumns);


+ 3
- 3
mallinkService/src/main/java/com/iformall/domain/po/BaseEntity.java Просмотреть файл

@@ -49,9 +49,9 @@ public class BaseEntity implements Serializable {
break;
}
}
// if(!find) {
// return sortColumn;
// }
if(!find) {
return null;
}

//默认驼峰解析
return underscoreName(sortColumn) +" "+sortOrder;


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

@@ -286,6 +286,7 @@ public class MarkingDataReportServiceImpl implements MarkingDataReportService {
@Override
public PageInfo<MarkingSceneDataVo> getSceneDataList(String tenantId, MarkingCouponDataReportDto markingCouponDataReportDto, Integer pageIndex, Integer pageSize) {
MarkingCouponDataReportDto queryDto = new MarkingCouponDataReportDto();
org.springframework.beans.BeanUtils.copyProperties(markingCouponDataReportDto, queryDto);
queryDto.setTenantId(tenantId);

HashMap<String, Object> params = new HashMap<>();


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

@@ -125,7 +125,7 @@
<if test=" null != endTime ">
and create_time &lt;= #{endTime}
</if>
group by xTime
group by xTime
<if test=" null != sortColumns"> order by ${sortColumns} </if>
<if test=" null == sortColumns"> order by xTime desc </if>
</select>


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

@@ -606,34 +606,6 @@
<if test=" null != sortColumns">order by ${sortColumns}</if>
<if test=" null == sortColumns">order by c.status asc,c.create_date desc</if>
</select>
<!--
<select id="findCouponData" parameterType="com.iformall.domain.po.WxCoupon" resultMap="statisMap">
select c.*,
(select count(wco.id) from wx_coupon_order wco where wco.coupon_id = c.id) as sale_count,
(select count(wco.id) from wx_coupon wc,wx_coupon_order wco where wco.coupon_id = wc.id and wco.coupon_order_status = 1 and wc.id = c.id) as sum_payment,
(select count(wco.id) from wx_coupon wc,wx_coupon_order wco where wco.coupon_id = wc.id and wco.coupon_order_status = 3 and wc.id = c.id) as backpay_count,
(select sum(sc.subsidy) from wx_coupon wc
left join wx_coupon_order wo on wo.coupon_id = wc.id
left join wx_merchant_subsidy sc on sc.coupon_order_id = wo.id
where wc.id = c.id) as sum_subsidy

from wx_coupon c where c.type not in(8,9,100)
<if test=" 1 == type ">
and c.sale_price > 0
</if>
<if test=" 2 == type ">
and c.sale_price = 0
</if>
<if test="title != null and title != ''">
and c.title like concat('%', #{title},'%')
</if>
<if test="id != null">
and c.id = #{id}
</if>
<if test=" null != sortColumns"> order by ${sortColumns} </if>
<if test=" null == sortColumns">order by c.status asc,c.create_date desc</if>

</select>-->

<select id="findPressData" parameterType="com.iformall.domain.po.WxCoupon" resultMap="statisMap">
select c.*,


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

@@ -102,7 +102,7 @@
ROUND(IFNULL((c.group_success_count/c.group_total_count),0)*100)
group_transfer_ratio,c.success_people,c.verify_count,
ROUND(IFNULL((verify_count/success_people),0)*100) verify_ratio,c.total_people from(
select tenant_id,id coupon_id,cover_img,title,FORMAT(price/100,2) price,FORMAT(sale_price/100,2) sale_price,
select tenant_id,id coupon_id,cover_img,title,ROUND(price/100,2) price,ROUND(sale_price/100,2) sale_price,
(select count(*) total from wx_order_group where coupon_id=c.id) group_total_count,
(select count(*) total from wx_order_group where status=11 and coupon_id=c.id) group_success_count,
IFNULL((select count(*) from wx_order where order_status=11 and product_id=c.id),0) success_people,


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