Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
C
chinafrica
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
chinafrica
Commits
2fe6ad94
提交
2fe6ad94
authored
7月 23, 2020
作者:
吴德鹏
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
首页统计
上级
eae44a16
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
126 行增加
和
73 行删除
+126
-73
TbCfOrderController.java
...ain/java/com/platform/controller/TbCfOrderController.java
+8
-0
TbCfSearchController.java
...in/java/com/platform/controller/TbCfSearchController.java
+1
-1
TbCfOrderDao.java
...rm-admin/src/main/java/com/platform/dao/TbCfOrderDao.java
+2
-0
TbCfSearchDao.java
...m-admin/src/main/java/com/platform/dao/TbCfSearchDao.java
+2
-0
TbCfOrderService.java
.../src/main/java/com/platform/service/TbCfOrderService.java
+2
-0
TbCfOrderServiceImpl.java
.../java/com/platform/service/impl/TbCfOrderServiceImpl.java
+7
-1
TopSearch.java
platform-admin/src/main/java/com/platform/vo/TopSearch.java
+3
-3
TbCfOrderDao.xml
...dmin/src/main/resources/com/platform/dao/TbCfOrderDao.xml
+6
-1
TbCfSearchDao.xml
...min/src/main/resources/com/platform/dao/TbCfSearchDao.xml
+59
-53
platform.properties
platform-admin/src/main/resources/dev/platform.properties
+6
-6
platform.properties
platform-admin/src/main/resources/prod/platform.properties
+6
-6
main.html
platform-admin/src/main/webapp/WEB-INF/page/sys/main.html
+2
-2
main.js
platform-admin/src/main/webapp/js/sys/main.js
+22
-0
没有找到文件。
platform-admin/src/main/java/com/platform/controller/TbCfOrderController.java
浏览文件 @
2fe6ad94
...
...
@@ -319,6 +319,7 @@ public class TbCfOrderController extends AbstractController {
amount
=
amount
.
setScale
(
2
,
BigDecimal
.
ROUND_UP
);
return
R
.
ok
().
put
(
"amount"
,
amount
);
}
@GetMapping
(
"/getOrderSumAmount"
)
@ResponseBody
public
R
getOrderSumAmount
()
{
...
...
@@ -326,6 +327,13 @@ public class TbCfOrderController extends AbstractController {
amount
=
amount
.
setScale
(
2
,
BigDecimal
.
ROUND_UP
);
return
R
.
ok
().
put
(
"amount"
,
amount
);
}
@GetMapping
(
"/getDayOrderNum"
)
@ResponseBody
public
R
getDayOrderNum
()
{
int
dayOrderNum
=
tbCfOrderService
.
getDayOrderNum
();
return
R
.
ok
().
put
(
"dayOrderNum"
,
dayOrderNum
);
}
//==========================================================================================================
/**
...
...
platform-admin/src/main/java/com/platform/controller/TbCfSearchController.java
浏览文件 @
2fe6ad94
...
...
@@ -128,7 +128,7 @@ public class TbCfSearchController {
*/
@RequestMapping
(
"/getTopSearch"
)
@ResponseBody
public
R
getTopSearch
()
{
public
R
getTopSearch
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
TopSearch
topSearch
=
tbCfSearchService
.
getTopSearch
();
...
...
platform-admin/src/main/java/com/platform/dao/TbCfOrderDao.java
浏览文件 @
2fe6ad94
...
...
@@ -96,4 +96,6 @@ public interface TbCfOrderDao extends BaseDao<TbCfOrderEntity> {
BigDecimal
getOrderSumAmount
();
int
getDayOrderNum
();
}
platform-admin/src/main/java/com/platform/dao/TbCfSearchDao.java
浏览文件 @
2fe6ad94
...
...
@@ -17,4 +17,6 @@ public interface TbCfSearchDao extends BaseDao<TbCfSearchEntity> {
List
<
SearchKeywords
>
getSearchKeywords
();
TopSearch
getTopSearch
();
int
getTotal
();
}
platform-admin/src/main/java/com/platform/service/TbCfOrderService.java
浏览文件 @
2fe6ad94
...
...
@@ -115,4 +115,6 @@ public interface TbCfOrderService {
BigDecimal
getAverageSales
();
BigDecimal
getOrderSumAmount
();
int
getDayOrderNum
();
}
platform-admin/src/main/java/com/platform/service/impl/TbCfOrderServiceImpl.java
浏览文件 @
2fe6ad94
...
...
@@ -118,7 +118,7 @@ public class TbCfOrderServiceImpl implements TbCfOrderService {
Set
<
Integer
>
statusList
=
new
HashSet
<>();
if
(
orderItemList
!=
null
&&
orderItemList
.
size
()
>
0
)
{
for
(
TbCfItemDetailEntity
itemList
:
orderItemList
)
{
if
(
itemList
!=
null
)
{
if
(
itemList
!=
null
)
{
TbCfItemOrderREntity
tbCfItemOrder
=
tbCfItemOrderRDao
.
getOrderItemId
(
tbCfPlatformOrder
.
getOrderId
(),
itemList
.
getItemId
());
Integer
orderStatus
=
tbCfItemOrder
.
getOrderStatus
();
statusList
.
add
(
orderStatus
);
...
...
@@ -196,4 +196,10 @@ public class TbCfOrderServiceImpl implements TbCfOrderService {
return
tbCfOrderDao
.
getOrderSumAmount
();
}
@Override
public
int
getDayOrderNum
()
{
return
tbCfOrderDao
.
getDayOrderNum
();
}
}
platform-admin/src/main/java/com/platform/vo/TopSearch.java
浏览文件 @
2fe6ad94
...
...
@@ -8,7 +8,7 @@ package com.platform.vo;
public
class
TopSearch
{
private
Long
total
;
private
Long
average
;
private
Double
average
;
public
Long
getTotal
()
{
return
total
;
...
...
@@ -18,11 +18,11 @@ public class TopSearch {
this
.
total
=
total
;
}
public
Long
getAverage
()
{
public
Double
getAverage
()
{
return
average
;
}
public
void
setAverage
(
Long
average
)
{
public
void
setAverage
(
Double
average
)
{
this
.
average
=
average
;
}
}
platform-admin/src/main/resources/com/platform/dao/TbCfOrderDao.xml
浏览文件 @
2fe6ad94
...
...
@@ -243,7 +243,12 @@
left join tb_cf_item_detail d on d.item_id=i.item_id
WHERE 1=1 and i.enable_flag=1 and o.enable_flag=1
</select>
<select
id=
"getDayOrderNum"
resultType=
"int"
>
SELECT
count(DISTINCT user_id)
FROM
tb_cf_order where DATE_FORMAT(order_time,'%Y-%m-%d')=CURDATE()
</select>
<insert
id=
"save"
parameterType=
"com.platform.entity.TbCfOrderEntity"
>
insert into tb_cf_order(
...
...
platform-admin/src/main/resources/com/platform/dao/TbCfSearchDao.xml
浏览文件 @
2fe6ad94
...
...
@@ -9,7 +9,7 @@
<result
property=
"userId"
column=
"user_id"
/>
</resultMap>
<select
id=
"queryObject"
resultType=
"com.platform.entity.TbCfSearchEntity"
>
<select
id=
"queryObject"
resultType=
"com.platform.entity.TbCfSearchEntity"
>
select
`id`,
`search_keywords`,
...
...
@@ -17,55 +17,61 @@
from tb_cf_search
where id = #{id}
</select>
<select
id=
"getSearchKeywords"
resultType=
"com.platform.vo.SearchKeywords"
>
SELECT
search_keywords,
count( DISTINCT user_id ) count
FROM
tb_cf_search
GROUP BY
search_keywords
ORDER BY
count DESC
</select>
<select
id=
"queryList"
resultType=
"com.platform.entity.TbCfSearchEntity"
>
select
`id`,
`search_keywords`,
`user_id`
from tb_cf_search
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND name LIKE concat('%',#{name},'%')
</if>
<select
id=
"getSearchKeywords"
resultType=
"com.platform.vo.SearchKeywords"
>
SELECT
search_keywords,
count( DISTINCT user_id ) count
FROM
tb_cf_search
GROUP BY
search_keywords
ORDER BY
count DESC
<if
test=
"offset != null and limit != null"
>
limit #{offset}, #{limit}
</if>
</select>
<select
id=
"queryList"
resultType=
"com.platform.entity.TbCfSearchEntity"
>
select
`id`,
`search_keywords`,
`user_id`
from tb_cf_search
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND name LIKE concat('%',#{name},'%')
</if>
<choose>
<when
test=
"sidx != null and sidx.trim() != ''"
>
order by ${sidx} ${order}
</when>
<otherwise>
<otherwise>
order by id desc
</otherwise>
</otherwise>
</choose>
<if
test=
"offset != null and limit != null"
>
limit #{offset}, #{limit}
</if>
</select>
<select
id=
"getTopSearch"
resultType=
"com.platform.vo.TopSearch"
>
<if
test=
"offset != null and limit != null"
>
limit #{offset}, #{limit}
</if>
</select>
<select
id=
"getTopSearch"
resultType=
"com.platform.vo.TopSearch"
>
SELECT
count( DISTINCT user_id ) total,
count( 1 ) / count( DISTINCT user_id ) average
FROM
tb_cf_search
</select>
<select
id=
"queryTotal"
resultType=
"int"
>
select count(*) from tb_cf_search
WHERE 1=1
<select
id=
"getTotal"
resultType=
"int"
>
select count(DISTINCT search_keywords) from tb_cf_search
</select>
<select
id=
"queryTotal"
resultType=
"int"
>
select count(*) from tb_cf_search
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND name LIKE concat('%',#{name},'%')
</if>
</select>
<insert
id=
"save"
parameterType=
"com.platform.entity.TbCfSearchEntity"
>
</select>
<insert
id=
"save"
parameterType=
"com.platform.entity.TbCfSearchEntity"
>
insert into tb_cf_search(
`id`,
`search_keywords`,
...
...
@@ -75,25 +81,25 @@
#{searchKeywords},
#{userId})
</insert>
<update
id=
"update"
parameterType=
"com.platform.entity.TbCfSearchEntity"
>
update tb_cf_search
<set>
<if
test=
"searchKeywords != null"
>
`search_keywords` = #{searchKeywords},
</if>
<if
test=
"userId != null"
>
`user_id` = #{userId}
</if>
</set>
where id = #{id}
</update>
<delete
id=
"delete"
>
<update
id=
"update"
parameterType=
"com.platform.entity.TbCfSearchEntity"
>
update tb_cf_search
<set>
<if
test=
"searchKeywords != null"
>
`search_keywords` = #{searchKeywords},
</if>
<if
test=
"userId != null"
>
`user_id` = #{userId}
</if>
</set>
where id = #{id}
</update>
<delete
id=
"delete"
>
delete from tb_cf_search where id = #{value}
</delete>
<delete
id=
"deleteBatch"
>
delete from tb_cf_search where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
<delete
id=
"deleteBatch"
>
delete from tb_cf_search where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
platform-admin/src/main/resources/dev/platform.properties
浏览文件 @
2fe6ad94
...
...
@@ -2,13 +2,13 @@
#jdbc.username=root
#jdbc.password=root
jdbc.url
=
jdbc:mysql://47.106.242.175:3306/chinafrica?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
jdbc.username
=
root
jdbc.password
=
diaoyun666
#
jdbc.url=jdbc:mysql://47.106.242.175:3306/chinafrica?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
#
jdbc.username=root
#
jdbc.password=diaoyun666
#
jdbc.url: jdbc:mysql://159.138.48.71:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false
#
jdbc.username: root
#
jdbc.password: Diaoyunnuli.8
jdbc.url
:
jdbc:mysql://159.138.48.71:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false
jdbc.username
:
root
jdbc.password
:
Diaoyunnuli.8
jdbc.initialSize
=
5
jdbc.maxActive
=
30
...
...
platform-admin/src/main/resources/prod/platform.properties
浏览文件 @
2fe6ad94
...
...
@@ -2,13 +2,13 @@
#jdbc.username=root
#jdbc.password=root
jdbc.url
=
jdbc:mysql://47.106.242.175:3306/chinafrica?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
jdbc.username
=
root
jdbc.password
=
diaoyun666
#
jdbc.url=jdbc:mysql://47.106.242.175:3306/chinafrica?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
#
jdbc.username=root
#
jdbc.password=diaoyun666
#
jdbc.url: jdbc:mysql://159.138.48.71:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false
#
jdbc.username: root
#
jdbc.password: Diaoyunnuli.8
jdbc.url
:
jdbc:mysql://159.138.48.71:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false
jdbc.username
:
root
jdbc.password
:
Diaoyunnuli.8
jdbc.initialSize
=
5
jdbc.maxActive
=
30
...
...
platform-admin/src/main/webapp/WEB-INF/page/sys/main.html
浏览文件 @
2fe6ad94
...
...
@@ -584,7 +584,7 @@
<h4
class=
"m-card-title"
ref=
'userSearchSum'
>
搜索用户数
</h4>
<p>
<span>
8846
{{total}}
</span>
<span>
17.1%
...
...
@@ -596,7 +596,7 @@
<h4
class=
"m-card-title"
ref=
'userSearchPerCapita'
>
人均搜索次数
</h4>
<p>
<span>
8846
{{average}}
</span>
<span>
17.1%
...
...
platform-admin/src/main/webapp/js/sys/main.js
浏览文件 @
2fe6ad94
...
...
@@ -2,6 +2,8 @@ let app = new Vue({
el
:
'#app'
,
data
()
{
return
{
total
:
0
,
average
:
0
,
category2
:
null
,
category3
:
null
,
amount
:
0
,
...
...
@@ -673,14 +675,20 @@ let app = new Vue({
this
.
$refs
.
middleEachrtsTitle
.
innerText
=
element
.
title
+
'趋势'
;
// this.initEchartsMiddleData[0].data.push(['2019-10-1'+Math.round(Math.random()*100), Math.round(Math.random()*1000)])
if
(
index
===
0
)
{
this
.
initEchartsMiddleData
[
0
].
name
=
'注册量'
let
url
=
'../tbcfuserinfo/getDailyRegistered'
;
this
.
templateMethod
(
url
);
}
else
if
(
index
===
1
)
{
this
.
initEchartsMiddleData
[
0
].
name
=
'访问量'
this
.
initEchartsMiddleData
[
0
].
data
=
[]
}
else
if
(
index
===
2
)
{
this
.
initEchartsMiddleData
[
0
].
name
=
'订单笔数'
console
.
log
(
123345455
,
this
.
initEchartsMiddleData
[
0
].
name
)
let
url
=
'../tbcforder/getOrderByDate'
;
this
.
templateMethod1
(
url
);
}
else
if
(
index
===
3
)
{
this
.
initEchartsMiddleData
[
0
].
name
=
'成交量'
console
.
log
(
123345455
,
this
.
initEchartsMiddleData
[
0
].
name
)
let
url
=
'../tbcforder/getOrderPaidByDate'
;
this
.
templateMethod1
(
url
);
}
...
...
@@ -693,9 +701,11 @@ let app = new Vue({
if
(
element
.
title
===
'热门搜索'
)
{
this
.
$refs
.
userSearchSum
.
innerText
=
'搜索用户数'
this
.
$refs
.
userSearchPerCapita
.
innerText
=
'人均搜索次数'
this
.
getTopSearch
();
}
else
{
this
.
$refs
.
userSearchSum
.
innerText
=
'下单用户数'
this
.
$refs
.
userSearchPerCapita
.
innerText
=
'人均流量次数'
this
.
getDayOrderNum
();
}
},
/* 中间模块日期 */
...
...
@@ -749,6 +759,11 @@ let app = new Vue({
})
})
},
getDayOrderNum
()
{
$
.
get
(
'../tbcforder/getDayOrderNum'
,
res
=>
{
this
.
total
=
res
.
dayOrderNum
;
})
},
getSearchKeywords
()
{
$
.
get
(
'../tbcfsearch/getSearchKeywords'
,
res
=>
{
let
list
=
JSON
.
parse
(
res
).
list
;
...
...
@@ -767,6 +782,12 @@ let app = new Vue({
this
.
amount
=
res
.
amount
;
})
},
getTopSearch
()
{
$
.
get
(
'../tbcfsearch/getTopSearch'
,
res
=>
{
this
.
total
=
JSON
.
parse
(
res
).
topSearch
.
total
;
this
.
average
=
JSON
.
parse
(
res
).
topSearch
.
average
;
})
},
getCategory
()
{
$
.
get
(
'../tbcfgoodstype/queryAll'
,
res
=>
{
this
.
categoryList
=
res
.
list
;
...
...
@@ -789,6 +810,7 @@ let app = new Vue({
this
.
getOrderPaidNum
();
this
.
getOrderRate
();
this
.
getAverageSales
();
this
.
getTopSearch
();
$
.
get
(
'../tbcfuserinfo/getDayRegistered'
,
res
=>
{
let
objList
=
JSON
.
parse
(
res
).
list
this
.
newNum
=
objList
[
0
].
num
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论