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

bug yiban

release_toaliyun_real
xhxu 5 лет назад
Родитель
Сommit
1a1c81fb25
26 измененных файлов: 206 добавлений и 78 удалений
  1. +4
    -0
      mallinkAdmin/src/main/resources/db/migration/V202007131031__GROUP__ADD_001.sql
  2. +2
    -2
      mallinkService/src/main/java/com/iformall/domain/po/WxUserVisit.java
  3. +4
    -1
      mallinkService/src/main/resources/mapper/KwMerchantMeterMapper.xml
  4. +12
    -3
      mallinkService/src/main/resources/mapper/KwMeterDataMapper.xml
  5. +20
    -8
      mallinkService/src/main/resources/mapper/MallUserInfoMapper.xml
  6. +4
    -1
      mallinkService/src/main/resources/mapper/WxActivityJoinMapper.xml
  7. +6
    -1
      mallinkService/src/main/resources/mapper/WxBillSettleBillMapper.xml
  8. +5
    -6
      mallinkService/src/main/resources/mapper/WxBuserMapper.xml
  9. +9
    -3
      mallinkService/src/main/resources/mapper/WxCUserFromBMapper.xml
  10. +17
    -8
      mallinkService/src/main/resources/mapper/WxCouponChannelMapper.xml
  11. +14
    -5
      mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml
  12. +5
    -2
      mallinkService/src/main/resources/mapper/WxCouponSendMapper.xml
  13. +4
    -1
      mallinkService/src/main/resources/mapper/WxCreditHistoryMapper.xml
  14. +0
    -7
      mallinkService/src/main/resources/mapper/WxDataRuleTargetMapper.xml
  15. +5
    -3
      mallinkService/src/main/resources/mapper/WxGameActionLogMapper.xml
  16. +4
    -1
      mallinkService/src/main/resources/mapper/WxMerchantMapper.xml
  17. +4
    -1
      mallinkService/src/main/resources/mapper/WxMerchantSubsidyMapper.xml
  18. +8
    -6
      mallinkService/src/main/resources/mapper/WxMsgCallbackMapper.xml
  19. +13
    -3
      mallinkService/src/main/resources/mapper/WxMsgLimitMapper.xml
  20. +5
    -2
      mallinkService/src/main/resources/mapper/WxMsgModelMapper.xml
  21. +8
    -2
      mallinkService/src/main/resources/mapper/WxOrderMapper.xml
  22. +6
    -3
      mallinkService/src/main/resources/mapper/WxOrderPressMapper.xml
  23. +6
    -1
      mallinkService/src/main/resources/mapper/WxPayOrderMapper.xml
  24. +7
    -1
      mallinkService/src/main/resources/mapper/WxPropertyContractMapper.xml
  25. +6
    -0
      mallinkService/src/main/resources/mapper/WxShopMapper.xml
  26. +28
    -7
      mallinkService/src/main/resources/mapper/WxUserVisitMapper.xml

+ 4
- 0
mallinkAdmin/src/main/resources/db/migration/V202007131031__GROUP__ADD_001.sql Просмотреть файл

@@ -7,3 +7,7 @@ ADD COLUMN `parent_tenant_id` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_u
ALTER TABLE `wx_mall`
ADD COLUMN `live_support` SMALLINT(1) DEFAULT '0' COMMENT '是否支持直播(0-不支持,1-支持)';

ALTER TABLE `wx_user_visit`
ADD COLUMN `parent_tenant_id` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '父租户ID' AFTER `tenant_id`;

