|
|
@ -6,7 +6,7 @@ |
|
|
|
<update id="syncServiceTypeByMallName"> |
|
|
|
<update id="syncServiceTypeByMallName"> |
|
|
|
UPDATE logpm_distribution_stock_article ldsa |
|
|
|
UPDATE logpm_distribution_stock_article ldsa |
|
|
|
LEFT JOIN logpm_basicdata_client lbc ON lbc.client_name = #{mallName} AND lbc.is_deleted = 0 |
|
|
|
LEFT JOIN logpm_basicdata_client lbc ON lbc.client_name = #{mallName} AND lbc.is_deleted = 0 |
|
|
|
LEFT JOIN logpm_basicdata_store_business lbsb ON lbsb.client_id = lbc.id |
|
|
|
LEFT JOIN logpm_basicdata_store_business lbsb ON lbsb.client_id = lbc.id AND lbsb.is_deleted = 0 |
|
|
|
SET ldsa.mall_id = COALESCE(lbc.id, ldsa.mall_id), |
|
|
|
SET ldsa.mall_id = COALESCE(lbc.id, ldsa.mall_id), |
|
|
|
ldsa.mall_code = COALESCE(lbc.client_code, ldsa.mall_code), |
|
|
|
ldsa.mall_code = COALESCE(lbc.client_code, ldsa.mall_code), |
|
|
|
ldsa.mall_name = COALESCE(lbc.client_name, ldsa.mall_name), |
|
|
|
ldsa.mall_name = COALESCE(lbc.client_name, ldsa.mall_name), |
|
|
|