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

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

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