Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
goods
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
goods
Commits
bf91e4d8
Commit
bf91e4d8
authored
Aug 31, 2021
by
jianghaiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:添加操作记录和修改文案
parent
8c928649
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
GoodsException.php
application/exception/custom/GoodsException.php
+1
-1
GoodsService.php
application/services/goods/GoodsService.php
+16
-0
No files found.
application/exception/custom/GoodsException.php
View file @
bf91e4d8
...
...
@@ -70,6 +70,6 @@ class GoodsException extends BaseException
49
=>
'库存不得小于已售库存'
,
self
::
RULE_LIMIT_ERROR
=>
'单人可买上限填写错误'
,
self
::
NOT_FIND_MARKETING
=>
'找不到活动'
,
52
=>
'
商品过期时间小于等于上架
时间'
,
52
=>
'
过期时间不得小于等于上架开始
时间'
,
];
}
\ No newline at end of file
application/services/goods/GoodsService.php
View file @
bf91e4d8
...
...
@@ -635,6 +635,22 @@ class GoodsService
}
}
$operatorId
=
empty
(
$params
[
"user_id"
])
?
0
:
$params
[
"user_id"
];
$operatorName
=
!
empty
(
$params
[
"user_name"
])
?
$params
[
"user_name"
]
:
''
;
//商品操作记录
$record
=
[
"goods_spu_id"
=>
$goodsSpuId
,
"goods_sku_id"
=>
$goodsSkuId
,
"operator_id"
=>
$operatorId
,
"operator_name"
=>
$operatorName
,
"goods_status"
=>
$sku
[
"audit_status"
],
"online_status"
=>
!
empty
(
$goodsSkuData
[
'online_status'
])
?
$goodsSkuData
[
'online_status'
]
:
$sku
[
"online_status"
],
"before_version"
=>
$sku
[
"goods_version"
],
"after_version"
=>
$sku
[
"goods_version"
],
"note"
=>
empty
(
$params
[
"rejected_reason"
])
?
""
:
$params
[
"rejected_reason"
],
];
GoodsOperationRecord
::
insertRecord
(
$record
);
GoodsSku
::
save
(
$goodsSkuData
,
[
"goods_sku_id"
=>
$goodsSkuId
]);
//上架的话,生成快照
self
::
addGoodsSnapshot
(
$sku
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment