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
8963ffd5
Commit
8963ffd5
authored
Oct 22, 2020
by
Sxy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 代码规范
parent
8ee442cc
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
208 additions
and
133 deletions
+208
-133
ic-deliver/app/base/controller/impl/bizchance/cacheinfoCtl.js
+45
-19
ic-deliver/app/base/controller/impl/bizchance/deliverybillCtl.js
+40
-18
ic-deliver/app/base/controller/impl/common/cachsearchesCtl.js
+6
-3
ic-deliver/app/base/db/cache/CacheLocker.js
+0
-28
ic-deliver/app/base/db/impl/auth/userDao.js
+27
-21
ic-deliver/app/base/db/impl/bizchance/bizoptDao.js
+14
-10
ic-deliver/app/base/db/impl/bizchance/cacheinfoDao.js
+6
-3
ic-deliver/app/base/db/impl/common/connection.js
+2
-1
ic-deliver/app/base/service/impl/auth/authSve.js
+17
-5
ic-deliver/app/base/service/impl/bizchance/bizoptSve.js
+14
-4
ic-deliver/app/base/service/impl/bizchance/cacheinfoSve.js
+10
-3
ic-deliver/app/base/service/impl/bizchance/schemeSve.js
+6
-3
ic-deliver/app/base/service/impl/common/appSve.js
+2
-2
ic-deliver/app/base/service/impl/common/cachsearchesSve.js
+18
-12
ic-deliver/app/base/utils/businessManager/authUtils.js
+1
-1
No files found.
ic-deliver/app/base/controller/impl/bizchance/cacheinfoCtl.js
View file @
8963ffd5
...
@@ -23,25 +23,35 @@ class CacheInfoCtl extends CtlBase {
...
@@ -23,25 +23,35 @@ class CacheInfoCtl extends CtlBase {
rarr
.
cacheInfo
=
rs
.
cache_info
;
rarr
.
cacheInfo
=
rs
.
cache_info
;
if
(
rarr
.
cacheInfo
&&
rarr
.
cacheInfo
!=
'undefined'
)
{
if
(
rarr
.
cacheInfo
&&
rarr
.
cacheInfo
!=
'undefined'
)
{
if
(
rarr
.
cacheInfo
.
cmpContactInfo
.
contactsPhone
&&
rarr
.
cacheInfo
.
cmpContactInfo
.
contactsPhone
!=
'undefined'
)
{
if
(
rarr
.
cacheInfo
.
cmpContactInfo
.
contactsPhone
&&
rarr
.
cacheInfo
.
cmpContactInfo
.
contactsPhone
!=
'undefined'
)
{
rarr
.
cacheInfo
.
cmpContactInfo
.
contactsPhone
=
system
.
decryptStr
(
rarr
.
cacheInfo
.
cmpContactInfo
.
contactsPhone
);
rarr
.
cacheInfo
.
cmpContactInfo
.
contactsPhone
=
(
system
.
decryptStr
(
rarr
.
cacheInfo
.
cmpContactInfo
.
contactsPhone
)
);
}
}
if
(
rarr
.
cacheInfo
.
positionData
&&
rarr
.
cacheInfo
.
positionData
.
length
>
0
)
{
if
(
rarr
.
cacheInfo
.
positionData
&&
rarr
.
cacheInfo
.
positionData
.
length
>
0
)
{
for
(
var
i
=
0
;
i
<
rarr
.
cacheInfo
.
positionData
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
rarr
.
cacheInfo
.
positionData
.
length
;
i
++
)
{
if
(
rarr
.
cacheInfo
.
positionData
[
i
].
fixedPhone
&&
rarr
.
cacheInfo
.
positionData
[
i
].
fixedPhone
!=
'undefined'
)
{
if
(
rarr
.
cacheInfo
.
positionData
[
i
].
fixedPhone
&&
rarr
.
cacheInfo
.
positionData
[
i
].
fixedPhone
!=
'undefined'
)
{
rarr
.
cacheInfo
.
positionData
[
i
].
fixedPhone
=
system
.
decryptStr
(
rarr
.
cacheInfo
.
positionData
[
i
].
fixedPhone
);
rarr
.
cacheInfo
.
positionData
[
i
].
fixedPhone
=
(
system
.
decryptStr
(
rarr
.
cacheInfo
.
positionData
[
i
].
fixedPhone
)
);
}
}
if
(
rarr
.
cacheInfo
.
positionData
[
i
].
mobilePhone
&&
rarr
.
cacheInfo
.
positionData
[
i
].
mobilePhone
!=
'undefined'
)
{
if
(
rarr
.
cacheInfo
.
positionData
[
i
].
mobilePhone
&&
rarr
.
cacheInfo
.
positionData
[
i
].
mobilePhone
!=
'undefined'
)
{
rarr
.
cacheInfo
.
positionData
[
i
].
mobilePhone
=
system
.
decryptStr
(
rarr
.
cacheInfo
.
positionData
[
i
].
mobilePhone
);
rarr
.
cacheInfo
.
positionData
[
i
].
mobilePhone
=
(
system
.
decryptStr
(
rarr
.
cacheInfo
.
positionData
[
i
].
mobilePhone
)
);
}
}
}
}
}
}
if
(
rarr
.
cacheInfo
.
contributionData
&&
rarr
.
cacheInfo
.
contributionData
.
length
>
0
)
{
if
(
rarr
.
cacheInfo
.
contributionData
&&
rarr
.
cacheInfo
.
contributionData
.
length
>
0
)
{
for
(
var
i
=
0
;
i
<
rarr
.
cacheInfo
.
contributionData
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
rarr
.
cacheInfo
.
contributionData
.
length
;
i
++
)
{
if
(
rarr
.
cacheInfo
.
contributionData
[
i
].
phoneNumber
&&
rarr
.
cacheInfo
.
contributionData
[
i
].
phoneNumber
!=
'undefined'
)
{
if
(
rarr
.
cacheInfo
.
contributionData
[
i
].
phoneNumber
&&
rarr
.
cacheInfo
.
contributionData
[
i
].
phoneNumber
!=
'undefined'
)
{
rarr
.
cacheInfo
.
contributionData
[
i
].
phoneNumber
=
system
.
decryptStr
(
rarr
.
cacheInfo
.
contributionData
[
i
].
phoneNumber
);
rarr
.
cacheInfo
.
contributionData
[
i
].
phoneNumber
=
(
system
.
decryptStr
(
rarr
.
cacheInfo
.
contributionData
[
i
].
phoneNumber
)
);
}
}
if
(
rarr
.
cacheInfo
.
contributionData
[
i
].
IdentificationNumber
&&
rarr
.
cacheInfo
.
contributionData
[
i
].
IdentificationNumber
!=
'undefined'
)
{
if
(
rarr
.
cacheInfo
.
contributionData
[
i
].
IdentificationNumber
&&
rarr
.
cacheInfo
.
contributionData
[
i
].
IdentificationNumber
!=
'undefined'
)
{
rarr
.
cacheInfo
.
contributionData
[
i
].
IdentificationNumber
=
system
.
decryptStr
(
rarr
.
cacheInfo
.
contributionData
[
i
].
IdentificationNumber
);
rarr
.
cacheInfo
.
contributionData
[
i
].
IdentificationNumber
=
(
system
.
decryptStr
(
rarr
.
cacheInfo
.
contributionData
[
i
].
IdentificationNumber
)
);
}
}
}
}
}
}
...
@@ -72,27 +82,35 @@ class CacheInfoCtl extends CtlBase {
...
@@ -72,27 +82,35 @@ class CacheInfoCtl extends CtlBase {
try
{
try
{
if
(
pobj
.
cacheInfo
.
cmpContactInfo
&&
pobj
.
cacheInfo
.
cmpContactInfo
!=
'undefined'
)
{
if
(
pobj
.
cacheInfo
.
cmpContactInfo
&&
pobj
.
cacheInfo
.
cmpContactInfo
!=
'undefined'
)
{
if
(
pobj
.
cacheInfo
.
cmpContactInfo
.
contactsPhone
&&
pobj
.
cacheInfo
.
cmpContactInfo
.
contactsPhone
!=
'undefined'
)
{
if
(
pobj
.
cacheInfo
.
cmpContactInfo
.
contactsPhone
&&
pobj
.
cacheInfo
.
cmpContactInfo
.
contactsPhone
!=
'undefined'
)
{
pobj
.
cacheInfo
.
cmpContactInfo
.
contactsPhone
=
system
.
encryptStr
(
pobj
.
cacheInfo
.
cmpContactInfo
.
contactsPhone
);
pobj
.
cacheInfo
.
cmpContactInfo
.
contactsPhone
=
(
system
.
encryptStr
(
pobj
.
cacheInfo
.
cmpContactInfo
.
contactsPhone
)
);
}
}
}
}
if
(
pobj
.
cacheInfo
.
positionData
&&
pobj
.
cacheInfo
.
positionData
.
length
>
0
)
{
if
(
pobj
.
cacheInfo
.
positionData
&&
pobj
.
cacheInfo
.
positionData
.
length
>
0
)
{
for
(
var
i
=
0
;
i
<
pobj
.
cacheInfo
.
positionData
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
pobj
.
cacheInfo
.
positionData
.
length
;
i
++
)
{
if
(
pobj
.
cacheInfo
.
positionData
[
i
].
fixedPhone
&&
pobj
.
cacheInfo
.
positionData
[
i
].
fixedPhone
!=
'undefined'
)
{
if
(
pobj
.
cacheInfo
.
positionData
[
i
].
fixedPhone
&&
pobj
.
cacheInfo
.
positionData
[
i
].
fixedPhone
!=
'undefined'
)
{
pobj
.
cacheInfo
.
positionData
[
i
].
fixedPhone
=
system
.
encryptStr
(
pobj
.
cacheInfo
.
positionData
[
i
].
fixedPhone
);
pobj
.
cacheInfo
.
positionData
[
i
].
fixedPhone
=
system
.
encryptStr
(
pobj
.
cacheInfo
.
positionData
[
i
].
fixedPhone
);
}
}
if
(
pobj
.
cacheInfo
.
positionData
[
i
].
mobilePhone
&&
pobj
.
cacheInfo
.
positionData
[
i
].
mobilePhone
!=
'undefined'
)
{
if
(
pobj
.
cacheInfo
.
positionData
[
i
].
mobilePhone
&&
pobj
.
cacheInfo
.
positionData
[
i
].
mobilePhone
!=
'undefined'
)
{
pobj
.
cacheInfo
.
positionData
[
i
].
mobilePhone
=
system
.
encryptStr
(
pobj
.
cacheInfo
.
positionData
[
i
].
mobilePhone
);
pobj
.
cacheInfo
.
positionData
[
i
].
mobilePhone
=
(
system
.
encryptStr
(
pobj
.
cacheInfo
.
positionData
[
i
].
mobilePhone
)
);
}
}
}
}
}
}
if
(
pobj
.
cacheInfo
.
contributionData
&&
pobj
.
cacheInfo
.
contributionData
.
length
>
0
)
{
if
(
pobj
.
cacheInfo
.
contributionData
&&
pobj
.
cacheInfo
.
contributionData
.
length
>
0
)
{
for
(
var
i
=
0
;
i
<
pobj
.
cacheInfo
.
contributionData
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
pobj
.
cacheInfo
.
contributionData
.
length
;
i
++
)
{
if
(
pobj
.
cacheInfo
.
contributionData
[
i
].
phoneNumber
&&
pobj
.
cacheInfo
.
contributionData
[
i
].
phoneNumber
!=
'undefined'
)
{
if
(
pobj
.
cacheInfo
.
contributionData
[
i
].
phoneNumber
&&
pobj
.
cacheInfo
.
contributionData
[
i
].
phoneNumber
!=
'undefined'
)
{
pobj
.
cacheInfo
.
contributionData
[
i
].
phoneNumber
=
system
.
encryptStr
(
pobj
.
cacheInfo
.
contributionData
[
i
].
phoneNumber
);
pobj
.
cacheInfo
.
contributionData
[
i
].
phoneNumber
=
(
system
.
encryptStr
(
pobj
.
cacheInfo
.
contributionData
[
i
].
phoneNumber
)
);
}
}
if
(
pobj
.
cacheInfo
.
contributionData
[
i
].
IdentificationNumber
&&
pobj
.
cacheInfo
.
contributionData
[
i
].
IdentificationNumber
!=
'undefined'
)
{
if
(
pobj
.
cacheInfo
.
contributionData
[
i
].
IdentificationNumber
&&
pobj
.
cacheInfo
.
contributionData
[
i
].
IdentificationNumber
!=
'undefined'
)
{
pobj
.
cacheInfo
.
contributionData
[
i
].
IdentificationNumber
=
system
.
encryptStr
(
pobj
.
cacheInfo
.
contributionData
[
i
].
IdentificationNumber
);
pobj
.
cacheInfo
.
contributionData
[
i
].
IdentificationNumber
=
(
system
.
encryptStr
(
pobj
.
cacheInfo
.
contributionData
[
i
].
IdentificationNumber
)
);
}
}
}
}
}
}
...
@@ -115,27 +133,35 @@ class CacheInfoCtl extends CtlBase {
...
@@ -115,27 +133,35 @@ class CacheInfoCtl extends CtlBase {
try
{
try
{
if
(
pobj
.
cacheInfo
.
cmpContactInfo
&&
pobj
.
cacheInfo
.
cmpContactInfo
!=
'undefined'
)
{
if
(
pobj
.
cacheInfo
.
cmpContactInfo
&&
pobj
.
cacheInfo
.
cmpContactInfo
!=
'undefined'
)
{
if
(
pobj
.
cacheInfo
.
cmpContactInfo
.
contactsPhone
&&
pobj
.
cacheInfo
.
cmpContactInfo
.
contactsPhone
!=
'undefined'
)
{
if
(
pobj
.
cacheInfo
.
cmpContactInfo
.
contactsPhone
&&
pobj
.
cacheInfo
.
cmpContactInfo
.
contactsPhone
!=
'undefined'
)
{
pobj
.
cacheInfo
.
cmpContactInfo
.
contactsPhone
=
system
.
encryptStr
(
pobj
.
cacheInfo
.
cmpContactInfo
.
contactsPhone
);
pobj
.
cacheInfo
.
cmpContactInfo
.
contactsPhone
=
(
system
.
encryptStr
(
pobj
.
cacheInfo
.
cmpContactInfo
.
contactsPhone
)
);
}
}
}
}
if
(
pobj
.
cacheInfo
.
positionData
&&
pobj
.
cacheInfo
.
positionData
.
length
>
0
)
{
if
(
pobj
.
cacheInfo
.
positionData
&&
pobj
.
cacheInfo
.
positionData
.
length
>
0
)
{
for
(
var
i
=
0
;
i
<
pobj
.
cacheInfo
.
positionData
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
pobj
.
cacheInfo
.
positionData
.
length
;
i
++
)
{
if
(
pobj
.
cacheInfo
.
positionData
[
i
].
fixedPhone
&&
pobj
.
cacheInfo
.
positionData
[
i
].
fixedPhone
!=
'undefined'
)
{
if
(
pobj
.
cacheInfo
.
positionData
[
i
].
fixedPhone
&&
pobj
.
cacheInfo
.
positionData
[
i
].
fixedPhone
!=
'undefined'
)
{
pobj
.
cacheInfo
.
positionData
[
i
].
fixedPhone
=
system
.
encryptStr
(
pobj
.
cacheInfo
.
positionData
[
i
].
fixedPhone
);
pobj
.
cacheInfo
.
positionData
[
i
].
fixedPhone
=
system
.
encryptStr
(
pobj
.
cacheInfo
.
positionData
[
i
].
fixedPhone
);
}
}
if
(
pobj
.
cacheInfo
.
positionData
[
i
].
mobilePhone
&&
pobj
.
cacheInfo
.
positionData
[
i
].
mobilePhone
!=
'undefined'
)
{
if
(
pobj
.
cacheInfo
.
positionData
[
i
].
mobilePhone
&&
pobj
.
cacheInfo
.
positionData
[
i
].
mobilePhone
!=
'undefined'
)
{
pobj
.
cacheInfo
.
positionData
[
i
].
mobilePhone
=
system
.
encryptStr
(
pobj
.
cacheInfo
.
positionData
[
i
].
mobilePhone
);
pobj
.
cacheInfo
.
positionData
[
i
].
mobilePhone
=
(
system
.
encryptStr
(
pobj
.
cacheInfo
.
positionData
[
i
].
mobilePhone
)
);
}
}
}
}
}
}
if
(
pobj
.
cacheInfo
.
contributionData
&&
pobj
.
cacheInfo
.
contributionData
.
length
>
0
)
{
if
(
pobj
.
cacheInfo
.
contributionData
&&
pobj
.
cacheInfo
.
contributionData
.
length
>
0
)
{
for
(
var
i
=
0
;
i
<
pobj
.
cacheInfo
.
contributionData
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
pobj
.
cacheInfo
.
contributionData
.
length
;
i
++
)
{
if
(
pobj
.
cacheInfo
.
contributionData
[
i
].
phoneNumber
&&
pobj
.
cacheInfo
.
contributionData
[
i
].
phoneNumber
!=
'undefined'
)
{
if
(
pobj
.
cacheInfo
.
contributionData
[
i
].
phoneNumber
&&
pobj
.
cacheInfo
.
contributionData
[
i
].
phoneNumber
!=
'undefined'
)
{
pobj
.
cacheInfo
.
contributionData
[
i
].
phoneNumber
=
system
.
encryptStr
(
pobj
.
cacheInfo
.
contributionData
[
i
].
phoneNumber
);
pobj
.
cacheInfo
.
contributionData
[
i
].
phoneNumber
=
(
system
.
encryptStr
(
pobj
.
cacheInfo
.
contributionData
[
i
].
phoneNumber
)
);
}
}
if
(
pobj
.
cacheInfo
.
contributionData
[
i
].
IdentificationNumber
&&
pobj
.
cacheInfo
.
contributionData
[
i
].
IdentificationNumber
!=
'undefined'
)
{
if
(
pobj
.
cacheInfo
.
contributionData
[
i
].
IdentificationNumber
&&
pobj
.
cacheInfo
.
contributionData
[
i
].
IdentificationNumber
!=
'undefined'
)
{
pobj
.
cacheInfo
.
contributionData
[
i
].
IdentificationNumber
=
system
.
encryptStr
(
pobj
.
cacheInfo
.
contributionData
[
i
].
IdentificationNumber
);
pobj
.
cacheInfo
.
contributionData
[
i
].
IdentificationNumber
=
(
system
.
encryptStr
(
pobj
.
cacheInfo
.
contributionData
[
i
].
IdentificationNumber
)
);
}
}
}
}
}
}
...
...
ic-deliver/app/base/controller/impl/bizchance/deliverybillCtl.js
View file @
8963ffd5
...
@@ -87,7 +87,7 @@ class DeliverybillCtl extends CtlBase {
...
@@ -87,7 +87,7 @@ class DeliverybillCtl extends CtlBase {
}
}
}
else
{
}
else
{
robj
.
relatedProducts
=
'无'
;
robj
.
relatedProducts
=
'无'
;
}
;
}
robj
.
payAmount
=
this
.
FenToYuan
(
element
.
selling_price
);
// 交付单金额
robj
.
payAmount
=
this
.
FenToYuan
(
element
.
selling_price
);
// 交付单金额
robj
.
selling_price
=
this
.
FenToYuan
(
element
.
selling_price
);
// 交付单金额-shousuo
robj
.
selling_price
=
this
.
FenToYuan
(
element
.
selling_price
);
// 交付单金额-shousuo
robj
.
deliverStatus
=
element
.
delivery_status
;
// 交付单状态
robj
.
deliverStatus
=
element
.
delivery_status
;
// 交付单状态
...
@@ -240,13 +240,19 @@ class DeliverybillCtl extends CtlBase {
...
@@ -240,13 +240,19 @@ class DeliverybillCtl extends CtlBase {
rarr
.
companyInfo
=
ms
.
company_info
;
// 公司详情
rarr
.
companyInfo
=
ms
.
company_info
;
// 公司详情
rarr
.
registeredInfo
=
ms
.
registered_info
;
// 注册信息
rarr
.
registeredInfo
=
ms
.
registered_info
;
// 注册信息
rarr
.
contributionInfo
=
ms
.
contribution_info
;
// 出资比例信息
rarr
.
contributionInfo
=
ms
.
contribution_info
;
// 出资比例信息
if
(
rarr
.
contributionInfo
&&
rarr
.
contributionInfo
.
contributionData
&&
rarr
.
contributionInfo
.
contributionData
.
length
>
0
)
{
if
(
rarr
.
contributionInfo
for
(
var
i
=
0
;
i
<
rarr
.
contributionInfo
.
contributionData
.
length
;
i
++
)
{
&&
rarr
.
contributionInfo
.
contributionData
&&
rarr
.
contributionInfo
.
contributionData
.
length
>
0
)
{
for
(
let
i
=
0
;
i
<
rarr
.
contributionInfo
.
contributionData
.
length
;
i
++
)
{
if
(
rarr
.
contributionInfo
.
contributionData
[
i
].
phoneNumber
&&
rarr
.
contributionInfo
.
contributionData
[
i
].
phoneNumber
!=
'undefined'
)
{
if
(
rarr
.
contributionInfo
.
contributionData
[
i
].
phoneNumber
&&
rarr
.
contributionInfo
.
contributionData
[
i
].
phoneNumber
!=
'undefined'
)
{
rarr
.
contributionInfo
.
contributionData
[
i
].
phoneNumber
=
system
.
decryptStr
(
rarr
.
contributionInfo
.
contributionData
[
i
].
phoneNumber
);
rarr
.
contributionInfo
.
contributionData
[
i
].
phoneNumber
=
(
system
.
decryptStr
(
rarr
.
contributionInfo
.
contributionData
[
i
].
phoneNumber
)
);
}
}
if
(
rarr
.
contributionInfo
.
contributionData
[
i
].
IdentificationNumber
&&
rarr
.
contributionInfo
.
contributionData
[
i
].
IdentificationNumber
!=
'undefined'
)
{
if
(
rarr
.
contributionInfo
.
contributionData
[
i
].
IdentificationNumber
&&
rarr
.
contributionInfo
.
contributionData
[
i
].
IdentificationNumber
!=
'undefined'
)
{
rarr
.
contributionInfo
.
contributionData
[
i
].
IdentificationNumber
=
system
.
decryptStr
(
rarr
.
contributionInfo
.
contributionData
[
i
].
IdentificationNumber
);
rarr
.
contributionInfo
.
contributionData
[
i
].
IdentificationNumber
=
(
system
.
decryptStr
(
rarr
.
contributionInfo
.
contributionData
[
i
].
IdentificationNumber
)
);
}
}
}
}
}
}
...
@@ -260,12 +266,16 @@ class DeliverybillCtl extends CtlBase {
...
@@ -260,12 +266,16 @@ class DeliverybillCtl extends CtlBase {
}
}
if
(
position_t_info
.
positionData
&&
position_t_info
.
positionData
.
length
>
0
)
{
if
(
position_t_info
.
positionData
&&
position_t_info
.
positionData
.
length
>
0
)
{
for
(
var
i
=
0
;
i
<
pobj
.
positionInfo
.
positionData
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
pobj
.
positionInfo
.
positionData
.
length
;
i
++
)
{
if
(
position_t_info
.
positionData
[
i
].
fixedPhone
&&
position_t_info
.
positionData
[
i
].
fixedPhone
!=
'undefined'
)
{
if
(
position_t_info
.
positionData
[
i
].
fixedPhone
&&
position_t_info
.
positionData
[
i
].
fixedPhone
!=
'undefined'
)
{
position_t_info
.
positionData
[
i
].
fixedPhone
=
system
.
decryptStr
(
position_t_info
.
positionData
[
i
].
fixedPhone
);
position_t_info
.
positionData
[
i
].
fixedPhone
=
(
system
.
decryptStr
(
position_t_info
.
positionData
[
i
].
fixedPhone
)
);
}
}
if
(
position_t_info
.
positionData
[
i
].
mobilePhone
&&
position_t_info
.
positionData
[
i
].
mobilePhone
!=
'undefined'
)
{
if
(
position_t_info
.
positionData
[
i
].
mobilePhone
&&
position_t_info
.
positionData
[
i
].
mobilePhone
!=
'undefined'
)
{
position_t_info
.
positionData
[
i
].
mobilePhone
=
system
.
decryptStr
(
position_t_info
.
positionData
[
i
].
mobilePhone
);
position_t_info
.
positionData
[
i
].
mobilePhone
=
(
system
.
decryptStr
(
position_t_info
.
positionData
[
i
].
mobilePhone
)
);
}
}
}
}
}
}
...
@@ -671,12 +681,16 @@ class DeliverybillCtl extends CtlBase {
...
@@ -671,12 +681,16 @@ class DeliverybillCtl extends CtlBase {
if
(
pobj
.
contributionInfo
)
{
if
(
pobj
.
contributionInfo
)
{
if
(
pobj
.
contributionInfo
.
contributionData
&&
pobj
.
contributionInfo
.
contributionData
.
length
>
0
)
{
if
(
pobj
.
contributionInfo
.
contributionData
&&
pobj
.
contributionInfo
.
contributionData
.
length
>
0
)
{
for
(
var
i
=
0
;
i
<
pobj
.
contributionInfo
.
contributionData
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
pobj
.
contributionInfo
.
contributionData
.
length
;
i
++
)
{
if
(
pobj
.
contributionInfo
.
contributionData
[
i
].
phoneNumber
&&
pobj
.
contributionInfo
.
contributionData
[
i
].
phoneNumber
!=
'undefined'
)
{
if
(
pobj
.
contributionInfo
.
contributionData
[
i
].
phoneNumber
&&
pobj
.
contributionInfo
.
contributionData
[
i
].
phoneNumber
!=
'undefined'
)
{
pobj
.
contributionInfo
.
contributionData
[
i
].
phoneNumber
=
system
.
encryptStr
(
pobj
.
contributionInfo
.
contributionData
[
i
].
phoneNumber
);
pobj
.
contributionInfo
.
contributionData
[
i
].
phoneNumber
=
(
system
.
encryptStr
(
pobj
.
contributionInfo
.
contributionData
[
i
].
phoneNumber
)
);
}
}
if
(
pobj
.
contributionInfo
.
contributionData
[
i
].
IdentificationNumber
&&
pobj
.
contributionInfo
.
contributionData
[
i
].
IdentificationNumber
!=
'undefined'
)
{
if
(
pobj
.
contributionInfo
.
contributionData
[
i
].
IdentificationNumber
&&
pobj
.
contributionInfo
.
contributionData
[
i
].
IdentificationNumber
!=
'undefined'
)
{
pobj
.
contributionInfo
.
contributionData
[
i
].
IdentificationNumber
=
system
.
encryptStr
(
pobj
.
contributionInfo
.
contributionData
[
i
].
IdentificationNumber
);
pobj
.
contributionInfo
.
contributionData
[
i
].
IdentificationNumber
=
(
system
.
encryptStr
(
pobj
.
contributionInfo
.
contributionData
[
i
].
IdentificationNumber
)
);
}
}
}
}
}
}
...
@@ -684,12 +698,16 @@ class DeliverybillCtl extends CtlBase {
...
@@ -684,12 +698,16 @@ class DeliverybillCtl extends CtlBase {
if
(
pobj
.
positionInfo
)
{
if
(
pobj
.
positionInfo
)
{
if
(
pobj
.
positionInfo
.
positionData
&&
pobj
.
positionInfo
.
positionData
.
length
>
0
)
{
if
(
pobj
.
positionInfo
.
positionData
&&
pobj
.
positionInfo
.
positionData
.
length
>
0
)
{
for
(
var
i
=
0
;
i
<
pobj
.
positionInfo
.
positionData
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
pobj
.
positionInfo
.
positionData
.
length
;
i
++
)
{
if
(
pobj
.
positionInfo
.
positionData
[
i
].
fixedPhone
&&
pobj
.
positionInfo
.
positionData
[
i
].
fixedPhone
!=
'undefined'
)
{
if
(
pobj
.
positionInfo
.
positionData
[
i
].
fixedPhone
&&
pobj
.
positionInfo
.
positionData
[
i
].
fixedPhone
!=
'undefined'
)
{
pobj
.
positionInfo
.
positionData
[
i
].
fixedPhone
=
system
.
encryptStr
(
pobj
.
positionInfo
.
positionData
[
i
].
fixedPhone
);
pobj
.
positionInfo
.
positionData
[
i
].
fixedPhone
=
(
system
.
encryptStr
(
pobj
.
positionInfo
.
positionData
[
i
].
fixedPhone
)
);
}
}
if
(
pobj
.
positionInfo
.
positionData
[
i
].
mobilePhone
&&
pobj
.
positionInfo
.
positionData
[
i
].
mobilePhone
!=
'undefined'
)
{
if
(
pobj
.
positionInfo
.
positionData
[
i
].
mobilePhone
&&
pobj
.
positionInfo
.
positionData
[
i
].
mobilePhone
!=
'undefined'
)
{
pobj
.
positionInfo
.
positionData
[
i
].
mobilePhone
=
system
.
encryptStr
(
pobj
.
positionInfo
.
positionData
[
i
].
mobilePhone
);
pobj
.
positionInfo
.
positionData
[
i
].
mobilePhone
=
(
system
.
encryptStr
(
pobj
.
positionInfo
.
positionData
[
i
].
mobilePhone
)
);
}
}
}
}
}
}
...
@@ -770,11 +788,15 @@ class DeliverybillCtl extends CtlBase {
...
@@ -770,11 +788,15 @@ class DeliverybillCtl extends CtlBase {
pobj
.
businessType
=
appconfig
.
pdict
.
dyDict
[
pobj
.
businessType
];
pobj
.
businessType
=
appconfig
.
pdict
.
dyDict
[
pobj
.
businessType
];
if
(
pobj
.
companyInfo
.
companyPropertiesName
&&
pobj
.
companyInfo
.
companyPropertiesName
!=
'undefined'
)
{
if
(
pobj
.
companyInfo
.
companyPropertiesName
&&
pobj
.
companyInfo
.
companyPropertiesName
!=
'undefined'
)
{
if
(
pobj
.
businessName
==
'公司注册'
)
{
if
(
pobj
.
businessName
==
'公司注册'
)
{
pobj
.
companyInfo
.
companyProperties
=
appconfig
.
pdict
.
companyNatureDictT
[
pobj
.
companyInfo
.
companyPropertiesName
];
pobj
.
companyInfo
.
companyProperties
=
(
appconfig
.
pdict
.
companyNatureDictT
[
pobj
.
companyInfo
.
companyPropertiesName
]
);
pobj
.
baseInfo
.
companyProperties
=
pobj
.
companyInfo
.
companyProperties
;
pobj
.
baseInfo
.
companyProperties
=
pobj
.
companyInfo
.
companyProperties
;
pobj
.
baseInfo
.
companyType
=
pobj
.
companyInfo
.
companyProperties
;
pobj
.
baseInfo
.
companyType
=
pobj
.
companyInfo
.
companyProperties
;
}
else
if
(
pobj
.
businessName
==
'云上园区注册'
)
{
}
else
if
(
pobj
.
businessName
==
'云上园区注册'
)
{
pobj
.
companyInfo
.
companyProperties
=
appconfig
.
pdict
.
registeredTypeDictT
[
pobj
.
companyInfo
.
companyPropertiesName
];
pobj
.
companyInfo
.
companyProperties
=
(
appconfig
.
pdict
.
registeredTypeDictT
[
pobj
.
companyInfo
.
companyPropertiesName
]
);
pobj
.
baseInfo
.
companyProperties
=
pobj
.
companyInfo
.
companyProperties
;
pobj
.
baseInfo
.
companyProperties
=
pobj
.
companyInfo
.
companyProperties
;
pobj
.
baseInfo
.
companyType
=
pobj
.
companyInfo
.
companyProperties
;
pobj
.
baseInfo
.
companyType
=
pobj
.
companyInfo
.
companyProperties
;
}
else
{
}
else
{
...
@@ -1006,11 +1028,11 @@ class DeliverybillCtl extends CtlBase {
...
@@ -1006,11 +1028,11 @@ class DeliverybillCtl extends CtlBase {
}
}
toDecimal2
(
x
)
{
toDecimal2
(
x
)
{
var
f
=
parseFloat
(
x
);
let
f
=
parseFloat
(
x
);
if
(
isNaN
(
f
))
{
if
(
isNaN
(
f
))
{
return
false
;
return
false
;
}
}
var
f
=
Math
.
round
(
x
*
100
)
/
100
;
f
=
Math
.
round
(
x
*
100
)
/
100
;
let
s
=
f
.
toString
();
let
s
=
f
.
toString
();
let
rs
=
s
.
indexOf
(
'.'
);
let
rs
=
s
.
indexOf
(
'.'
);
if
(
rs
<
0
)
{
if
(
rs
<
0
)
{
...
...
ic-deliver/app/base/controller/impl/common/cachsearchesCtl.js
View file @
8963ffd5
...
@@ -12,15 +12,18 @@ class CachSearchesCtl extends CtlBase {
...
@@ -12,15 +12,18 @@ class CachSearchesCtl extends CtlBase {
async
findAndCountAll
(
pobj
,
gobj
,
req
)
{
async
findAndCountAll
(
pobj
,
gobj
,
req
)
{
pobj
.
opCacheUrl
=
req
.
session
.
app
.
opCacheUrl
;
pobj
.
opCacheUrl
=
req
.
session
.
app
.
opCacheUrl
;
pobj
.
appid
=
req
.
appid
;
pobj
.
appid
=
req
.
appid
;
return
await
this
.
service
.
findAndCountAllCache
(
pobj
);
const
result
=
await
this
.
service
.
findAndCountAllCache
(
pobj
);
return
result
;
}
}
async
delCache
(
queryobj
,
qobj
,
req
)
{
async
delCache
(
queryobj
,
qobj
,
req
)
{
const
param
=
{
key
:
queryobj
.
key
,
appid
:
req
.
appid
,
opCacheUrl
:
req
.
session
.
app
.
opCacheUrl
};
const
param
=
{
key
:
queryobj
.
key
,
appid
:
req
.
appid
,
opCacheUrl
:
req
.
session
.
app
.
opCacheUrl
};
return
await
this
.
service
.
delCache
(
param
);
const
result
=
await
this
.
service
.
delCache
(
param
);
return
result
;
}
}
async
clearAllCache
(
queryobj
,
qobj
,
req
)
{
async
clearAllCache
(
queryobj
,
qobj
,
req
)
{
const
param
=
{
appid
:
req
.
appid
,
opCacheUrl
:
req
.
session
.
app
.
opCacheUrl
};
const
param
=
{
appid
:
req
.
appid
,
opCacheUrl
:
req
.
session
.
app
.
opCacheUrl
};
return
await
this
.
service
.
clearAllCache
(
param
);
const
result
=
await
this
.
service
.
clearAllCache
(
param
);
return
result
;
}
}
}
}
module
.
exports
=
CachSearchesCtl
;
module
.
exports
=
CachSearchesCtl
;
ic-deliver/app/base/db/cache/CacheLocker.js
deleted
100644 → 0
View file @
8ee442cc
const
CacheBase
=
require
(
'../cache.base'
);
const
system
=
require
(
'../../system'
);
// 缓存首次登录的赠送的宝币数量
class
CacheLocker
extends
CacheBase
{
constructor
()
{
super
();
this
.
prefix
=
'locker_'
;
}
desc
()
{
}
prefix
()
{
}
async
init
(
tradekey
)
{
const
key
=
this
.
prefix
+
tradekey
;
return
this
.
redisClient
.
rpushWithEx
(
key
,
'1'
,
1800
);
}
async
enter
(
tradekey
)
{
const
key
=
this
.
prefix
+
tradekey
;
return
this
.
redisClient
.
rpop
(
key
);
}
async
release
(
tradekey
)
{
const
key
=
this
.
prefix
+
tradekey
;
return
this
.
redisClient
.
rpushWithEx
(
key
,
'1'
,
1800
);
}
}
module
.
exports
=
CacheLocker
;
ic-deliver/app/base/db/impl/auth/userDao.js
View file @
8963ffd5
...
@@ -9,9 +9,11 @@ class UserDao extends Dao {
...
@@ -9,9 +9,11 @@ class UserDao extends Dao {
return
this
.
model
.
findOne
({
return
this
.
model
.
findOne
({
where
:
{
id
:
userid
},
where
:
{
id
:
userid
},
include
:
[{
model
:
self
.
db
.
models
.
account
,
attributes
:
[
'id'
,
'isSuper'
,
'referrerOnlyCode'
]
},
include
:
[{
model
:
self
.
db
.
models
.
account
,
attributes
:
[
'id'
,
'isSuper'
,
'referrerOnlyCode'
]
},
{
model
:
self
.
db
.
models
.
role
,
as
:
'Roles'
,
attributes
:
[
'id'
,
'code'
],
include
:
[
{
model
:
self
.
db
.
models
.
role
,
as
:
'Roles'
,
attributes
:
[
'id'
,
'code'
],
include
:
[
{
model
:
self
.
db
.
models
.
product
,
as
:
'Products'
,
attributes
:
[
'id'
,
'code'
]
},
{
model
:
self
.
db
.
models
.
product
,
as
:
'Products'
,
attributes
:
[
'id'
,
'code'
]
},
]
},
],
},
],
],
});
});
}
}
...
@@ -20,17 +22,18 @@ class UserDao extends Dao {
...
@@ -20,17 +22,18 @@ class UserDao extends Dao {
const
tUser
=
await
this
.
model
.
findOne
({
const
tUser
=
await
this
.
model
.
findOne
({
where
:
{
userName
:
username
,
app_id
:
app
.
id
},
where
:
{
userName
:
username
,
app_id
:
app
.
id
},
include
:
[{
model
:
this
.
db
.
models
.
app
,
raw
:
true
},
include
:
[{
model
:
this
.
db
.
models
.
app
,
raw
:
true
},
// {model:this.db.models.partnerinfo,attributes:["id","user_id","app_id","userName","applyType","applyName","workPic","tagInfo","mobile","tel","applyProvince","applyCity",
{
model
:
this
.
db
.
models
.
account
,
attributes
:
[
'id'
,
'isSuper'
,
'referrerOnlyCode'
],
raw
:
true
},
// "applyArea","applyAddr","identityCardPic","identityCard","businessLicensePic","businessLicenseNum","entName","cardNo","realName"]},
{
{
model
:
this
.
db
.
models
.
account
,
attributes
:
[
'id'
,
'isSuper'
,
'referrerOnlyCode'
],
raw
:
true
},
model
:
this
.
db
.
models
.
role
,
as
:
'Roles'
,
attributes
:
[
'id'
,
'code'
],
include
:
[
{
model
:
this
.
db
.
models
.
role
,
as
:
'Roles'
,
attributes
:
[
'id'
,
'code'
],
include
:
[
{
model
:
this
.
db
.
models
.
product
,
as
:
'Products'
,
attributes
:
[
'id'
,
'code'
],
raw
:
true
},
{
model
:
this
.
db
.
models
.
product
,
as
:
'Products'
,
attributes
:
[
'id'
,
'code'
],
raw
:
true
},
]
},
],
]
},
{
transaction
:
t
});
},
// if(tUser!=null){
],
// tUser=tUser.get({plain:true});
},
{
transaction
:
t
});
// tUser.partnerinfo=await this.partnerinfoDao.model.findOne({where:{onlyCode:tUser.onlyCode},raw:true});
// if(tUser!=null){
// }
// tUser=tUser.get({plain:true});
// tUser.partnerinfo=await this.partnerinfoDao.model.findOne({where:{onlyCode:tUser.onlyCode},raw:true});
// }
return
tUser
;
return
tUser
;
}
}
async
getUserByOpenId
(
popenid
,
appkey
,
t
)
{
async
getUserByOpenId
(
popenid
,
appkey
,
t
)
{
...
@@ -38,13 +41,14 @@ class UserDao extends Dao {
...
@@ -38,13 +41,14 @@ class UserDao extends Dao {
let
tUser
=
await
this
.
model
.
findOne
({
let
tUser
=
await
this
.
model
.
findOne
({
where
:
{
openId
:
popenid
},
where
:
{
openId
:
popenid
},
include
:
[{
model
:
this
.
db
.
models
.
app
,
raw
:
true
},
include
:
[{
model
:
this
.
db
.
models
.
app
,
raw
:
true
},
// {model:this.db.models.partnerinfo,attributes:["id","user_id","app_id","userName","applyType","applyName","workPic","tagInfo","mobile","tel","applyProvince","applyCity",
{
model
:
this
.
db
.
models
.
account
,
attributes
:
[
'id'
,
'isSuper'
,
'referrerOnlyCode'
],
raw
:
true
},
// "applyArea","applyAddr","identityCardPic","identityCard","businessLicensePic","businessLicenseNum","entName","cardNo","realName"]},
{
{
model
:
this
.
db
.
models
.
account
,
attributes
:
[
'id'
,
'isSuper'
,
'referrerOnlyCode'
],
raw
:
true
},
model
:
this
.
db
.
models
.
role
,
as
:
'Roles'
,
attributes
:
[
'id'
,
'code'
],
include
:
[
{
model
:
this
.
db
.
models
.
role
,
as
:
'Roles'
,
attributes
:
[
'id'
,
'code'
],
include
:
[
{
model
:
this
.
db
.
models
.
product
,
as
:
'Products'
,
attributes
:
[
'id'
,
'code'
],
raw
:
true
},
{
model
:
this
.
db
.
models
.
product
,
as
:
'Products'
,
attributes
:
[
'id'
,
'code'
],
raw
:
true
},
]
},
],
]
},
{
transaction
:
t
});
},
],
},
{
transaction
:
t
});
if
(
tUser
!=
null
)
{
if
(
tUser
!=
null
)
{
tUser
=
tUser
.
get
({
plain
:
true
});
tUser
=
tUser
.
get
({
plain
:
true
});
tUser
.
partnerinfo
=
await
this
.
partnerinfoDao
.
model
.
findOne
({
where
:
{
onlyCode
:
tUser
.
onlyCode
},
raw
:
true
});
tUser
.
partnerinfo
=
await
this
.
partnerinfoDao
.
model
.
findOne
({
where
:
{
onlyCode
:
tUser
.
onlyCode
},
raw
:
true
});
...
@@ -64,9 +68,11 @@ class UserDao extends Dao {
...
@@ -64,9 +68,11 @@ class UserDao extends Dao {
}
}
extraModelFilter
()
{
extraModelFilter
()
{
// return {"key":"include","value":[{model:this.db.models.app,},{model:this.db.models.role,as:"Roles",attributes:["id","name"],joinTableAttributes:['created_at']}]};
// return {"key":"include","value":[{model:this.db.models.app,},{model:this.db.models.role,as:"Roles",attributes:["id","name"],joinTableAttributes:['created_at']}]};
return
{
key
:
'include'
,
value
:
[
return
{
{
model
:
this
.
db
.
models
.
app
},
key
:
'include'
,
value
:
[
{
model
:
this
.
db
.
models
.
role
,
as
:
'Roles'
,
attributes
:
[
'id'
,
'name'
]
}]
};
{
model
:
this
.
db
.
models
.
app
},
{
model
:
this
.
db
.
models
.
role
,
as
:
'Roles'
,
attributes
:
[
'id'
,
'name'
]
}],
};
}
}
extraWhere
(
obj
,
w
,
qc
,
linkAttrs
)
{
extraWhere
(
obj
,
w
,
qc
,
linkAttrs
)
{
if
(
obj
.
bizpath
&&
obj
.
bizpath
!=
''
)
{
if
(
obj
.
bizpath
&&
obj
.
bizpath
!=
''
)
{
...
...
ic-deliver/app/base/db/impl/bizchance/bizoptDao.js
View file @
8963ffd5
...
@@ -35,7 +35,8 @@ class BizoptDao extends Dao {
...
@@ -35,7 +35,8 @@ class BizoptDao extends Dao {
/* 根据商机编号获取商机详情*/
/* 根据商机编号获取商机详情*/
async
findInfoByDemandCode
(
qobj
)
{
async
findInfoByDemandCode
(
qobj
)
{
const
qcwhere
=
{
demand_code
:
qobj
.
businessMode
};
const
qcwhere
=
{
demand_code
:
qobj
.
businessMode
};
return
await
this
.
findOne
(
qcwhere
);
const
result
=
await
this
.
findOne
(
qcwhere
);
return
result
;
}
}
/* 更新商机状态*/
/* 更新商机状态*/
...
@@ -47,7 +48,8 @@ class BizoptDao extends Dao {
...
@@ -47,7 +48,8 @@ class BizoptDao extends Dao {
setobj
.
close_reason
=
''
;
setobj
.
close_reason
=
''
;
}
}
const
whereobj
=
{
demand_code
:
qobj
.
businessMode
};
const
whereobj
=
{
demand_code
:
qobj
.
businessMode
};
return
await
this
.
updateByWhere
(
setobj
,
whereobj
,
t
);
const
result
=
await
this
.
updateByWhere
(
setobj
,
whereobj
,
t
);
return
result
;
}
}
/* 更新业务员信息*/
/* 更新业务员信息*/
...
@@ -55,24 +57,25 @@ class BizoptDao extends Dao {
...
@@ -55,24 +57,25 @@ class BizoptDao extends Dao {
const
setobj
=
{};
const
setobj
=
{};
if
(
qobj
.
salesmanId
&&
qobj
.
salesmanId
!=
'undefined'
)
{
if
(
qobj
.
salesmanId
&&
qobj
.
salesmanId
!=
'undefined'
)
{
setobj
.
salesman_id
=
qobj
.
salesmanId
;
setobj
.
salesman_id
=
qobj
.
salesmanId
;
}
;
}
if
(
qobj
.
salesmanName
&&
qobj
.
salesmanName
!=
'undefined'
)
{
if
(
qobj
.
salesmanName
&&
qobj
.
salesmanName
!=
'undefined'
)
{
setobj
.
salesman_name
=
qobj
.
salesmanName
;
setobj
.
salesman_name
=
qobj
.
salesmanName
;
}
;
}
if
(
qobj
.
salesmanOpcode
&&
qobj
.
salesmanOpcode
!=
'undefined'
)
{
if
(
qobj
.
salesmanOpcode
&&
qobj
.
salesmanOpcode
!=
'undefined'
)
{
setobj
.
salesman_opcode
=
qobj
.
salesmanOpcode
;
setobj
.
salesman_opcode
=
qobj
.
salesmanOpcode
;
}
;
}
if
(
qobj
.
salesmanPhone
&&
qobj
.
salesmanPhone
!=
'undefined'
)
{
if
(
qobj
.
salesmanPhone
&&
qobj
.
salesmanPhone
!=
'undefined'
)
{
setobj
.
salesman_phone
=
qobj
.
salesmanPhone
;
setobj
.
salesman_phone
=
qobj
.
salesmanPhone
;
}
;
}
if
(
qobj
.
facilitatorId
&&
qobj
.
facilitatorId
!=
'undefined'
)
{
if
(
qobj
.
facilitatorId
&&
qobj
.
facilitatorId
!=
'undefined'
)
{
setobj
.
facilitator_id
=
qobj
.
facilitatorId
;
setobj
.
facilitator_id
=
qobj
.
facilitatorId
;
}
;
}
if
(
qobj
.
facilitatorName
&&
qobj
.
facilitatorName
!=
'undefined'
)
{
if
(
qobj
.
facilitatorName
&&
qobj
.
facilitatorName
!=
'undefined'
)
{
setobj
.
facilitator_name
=
qobj
.
facilitatorName
;
setobj
.
facilitator_name
=
qobj
.
facilitatorName
;
}
;
}
const
whereobj
=
{
demand_code
:
qobj
.
businessMode
};
const
whereobj
=
{
demand_code
:
qobj
.
businessMode
};
return
await
this
.
updateByWhere
(
setobj
,
whereobj
,
t
);
const
result
=
await
this
.
updateByWhere
(
setobj
,
whereobj
,
t
);
return
result
;
}
}
/* 插入商机信息*/
/* 插入商机信息*/
...
@@ -134,7 +137,8 @@ class BizoptDao extends Dao {
...
@@ -134,7 +137,8 @@ class BizoptDao extends Dao {
if
(
qobj
.
clerkPhone
&&
qobj
.
clerkPhone
!=
'undefined'
)
{
if
(
qobj
.
clerkPhone
&&
qobj
.
clerkPhone
!=
'undefined'
)
{
obj
.
salesman_phone
=
qobj
.
clerkPhone
;
obj
.
salesman_phone
=
qobj
.
clerkPhone
;
}
}
return
await
this
.
create
(
obj
,
t
);
const
result
=
await
this
.
create
(
obj
,
t
);
return
result
;
}
}
}
}
module
.
exports
=
BizoptDao
;
module
.
exports
=
BizoptDao
;
ic-deliver/app/base/db/impl/bizchance/cacheinfoDao.js
View file @
8963ffd5
...
@@ -22,14 +22,16 @@ class CacheinfoDao extends Dao {
...
@@ -22,14 +22,16 @@ class CacheinfoDao extends Dao {
/* 根据订单id获取缓存信息详情*/
/* 根据订单id获取缓存信息详情*/
async
findInfoByDeliverId
(
qobj
)
{
async
findInfoByDeliverId
(
qobj
)
{
const
qcwhere
=
{
deliver_id
:
qobj
.
deliverNumber
};
const
qcwhere
=
{
deliver_id
:
qobj
.
deliverNumber
};
return
await
this
.
findOne
(
qcwhere
);
const
result
=
await
this
.
findOne
(
qcwhere
);
return
result
;
}
}
/* 更加订单id更新缓存信息*/
/* 更加订单id更新缓存信息*/
async
updateInfoByDeliverId
(
qobj
,
t
)
{
async
updateInfoByDeliverId
(
qobj
,
t
)
{
const
setobj
=
{
cache_info
:
qobj
.
cacheInfo
};
const
setobj
=
{
cache_info
:
qobj
.
cacheInfo
};
const
whereobj
=
{
deliver_id
:
qobj
.
deliverNumber
};
const
whereobj
=
{
deliver_id
:
qobj
.
deliverNumber
};
return
await
this
.
updateByWhere
(
setobj
,
whereobj
,
t
);
const
result
=
await
this
.
updateByWhere
(
setobj
,
whereobj
,
t
);
return
result
;
}
}
/* 插入缓存信息*/
/* 插入缓存信息*/
...
@@ -38,7 +40,8 @@ class CacheinfoDao extends Dao {
...
@@ -38,7 +40,8 @@ class CacheinfoDao extends Dao {
deliver_id
:
qobj
.
deliverNumber
,
deliver_id
:
qobj
.
deliverNumber
,
cache_info
:
qobj
.
cacheInfo
,
cache_info
:
qobj
.
cacheInfo
,
};
};
return
await
this
.
create
(
obj
,
t
);
const
result
=
await
this
.
create
(
obj
,
t
);
return
result
;
}
}
}
}
module
.
exports
=
CacheinfoDao
;
module
.
exports
=
CacheinfoDao
;
ic-deliver/app/base/db/impl/common/connection.js
View file @
8963ffd5
...
@@ -89,7 +89,8 @@ class DbFactory {
...
@@ -89,7 +89,8 @@ class DbFactory {
// pconfigObjs.forEach(p=>{
// pconfigObjs.forEach(p=>{
// console.log(p.get({plain:true}));
// console.log(p.get({plain:true}));
// });
// });
// await this.db.models.user.create({nickName:"dev","description":"test user",openId:"testopenid",unionId:"testunionid"})
// await this.db.models.user.create({
// nickName:"dev","description":"test user",openId:"testopenid",unionId:"testunionid"})
// .then(function(user){
// .then(function(user){
// var acc=that.db.models.account.build({unionId:"testunionid",nickName:"dev"});
// var acc=that.db.models.account.build({unionId:"testunionid",nickName:"dev"});
// acc.save().then(a=>{
// acc.save().then(a=>{
...
...
ic-deliver/app/base/service/impl/auth/authSve.js
View file @
8963ffd5
...
@@ -11,7 +11,8 @@ class AuthService extends ServiceBase {
...
@@ -11,7 +11,8 @@ class AuthService extends ServiceBase {
// var newattrs=rolecodestr.split(",");
// var newattrs=rolecodestr.split(",");
const
aths
=
await
this
.
dao
.
model
.
findAll
({
const
aths
=
await
this
.
dao
.
model
.
findAll
({
attributes
:
[
'bizcode'
,
'authstrs'
,
'codepath'
],
attributes
:
[
'bizcode'
,
'authstrs'
,
'codepath'
],
where
:
{
role_id
:
{
[
this
.
db
.
Op
.
in
]:
roleids
},
app_id
:
appid
,
company_id
:
comid
}
});
where
:
{
role_id
:
{
[
this
.
db
.
Op
.
in
]:
roleids
},
app_id
:
appid
,
company_id
:
comid
},
});
return
aths
;
return
aths
;
}
}
async
saveAuths
(
auths
,
appid
,
cmid
)
{
async
saveAuths
(
auths
,
appid
,
cmid
)
{
...
@@ -20,8 +21,8 @@ class AuthService extends ServiceBase {
...
@@ -20,8 +21,8 @@ class AuthService extends ServiceBase {
console
.
log
(
'yyyyyyyyyvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv'
);
console
.
log
(
'yyyyyyyyyvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv'
);
console
.
log
(
auths
);
console
.
log
(
auths
);
return
self
.
db
.
transaction
(
async
(
t
)
=>
{
return
self
.
db
.
transaction
(
async
(
t
)
=>
{
for
(
let
i
=
0
;
i
<
auths
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
auths
.
length
;
i
++
)
{
var
tmpAuth
=
auths
[
i
];
const
tmpAuth
=
auths
[
i
];
tmpAuth
.
app_id
=
appid
;
tmpAuth
.
app_id
=
appid
;
tmpAuth
.
company_id
=
cmid
;
tmpAuth
.
company_id
=
cmid
;
const
objrtn
=
await
self
.
dao
.
model
.
findOrCreate
({
const
objrtn
=
await
self
.
dao
.
model
.
findOrCreate
({
...
@@ -33,10 +34,21 @@ class AuthService extends ServiceBase {
...
@@ -33,10 +34,21 @@ class AuthService extends ServiceBase {
console
.
log
(
objrtn
);
console
.
log
(
objrtn
);
if
(
!
objrtn
[
1
].
created
)
{
if
(
!
objrtn
[
1
].
created
)
{
// 就执行更新操作
// 就执行更新操作
await
objrtn
[
0
].
update
(
tmpAuth
,
{
where
:
{
role_id
:
tmpAuth
.
role_id
,
bizcode
:
tmpAuth
.
bizcode
},
transaction
:
t
});
await
objrtn
[
0
].
update
(
tmpAuth
,
{
where
:
{
role_id
:
tmpAuth
.
role_id
,
bizcode
:
tmpAuth
.
bizcode
,
},
transaction
:
t
,
});
}
}
}
}
const
aths
=
await
self
.
dao
.
model
.
findAll
({
where
:
{
role_id
:
tmpAuth
.
role_id
,
app_id
:
tmpAuth
.
app_id
},
transaction
:
t
});
const
aths
=
await
self
.
dao
.
model
.
findAll
({
where
:
{
role_id
:
tmpAuth
.
role_id
,
app_id
:
tmpAuth
.
app_id
,
},
transaction
:
t
,
});
return
aths
;
return
aths
;
});
});
}
}
...
...
ic-deliver/app/base/service/impl/bizchance/bizoptSve.js
View file @
8963ffd5
...
@@ -77,25 +77,35 @@ class BizOptService extends ServiceBase {
...
@@ -77,25 +77,35 @@ class BizOptService extends ServiceBase {
/* 根据商机编号获取商机详情*/
/* 根据商机编号获取商机详情*/
async
findInfoByDemandCode
(
qobj
)
{
async
findInfoByDemandCode
(
qobj
)
{
return
await
this
.
dao
.
findInfoByDemandCode
(
qobj
);
const
result
=
await
this
.
dao
.
findInfoByDemandCode
(
qobj
);
return
result
;
}
}
/* 根据商机编号更新商机状态 */
/* 根据商机编号更新商机状态 */
async
updateStatusByDemandCode
(
qobj
)
{
async
updateStatusByDemandCode
(
qobj
)
{
const
self
=
this
;
const
self
=
this
;
return
self
.
db
.
transaction
(
async
t
=>
await
self
.
dao
.
updateStatusByDemandCode
(
qobj
,
t
));
return
self
.
db
.
transaction
(
async
(
t
)
=>
{
const
result
=
await
self
.
dao
.
updateStatusByDemandCode
(
qobj
,
t
);
return
result
;
});
}
}
/* 更新业务员信息*/
/* 更新业务员信息*/
async
updateSalesmanInfoByDemandCode
(
qobj
)
{
async
updateSalesmanInfoByDemandCode
(
qobj
)
{
const
self
=
this
;
const
self
=
this
;
return
self
.
db
.
transaction
(
async
t
=>
await
self
.
dao
.
updateSalesmanInfoByDemandCode
(
qobj
,
t
));
return
self
.
db
.
transaction
(
async
(
t
)
=>
{
const
result
=
await
self
.
dao
.
updateSalesmanInfoByDemandCode
(
qobj
,
t
);
return
result
;
});
}
}
/* 插入商机信息*/
/* 插入商机信息*/
async
insertInfo
(
qobj
)
{
async
insertInfo
(
qobj
)
{
const
self
=
this
;
const
self
=
this
;
return
self
.
db
.
transaction
(
async
t
=>
await
self
.
dao
.
insertInfo
(
qobj
,
t
));
return
self
.
db
.
transaction
(
async
(
t
)
=>
{
const
result
=
await
self
.
dao
.
insertInfo
(
qobj
,
t
);
return
result
;
});
}
}
}
}
module
.
exports
=
BizOptService
;
module
.
exports
=
BizOptService
;
ic-deliver/app/base/service/impl/bizchance/cacheinfoSve.js
View file @
8963ffd5
...
@@ -14,19 +14,26 @@ class CacheInfoService extends ServiceBase {
...
@@ -14,19 +14,26 @@ class CacheInfoService extends ServiceBase {
/* 根据交付单id获取缓存详情*/
/* 根据交付单id获取缓存详情*/
async
findInfoByDeliverId
(
qobj
)
{
async
findInfoByDeliverId
(
qobj
)
{
return
await
this
.
dao
.
findInfoByDeliverId
(
qobj
);
const
result
=
await
this
.
dao
.
findInfoByDeliverId
(
qobj
);
return
result
;
}
}
/* 根据交付单id更新缓存信息 */
/* 根据交付单id更新缓存信息 */
async
updateInfoByDeliverId
(
qobj
)
{
async
updateInfoByDeliverId
(
qobj
)
{
const
self
=
this
;
const
self
=
this
;
return
self
.
db
.
transaction
(
async
t
=>
await
self
.
dao
.
updateInfoByDeliverId
(
qobj
,
t
));
return
self
.
db
.
transaction
(
async
(
t
)
=>
{
const
result
=
await
self
.
dao
.
updateInfoByDeliverId
(
qobj
,
t
);
return
result
;
});
}
}
/* 插入缓存信息*/
/* 插入缓存信息*/
async
insertInfo
(
qobj
)
{
async
insertInfo
(
qobj
)
{
const
self
=
this
;
const
self
=
this
;
return
self
.
db
.
transaction
(
async
t
=>
await
self
.
dao
.
insertInfo
(
qobj
,
t
));
return
self
.
db
.
transaction
(
async
(
t
)
=>
{
const
result
=
await
self
.
dao
.
insertInfo
(
qobj
,
t
);
return
result
;
});
}
}
}
}
module
.
exports
=
CacheInfoService
;
module
.
exports
=
CacheInfoService
;
ic-deliver/app/base/service/impl/bizchance/schemeSve.js
View file @
8963ffd5
...
@@ -6,11 +6,13 @@ class SchemeService extends ServiceBase {
...
@@ -6,11 +6,13 @@ class SchemeService extends ServiceBase {
async
findById
(
qobj
)
{
// 根据id获取方案信息
async
findById
(
qobj
)
{
// 根据id获取方案信息
const
oid
=
qobj
.
id
;
const
oid
=
qobj
.
id
;
return
await
this
.
dao
.
findById
(
oid
);
const
result
=
await
this
.
dao
.
findById
(
oid
);
return
result
;
}
}
async
findInfoByDemandCode
(
qobj
)
{
// 根据方案编号获取方案详情
async
findInfoByDemandCode
(
qobj
)
{
// 根据方案编号获取方案详情
return
await
this
.
dao
.
findInfoByDemandCode
(
qobj
);
const
result
=
await
this
.
dao
.
findInfoByDemandCode
(
qobj
);
return
result
;
}
}
async
updateStatusByDemandCode
(
qobj
)
{
// 根据商机编号号更新方案状态及原因
async
updateStatusByDemandCode
(
qobj
)
{
// 根据商机编号号更新方案状态及原因
...
@@ -30,7 +32,8 @@ class SchemeService extends ServiceBase {
...
@@ -30,7 +32,8 @@ class SchemeService extends ServiceBase {
async
insertInfo
(
qobj
)
{
// 插入方案信息
async
insertInfo
(
qobj
)
{
// 插入方案信息
const
self
=
this
;
const
self
=
this
;
return
await
self
.
db
.
transaction
(
async
t
=>
await
self
.
dao
.
insertInfo
(
qobj
,
t
));
const
result
=
await
self
.
db
.
transaction
(
async
t
=>
await
self
.
dao
.
insertInfo
(
qobj
,
t
));
return
result
;
}
}
}
}
module
.
exports
=
SchemeService
;
module
.
exports
=
SchemeService
;
ic-deliver/app/base/service/impl/common/appSve.js
View file @
8963ffd5
...
@@ -14,7 +14,7 @@ class AppService extends ServiceBase {
...
@@ -14,7 +14,7 @@ class AppService extends ServiceBase {
const
app
=
this
.
cacheManager
.
AppCache
.
cache
(
p
.
appkey
,
null
);
const
app
=
this
.
cacheManager
.
AppCache
.
cache
(
p
.
appkey
,
null
);
return
app
;
return
app
;
}
}
async
upFrontRoute
(
jsonObject
,
app
_i
d
)
{
async
upFrontRoute
(
jsonObject
,
app
I
d
)
{
const
self
=
this
;
const
self
=
this
;
return
this
.
db
.
transaction
(
async
(
t
)
=>
{
return
this
.
db
.
transaction
(
async
(
t
)
=>
{
const
keyfile
=
`
${
self
.
getUUID
()}
.json`
;
const
keyfile
=
`
${
self
.
getUUID
()}
.json`
;
...
@@ -23,7 +23,7 @@ class AppService extends ServiceBase {
...
@@ -23,7 +23,7 @@ class AppService extends ServiceBase {
fs
.
writeFileSync
(
tmpdirfile
,
str
);
fs
.
writeFileSync
(
tmpdirfile
,
str
);
const
result
=
await
self
.
ossC
.
upfile
(
keyfile
,
tmpdirfile
);
const
result
=
await
self
.
ossC
.
upfile
(
keyfile
,
tmpdirfile
);
fs
.
unlinkSync
(
tmpdirfile
);
fs
.
unlinkSync
(
tmpdirfile
);
await
self
.
db
.
models
.
app
.
update
({
docUrl
:
result
.
url
,
id
:
app_id
},
{
where
:
{
id
:
app_i
d
},
transaction
:
t
});
await
self
.
db
.
models
.
app
.
update
({
docUrl
:
result
.
url
,
id
:
appId
},
{
where
:
{
id
:
appI
d
},
transaction
:
t
});
return
result
;
return
result
;
});
});
}
}
...
...
ic-deliver/app/base/service/impl/common/cachsearchesSve.js
View file @
8963ffd5
...
@@ -10,7 +10,7 @@ class CachSearchesSve {
...
@@ -10,7 +10,7 @@ class CachSearchesSve {
}
}
getUUID
()
{
getUUID
()
{
const
uuid
=
uuidv4
();
const
uuid
=
uuidv4
();
const
u
=
uuid
.
replace
(
/
\
-
/g
,
''
);
const
u
=
uuid
.
replace
(
/-/g
,
''
);
return
u
;
return
u
;
}
}
async
buildCacheRtn
(
pageValues
)
{
async
buildCacheRtn
(
pageValues
)
{
...
@@ -27,24 +27,28 @@ class CachSearchesSve {
...
@@ -27,24 +27,28 @@ class CachSearchesSve {
const
{
pageSize
}
=
obj
.
pageInfo
;
const
{
pageSize
}
=
obj
.
pageInfo
;
const
limit
=
pageSize
;
const
limit
=
pageSize
;
const
offset
=
(
pageNo
-
1
)
*
pageSize
;
const
offset
=
(
pageNo
-
1
)
*
pageSize
;
const
search
_n
ame
=
obj
.
search
&&
obj
.
search
.
name
?
obj
.
search
.
name
:
''
;
const
search
N
ame
=
obj
.
search
&&
obj
.
search
.
name
?
obj
.
search
.
name
:
''
;
const
cacheCacheKeyPrefix
=
`sadd_base_appkeys:
${
settings
.
appKey
}
_cachekey`
;
const
cacheCacheKeyPrefix
=
`sadd_base_appkeys:
${
settings
.
appKey
}
_cachekey`
;
if
(
obj
.
appid
==
settings
.
platformid
)
{
if
(
obj
.
appid
==
settings
.
platformid
)
{
let
cacheList
=
await
this
.
cacheManager
.
MagCache
.
getCacheSmembersByKey
(
cacheCacheKeyPrefix
);
let
cacheList
=
await
this
.
cacheManager
.
MagCache
.
getCacheSmembersByKey
(
cacheCacheKeyPrefix
);
if
(
search
_n
ame
)
{
if
(
search
N
ame
)
{
cacheList
=
cacheList
.
filter
(
f
=>
f
.
indexOf
(
search
_n
ame
)
>=
0
);
cacheList
=
cacheList
.
filter
(
f
=>
f
.
indexOf
(
search
N
ame
)
>=
0
);
}
}
const
pageValues
=
cacheList
.
slice
(
offset
,
offset
+
limit
);
const
pageValues
=
cacheList
.
slice
(
offset
,
offset
+
limit
);
const
kobjs
=
await
this
.
buildCacheRtn
(
pageValues
);
const
kobjs
=
await
this
.
buildCacheRtn
(
pageValues
);
var
tmpList
=
{
results
:
{
rows
:
kobjs
,
count
:
cacheList
.
length
}
};
const
tmpList
=
{
results
:
{
rows
:
kobjs
,
count
:
cacheList
.
length
,
},
};
return
system
.
getResult
(
tmpList
);
return
system
.
getResult
(
tmpList
);
}
}
const
body
=
{
const
body
=
{
pageInfo
:
obj
.
pageInfo
,
pageInfo
:
obj
.
pageInfo
,
search
:
obj
.
search
,
search
:
obj
.
search
,
};
};
var
tmpList
=
await
this
.
opOtherAppCache
(
'findAndCountAll'
,
body
,
obj
.
opCacheUrl
);
const
tmpList
=
await
this
.
opOtherAppCache
(
'findAndCountAll'
,
body
,
obj
.
opCacheUrl
);
return
tmpList
;
return
tmpList
;
}
}
async
delCache
(
obj
)
{
async
delCache
(
obj
)
{
...
@@ -60,7 +64,8 @@ class CachSearchesSve {
...
@@ -60,7 +64,8 @@ class CachSearchesSve {
const
body
=
{
const
body
=
{
del_cachekey
:
obj
.
key
,
del_cachekey
:
obj
.
key
,
};
};
return
await
this
.
opOtherAppCache
(
'delCache'
,
body
,
obj
.
opCacheUrl
);
const
result
=
await
this
.
opOtherAppCache
(
'delCache'
,
body
,
obj
.
opCacheUrl
);
return
result
;
}
}
}
}
async
clearAllCache
(
obj
)
{
async
clearAllCache
(
obj
)
{
...
@@ -68,24 +73,25 @@ class CachSearchesSve {
...
@@ -68,24 +73,25 @@ class CachSearchesSve {
await
this
.
cacheManager
.
MagCache
.
clearAll
();
await
this
.
cacheManager
.
MagCache
.
clearAll
();
return
{
status
:
0
};
return
{
status
:
0
};
}
}
return
await
this
.
opOtherAppCache
(
'clearAllCache'
,
{},
obj
.
opCacheUrl
);
const
result
=
await
this
.
opOtherAppCache
(
'clearAllCache'
,
{},
obj
.
opCacheUrl
);
return
result
;
}
}
// app调用次数
// app调用次数
async
findAndCountAlldetail
(
obj
)
{
async
findAndCountAlldetail
(
obj
)
{
const
apicallAccu
=
await
this
.
cacheManager
.
ApiAccuCache
.
getApiCallAccu
(
obj
);
const
apicallAccu
=
await
this
.
cacheManager
.
ApiAccuCache
.
getApiCallAccu
(
obj
);
const
result
=
{
rows
:
[],
count
:
0
};
const
result
=
{
rows
:
[],
count
:
0
};
const
keys
=
await
this
.
cacheManager
.
MagCache
.
keys
(
`api_call_
${
appkey
}
*`
);
const
keys
=
await
this
.
cacheManager
.
MagCache
.
keys
(
`api_call_
${
appkey
}
*`
);
var
detail
=
null
;
let
detail
=
null
;
for
(
let
j
=
0
;
j
<
keys
.
length
;
j
++
)
{
for
(
let
j
=
0
;
j
<
keys
.
length
;
j
++
)
{
const
d
=
keys
[
j
];
const
d
=
keys
[
j
];
const
pathdetail
=
d
.
substr
(
d
.
lastIndexOf
(
'_'
)
+
1
,
d
.
length
);
const
pathdetail
=
d
.
substr
(
d
.
lastIndexOf
(
'_'
)
+
1
,
d
.
length
);
const
apicalldetailAccu
=
await
this
.
cacheManager
.
ApiCallCountCache
.
getApiCallCount
(
appkey
,
pathdetail
);
const
apicalldetailAccu
=
await
this
.
cacheManager
.
ApiCallCountCache
.
getApiCallCount
(
appkey
,
pathdetail
);
var
detail
=
{
detailPath
:
d
,
detailCount
:
apicalldetailAccu
.
callcount
};
detail
=
{
detailPath
:
d
,
detailCount
:
apicalldetailAccu
.
callcount
};
}
}
result
.
rows
=
detail
;
result
.
rows
=
detail
;
}
}
// 操作别的应用的缓存
// 操作别的应用的缓存
async
opOtherAppCache
(
action
_t
ype
,
body
=
null
,
opCacheUrl
)
{
async
opOtherAppCache
(
action
T
ype
,
body
=
null
,
opCacheUrl
)
{
const
appData
=
await
this
.
authUtils
.
getTokenInfo
(
settings
.
appKey
,
settings
.
secret
);
const
appData
=
await
this
.
authUtils
.
getTokenInfo
(
settings
.
appKey
,
settings
.
secret
);
if
(
appData
.
status
!=
0
)
{
if
(
appData
.
status
!=
0
)
{
return
appData
;
return
appData
;
...
@@ -94,7 +100,7 @@ class CachSearchesSve {
...
@@ -94,7 +100,7 @@ class CachSearchesSve {
const
restS
=
await
system
.
getObject
(
'util.restClient'
);
const
restS
=
await
system
.
getObject
(
'util.restClient'
);
const
restResult
=
await
restS
.
execPostWithAK
(
const
restResult
=
await
restS
.
execPostWithAK
(
{
{
action_type
,
action_type
:
actionType
,
body
,
body
,
},
},
opCacheUrl
,
appData
.
data
.
accessKey
,
opCacheUrl
,
appData
.
data
.
accessKey
,
...
...
ic-deliver/app/base/utils/businessManager/authUtils.js
View file @
8963ffd5
...
@@ -7,7 +7,7 @@ class AuthUtils {
...
@@ -7,7 +7,7 @@ class AuthUtils {
}
}
getUUID
()
{
getUUID
()
{
const
uuid
=
uuidv4
();
const
uuid
=
uuidv4
();
const
u
=
uuid
.
replace
(
/
\
-
/g
,
''
);
const
u
=
uuid
.
replace
(
/-/g
,
''
);
return
u
;
return
u
;
}
}
/**
/**
...
...
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