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
077e8b08
Commit
077e8b08
authored
Mar 23, 2022
by
王悦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add new
parent
baac8efc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
3 deletions
+35
-3
center-tmtransaction/app/base/api/impl/action/trademarktransaction.js
+3
-0
center-tmtransaction/app/base/db/models/tm/trademarktransaction.js
+2
-0
center-tmtransaction/app/base/service/impl/tm/trademarktransactionSve.js
+24
-2
center-tmtransaction/app/base/utils/aliClient.js
+6
-1
No files found.
center-tmtransaction/app/base/api/impl/action/trademarktransaction.js
View file @
077e8b08
...
@@ -25,6 +25,9 @@ class ProductAPI extends APIBase {
...
@@ -25,6 +25,9 @@ class ProductAPI extends APIBase {
case
"tmBatchUpload"
:
// 2020 0901 lin 新增 标源批传
case
"tmBatchUpload"
:
// 2020 0901 lin 新增 标源批传
opResult
=
await
this
.
trademarkTransactionSve
.
tmBatchUpload
(
pobj
,
pobj
.
actionBody
);
opResult
=
await
this
.
trademarkTransactionSve
.
tmBatchUpload
(
pobj
,
pobj
.
actionBody
);
break
;
break
;
case
"tmAddUpload"
:
// 2020 0901 lin 新增 标源批传
opResult
=
await
this
.
trademarkTransactionSve
.
tmAddUpload
(
pobj
,
pobj
.
actionBody
);
break
;
case
"tmInfo"
:
// 2020 0903 lin 新增 标原管理
case
"tmInfo"
:
// 2020 0903 lin 新增 标原管理
opResult
=
await
this
.
trademarkTransactionSve
.
tmInfo
(
pobj
,
pobj
.
actionBody
);
opResult
=
await
this
.
trademarkTransactionSve
.
tmInfo
(
pobj
,
pobj
.
actionBody
);
break
;
break
;
...
...
center-tmtransaction/app/base/db/models/tm/trademarktransaction.js
View file @
077e8b08
...
@@ -73,6 +73,8 @@ module.exports = (db, DataTypes) => {
...
@@ -73,6 +73,8 @@ module.exports = (db, DataTypes) => {
type
:
DataTypes
.
STRING
,
//转让类型
type
:
DataTypes
.
STRING
,
//转让类型
reason
:
DataTypes
.
STRING
,
//转让原因
reason
:
DataTypes
.
STRING
,
//转让原因
fail_reason
:
DataTypes
.
STRING
,
//失败原因
fail_reason
:
DataTypes
.
STRING
,
//失败原因
TradeTmDetailJson
:
DataTypes
.
JSON
,
TmType
:
DataTypes
.
STRING
,
// 商标标签: NORMAL: 普通标 (不传默认普通) STORY:故事商标 BARGAIN:特价 SELECTED:甄选
},
{
},
{
paranoid
:
true
,
//假的删除
paranoid
:
true
,
//假的删除
underscored
:
true
,
underscored
:
true
,
...
...
center-tmtransaction/app/base/service/impl/tm/trademarktransactionSve.js
View file @
077e8b08
...
@@ -299,7 +299,25 @@ class TrademarktransactionService extends ServiceBase {
...
@@ -299,7 +299,25 @@ class TrademarktransactionService extends ServiceBase {
}
}
return
system
.
getResultSuccess
(
data
);
return
system
.
getResultSuccess
(
data
);
}
}
//甄选特价品牌商标的上传
async
tmAddUpload
(
pobj
,
actionbody
)
{
if
(
!
pobj
||
!
actionbody
)
{
return
system
.
getResultFail
(
-
101
,
"actionBody is empty"
);
}
let
objlist
=
await
this
.
addbaseinfo
([
actionbody
]);
let
res
=
"ok"
for
(
var
i
=
0
;
i
<
objlist
.
length
;
i
++
)
{
// 2020 0910 lin 新增 platform_quoted_price = business_quoted_price * 1.2 + 1000
objlist
[
i
].
platform_quoted_price
=
Number
(
objlist
[
i
].
business_quoted_price
)
*
1.2
+
1000
;
if
(
objlist
[
i
].
id
)
await
this
.
dao
.
model
.
updateByWhere
(
objlist
[
i
],
{
where
:
{
id
:
objlist
[
i
].
id
}})
else
res
=
await
this
.
dao
.
model
.
create
(
objlist
[
i
]);
await
this
.
updateAlistatus
([
objlist
[
i
].
id
||
res
.
id
])
}
var
data
=
res
return
system
.
getResultSuccess
(
data
);
}
/**
/**
* @api {post} /tmtransaction/action/trademarktransaction/springBoard 标原列表
* @api {post} /tmtransaction/action/trademarktransaction/springBoard 标原列表
* @apiGroup 标源管理
* @apiGroup 标源管理
...
@@ -417,6 +435,10 @@ class TrademarktransactionService extends ServiceBase {
...
@@ -417,6 +435,10 @@ class TrademarktransactionService extends ServiceBase {
whereObj
[
"publish_status"
]
=
ab
.
publish_status
;
whereObj
[
"publish_status"
]
=
ab
.
publish_status
;
countObj
[
"publish_status"
]
=
ab
.
publish_status
;
countObj
[
"publish_status"
]
=
ab
.
publish_status
;
}
}
if
(
ab
.
TmType
)
{
// publish_status
whereObj
[
"TmType"
]
=
ab
.
TmType
;
countObj
[
"TmType"
]
=
ab
.
TmType
;
}
var
count
=
await
this
.
dao
.
findCount
({
where
:
countObj
});
var
count
=
await
this
.
dao
.
findCount
({
where
:
countObj
});
var
list
=
await
this
.
dao
.
model
.
findAll
({
var
list
=
await
this
.
dao
.
model
.
findAll
({
where
:
whereObj
,
where
:
whereObj
,
...
@@ -431,7 +453,7 @@ class TrademarktransactionService extends ServiceBase {
...
@@ -431,7 +453,7 @@ class TrademarktransactionService extends ServiceBase {
"contacts"
,
//联系人
"contacts"
,
//联系人
"mobile"
,
//联系电话
"mobile"
,
//联系电话
"name"
,
//商标名称
"name"
,
//商标名称
"
trademark_type_nam
e"
,
"
TmTyp
e"
,
"ncl_one_code"
,
"ncl_one_code"
,
"channel_name"
,
"channel_name"
,
"tm_applier"
,
"tm_applier"
,
...
...
center-tmtransaction/app/base/utils/aliClient.js
View file @
077e8b08
...
@@ -41,7 +41,7 @@ exports.buildobj=(sqlobj,status)=>{
...
@@ -41,7 +41,7 @@ exports.buildobj=(sqlobj,status)=>{
return
null
return
null
if
(
sqlobj
.
ncl_one_code
.
length
===
1
)
if
(
sqlobj
.
ncl_one_code
.
length
===
1
)
nclcode
=
"0"
+
nclcode
nclcode
=
"0"
+
nclcode
return
{
let
data
=
{
"beginTime"
:
1574388139000
,
"beginTime"
:
1574388139000
,
"classificationCode"
:
nclcode
,
"classificationCode"
:
nclcode
,
"description"
:
JSON
.
parse
(
sqlobj
.
tm_ncl_third
).
join
(
","
),
"description"
:
JSON
.
parse
(
sqlobj
.
tm_ncl_third
).
join
(
","
),
...
@@ -59,6 +59,11 @@ exports.buildobj=(sqlobj,status)=>{
...
@@ -59,6 +59,11 @@ exports.buildobj=(sqlobj,status)=>{
"tmName"
:
sqlobj
.
name
,
"tmName"
:
sqlobj
.
name
,
"tmNumber"
:
sqlobj
.
code
"tmNumber"
:
sqlobj
.
code
}
}
if
(
sqlobj
.
TmType
!==
"NORMAL"
){
data
.
TmType
=
sqlobj
.
TmType
data
.
TradeTmDetailJson
=
JSON
.
stringify
(
sqlobj
.
TradeTmDetailJson
)
}
return
data
}
catch
(
e
){
}
catch
(
e
){
return
null
return
null
}
}
...
...
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