提交 b3559402 authored 作者: 吴德鹏's avatar 吴德鹏

完成首页支付笔数、订单量、新增注册人数统计

上级 469defd3
...@@ -304,6 +304,15 @@ public class TbCfOrderController extends AbstractController { ...@@ -304,6 +304,15 @@ public class TbCfOrderController extends AbstractController {
List<StatisticalVo> orderList = tbCfOrderListService.getOrderPaidByDate(start, end); List<StatisticalVo> orderList = tbCfOrderListService.getOrderPaidByDate(start, end);
return R.ok().put("list", orderList); return R.ok().put("list", orderList);
} }
@GetMapping("/getOrderNum")
@ResponseBody
public R getOrderNum(@RequestParam(value = "status", required = false) String status) {
Long count = tbCfOrderListService.getOrderNum(status);
return R.ok().put("count", count);
}
//========================================================================================================== //==========================================================================================================
/** /**
......
...@@ -89,4 +89,8 @@ public interface TbCfOrderDao extends BaseDao<TbCfOrderEntity> { ...@@ -89,4 +89,8 @@ public interface TbCfOrderDao extends BaseDao<TbCfOrderEntity> {
List<StatisticalVo> getOrderByDate(@Param("start") String start, @Param("end") String end); List<StatisticalVo> getOrderByDate(@Param("start") String start, @Param("end") String end);
List<StatisticalVo> getOrderPaidByDate(@Param("start") String start, @Param("end") String end); List<StatisticalVo> getOrderPaidByDate(@Param("start") String start, @Param("end") String end);
Long getOrderNum(@Param("status") String status);
} }
...@@ -57,4 +57,6 @@ public interface TbCfOrderListService { ...@@ -57,4 +57,6 @@ public interface TbCfOrderListService {
List<StatisticalVo> getOrderByDate(String start, String end); List<StatisticalVo> getOrderByDate(String start, String end);
List<StatisticalVo> getOrderPaidByDate(String start, String end); List<StatisticalVo> getOrderPaidByDate(String start, String end);
Long getOrderNum(String status);
} }
...@@ -115,4 +115,10 @@ public class TbCfOrderListServiceImpl implements TbCfOrderListService { ...@@ -115,4 +115,10 @@ public class TbCfOrderListServiceImpl implements TbCfOrderListService {
return tbCfOrderDao.getOrderPaidByDate(start, end); return tbCfOrderDao.getOrderPaidByDate(start, end);
} }
@Override
public Long getOrderNum(String status) {
return tbCfOrderDao.getOrderNum(status);
}
} }
...@@ -123,6 +123,12 @@ ...@@ -123,6 +123,12 @@
left join tb_cf_item_order_r i on i.order_id=o.order_id left join tb_cf_item_order_r i on i.order_id=o.order_id
where i.order_item_id = #{ordersId} where i.order_item_id = #{ordersId}
</select> </select>
<select id="getOrderNum" resultType="long">
select count(1) from tb_cf_order where 1=1
<if test="status != null and status.trim() != ''">
and pay_status=#{status}
</if>
</select>
<select id="queryList" resultType="com.platform.entity.TbCfOrderEntity"> <select id="queryList" resultType="com.platform.entity.TbCfOrderEntity">
select select
i.order_item_id ordersId, i.order_item_id ordersId,
......
...@@ -442,7 +442,7 @@ ...@@ -442,7 +442,7 @@
title="今日当前注册用户数量" title="今日当前注册用户数量"
> >
</p> </p>
<p class="m-card-main-text">13243</p> <p class="m-card-main-text">{{newNum}}</p>
<div class="m-card-functionzone flex-mill-center" id="echartsNewUsers"> <div class="m-card-functionzone flex-mill-center" id="echartsNewUsers">
<div class="pillar"> <div class="pillar">
<div title="今日新增比例" class="TodaySchedule" style="width:20px;"></div> <div title="今日新增比例" class="TodaySchedule" style="width:20px;"></div>
......
...@@ -3,6 +3,7 @@ let app = new Vue({ ...@@ -3,6 +3,7 @@ let app = new Vue({
data() { data() {
return { return {
ForturnoverNumber: 0, ForturnoverNumber: 0,
newNum:0,
PVNumber: 0, PVNumber: 0,
FrequencyOfPaymentNumber: 0, FrequencyOfPaymentNumber: 0,
datePicker: { datePicker: {
...@@ -253,7 +254,7 @@ let app = new Vue({ ...@@ -253,7 +254,7 @@ let app = new Vue({
this.initEchartsMiddleData[0].data = [] this.initEchartsMiddleData[0].data = []
let objList = JSON.parse(res).list let objList = JSON.parse(res).list
objList.map(res => { objList.map(res => {
console.log('date', res.date) // console.log('date', res.date)
this.initEchartsMiddleData[0].data.push([res.date, res.num]) this.initEchartsMiddleData[0].data.push([res.date, res.num])
}) })
this.initEchartsMiddle(); this.initEchartsMiddle();
...@@ -263,7 +264,7 @@ let app = new Vue({ ...@@ -263,7 +264,7 @@ let app = new Vue({
$.get(url, res => { $.get(url, res => {
this.initEchartsMiddleData[0].data = [] this.initEchartsMiddleData[0].data = []
res.list.map(res => { res.list.map(res => {
console.log('date', res.date) // console.log('date', res.date)
this.initEchartsMiddleData[0].data.push([res.date, res.num]) this.initEchartsMiddleData[0].data.push([res.date, res.num])
}) })
this.initEchartsMiddle(); this.initEchartsMiddle();
...@@ -271,7 +272,7 @@ let app = new Vue({ ...@@ -271,7 +272,7 @@ let app = new Vue({
}, },
getDayRegistered() { getDayRegistered() {
let endDate = this.getEndDate(); let endDate = this.getEndDate();
console.log(endDate) // console.log(endDate)
if (this.middleOption[0].isActive) { if (this.middleOption[0].isActive) {
let url = '../tbcfuserinfo/getDayRegistered' let url = '../tbcfuserinfo/getDayRegistered'
this.templateMethod(url); this.templateMethod(url);
...@@ -294,8 +295,8 @@ let app = new Vue({ ...@@ -294,8 +295,8 @@ let app = new Vue({
end.setDate(now.getDate() - n + 7); end.setDate(now.getDate() - n + 7);
start = start.getFullYear() + "-" + '0' + (start.getMonth() + 1) + "-" + start.getDate(); start = start.getFullYear() + "-" + '0' + (start.getMonth() + 1) + "-" + start.getDate();
end = end.getFullYear() + "-" + '0' + (end.getMonth() + 1) + "-" + end.getDate(); end = end.getFullYear() + "-" + '0' + (end.getMonth() + 1) + "-" + end.getDate();
console.log('start', start) // console.log('start', start)
console.log('end', end) // console.log('end', end)
if (this.middleOption[0].isActive) { if (this.middleOption[0].isActive) {
let url = '../tbcfuserinfo/getWeekRegistered' let url = '../tbcfuserinfo/getWeekRegistered'
this.templateMethod(url); this.templateMethod(url);
...@@ -312,8 +313,8 @@ let app = new Vue({ ...@@ -312,8 +313,8 @@ let app = new Vue({
getMonthRegistered() { getMonthRegistered() {
let end = this.getEndDate() let end = this.getEndDate()
let start = end.substr(0, end.lastIndexOf("-")) + '-01' let start = end.substr(0, end.lastIndexOf("-")) + '-01'
console.log('start', start) // console.log('start', start)
console.log('end', end) // console.log('end', end)
if (this.middleOption[0].isActive) { if (this.middleOption[0].isActive) {
let url = '../tbcfuserinfo/getMonthRegistered' let url = '../tbcfuserinfo/getMonthRegistered'
this.templateMethod(url); this.templateMethod(url);
...@@ -330,8 +331,8 @@ let app = new Vue({ ...@@ -330,8 +331,8 @@ let app = new Vue({
getYearRegistered() { getYearRegistered() {
let end = this.getEndDate(); let end = this.getEndDate();
let start = end.substr(0, end.indexOf('-')) + '-01-01'; let start = end.substr(0, end.indexOf('-')) + '-01-01';
console.log('start', start) // console.log('start', start)
console.log('end', end) // console.log('end', end)
if (this.middleOption[0].isActive) { if (this.middleOption[0].isActive) {
let url = '../tbcfuserinfo/getYearRegistered' let url = '../tbcfuserinfo/getYearRegistered'
this.templateMethod(url); this.templateMethod(url);
...@@ -353,6 +354,12 @@ let app = new Vue({ ...@@ -353,6 +354,12 @@ let app = new Vue({
let end = year + "-" + '0' + month + "-" + day let end = year + "-" + '0' + month + "-" + day
return end; return end;
}, },
getOrderNum(e) {
$.get('../tbcforder/getOrderNum?status=' + e, res => {
// console.log('订单数量', res.count)
return res.count
})
},
/* 访问量 */ /* 访问量 */
initEchartsPV() { initEchartsPV() {
var app = echarts.init(document.getElementById('echartsPV')); var app = echarts.init(document.getElementById('echartsPV'));
...@@ -618,7 +625,6 @@ let app = new Vue({ ...@@ -618,7 +625,6 @@ let app = new Vue({
this.middleOption[index].isActive = true; this.middleOption[index].isActive = true;
this.$refs.middleEachrtsTitle.innerText = element.title + '趋势'; this.$refs.middleEachrtsTitle.innerText = element.title + '趋势';
// this.initEchartsMiddleData[0].data.push(['2019-10-1'+Math.round(Math.random()*100), Math.round(Math.random()*1000)]) // this.initEchartsMiddleData[0].data.push(['2019-10-1'+Math.round(Math.random()*100), Math.round(Math.random()*1000)])
console.log(index)
if (index === 0) { if (index === 0) {
let url = '../tbcfuserinfo/getDailyRegistered'; let url = '../tbcfuserinfo/getDailyRegistered';
this.templateMethod(url); this.templateMethod(url);
...@@ -686,12 +692,28 @@ let app = new Vue({ ...@@ -686,12 +692,28 @@ let app = new Vue({
this.initEchartsMiddlebottomUserSearchSum(); this.initEchartsMiddlebottomUserSearchSum();
this.initEchartsMiddlebottomUserSearchPerCapita(); this.initEchartsMiddlebottomUserSearchPerCapita();
this.initEchartsCategory(); this.initEchartsCategory();
TweenLite.to(this.$data, 1, {ForturnoverNumber: 2649}); let orderNum;
TweenLite.to(this.$data, 1, {PVNumber: 23404232}); let orderPaidNum;
TweenLite.to(this.$data, 1, {FrequencyOfPaymentNumber: 23440}); $.get('../tbcforder/getOrderNum', res => {
TweenLite.to(this.$data, 1, {ForturnoverNumber: res.count});
})
$.get('../tbcforder/getOrderNum?status=20', res => {
TweenLite.to(this.$data, 1, {FrequencyOfPaymentNumber: res.count});
})
$.get('../tbcfuserinfo/getDayRegistered', res => {
let objList = JSON.parse(res).list
console.log('objList[0].num',objList[0].num)
this.newNum=objList[0].num;
})
TweenLite.to(this.$data, 1, {PVNumber: 135245554});
this.changeMiddelActive({ this.changeMiddelActive({
isActive: true, isActive: true,
title: '注册量' title: '注册量'
}, 0); }, 0);
} }
}) })
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论