Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
79857b71
Commit
79857b71
authored
Sep 11, 2020
by
linboxuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add tmStatusCheck
parent
833b535e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
1 deletions
+31
-1
center-tmtransaction/app/base/api/impl/action/trademarktransaction.js
+6
-0
center-tmtransaction/app/base/service/impl/tm/trademarktransactionSve.js
+25
-1
No files found.
center-tmtransaction/app/base/api/impl/action/trademarktransaction.js
View file @
79857b71
...
...
@@ -46,6 +46,12 @@ class ProductAPI extends APIBase {
case
"createjsonfile"
:
// 2020 0908 lin 新增 json文件生成
opResult
=
await
this
.
trademarkTransactionSve
.
createjsonfile
();
break
;
case
"tmStatusCheck"
:
// 2020 0911 lin 新增 上架状态查询
opResult
=
await
this
.
trademarkTransactionSve
.
tmStatusCheck
(
pobj
,
pobj
.
actionBody
);
break
;
case
"tmStatus"
:
// 2020 0911 lin 新增 上架状态查询
opResult
=
await
this
.
trademarkTransactionSve
.
tmStatusCheck
(
pobj
,
pobj
.
actionBody
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
...
...
center-tmtransaction/app/base/service/impl/tm/trademarktransactionSve.js
View file @
79857b71
...
...
@@ -500,7 +500,7 @@ class TrademarktransactionService extends ServiceBase {
return
system
.
getResultFail
(
-
103
,
"参数错误"
);
}
if
(
actionBody
.
tm
.
length
==
0
)
{
return
system
.
getResultFail
(
-
110
,
"标源
id
为空"
);
return
system
.
getResultFail
(
-
110
,
"标源为空"
);
}
switch
(
actionBody
.
status
)
{
// 如果下架 全部下架
...
...
@@ -540,6 +540,13 @@ class TrademarktransactionService extends ServiceBase {
// 可以优化的地方:比如已经是想修改的状态 怎么做跳过?其他验证是否完善?
}
break
;
case
"oversales"
:
for
(
var
i
=
0
;
i
<
actionBody
.
tm
.
length
;
i
++
)
{
await
this
.
dao
.
model
.
update
({
publish_status
:
"oversales"
},{
where
:
{
id
:
actionBody
.
tm
[
i
].
id
}
})
}
// 这个方法会把其他字段改为null 不使用了
// var tmUpdateResult = await this.dao.model.bulkCreate(actionBody.tm,{updateOnDuplicate:true})
break
;
default
:
return
system
.
getResultFail
(
-
111
,
"修改状态错误"
);
}
...
...
@@ -809,6 +816,23 @@ class TrademarktransactionService extends ServiceBase {
}
async
tmStatusCheck
(
pobj
,
actionBody
)
{
if
(
!
pobj
||
!
pobj
.
actionBody
)
{
return
system
.
getResultFail
(
-
103
,
"参数错误"
);
}
var
tmInfo
=
await
this
.
dao
.
model
.
findOne
({
where
:
{
code
:
actionBody
.
code
,
},
attributes
:
[
"id"
,
"publish_status"
],
raw
:
true
});
return
system
.
getResultSuccess
(
tmInfo
);
}
}
module
.
exports
=
TrademarktransactionService
;
...
...
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