CREATE OR REPLACE ALGORITHM = UNDEFINED DEFINER = `root`@`%` SQL SECURITY DEFINER VIEW `mallink`.`view_touch_user` AS select date_format(`u`.`day_date`,'%Y-%m-%d') AS `xTime`,`u`.`tenant_id` AS `tenant_id`,`u`.`parent_tenant_id` AS `parent_tenant_id`,`u`.`visit_pv` AS `pv`,`u`.`visit_uv` AS `uv`,ifnull(`o`.`couponCount`,0) AS `couponCount`,ifnull(`o`.`userCount`,0) AS `userCount`,ifnull(`v`.`verifyCount`,0) AS `verifyCount`,ifnull(`v`.`verifyUserCount`,0) AS `verifyUserCount` from ((`mallink`.`wx_user_visit` `u` left join (select `mallink`.`wx_coupon_order`.`tenant_id` AS `tenant_id`,date_format(`mallink`.`wx_coupon_order`.`create_date`,'%Y-%m-%d') AS `xTime`,count(distinct `mallink`.`wx_coupon_order`.`c_user_id`) AS `userCount`,count(0) AS `couponCount` from `mallink`.`wx_coupon_order` group by `xTime`,`mallink`.`wx_coupon_order`.`tenant_id`) `o` on(((date_format(`u`.`day_date`,'%Y-%m-%d') = `o`.`xTime`) and (`o`.`tenant_id` = `u`.`tenant_id`)))) left join (select `mallink`.`wx_coupon_order`.`tenant_id` AS `tenant_id`,date_format(`mallink`.`wx_coupon_order`.`update_date`,'%Y-%m-%d') AS `xTime`,count(0) AS `verifyCount`,count(distinct `mallink`.`wx_coupon_order`.`c_user_id`) AS `verifyUserCount` from `mallink`.`wx_coupon_order` where (`mallink`.`wx_coupon_order`.`coupon_order_status` = 1) group by `xTime`,`mallink`.`wx_coupon_order`.`tenant_id`) `v` on(((date_format(`u`.`day_date`,'%Y-%m-%d') = `v`.`xTime`) and (`v`.`tenant_id` = `u`.`tenant_id`))));

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

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

import com.baomidou.mybatisplus.annotation.TableName;
import com.iformall.domain.po.base.BaseTenantEntity;
import com.iformall.domain.po.base.TenantEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

