Browse Source

bug

release_toaliyun_real
xhxu 5 years ago
parent
commit
e3ca290be1
9 changed files with 36 additions and 16 deletions
  1. +3
    -1
      mallinkService/src/main/java/com/iformall/service/impl/MarkingDataReportServiceImpl.java
  2. +1
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxCUserTagsServiceImpl.java
  3. +2
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java
  4. +3
    -1
      mallinkService/src/main/resources/mapper/WxCarCmdLogMapper.xml
  5. +6
    -2
      mallinkService/src/main/resources/mapper/WxCouponActionLogMapper.xml
  6. +5
    -3
      mallinkService/src/main/resources/mapper/WxCouponMapper.xml
  7. +11
    -3
      mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml
  8. +2
    -2
      mallinkService/src/main/resources/mapper/WxOrderGroupMapper.xml
  9. +3
    -1
      mallinkService/src/main/resources/mapper/WxOrderMapper.xml

+ 3
- 1
mallinkService/src/main/java/com/iformall/service/impl/MarkingDataReportServiceImpl.java View File

@@ -343,8 +343,8 @@ public class MarkingDataReportServiceImpl implements MarkingDataReportService {
public PageInfo<MarkingSceneDataVo> getSceneDataList(TenantEntity tenantEntity, MarkingCouponDataReportDto markingCouponDataReportDto, Integer pageIndex, Integer pageSize) {
List<TenantEntity> tenantEntitys = wxMallMapper.getTenantEntitys(tenantEntity);
MarkingCouponDataReportDto queryDto = new MarkingCouponDataReportDto();
queryDto.setTenantEntitys(tenantEntitys);
org.springframework.beans.BeanUtils.copyProperties(markingCouponDataReportDto, queryDto);
queryDto.setTenantEntitys(tenantEntitys);
queryDto.updateTenantInfo(tenantEntity);

HashMap<String, Object> params = new HashMap<>();
@@ -391,6 +391,7 @@ public class MarkingDataReportServiceImpl implements MarkingDataReportService {
Map<String, Integer> countMap = new HashMap<>();

params.clear();
params.put("tenantEntitys",tenantEntitys);
params.put("tenantId", tenantEntity.getTenantId());
if (StringUtils.isNotBlank(tenantEntity.getParentTenantId())) {
params.put("parentTenantId", tenantEntity.getParentTenantId());
@@ -445,6 +446,7 @@ public class MarkingDataReportServiceImpl implements MarkingDataReportService {
Map<String, Integer> triggerCountMap = new HashMap<>();

params.clear();
params.put("tenantEntitys",tenantEntitys);
params.put("tenantId", tenantEntity.getTenantId());
if (StringUtils.isNotBlank(tenantEntity.getParentTenantId())) {
params.put("parentTenantId", tenantEntity.getParentTenantId());


+ 1
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxCUserTagsServiceImpl.java View File

@@ -91,7 +91,7 @@ public class WxCUserTagsServiceImpl implements WxCUserTagsService {
@Override
public long countUser(TenantEntity tenantEntity, Long tagId, Date startTime, Date endTime ) {
String str = JSON.toJSONString(tagId);
return wxCUserTagsMapper.countUser(str, tenantEntity.getTenantId(),tenantEntity.getFinalTenantId(), startTime, endTime);
return wxCUserTagsMapper.countUser(str, tenantEntity.getFinalTenantId(),tenantEntity.getFinalTenantId(), startTime, endTime);
}




+ 2
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java View File

@@ -2254,7 +2254,7 @@ public class WxChartServiceImpl implements WxChartDataService {
for (int i = 0; i < tags.length; i++) {
WxTags tag = new WxTags();
tag.setName(tags[i].getMessage());
tag.setCount(wxCUserTagsMapper.countUser(JSON.toJSONString(tags[i].getCode()), tenantEntity.getTenantId(),tenantEntity.getFinalTenantId(), startTime, endTime));
tag.setCount(wxCUserTagsMapper.countUser(JSON.toJSONString(tags[i].getCode()), tenantEntity.getFinalTenantId(),tenantEntity.getFinalTenantId(), startTime, endTime));
tagList.add(tag);
total -= tag.getCount();
}
@@ -2289,7 +2289,7 @@ public class WxChartServiceImpl implements WxChartDataService {
for (int i = 0; i < tags.length; i++) {
WxTags tag = new WxTags();
tag.setName(tags[i].getMessage());
tag.setCount(wxCUserTagsMapper.countUser(JSON.toJSONString(tags[i].getCode()), tenantEntity.getTenantId(),tenantEntity.getFinalTenantId(), startTime, endTime));
tag.setCount(wxCUserTagsMapper.countUser(JSON.toJSONString(tags[i].getCode()), tenantEntity.getFinalTenantId(),tenantEntity.getFinalTenantId(), startTime, endTime));
tagList.add(tag);
total -= tag.getCount();
}


+ 3
- 1
mallinkService/src/main/resources/mapper/WxCarCmdLogMapper.xml View File

@@ -139,7 +139,9 @@

<select id="queryForSceneRepotyHistoryCar" resultType="com.iformall.domain.vo.MarkingSceneDataVo" parameterType="hashmap">
select DATE_FORMAT(ccl.create_date,'%Y-%m-%d') xTime, count(ccl.id) triggerCount
from wx_c_user_car cuc, wx_car_cmd_log ccl
from wx_c_user_car cuc, (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all">
SELECT * from wx_car_cmd_log${tenantEntity.shardTableSuffix}
</foreach>) ccl
where ccl.plateNumber = cuc.car_number and cmd_type=#{cmdType}
<if test=" null != tenantId and '' != tenantId">
and cuc.`tenant_id` = #{tenantId}


+ 6
- 2
mallinkService/src/main/resources/mapper/WxCouponActionLogMapper.xml View File

@@ -232,8 +232,12 @@
parameterType="hashmap">
select DATE_FORMAT(cal.create_time,'%Y-%m-%d') AS xTime,
COUNT(co.id) as tempCount
from wx_coupon_action_log cal
left join wx_coupon_order co on cal.coupon_order_id=co.id
from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all">
SELECT * from wx_coupon_action_log${tenantEntity.shardTableSuffix}
</foreach>) cal
left join (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all">
SELECT * from wx_coupon_order${tenantEntity.shardTableSuffix}
</foreach>) co on cal.coupon_order_id=co.id
where co.coupon_order_status = 1
<if test=" null != tenantId and '' != tenantId">
and cal.`tenant_id` = #{tenantId}


+ 5
- 3
mallinkService/src/main/resources/mapper/WxCouponMapper.xml View File

@@ -891,7 +891,7 @@
and `parent_tenant_id` = #{wxCoupon.parentTenantId}
</if>
group by product_id) o on o.product_id = c.id
left join (SELECT count(id) as join_count, coupon_id FROM (SELECT count(id) as press_count, coupon_id FROM (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all">
left join (SELECT count(id) as join_count, coupon_id FROM (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all">
SELECT * from wx_order_press${tenantEntity.shardTableSuffix}
</foreach>) wx_order_press WHERE 1=1
<if test=" null != wxCoupon.tenantId and '' != wxCoupon.tenantId">
@@ -901,7 +901,7 @@
and `parent_tenant_id` = #{wxCoupon.parentTenantId}
</if>
group by coupon_id) op2 on op2.coupon_id = c.id
left join (SELECT count(id) as xCount, coupon_id FROM (SELECT count(id) as join_count, coupon_id FROM (SELECT count(id) as press_count, coupon_id FROM (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all">
left join (SELECT count(id) as xCount, coupon_id FROM (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all">
SELECT * from wx_coupon_order${tenantEntity.shardTableSuffix}
</foreach>) wx_coupon_order WHERE coupon_order_status = 1
<if test=" null != wxCoupon.tenantId and '' != wxCoupon.tenantId">
@@ -1066,7 +1066,9 @@
and wo.create_date between #{wxCoupon.startdate} and #{wxCoupon.enddate}
)
/
(select count(wop.id) from wx_coupon wc
(select count(wop.id) from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all">
SELECT * from wx_coupon${tenantEntity.shardTableSuffix}
</foreach>) wc
left join (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all">
SELECT * from wx_order${tenantEntity.shardTableSuffix}
</foreach>) wo on wo.product_id = wc.id


+ 11
- 3
mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml View File

@@ -272,7 +272,9 @@

<select id="queryForSceneRepotyHistoryVerified" resultType="com.iformall.domain.vo.MarkingSceneDataVo" parameterType="hashmap">
select DATE_FORMAT(update_date,'%Y-%m-%d') xTime, count(c.id) triggerCount
from wx_coupon_order c
from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all">
SELECT * from wx_coupon_order${tenantEntity.shardTableSuffix}
</foreach>) c
where c.coupon_order_status = 1
<if test=" null != tenantId and '' != tenantId">
and c.`tenant_id` = #{tenantId}
@@ -288,7 +290,9 @@

<select id="queryForSceneRepotyHistoryOrdered" resultType="com.iformall.domain.vo.MarkingSceneDataVo" parameterType="hashmap">
select DATE_FORMAT(update_date,'%Y-%m-%d') xTime, count(c.id) triggerCount
from wx_coupon_order c
from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all">
SELECT * from wx_coupon_order${tenantEntity.shardTableSuffix}
</foreach>) c
where 1=1
<if test=" null != tenantId and '' != tenantId">
and c.`tenant_id` = #{tenantId}
@@ -304,7 +308,11 @@

<select id="queryForSceneRepotyMechantHistoryOrdered" resultType="com.iformall.domain.vo.MarkingSceneDataVo" parameterType="hashmap">
select DATE_FORMAT(update_date,'%Y-%m-%d') xTime, count(c.id) triggerCount
from wx_coupon_order c left join wx_coupon_action_log cal on cal.tenant_id = c.tenant_id
from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all">
SELECT * from wx_coupon_order${tenantEntity.shardTableSuffix}
</foreach>) c left join (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all">
SELECT * from wx_coupon_action_log${tenantEntity.shardTableSuffix}
</foreach>) cal on cal.tenant_id = c.tenant_id
where cal.coupon_order_id=c.id
<if test=" null != tenantId and '' != tenantId">
and c.`tenant_id` = #{tenantId}


+ 2
- 2
mallinkService/src/main/resources/mapper/WxOrderGroupMapper.xml View File

@@ -146,10 +146,10 @@
<if test=" null != marketing.parentTenantId and '' != marketing.parentTenantId">
and c.`parent_tenant_id` = #{marketing.parentTenantId}
</if>
<if test=" null != marketing.couponId and ''! = marketing.couponId">
<if test=" null != marketing.couponId and '' != marketing.couponId">
and c.coupon_id=#{marketing.couponId}
</if>
<if test=" null != marketing.title and ''! = marketing.title">
<if test=" null != marketing.title and '' != marketing.title">
and c.title like concat('%',#{marketing.title},'%')
</if>
<if test=" null != marketing.sortColumns"> order by ${marketing.sortColumns} </if>


+ 3
- 1
mallinkService/src/main/resources/mapper/WxOrderMapper.xml View File

@@ -551,7 +551,9 @@

<select id="queryForSceneRepotyHistory" resultType="com.iformall.domain.vo.MarkingSceneDataVo" parameterType="hashmap">
select DATE_FORMAT(o.create_date,'%Y-%m-%d') xTime, count(o.id) triggerCount
from wx_order o
from (<foreach collection="tenantEntitys" item="tenantEntity" index="index" separator="union all">
SELECT * from wx_order${tenantEntity.shardTableSuffix}
</foreach>) o
where o.`type` = #{type}
<if test=" null != tenantId and '' != tenantId">
and o.`tenant_id` = #{tenantId}


Loading…
Cancel
Save