Commit 1cc11bb6 by 林冲

Merge remote-tracking branch 'origin/master' into v5.8.1

# Conflicts:
#	rpc-dj-smartcarlife/src/main/resources/META-INF/orm/MerchantGoodsStockReduceRecordMapper.xml
2 parents 7f325b59 d3eaaf86
......@@ -323,6 +323,8 @@ public class IncrementalRuleMergeService {
}
if (source.getMultiPlatformMerchantFlag() != null) {
target.setMultiPlatformMerchantFlag(source.getMultiPlatformMerchantFlag());
target.setDjzhySubMerchantId(source.getDjzhySubMerchantId());
target.setDjzhySubMerchantName(source.getDjzhySubMerchantName());
if (CarLifeEnum.Flag.N.name().equals(source.getMultiPlatformMerchantFlag())) {
//开启多平台分账=关闭,清空字段
target.setDjzhySubMerchantId(null);
......
......@@ -642,6 +642,7 @@
left join dj_car_life_goods_info gi on gi.goods_code=bg.goods_code and gi.deleted_flag='N' and gi.`status` = 1
<!-- 仅用做查询条件使用 -->
left join dj_car_life_upgrade_goods ug on ug.base_goods_id=bg.id and ug.deleted_flag='N'
left join dj_car_life_upgrade_goods_provider_ref ugpr on ug.id = ugpr.upgrade_goods_id and ugpr.deleted_flag = 'N'
<include refid="listWithPageCondition"/>
GROUP BY bg.id
order by bg.updated_date desc
......@@ -664,6 +665,7 @@
from dj_car_life_base_goods bg
left join dj_car_life_goods_info gi on gi.goods_code=bg.goods_code and gi.deleted_flag='N' and gi.`status` = 1
left join dj_car_life_upgrade_goods ug on ug.base_goods_id=bg.id and ug.deleted_flag='N'
left join dj_car_life_upgrade_goods_provider_ref ugpr on ug.id = ugpr.upgrade_goods_id and ugpr.deleted_flag = 'N'
<include refid="listWithPageCondition"/>
</select>
......@@ -971,7 +973,7 @@
and ug.third_party_code like concat('%',#{thirdPartyCode},'%')
</if>
<if test="providerIds != null and providerIds.size() > 0">
and gi.provider_id in
and ugpr.provider_id in
<foreach collection="providerIds" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
......
......@@ -53,9 +53,7 @@
i.upgrade_flag,
i.yq_merchant_id,
inventory_type as inventory_type,
null as orderMerchantName,
'' AS storeUsage,
null AS successDate
null as orderMerchantName
FROM dj_car_life_goods_warehousing_info i
LEFT JOIN dj_car_life_upgrade_goods ug ON i.upgrade_goods_id = ug.id
left join dj_car_life_goods_info gi on gi.deleted_flag = 'N' and gi.goods_code = ug.goods_code
......@@ -116,14 +114,11 @@
r.upgrade_flag,
r.yq_merchant_id,
r.inventory_type,
r.order_merchant_name as orderMerchantName,
r.store_usage AS storeUsage,
po.success_date AS successDate
r.order_merchant_name as orderMerchantName
FROM dj_car_life_merchant_goods_stock_reduce_record r
LEFT JOIN dj_car_life_upgrade_goods ug ON r.upgrade_goods_id = ug.id
left join dj_car_life_goods_info gi on gi.deleted_flag = 'N' and gi.goods_code = ug.goods_code
Left join dj_car_life_pay_order po on r.business_code = po.order_code
WHERE r.deleted_flag = 'N' and po.deleted_flag = 'N'
WHERE r.deleted_flag = 'N'
<if test="yqMerchantIds != null and yqMerchantIds.size() > 0">
AND r.yq_merchant_id IN
<foreach collection="yqMerchantIds" item="item" open="(" separator="," close=")">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!