@@ -10,7 +10,7 @@ import java.util.*;
@TableName(value = "wx_user_visit")
@Data
@EqualsAndHashCode(callSuper = true)
public class WxUserVisit extends BaseTenantEntity {
public class WxUserVisit extends TenantEntity {

protected Long id;



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

@@ -175,9 +175,12 @@
<sql id="dynamicWhereConditionsVo">
where 1 = 1

<if test=" null != tenantId ">
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>

<if test=" null != boxId ">
and `box_id` = #{boxId}


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

@@ -27,9 +27,12 @@
and `id` = #{id}
</if>

<if test=" null != tenantId ">
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>

<if test=" null != boxId ">
and `box_id` = #{boxId}
@@ -106,9 +109,12 @@
<sql id="dynamicWhereConditionsVo">
where 1 = 1

<if test=" null != tenantId ">
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>

<if test=" null != boxId ">
and `box_id` = #{boxId}
@@ -232,9 +238,12 @@
tenant_id
FROM kw_meter_data
where 1 = 1
<if test=" null != tenantId ">
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
<if test=" null != meterId ">
and `meter_id` = #{meterId}
</if>


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

@@ -152,8 +152,11 @@
<include refid="allSafeColumns"/>
from mall_user_info
where 1=1
<if test=" null != tenantId ">
and `tenant_id`=#{tenantId}
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
<if test=" null != bopenId ">
and `bopen_id`=#{bopenId}
@@ -174,8 +177,11 @@
update mall_user_info
set `web_open_id` = null
where 1=1
<if test=" null != tenantId ">
and `tenant_id`=#{tenantId}
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
<if test=" null != username ">
and username=#{username}
@@ -189,8 +195,11 @@
update mall_user_info
set `web_open_id` = null, `bopen_id` = null
where 1=1
<if test=" null != tenantId ">
and `tenant_id`=#{tenantId}
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
<if test=" null != username ">
and username=#{username}
@@ -205,8 +214,11 @@
<include refid="allColumns"/>
from mall_user_info
where 1=1
<if test=" null != tenantId ">
and `tenant_id`=#{tenantId}
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
<if test=" null != phone ">
and `phone`=#{phone}


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

@@ -83,9 +83,12 @@
select a.id,a.cover_img,a.title,a.activity_start_time,a.activity_end_time,aj.`status`
from wx_activity_join aj left join wx_activity a on aj.activity_id=a.id
where aj.user_id=#{userId}
<if test=" null != tenantId ">
<if test=" null != tenantId and '' != tenantId">
and aj.`tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and aj.`parent_tenant_id` = #{parentTenantId}
</if>
<if test=" null != statusStr and ''!=statusStr">
and aj.`status` in (${statusStr}) and a.`status`=2
</if>


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

@@ -28,7 +28,12 @@
<sql id="dynamicWhereConditions">
where 1=1
<if test=" null != id ">and `id` = #{id}</if>
<if test=" null != tenantId ">and `tenant_id` = #{tenantId}</if>
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>

<if test=" null != ids ">
and id in


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

@@ -66,13 +66,12 @@
<if test=" null != id ">
and `id` = #{id}
</if>
<if test=" null != tenantId ">
and `tenant_id`= #{tenantId}
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId ">
and `parent_tenant_id`= #{parentTenantId}
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
<if test=" null != openId ">


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

@@ -4,6 +4,7 @@
<resultMap id="BaseResultMap" type="com.iformall.domain.po.WxCUserFromB">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
<result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId"/>
<result column="merchant_id" jdbcType="INTEGER" property="merchantId" />
<result column="b_user_id" jdbcType="BIGINT" property="bUserId" />
<result column="c_user_id" jdbcType="BIGINT" property="cUserId" />
@@ -16,13 +17,18 @@
</resultMap>
<sql id="allColumns">
`id`,`tenant_id`,`merchant_id`,`b_user_id`,`c_user_id`,`info`,`create_time`,`update_time`,`openid`,`app_id`
`id`,`tenant_id`,`parent_tenant_id`,`merchant_id`,`b_user_id`,`c_user_id`,`info`,`create_time`,`update_time`,`openid`,`app_id`
</sql>

<sql id="dynamicWhereConditions">
where 1 = 1
<if test=" null != id "> and `id` = #{id} </if>
<if test=" null != tenantId "> and `tenant_id` = #{tenantId} </if>
<if test=" null != id "> and `id` = #{id} </if>
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
<if test=" null != merchantId "> and `merchant_id` = #{merchantId} </if>
<if test=" null != bUserId "> and `b_user_id` = #{bUserId} </if>
<if test=" null != cUserId "> and `c_user_id` = #{cUserId} </if>


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

@@ -124,18 +124,24 @@
update wx_coupon_channel
set status=#{status}, update_date=#{updateDate}
where coupon_id=#{couponId}
<if test=" null != tenantId ">
and tenant_id = #{tenantId}
</if>
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
</update>

<update id="updateEndTimeByCouponId" parameterType="com.iformall.domain.po.WxCouponChannel">
update wx_coupon_channel
set end_time = #{endTime}
where coupon_id=#{couponId}
<if test=" null != tenantId ">
and tenant_id = #{tenantId}
</if>
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
</update>

<sql id="CouponChannelVoColumns">
@@ -214,8 +220,11 @@
<if test="status != null">
and cc.status=#{status}
</if>
<if test=" null != tenantId ">
and cc.tenant_id = #{tenantId}
<if test=" null != tenantId and '' != tenantId">
and cc.`tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and cc.`parent_tenant_id` = #{parentTenantId}
</if>
<if test=" null != sortColumns"> order by ${sortColumns} </if>
</select>


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

@@ -226,12 +226,18 @@
<select id="touchUsersReportList" resultType="com.iformall.domain.vo.TouchUsersReportVo" parameterType="com.iformall.domain.dto.MarkingCouponDataReportDto">
SELECT xTime, tenant_id, pv, uv, couponCount, userCount, verifyCount, verifyUserCount
FROM view_touch_user
WHERE view_touch_user.tenant_id=#{tenantId}
WHERE 1=1
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
<if test="startTime != null">
and view_touch_user.xTime &gt;= DATE_FORMAT(#{startTime},'%Y-%m-%d')
and xTime &gt;= DATE_FORMAT(#{startTime},'%Y-%m-%d')
</if>
<if test="endTime != null">
and view_touch_user.xTime &lt;= DATE_FORMAT(#{endTime},'%Y-%m-%d')
and xTime &lt;= DATE_FORMAT(#{endTime},'%Y-%m-%d')
</if>
GROUP BY xTime
order by xTime desc
@@ -852,8 +858,11 @@
left join wx_shop s on ms.shop_id=s.id
left join wx_coupon_merchant cm on ms.merchant_id=cm.merchant_id
where ms.is_del=0 and s.building=#{building}
<if test=" null != tenantId ">
and ms.tenant_id=#{tenantId}
<if test=" null != tenantId and '' != tenantId">
and ms.`tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and ms.`parent_tenant_id` = #{parentTenantId}
</if>
<if test="null!=floor">
and s.floor=#{floor}


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

@@ -145,8 +145,11 @@
<update id="updateStatusByCouponId" parameterType="com.iformall.domain.po.WxCouponChannel">
update wx_coupon_send set status=#{status}
where coupon_id=#{couponId}
<if test=" null != tenantId ">
and tenant_id = #{tenantId}
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
</update>



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

@@ -198,9 +198,12 @@
select count(0)
from wx_credit_history
where 1=1
<if test=" null != tenantId ">
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
<if test=" null != cUserId ">
and `c_user_id` = #{cUserId}
</if>


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

@@ -26,13 +26,6 @@
<if test=" null != tenantId ">
and `tenant_id` = #{tenantId}
</if>

<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
<if test=" null != name ">
and `name` like concat('%',#{name},'%')


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

@@ -85,9 +85,11 @@

</if>

<if test=" null != tenantId ">
and `tenant_id` = #{tenantId}

<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>

<if test=" null != gameId ">


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

@@ -295,9 +295,12 @@
FROM wx_merchant m
left join wx_business bu on bu.id = m.business_id
<where>
<if test=" null != tenantId ">
<if test=" null != tenantId and '' != tenantId">
and m.`tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and m.`parent_tenant_id` = #{parentTenantId}
</if>
<if test=" null != status ">
and m.`status` = #{status}
</if>


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

@@ -250,9 +250,12 @@
ms.create_date create_date,ms.subsidy subsidy,ms.real_subsidy,ms.status,ms.freeze
from wx_merchant_subsidy ms left join wx_merchant m on ms.merchant_id=m.id
where 1=1
<if test=" null != tenantId ">
<if test=" null != tenantId and '' != tenantId">
and ms.`tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and ms.`parent_tenant_id` = #{parentTenantId}
</if>
<if test=" null != orderId ">
and ms.`order_id` = #{orderId}
</if>


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

@@ -30,12 +30,14 @@
<if test=" null != id ">
and `id` = #{id}
</if>
<if test=" null != tenantId ">
and `tenant_id` = #{tenantId}
</if>
</if>

<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
<if test=" null != batchNo ">
and `batch_no` like concat('%', #{batchNo},'%')


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

@@ -23,8 +23,11 @@
and `id` = #{id}
</if>

<if test=" null != tenantId ">
and `tenant_id`=#{tenantId}
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>

<if test=" null != type ">
@@ -63,7 +66,14 @@
</select>

<update id="updateLimitNum" parameterType="com.iformall.domain.po.WxMsgLimit">
update wx_msg_limit set limit_num = limit_num - 1 where `id` = #{id} and `tenant_id` = #{tenantId} and limit_num > 0
update wx_msg_limit set limit_num = limit_num - 1 where `id` = #{id}
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
and limit_num > 0
</update>

<delete id="delLimitNum" parameterType="com.iformall.domain.po.WxMsgLimit">


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

@@ -82,8 +82,11 @@
<if test=" null != modelId">
and `model_id` = #{modelId}
</if>
<if test=" null != tenantId ">
and `tenant_id`=#{tenantId}
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
limit 1
</select>


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

@@ -237,9 +237,12 @@
update wx_order set order_status=#{orderStatus}
where product_id=#{productId}
and press_end_date is not null and order_status in (6,7)
<if test=" null != tenantId ">
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
</update>
<update id="updateOrderGroupStatusByCouponId" parameterType="com.iformall.domain.po.WxOrder">
@@ -502,9 +505,12 @@
LEFT JOIN wx_c_user cu on cu.id = o.c_user_id
LEFT JOIN wx_c_user_basic_info cubi on cubi.id = o.c_user_id
where o.order_status = '0' and o.`type` = 1
<if test=" null != tenantId ">
<if test=" null != tenantId and '' != tenantId">
and o.`tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and o.`parent_tenant_id` = #{parentTenantId}
</if>
<if test=" null != merchantId ">
and bu.`merchant_id` = #{merchantId}
</if>


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

@@ -20,9 +20,12 @@
<if test=" null != id ">
and `id` = #{id}
</if>
<if test=" null != tenantId ">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
<if test=" null != orderId ">
and `order_id` = #{orderId}
</if>


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

@@ -173,7 +173,12 @@
<include refid="allColumns"/>
from wx_pay_order
where 1=1
<if test=" null != tenantId "> and `tenant_id` = #{tenantId} </if>
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
and order_id in (
select id from wx_order where `tenant_id` = #{tenantId} and type = 1 and order_status = 0
);


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

@@ -130,7 +130,13 @@
left join wx_mall_building b on s.building=b.id
left join wx_brand br on rc.brand=br.id
<where>
<if test=" null != tenantId ">rc.tenant_id=#{tenantId}</if>

<if test=" null != tenantId and '' != tenantId">
and rc.`tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and rc.`parent_tenant_id` = #{parentTenantId}
</if>
<if test=" null != merchantName and merchantName!=''">and rc.`merchant_name` like
concat('%',#{merchantName},'%')


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

@@ -565,6 +565,12 @@

<select id="getCountByWxShop" parameterType="com.iformall.domain.po.WxShop" resultType="Long">
select count(*) from wx_shop w where w.is_del=0
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
<if test="null != type">
and `type`=#{type}
</if>


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

@@ -4,6 +4,7 @@
<resultMap id="BaseResultMap" type="com.iformall.domain.po.WxUserVisit">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
<result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId"/>
<result column="ref_date" jdbcType="VARCHAR" property="refDate" />
<result column="day_date" jdbcType="TIMESTAMP" property="dayDate" />
<result column="session_cnt" jdbcType="INTEGER" property="sessionCnt" />
@@ -18,7 +19,7 @@
</resultMap>
<sql id="allColumns">
`id`,`tenant_id`,`ref_date`,`day_date`,`session_cnt`,`visit_pv`,`visit_uv`,`visit_uv_new`,`stay_time_uv`,`stay_time_session`,`visit_depth`,`app_id`,`create_date`
`id`,`tenant_id`,`parent_tenant_id`,`ref_date`,`day_date`,`session_cnt`,`visit_pv`,`visit_uv`,`visit_uv_new`,`stay_time_uv`,`stay_time_session`,`visit_depth`,`app_id`,`create_date`
</sql>

<sql id="dynamicWhereConditions">
@@ -28,9 +29,11 @@
and `id` = #{id}
</if>
<if test=" null != tenantId ">
and `tenant_id` =#{tenantId}

<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
<if test=" null != refDate ">
@@ -107,7 +110,13 @@
parameterType="com.iformall.domain.dto.MarkingCouponDataReportDto">
SELECT DATE_FORMAT(day_date,'%Y-%m-%d') as xTime,visit_pv as pv,visit_uv as uv
from wx_user_visit
where tenant_id=#{tenantId}
where 1=1
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
<if test="startTime != null">
and day_date &gt;= #{startTime}
</if>
@@ -122,7 +131,13 @@
<select id="touchUsersReportData" resultType="com.iformall.domain.vo.TouchUsersReportVo" parameterType="hashmap">
SELECT DATE_FORMAT(day_date,'%m/%d') as xTime,visit_pv as pv,visit_uv as uv
from wx_user_visit
where tenant_id=#{tenantId}
where 1=1
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
<if test="startTime != null">
and day_date &gt;= #{startTime}
</if>
@@ -133,7 +148,13 @@
</select>

<select id="queryVisitUv" resultType="Long" parameterType="hashmap">
select count(visit_uv) from wx_user_visit where tenant_id=#{tenantId}
select count(visit_uv) from wx_user_visit where 1=1
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
<if test="startTime != null">
and day_date &gt;= #{startTime}
</if>


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