Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
doc
/
ht_project_doc
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit be7e0383
authored
Jul 10, 2026
by
chenxi
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交SQL改动
1 parent
a8182034
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
89 additions
and
1 deletions
21_v5.8.4_20260728/sql/DML/scrm组dj_smartcarlife_dml.sql
21_v5.8.4_20260728/sql/DML/scrm组dj_smartcarlife_dml.sql
View file @
be7e038
...
@@ -103,4 +103,92 @@ where id = 1;
...
@@ -103,4 +103,92 @@ where id = 1;
###
黄炜
-----------------start--------------------
###
黄炜
-----------------start--------------------
###
黄炜
-----------------end--------------------
\ No newline at end of file
\ No newline at end of file
###
黄炜
-----------------end--------------------
###
陈希
-----------------start-------------------
----------------------dev start-------------------
-- Step 1: 所有历史未删除记录先刷为 0(自定义成本)
UPDATE
dj_car_life_merchant_goods_info
SET
product_cost_type
=
0
WHERE
deleted_flag
=
'N'
;
-- Step 2: 自营(供应商={SELF_OPERATED_SUPPLIER_ID})权益/延保刷为 1(产品自动带入成本)
UPDATE
dj_car_life_merchant_goods_info
mgi
JOIN
dj_car_life_upgrade_goods
ug
ON
ug
.
id
=
mgi
.
upgrade_goods_id
AND
ug
.
deleted_flag
=
'N'
JOIN
dj_car_life_goods_info
gi
ON
gi
.
goods_code
=
ug
.
goods_code
AND
gi
.
deleted_flag
=
'N'
SET
mgi
.
product_cost_type
=
1
WHERE
mgi
.
deleted_flag
=
'N'
AND
gi
.
supplier_code
=
'12'
-- 占位: supplier_glzy_id 配置值, 默认 '12'
AND
gi
.
goods_type
IN
(
73
,
102
,
146
,
158
,
114
);
-- 占位: {EQUITY_TYPE_IDS} → smartcarlife.goodsType.equity 配置值, 默认 126
-- 占位: {EXTENDED_INSURANCE_TYPE_IDS} → smartcarlife.goodsType.extendedInsurance 配置值, 默认 1
-----------------dev end-------------------
----------------------test start-------------------
-- Step 1: 所有历史未删除记录先刷为 0(自定义成本)
UPDATE
dj_car_life_merchant_goods_info
SET
product_cost_type
=
0
WHERE
deleted_flag
=
'N'
;
-- Step 2: 自营(供应商={SELF_OPERATED_SUPPLIER_ID})权益/延保刷为 1(产品自动带入成本)
UPDATE
dj_car_life_merchant_goods_info
mgi
JOIN
dj_car_life_upgrade_goods
ug
ON
ug
.
id
=
mgi
.
upgrade_goods_id
AND
ug
.
deleted_flag
=
'N'
JOIN
dj_car_life_goods_info
gi
ON
gi
.
goods_code
=
ug
.
goods_code
AND
gi
.
deleted_flag
=
'N'
SET
mgi
.
product_cost_type
=
1
WHERE
mgi
.
deleted_flag
=
'N'
AND
gi
.
supplier_code
=
'12'
-- 占位: supplier_glzy_id 配置值, 默认 '12'
AND
gi
.
goods_type
IN
(
105
,
109
,
110
,
111
,
112
,
113
,
121
,
125
,
200
,
228
,
267
,
159
);
-- 占位: {EQUITY_TYPE_IDS} → smartcarlife.goodsType.equity 配置值, 默认 126
-- 占位: {EXTENDED_INSURANCE_TYPE_IDS} → smartcarlife.goodsType.extendedInsurance 配置值, 默认 1
-----------------test end-------------------
----------------------beta start-------------------
-- Step 1: 所有历史未删除记录先刷为 0(自定义成本)
UPDATE
dj_car_life_merchant_goods_info
SET
product_cost_type
=
0
WHERE
deleted_flag
=
'N'
;
-- Step 2: 自营(供应商={SELF_OPERATED_SUPPLIER_ID})权益/延保刷为 1(产品自动带入成本)
UPDATE
dj_car_life_merchant_goods_info
mgi
JOIN
dj_car_life_upgrade_goods
ug
ON
ug
.
id
=
mgi
.
upgrade_goods_id
AND
ug
.
deleted_flag
=
'N'
JOIN
dj_car_life_goods_info
gi
ON
gi
.
goods_code
=
ug
.
goods_code
AND
gi
.
deleted_flag
=
'N'
SET
mgi
.
product_cost_type
=
1
WHERE
mgi
.
deleted_flag
=
'N'
AND
gi
.
supplier_code
=
'12'
-- 占位: supplier_glzy_id 配置值, 默认 '12'
AND
gi
.
goods_type
IN
(
107
,
109
,
113
);
-- 占位: {EQUITY_TYPE_IDS} → smartcarlife.goodsType.equity 配置值, 默认 126
-- 占位: {EXTENDED_INSURANCE_TYPE_IDS} → smartcarlife.goodsType.extendedInsurance 配置值, 默认 1
-----------------beta end-------------------
----------------------pro start-------------------
-- Step 1: 所有历史未删除记录先刷为 0(自定义成本)
UPDATE
dj_car_life_merchant_goods_info
SET
product_cost_type
=
0
WHERE
deleted_flag
=
'N'
;
-- Step 2: 自营(供应商={SELF_OPERATED_SUPPLIER_ID})权益/延保刷为 1(产品自动带入成本)
UPDATE
dj_car_life_merchant_goods_info
mgi
JOIN
dj_car_life_upgrade_goods
ug
ON
ug
.
id
=
mgi
.
upgrade_goods_id
AND
ug
.
deleted_flag
=
'N'
JOIN
dj_car_life_goods_info
gi
ON
gi
.
goods_code
=
ug
.
goods_code
AND
gi
.
deleted_flag
=
'N'
SET
mgi
.
product_cost_type
=
1
WHERE
mgi
.
deleted_flag
=
'N'
AND
gi
.
supplier_code
=
'12'
-- 占位: supplier_glzy_id 配置值, 默认 '12'
AND
gi
.
goods_type
IN
(
104
,
126
,
155
);
-- 占位: {EQUITY_TYPE_IDS} → smartcarlife.goodsType.equity 配置值, 默认 126
-- 占位: {EXTENDED_INSURANCE_TYPE_IDS} → smartcarlife.goodsType.extendedInsurance 配置值, 默认 1
-----------------pro end-------------------
###
陈希
-----------------end---------------------
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment