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
74234cc6
Commit
74234cc6
authored
Mar 13, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
9934725d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
30 deletions
+34
-30
fqboss/app/base/api/impl/beehive.js
+1
-1
fqboss/app/base/db/impl/trademarkDao.js
+23
-20
fqboss/app/base/service/impl/accountSve.js
+1
-1
fqboss/app/base/service/impl/statisticalrateSve.js
+1
-1
fqboss/app/config/localsettings.js
+8
-7
No files found.
fqboss/app/base/api/impl/beehive.js
View file @
74234cc6
...
...
@@ -46,7 +46,7 @@ class beehiveApi extends ApiBase{
}
sql
=
sql
+
" group by tmc.credit_code, tmc.applier, att.`name` "
var
sql2
=
"select count(
*
) count from ("
+
sql
+
") as a"
;
var
sql2
=
"select count(
1
) count from ("
+
sql
+
") as a"
;
console
.
log
(
sql2
);
sql
=
sql
+
" limit "
+
start
+
","
+
ps
;
console
.
log
(
sql
);
...
...
fqboss/app/base/db/impl/trademarkDao.js
View file @
74234cc6
...
...
@@ -8,42 +8,45 @@ class TrademarkDao extends Dao {
constructor
()
{
super
(
Dao
.
getModelName
(
TrademarkDao
));
}
judgeChannelCode
(
channelcode
){
//判断渠道编码是否为igirl-channel渠道,若是返回渠道码对应商标来源类型
if
(
!
channelCodeToTmSourceType
||
!
channelcode
)
{
judgeChannelCode
(
channelcode
)
{
//判断渠道编码是否为igirl-channel渠道,若是返回渠道码对应商标来源类型
if
(
!
channelCodeToTmSourceType
||
!
channelcode
)
{
return
null
;
}
if
(
channelCodeToTmSourceType
.
hasOwnProperty
(
channelcode
))
{
if
(
channelCodeToTmSourceType
.
hasOwnProperty
(
channelcode
))
{
return
channelCodeToTmSourceType
[
channelcode
];
}
else
{
}
else
{
return
null
;
}
}
judgeTmSourceType
(
type
){
//判断商标来源类型是否为igirl-channel来源,若是返回来源类型对应渠道码
if
(
!
tmSourceTypeToChannelCode
||
!
type
)
{
judgeTmSourceType
(
type
)
{
//判断商标来源类型是否为igirl-channel来源,若是返回来源类型对应渠道码
if
(
!
tmSourceTypeToChannelCode
||
!
type
)
{
return
null
;
}
if
(
tmSourceTypeToChannelCode
.
hasOwnProperty
(
type
))
{
if
(
tmSourceTypeToChannelCode
.
hasOwnProperty
(
type
))
{
return
tmSourceTypeToChannelCode
[
type
];
}
else
{
}
else
{
return
null
;
}
}
extraWhere
(
obj
,
w
)
{
if
(
obj
.
codepath
&&
obj
.
codepath
!=
""
)
{
if
(
obj
.
codepath
.
indexOf
(
"alltrademark"
)
<
0
&&
obj
.
codepath
.
indexOf
(
"allfqtm"
)
<
0
)
{
// w["user_id"]=obj.uid;--改成当前登录者的onlyCode进行查不同平台的用户提报的商标数据
// w["onlyCode"] = obj.onlyCode;
w
[
this
.
db
.
Op
.
or
]
=
[
{
[
this
.
db
.
Op
.
and
]:
[{
onlyCode
:
obj
.
onlyCode
}]
},
{
[
this
.
db
.
Op
.
and
]:
[{
mobile
:
obj
.
mobile
}]
},
];
if
(
obj
.
codepath
.
indexOf
(
"alltrademark"
)
<
0
&&
obj
.
codepath
.
indexOf
(
"allfqtm"
)
<
0
)
{
// 改成当前登录者的onlyCode进行查不同平台的用户提报的商标数据
var
whereArray
=
[];
if
(
obj
.
onlyCode
)
{
whereArray
.
push
({
[
this
.
db
.
Op
.
and
]:
[{
onlyCode
:
obj
.
onlyCode
}]
});
}
if
(
obj
.
mobile
)
{
whereArray
.
push
({
[
this
.
db
.
Op
.
and
]:
[{
mobile
:
obj
.
mobile
}]
});
}
if
(
obj
.
uid
)
{
whereArray
.
push
({
[
this
.
db
.
Op
.
and
]:
[{
user_id
:
obj
.
uid
}]
});
}
w
[
this
.
db
.
Op
.
or
]
=
whereArray
;
}
else
{
//----平台的运营人员可以看全部的商标信息
else
{
//----平台的运营人员可以看全部的商标信息
w
[
"channelPayStatus"
]
=
"yzf"
;
// w[this.db.Op.or] = [
// { [this.db.Op.and]: [{ tmSourceType: "8" }] },
// { [this.db.Op.and]: [{ tmSourceType: "16" }] },
// ];
}
}
return
w
;
...
...
fqboss/app/base/service/impl/accountSve.js
View file @
74234cc6
...
...
@@ -66,7 +66,7 @@ class AccountService extends ServiceBase{
topNum
=
100
;
}
var
sql
=
"SELECT userName,nickName,onlyCode,pvCount,headUrl FROM p_account AS a RIGHT JOIN"
+
" (SELECT referrerOnlyCode AS onlyCode,COUNT(
*
) AS pvCount FROM p_account WHERE referrerOnlyCode!='' AND "
+
" (SELECT referrerOnlyCode AS onlyCode,COUNT(
1
) AS pvCount FROM p_account WHERE referrerOnlyCode!='' AND "
+
" referrerOnlyCode IS NOT NULL GROUP BY referrerOnlyCode ORDER BY pvCount DESC LIMIT 0,:tmpTopNum) AS b"
+
" ON a.`unionId`=b.onlyCode ORDER BY pvCount DESC"
;
var
paras
=
{
tmpTopNum
:
topNum
};
...
...
fqboss/app/base/service/impl/statisticalrateSve.js
View file @
74234cc6
...
...
@@ -79,7 +79,7 @@ class StatisticalRateService extends ServiceBase{
addUpValue
:
kdfm
==
0
?
0
:
parseFloat
(
kdfz
)
/
parseFloat
(
kdfm
)
//累计值
});
//用户分裂率 ,sql查询返回的值为:[ { tjCount: 0 } ]
var
flfz
=
await
this
.
accountDao
.
customQuery
(
"SELECT COUNT(
*
) tjCount FROM `p_account` WHERE referrerOnlyCode IS NOT NULL"
);
var
flfz
=
await
this
.
accountDao
.
customQuery
(
"SELECT COUNT(
1
) tjCount FROM `p_account` WHERE referrerOnlyCode IS NOT NULL"
);
addList
.
push
({
createTime
:
tTime
,
totalType
:
'yhfll'
,
...
...
fqboss/app/config/localsettings.js
View file @
74234cc6
...
...
@@ -7,14 +7,15 @@ var settings={
},
database
:{
dbname
:
"fqboss"
,
//
user: "write",
//
password: "write",
user
:
"root"
,
password
:
"root"
,
user
:
"write"
,
password
:
"write"
,
//
user: "root",
//
password: "root",
config
:
{
host
:
'121.36.3.35'
,
// host: '192.168.18.237',
port
:
3306
,
// host: '121.36.3.35',
host
:
'43.247.184.35'
,
// port: 3306,
port
:
8899
,
dialect
:
'mysql'
,
operatorsAliases
:
false
,
pool
:
{
...
...
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