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
2c7367f6
Commit
2c7367f6
authored
Sep 09, 2020
by
linboxuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tmBatchUpload update
parent
9170d35a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
36 deletions
+59
-36
center-tmtransaction/app/base/service/impl/tm/trademarktransactionSve.js
+57
-35
center-tmtransaction/app/config/platform.js
+2
-1
No files found.
center-tmtransaction/app/base/service/impl/tm/trademarktransactionSve.js
View file @
2c7367f6
...
...
@@ -177,40 +177,35 @@ class TrademarktransactionService extends ServiceBase {
* {
"status": 1,
"message": "success",
"data": [
{
"id": 175625,
"code": "123123",
"name": "商标名字",//商标名称 这个是es真实的商标名字
"channel_code": "18",
"channel_name": "ali",
"excelName": "商标名字",// 上传时的商标名
"tm_applier": "18",
"ncl_one_code": "ali",
"business_quoted_price": "123",
"platform_quoted_price": "123",
"pic_url": "123",
"publish_status_name": "审核中",
"publish_status": "audit",
"tm_group": "123",
"tm_service_item": "123",
"tm_introduction": "123",
"tm_start_day": "0122-12-31T15:54:17.000Z",
"tm_end_day": "0122-12-31T15:54:17.000Z",
"contacts": "13911391996",
"mobile": "13911391996",
"notes": "13911391996",
"op_notes": "13911391996",
"trademark_type_name": "普通商标",
"trademark_type": "ordinary",
"tm_regist_day": "123",
"tm_ncl_third": "123",
"created_at": "2020-09-03T08:43:35.602Z",
"updated_at": "2020-09-03T08:43:35.602Z",
"version": 0
}
],
"requestId": "8e1f04d0-edc1-11ea-8143-5f78fb49f643"
"data": {
"tm": [
{
"id": 175706,
"code": "224262441",
"name": "阿里",
"channel_code": 10,
"channel_name": "公司宝",
"tm_applier": "公司宝",
"ncl_one_code": "31",
"business_quoted_price": "12341",
"pic_url": null,
"publish_status": "audit",
"tm_service_item": "",
"tm_start_day": null,
"tm_end_day": null,
"contacts": "1234",
"mobile": "1324",
"trademark_type_name": "普通商标",
"trademark_type": "ordinary",
"tm_regist_day": "",
"created_at": "2020-09-09T09:05:53.482Z",
"updated_at": "2020-09-09T09:05:53.482Z",
"version": 0
}
],
"successCount": 1
},
"requestId": "a9fb7670-f27b-11ea-8a62-1d06e253dc40"
}
* @apiErrorExample {json} 失败示例:
* {"error": ""}
...
...
@@ -227,8 +222,35 @@ class TrademarktransactionService extends ServiceBase {
let
objlist
=
await
this
.
addbaseinfo
(
actionbody
.
tm
);
// console.log(objlist);
// console.log("-------------------------")
// 2020 0909 lin 新增功能 查询code是否存在如果价格 高于之前的code 就价格异常
// count作为插入成功数量
var
count
=
0
;
for
(
var
i
=
0
;
i
<
objlist
.
length
;
i
++
)
{
var
tmInfo
=
await
this
.
dao
.
model
.
findOne
({
where
:
{
channel_code
:
objlist
[
i
].
channel_code
,
code
:
objlist
[
i
].
code
,
},
attributes
:
[
"id"
,
"business_quoted_price"
],
raw
:
true
});
if
(
tmInfo
)
{
if
(
tmInfo
.
business_quoted_price
<
objlist
[
i
].
business_quoted_price
)
{
objlist
[
i
][
"publish_status"
]
=
"fail"
continue
;
}
}
count
++
;
}
let
res
=
await
this
.
dao
.
model
.
bulkCreate
(
objlist
);
return
system
.
getResultSuccess
(
res
);
var
data
=
{
tm
:
res
,
successCount
:
count
}
return
system
.
getResultSuccess
(
data
);
}
/**
...
...
center-tmtransaction/app/config/platform.js
View file @
2c7367f6
...
...
@@ -30,7 +30,7 @@ module.exports = {
"330"
:
"已作废"
},
need_status
:{
1
:
"已提交"
,
2
:
"待顾问反馈"
,
3
:
"待用户确认"
,
4
:
"已完成"
,
5
:
"已关闭"
},
license_type
:{
"1"
:
"ICP资质"
,
2
:
"EDI资质"
},
publish_status
:
{
"audit"
:
"审核中"
,
"uppershelf"
:
"上架"
,
"lowershelf"
:
"下架"
,
"haltsales"
:
"停售"
,
"oversales"
:
"已出售"
,
"addbaseinfo"
:
"待补充信息"
},
// 剩余几个人是什么?fail,success
publish_status
:
{
"audit"
:
"审核中"
,
"uppershelf"
:
"上架"
,
"lowershelf"
:
"下架"
,
"haltsales"
:
"停售"
,
"oversales"
:
"已出售"
,
"addbaseinfo"
:
"待补充信息"
,
"fail"
:
"发布失败"
},
// 剩余几个人是什么?fail,success
trademark_type
:
{
"ordinary"
:
"普通商标"
,
"specialoffer"
:
"特价"
,
"highquality"
:
"精品"
,
"hot"
:
"热门"
,
"recommended"
:
"推荐"
}
}
}
\ No newline at end of file
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