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 ddbf9769
authored
May 08, 2026
by
潘诗林
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
v5.8.0 dml语句
1 parent
af30f053
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
105 additions
and
0 deletions
10_v5.8.0_20260515/sql/DML/dj组dj_smartcarlife_dml.sql
10_v5.8.0_20260515/sql/DML/dj组dj_smartcarlife_dml.sql
View file @
ddbf976
...
...
@@ -609,4 +609,109 @@ WHERE mpgi.deleted_flag = 'N'
AND
mpgi
.
scene_type
=
0
AND
mgi
.
deleted_flag
=
'N'
AND
cc
.
category_name
=
'权益服务'
;
-- 权益
INSERT
INTO
dj_car_life_merchant_goods_inventory_type_ref
(
merchant_goods_id
,
package_code
,
inventory_type
,
merchant_id
,
created_by
,
created_date
,
updated_by
,
updated_date
,
deleted_flag
)
SELECT
newB
.
ID
,
newB
.
package_code
,
oldA
.
inventory_type
,
oldA
.
merchant_id
,
'system'
,
NOW
(),
'system'
,
NOW
(),
'N'
FROM
dj_car_life_merchant_goods_info
AS
oldB
JOIN
dj_car_life_merchant_goods_inventory_type_ref
AS
oldA
ON
oldB
.
id
=
oldA
.
merchant_goods_id
JOIN
dj_car_life_merchant_goods_info
AS
newB
ON
newB
.
merchant_goods_code
=
CONCAT
(
oldB
.
merchant_goods_code
,
'B'
);
-- 延保
INSERT
INTO
dj_car_life_merchant_goods_inventory_type_ref
(
merchant_goods_id
,
package_code
,
inventory_type
,
merchant_id
,
created_by
,
created_date
,
updated_by
,
updated_date
,
deleted_flag
)
SELECT
newB
.
ID
,
newB
.
package_code
,
oldA
.
inventory_type
,
oldA
.
merchant_id
,
'system'
,
NOW
(),
'system'
,
NOW
(),
'N'
FROM
dj_car_life_merchant_goods_info
AS
oldB
JOIN
dj_car_life_merchant_goods_inventory_type_ref
AS
oldA
ON
oldB
.
id
=
oldA
.
merchant_goods_id
JOIN
dj_car_life_merchant_goods_info
AS
newB
ON
newB
.
merchant_goods_code
=
CONCAT
(
oldB
.
merchant_goods_code
,
'D'
);
-- 权益
INSERT
INTO
dj_car_life_merchant_goods_ref
(
merchant_goods_id
,
package_code
,
merchant_id
,
merchant_name
,
created_by
,
created_date
,
updated_by
,
updated_date
,
deleted_flag
)
SELECT
newB
.
ID
,
newB
.
package_code
,
oldA
.
merchant_id
,
oldA
.
merchant_name
,
'system'
,
NOW
(),
'system'
,
NOW
(),
'N'
FROM
dj_car_life_merchant_goods_info
AS
oldB
JOIN
dj_car_life_merchant_goods_ref
AS
oldA
ON
oldB
.
id
=
oldA
.
merchant_goods_id
JOIN
dj_car_life_merchant_goods_info
AS
newB
ON
newB
.
merchant_goods_code
=
CONCAT
(
oldB
.
merchant_goods_code
,
'B'
);
-- 延保
INSERT
INTO
dj_car_life_merchant_goods_ref
(
merchant_goods_id
,
package_code
,
merchant_id
,
merchant_name
,
created_by
,
created_date
,
updated_by
,
updated_date
,
deleted_flag
)
SELECT
newB
.
ID
,
newB
.
package_code
,
oldA
.
merchant_id
,
oldA
.
merchant_name
,
'system'
,
NOW
(),
'system'
,
NOW
(),
'N'
FROM
dj_car_life_merchant_goods_info
AS
oldB
JOIN
dj_car_life_merchant_goods_ref
AS
oldA
ON
oldB
.
id
=
oldA
.
merchant_goods_id
JOIN
dj_car_life_merchant_goods_info
AS
newB
ON
newB
.
merchant_goods_code
=
CONCAT
(
oldB
.
merchant_goods_code
,
'D'
);
###
潘诗林
-----------------end---------------------
\ 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