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
24fe5dd8
Commit
24fe5dd8
authored
Jan 15, 2020
by
庄冰
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'igirl-channel' of gitlab.gongsibao.com:jiangyong/zhichan into igirl-channel
parents
1b552297
feb7bf85
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
8 deletions
+18
-8
igirl-channel/app/base/api/impl/action/tmOrder.js
+1
-1
igirl-channel/app/base/api/impl/auth/accessAuth.js
+3
-3
igirl-channel/app/base/db/cache.base.js
+0
-1
igirl-channel/app/base/db/impl/dbapp/appuserDao.js
+1
-0
igirl-channel/app/base/db/models/dbapp/appuser.js
+2
-1
igirl-channel/app/base/service/impl/dborder/ordertmproductSve.js
+5
-1
igirl-channel/app/base/utils/businessManager/opPlatformUtils.js
+6
-1
No files found.
igirl-channel/app/base/api/impl/action/tmOrder.js
View file @
24fe5dd8
...
@@ -58,7 +58,7 @@ class TmOrderAPI extends APIBase {
...
@@ -58,7 +58,7 @@ class TmOrderAPI extends APIBase {
"tmConfirm"
,
"updateTmInfo"
,
"updateNclInfo"
,
"updateContacts"
,
"tmConfirm"
,
"updateTmInfo"
,
"updateNclInfo"
,
"updateContacts"
,
"updateCustomerInfo"
,
"addOrderAndDelivery"
,
"updateOrderPayStatus"
].
indexOf
(
action_type
)
>=
0
)
{
"updateCustomerInfo"
,
"addOrderAndDelivery"
,
"updateOrderPayStatus"
].
indexOf
(
action_type
)
>=
0
)
{
if
(
!
action_body
.
channelUserId
)
{
if
(
!
action_body
.
channelUserId
)
{
return
system
.
getResult
(
-
99
,
"verify channelUserId is empty"
);
return
system
.
getResult
Fail
(
-
99
,
"verify channelUserId is empty"
);
}
}
}
}
switch
(
action_type
)
{
switch
(
action_type
)
{
...
...
igirl-channel/app/base/api/impl/auth/accessAuth.js
View file @
24fe5dd8
...
@@ -67,19 +67,19 @@ class AccessAuthAPI extends APIBase {
...
@@ -67,19 +67,19 @@ class AccessAuthAPI extends APIBase {
case
"userPinByLgoin"
:
case
"userPinByLgoin"
:
opResult
=
await
this
.
opPlatformUtils
.
getReqUserPinByLgoin
(
action_body
,
userpin
);
opResult
=
await
this
.
opPlatformUtils
.
getReqUserPinByLgoin
(
action_body
,
userpin
);
if
(
opResult
.
status
==
0
)
{
if
(
opResult
.
status
==
0
)
{
return
system
.
getResultSuccess
({
userpin
:
userpin
,
channelUserId
:
encryptStrResult
.
data
,
userName
:
opStr
})
return
system
.
getResultSuccess
({
userpin
:
userpin
,
channelUserId
:
encryptStrResult
.
data
,
userName
:
opStr
,
isAdmin
:
opResult
.
data
.
isAdmin
||
0
})
}
}
break
;
break
;
case
"userPinByLgoinVcode"
:
case
"userPinByLgoinVcode"
:
opResult
=
await
this
.
opPlatformUtils
.
getReqUserPinByLgoinVcode
(
action_body
,
userpin
,
"login"
);
opResult
=
await
this
.
opPlatformUtils
.
getReqUserPinByLgoinVcode
(
action_body
,
userpin
,
"login"
);
if
(
opResult
.
status
==
0
)
{
if
(
opResult
.
status
==
0
)
{
return
system
.
getResultSuccess
({
userpin
:
userpin
,
channelUserId
:
encryptStrResult
.
data
,
userName
:
opStr
})
return
system
.
getResultSuccess
({
userpin
:
userpin
,
channelUserId
:
encryptStrResult
.
data
,
userName
:
opStr
,
isAdmin
:
opResult
.
data
.
isAdmin
||
0
})
}
}
break
;
break
;
case
"userPinByRegister"
:
case
"userPinByRegister"
:
opResult
=
await
this
.
opPlatformUtils
.
getReqUserPinByLgoinVcode
(
action_body
,
userpin
,
"reg"
);
opResult
=
await
this
.
opPlatformUtils
.
getReqUserPinByLgoinVcode
(
action_body
,
userpin
,
"reg"
);
if
(
opResult
.
status
==
0
)
{
if
(
opResult
.
status
==
0
)
{
return
system
.
getResultSuccess
({
userpin
:
userpin
,
channelUserId
:
encryptStrResult
.
data
,
userName
:
opStr
})
return
system
.
getResultSuccess
({
userpin
:
userpin
,
channelUserId
:
encryptStrResult
.
data
,
userName
:
opStr
,
isAdmin
:
opResult
.
data
.
isAdmin
||
0
})
}
}
break
;
break
;
case
"logout"
:
case
"logout"
:
...
...
igirl-channel/app/base/db/cache.base.js
View file @
24fe5dd8
...
@@ -34,7 +34,6 @@ class CacheBase {
...
@@ -34,7 +34,6 @@ class CacheBase {
this
.
redisClient
.
sadd
(
this
.
cacheCacheKeyPrefix
,
[
cachekey
+
"|"
+
this
.
desc
]);
this
.
redisClient
.
sadd
(
this
.
cacheCacheKeyPrefix
,
[
cachekey
+
"|"
+
this
.
desc
]);
return
objval
;
return
objval
;
}
else
{
}
else
{
this
.
redisClient
.
set
(
cachekey
,
cacheValue
,
ex
);
return
JSON
.
parse
(
cacheValue
);
return
JSON
.
parse
(
cacheValue
);
}
}
}
}
...
...
igirl-channel/app/base/db/impl/dbapp/appuserDao.js
View file @
24fe5dd8
...
@@ -21,6 +21,7 @@ class AppUserDao extends Dao {
...
@@ -21,6 +21,7 @@ class AppUserDao extends Dao {
"orgName"
,
"orgName"
,
"orgPath"
,
"orgPath"
,
"isEnabled"
,
"isEnabled"
,
"isAdmin"
,
"loginNum"
,
"loginNum"
,
"lastLoginTime"
],
"lastLoginTime"
],
raw
:
true
raw
:
true
...
...
igirl-channel/app/base/db/models/dbapp/appuser.js
View file @
24fe5dd8
...
@@ -14,7 +14,8 @@ module.exports = (db, DataTypes) => {
...
@@ -14,7 +14,8 @@ module.exports = (db, DataTypes) => {
orgPath
:
DataTypes
.
STRING
(
255
),
// 组织结构路径
orgPath
:
DataTypes
.
STRING
(
255
),
// 组织结构路径
isEnabled
:
DataTypes
.
INTEGER
,
// 是否启用
isEnabled
:
DataTypes
.
INTEGER
,
// 是否启用
loginNum
:
DataTypes
.
INTEGER
,
// 登录次数
loginNum
:
DataTypes
.
INTEGER
,
// 登录次数
lastLoginTime
:
DataTypes
.
DATE
,
// 上次登录时间
lastLoginTime
:
DataTypes
.
DATE
,
// 上次登录时间
isAdmin
:
DataTypes
.
INTEGER
,
// 是否管理员
},
{
},
{
paranoid
:
false
,
//假的删除
paranoid
:
false
,
//假的删除
underscored
:
true
,
underscored
:
true
,
...
...
igirl-channel/app/base/service/impl/dborder/ordertmproductSve.js
View file @
24fe5dd8
...
@@ -654,6 +654,10 @@ class OrderTmProductService extends ServiceBase {
...
@@ -654,6 +654,10 @@ class OrderTmProductService extends ServiceBase {
var
sqlCount
=
"SELECT count(1) as dataCount FROM `b_order_tm_product` AS tm LEFT JOIN `b_order` AS o ON tm.`sourceOrderNo`=o.`orderNo` LEFT JOIN"
+
var
sqlCount
=
"SELECT count(1) as dataCount FROM `b_order_tm_product` AS tm LEFT JOIN `b_order` AS o ON tm.`sourceOrderNo`=o.`orderNo` LEFT JOIN"
+
" `b_customerinfo` AS c ON tm.`deliveryOrderNo`=c.`deliveryOrderNo` where tm.deleted_at is null "
;
" `b_customerinfo` AS c ON tm.`deliveryOrderNo`=c.`deliveryOrderNo` where tm.deleted_at is null "
;
var
paramWhere
=
{};
var
paramWhere
=
{};
sql
+=
" and tm.app_id=:app_id"
;
sqlCount
+=
" and tm.app_id=:app_id"
;
paramWhere
.
app_id
=
req
.
app
.
id
;
if
([
"1688"
,
"jd"
,
"gsbhome"
].
indexOf
(
pobj
.
actionProcess
)
>=
0
)
{
if
([
"1688"
,
"jd"
,
"gsbhome"
].
indexOf
(
pobj
.
actionProcess
)
>=
0
)
{
sql
+=
" and o.orderPayStatus=:orderPayStatus"
;
sql
+=
" and o.orderPayStatus=:orderPayStatus"
;
sqlCount
+=
" and o.orderPayStatus=:orderPayStatus"
;;
sqlCount
+=
" and o.orderPayStatus=:orderPayStatus"
;;
...
@@ -661,7 +665,7 @@ class OrderTmProductService extends ServiceBase {
...
@@ -661,7 +665,7 @@ class OrderTmProductService extends ServiceBase {
}
}
if
(
req
.
user
)
{
if
(
req
.
user
)
{
if
(
params
.
getListType
&&
params
.
getListType
==
"getTmOrderListAdmin"
)
{
if
(
params
.
getListType
&&
params
.
getListType
==
"getTmOrderListAdmin"
)
{
if
([
"syaify"
,
"jd_613f2fd04340f"
].
indexOf
(
req
.
user
.
channelUserId
)
<
0
)
{
if
([
"syaify"
,
"jd_613f2fd04340f"
].
indexOf
(
req
.
user
.
channelUserId
)
<
0
&&
req
.
user
.
isAdmin
!=
1
)
{
sql
+=
" and tm.createuser_id=:createuser_id"
;
sql
+=
" and tm.createuser_id=:createuser_id"
;
sqlCount
+=
" and tm.createuser_id=:createuser_id"
;
sqlCount
+=
" and tm.createuser_id=:createuser_id"
;
paramWhere
.
createuser_id
=
req
.
user
.
id
;
paramWhere
.
createuser_id
=
req
.
user
.
id
;
...
...
igirl-channel/app/base/utils/businessManager/opPlatformUtils.js
View file @
24fe5dd8
...
@@ -25,10 +25,15 @@ class OpPlatformUtils {
...
@@ -25,10 +25,15 @@ class OpPlatformUtils {
async
getReqApiAccessKey
(
appKey
,
secret
)
{
async
getReqApiAccessKey
(
appKey
,
secret
)
{
var
cacheManager
=
system
.
getObject
(
"db.common.cacheManager"
);
var
cacheManager
=
system
.
getObject
(
"db.common.cacheManager"
);
var
reqApiAccessKey
=
null
;
var
reqApiAccessKey
=
null
;
appKey
=
appKey
&&
secret
?
appKey
:
settings
.
appKey
;
var
cacheValue
=
await
cacheManager
[
"ApiAccessKeyCache"
].
getCache
(
appKey
);
if
(
cacheValue
&&
cacheValue
.
status
==
0
)
{
return
cacheValue
;
}
if
(
appKey
&&
secret
)
{
if
(
appKey
&&
secret
)
{
reqApiAccessKey
=
await
cacheManager
[
"ApiAccessKeyCache"
].
cache
(
appKey
,
null
,
10
,
secret
);
reqApiAccessKey
=
await
cacheManager
[
"ApiAccessKeyCache"
].
cache
(
appKey
,
null
,
10
,
secret
);
}
else
{
}
else
{
reqApiAccessKey
=
await
cacheManager
[
"ApiAccessKeyCache"
].
cache
(
settings
.
appKey
,
null
,
10
);
reqApiAccessKey
=
await
cacheManager
[
"ApiAccessKeyCache"
].
cache
(
appKey
,
null
,
10
);
}
}
if
(
!
reqApiAccessKey
||
!
reqApiAccessKey
.
data
)
{
if
(
!
reqApiAccessKey
||
!
reqApiAccessKey
.
data
)
{
return
system
.
getResult
(
null
,
"获取请求token失败"
);
return
system
.
getResult
(
null
,
"获取请求token失败"
);
...
...
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