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
11977b6a
Commit
11977b6a
authored
Oct 12, 2020
by
任晓松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
全类保护
parent
4045e432
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
1 deletions
+30
-1
center-order/app/base/api/impl/action/tmOrder.js
+3
-0
center-order/app/base/service/impl/dbcorder/orderinfoSve.js
+27
-1
No files found.
center-order/app/base/api/impl/action/tmOrder.js
View file @
11977b6a
...
@@ -30,6 +30,9 @@ class OrderAPI extends APIBase {
...
@@ -30,6 +30,9 @@ class OrderAPI extends APIBase {
case
"getNclByCode"
:
case
"getNclByCode"
:
opResult
=
await
this
.
orderinfoSve
.
getNclByCode
(
pobj
);
opResult
=
await
this
.
orderinfoSve
.
getNclByCode
(
pobj
);
break
;
break
;
case
"getAllNcl"
:
opResult
=
await
this
.
orderinfoSve
.
getAllNcl
(
pobj
);
break
;
default
:
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
break
;
...
...
center-order/app/base/service/impl/dbcorder/orderinfoSve.js
View file @
11977b6a
...
@@ -1857,7 +1857,7 @@ class OrderInfoService extends ServiceBase {
...
@@ -1857,7 +1857,7 @@ class OrderInfoService extends ServiceBase {
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
}
//智能选择
、全类保护
尼斯类获取
//智能选择 尼斯类获取
async
getNclByCode
(
pobj
){
async
getNclByCode
(
pobj
){
var
sql
=
"select `business_code`,`ncl_content` from b_business_ncl where business_code=:business_code LIMIT 1"
;
var
sql
=
"select `business_code`,`ncl_content` from b_business_ncl where business_code=:business_code LIMIT 1"
;
var
paramWhere
=
{
business_code
:
pobj
.
actionBody
.
businessCode
};
var
paramWhere
=
{
business_code
:
pobj
.
actionBody
.
businessCode
};
...
@@ -1867,5 +1867,30 @@ class OrderInfoService extends ServiceBase {
...
@@ -1867,5 +1867,30 @@ class OrderInfoService extends ServiceBase {
}
}
return
system
.
getResult
(
result
[
0
].
ncl_content
);
return
system
.
getResult
(
result
[
0
].
ncl_content
);
}
}
//智能选择 尼斯类获取
async
getAllNcl
(
pobj
){
var
sql
=
"select `ncl_content` from b_business_ncl where business_code like '%类%'"
;
var
result
=
await
this
.
customQuery
(
sql
);
if
(
Object
.
keys
(
result
).
length
==
0
){
return
system
.
getResultFail
(
-
1
,
'find err'
);
}
let
ret
=
[]
result
.
forEach
(
item
=>
{
let
Arr
=
item
.
ncl_content
.
nclThree
;
let
arrNew
=
[];
for
(
var
i
=
0
;
i
<
10
;
i
++
)
{
var
_num
=
Math
.
floor
(
Math
.
random
()
*
Arr
.
length
)
var
mm
=
Arr
[
_num
];
Arr
.
splice
(
_num
,
1
)
arrNew
.
push
(
mm
)
}
item
.
ncl_content
.
nclThree
=
arrNew
;
ret
.
push
(
item
.
ncl_content
);
})
return
system
.
getResult
(
ret
);
}
}
}
module
.
exports
=
OrderInfoService
;
module
.
exports
=
OrderInfoService
;
\ 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