后台优化-用户账单、今日累计充值数据
This commit is contained in:
@@ -65,7 +65,6 @@ public class ChargeRecordAdminService extends BaseService {
|
||||
List<ChargeRecordStatisVo> statisVoList = new ArrayList<>();
|
||||
int hour = getCurrentHour();
|
||||
if (hour > 0) {
|
||||
Date now = new Date();
|
||||
statisVoList = chargeRecordMapperMgr.getChannelDailyStatistic(statisticCount, hour);
|
||||
this.addChargeRecordDaily(statisVoList, hour);
|
||||
}
|
||||
@@ -73,7 +72,6 @@ public class ChargeRecordAdminService extends BaseService {
|
||||
}
|
||||
|
||||
public List<ChargeRecordDetailVo> getChannelDailyDetail(Integer time) {
|
||||
Date now = new Date();
|
||||
List<ChargeRecordDetailVo> detailVoList = chargeRecordMapperMgr.getChannelDailyDetail(time);
|
||||
return this.addChargeRecordDetail(detailVoList);
|
||||
}
|
||||
@@ -85,12 +83,11 @@ public class ChargeRecordAdminService extends BaseService {
|
||||
}
|
||||
|
||||
public Map<String, Object> getRecordTotalList(boolean statisticCount, String beginDate, String endDate, Integer pageNum, Integer pageSize) {
|
||||
Map data = Maps.newHashMap();
|
||||
Map<String, Object> data = Maps.newHashMap();
|
||||
if (StringUtils.isEmpty(beginDate) || StringUtils.isEmpty(endDate)) {
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
pageNum = pageNum != null ? pageNum : Constant.DEFAULT_PAGE;
|
||||
pageSize = pageSize != null ? pageSize : Constant.DEFAULT_PAGE_SIZE;
|
||||
Integer start = (pageNum - 1) * pageSize;
|
||||
@@ -134,9 +131,9 @@ public class ChargeRecordAdminService extends BaseService {
|
||||
*/
|
||||
private List<ChargeRecordDetailVo> addChargeRecordDetail(List<ChargeRecordDetailVo> detailVoList) {
|
||||
for (ChargeChannelEnum channelEnum : ChargeChannelEnum.values()) {
|
||||
if(channelEnum.equals(ChargeChannelEnum.exchange)){//不计算钻石兑换的
|
||||
/*if(channelEnum.equals(ChargeChannelEnum.exchange)){//不计算钻石兑换的
|
||||
continue;
|
||||
}
|
||||
}*/
|
||||
boolean exist = false;
|
||||
for (ChargeRecordDetailVo detailVo : detailVoList) {
|
||||
if (channelEnum.toString().equals(detailVo.getChannel())) {
|
||||
|
@@ -58,11 +58,9 @@ public class ChargeRecordAdminController extends BaseController {
|
||||
*/
|
||||
@RequestMapping(value = "/dailylist")
|
||||
@ResponseBody
|
||||
public BusiResult getDailyList() {
|
||||
BusiResult busiResult = new BusiResult(BusiStatus.SUCCESS);
|
||||
public BusiResult<List<ChargeRecordStatisVo>> getDailyList() {
|
||||
List<ChargeRecordStatisVo> recordDailyList = chargeRecordAdminService.getRecordDailyList(false);
|
||||
busiResult.setData(recordDailyList);
|
||||
return busiResult;
|
||||
return new BusiResult<>(recordDailyList);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -72,11 +70,9 @@ public class ChargeRecordAdminController extends BaseController {
|
||||
*/
|
||||
@RequestMapping(value = "/dailydetail")
|
||||
@ResponseBody
|
||||
public BusiResult getDailyDetailList(Integer time) {
|
||||
BusiResult busiResult = new BusiResult(BusiStatus.SUCCESS);
|
||||
List<ChargeRecordDetailVo> DailyDetailList = chargeRecordAdminService.getChannelDailyDetail(time);
|
||||
busiResult.setData(DailyDetailList);
|
||||
return busiResult;
|
||||
public BusiResult<List<ChargeRecordDetailVo>> getDailyDetailList(Integer time) {
|
||||
List<ChargeRecordDetailVo> dailyDetailList = chargeRecordAdminService.getChannelDailyDetail(time);
|
||||
return new BusiResult<>(dailyDetailList);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -112,11 +108,9 @@ public class ChargeRecordAdminController extends BaseController {
|
||||
*/
|
||||
@RequestMapping(value = "/totaldetail")
|
||||
@ResponseBody
|
||||
public BusiResult getTotalDetailList(String time) {
|
||||
BusiResult busiResult = new BusiResult(BusiStatus.SUCCESS);
|
||||
public BusiResult<List<ChargeRecordDetailVo>> getTotalDetailList(String time) {
|
||||
List<ChargeRecordDetailVo> totalDetailList = chargeRecordAdminService.getChannelTotalDetail(time);
|
||||
busiResult.setData(totalDetailList);
|
||||
return busiResult;
|
||||
return new BusiResult<>(totalDetailList);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -123,7 +123,7 @@
|
||||
})
|
||||
|
||||
$('#btnSearch').on('click',function () {
|
||||
if(!$('#erbanNo').val() || !$('#startDate').val() || !$('#endDate').val()){
|
||||
if(!$('#startDate').val() || !$('#endDate').val()){
|
||||
$("#tipMsg").text("请输入必填的信息");
|
||||
$("#tipModal").modal('show');
|
||||
return;
|
||||
|
@@ -13,7 +13,7 @@
|
||||
<h4>
|
||||
今日充值数据:<span class="totalAmount" style="color: red">0</span>(总金额)/
|
||||
<span class="totalCount" style="color: red">0</span>(总笔数)
|
||||
<span style="color: red">(单位:人民币/元)</span>
|
||||
<span style="color: red">(单位:美元)</span>
|
||||
</h4>
|
||||
</div>
|
||||
<!-- <div class="col-sm-3 pull-right">
|
||||
@@ -55,7 +55,7 @@
|
||||
$('#table').bootstrapTable({
|
||||
columns: [
|
||||
{field: 'timeStr', title: '日期', align: 'center', width: '5%'},
|
||||
{field: 'wxAmount', title: '微信支付', align: 'center', width: '5%'},
|
||||
/*{field: 'wxAmount', title: '微信支付', align: 'center', width: '5%'},
|
||||
{field: 'wxWapAmount', title: '微信H5支付', align: 'center', width: '5%'},
|
||||
{field: 'wxPubAmount', title: '微信公众号', align: 'center', width: '5%'},
|
||||
{field: 'wxMicroMallPubAmount', title: '微商城公众号', align: 'center', width: '5%'},
|
||||
@@ -64,7 +64,9 @@
|
||||
{field: 'alipayAmount', title: '支付宝', align: 'center', width: '5%'},
|
||||
{field: 'alipayWapAmount', title: '支付宝H5', align: 'center', width: '5%'},
|
||||
{field: 'iosPayAmount', title: 'IOS支付', align: 'center', width: '5%'},
|
||||
{field: 'wxMiniAppAmount', title: '小程序支付', align: 'center', width: '5%'},
|
||||
{field: 'wxMiniAppAmount', title: '小程序支付', align: 'center', width: '5%'},*/
|
||||
{field: 'googleAmount', title: 'google支付', align: 'center', width: '5%'},
|
||||
{field: 'payermaxAmount', title: 'payermax支付', align: 'center', width: '5%'},
|
||||
{field: 'companyAccount', title: '充值打公账', align: 'center', width: '5%'},
|
||||
{
|
||||
field: 'time',
|
||||
|
@@ -29,7 +29,7 @@
|
||||
<button id="btnExport" class="btn btn-default">
|
||||
<i class="glyphicon glyphicon-export"></i>导出
|
||||
</button>
|
||||
<span style="color: red">(单位:人民币/元)</span>
|
||||
<span style="color: red">(单位:美元)</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -65,7 +65,7 @@
|
||||
$('#table').bootstrapTable({
|
||||
columns: [
|
||||
{field: 'timeStr', title: '日期', align: 'center', width: '5%'},
|
||||
{field: 'wxAmount', title: '微信支付', align: 'center', width: '5%'},
|
||||
/*{field: 'wxAmount', title: '微信支付', align: 'center', width: '5%'},
|
||||
{field: 'wxWapAmount', title: '微信H5支付', align: 'center', width: '5%'},
|
||||
{field: 'wxPubAmount', title: '微信公众号', align: 'center', width: '5%'},
|
||||
{field: 'alipayAmount', title: '支付宝', align: 'center', width: '5%'},
|
||||
@@ -75,7 +75,9 @@
|
||||
{field: 'wxPub2H5Amount', title: '平台公众号H5支付', align: 'center', width: '5%'},
|
||||
{field: 'alipayWapAmount', title: '支付宝H5', align: 'center', width: '5%'},
|
||||
{field: 'iosPayAmount', title: 'IOS支付', align: 'center', width: '5%'},
|
||||
{field: 'wxMiniAppAmount', title: '小程序支付', align: 'center', width: '5%'},
|
||||
{field: 'wxMiniAppAmount', title: '小程序支付', align: 'center', width: '5%'},*/
|
||||
{field: 'googleAmount', title: 'google支付', align: 'center', width: '5%'},
|
||||
{field: 'payermaxAmount', title: 'payermax支付', align: 'center', width: '5%'},
|
||||
{field: 'companyAccount', title: '充值打公账', align: 'center', width: '5%'},
|
||||
{field: 'totalAmount', title: '总计充值金额数', align: 'center', width: '5%'},
|
||||
{
|
||||
|
@@ -43,6 +43,10 @@ public class ChargeRecordStatisVo extends BaseVo {
|
||||
public BigDecimal luckyTarotAmount;
|
||||
@FieldComment("兑换")
|
||||
public BigDecimal exchangeAmount;
|
||||
@FieldComment("google")
|
||||
public BigDecimal googleAmount;
|
||||
@FieldComment("payermax")
|
||||
public BigDecimal payermaxAmount;
|
||||
@FieldComment("充值打公账")
|
||||
public BigDecimal companyAccount;
|
||||
@FieldComment("总计充值金额数")
|
||||
@@ -65,6 +69,10 @@ public class ChargeRecordStatisVo extends BaseVo {
|
||||
public Integer tarotPayCount;
|
||||
@FieldComment("兑换笔数")
|
||||
public Integer exchangeCount;
|
||||
@FieldComment("google笔数")
|
||||
public BigDecimal googleCount;
|
||||
@FieldComment("payermax笔数")
|
||||
public BigDecimal payermaxCount;
|
||||
@FieldComment("公账笔数")
|
||||
public Integer companyAccountCount;
|
||||
@FieldComment("总计笔数")
|
||||
|
@@ -50,6 +50,8 @@
|
||||
<result column="wx_mini_app" property="wxMiniAppAmount" jdbcType="DECIMAL"/>
|
||||
<result column="lucky_tarot" property="luckyTarotAmount" jdbcType="DECIMAL"/>
|
||||
<result column="exchange" property="exchangeAmount" jdbcType="DECIMAL"/>
|
||||
<result column="google" property="googleAmount" jdbcType="DECIMAL"/>
|
||||
<result column="payermax" property="payermaxAmount" jdbcType="DECIMAL"/>
|
||||
<result column="companyAccount" property="companyAccount" jdbcType="DECIMAL"/>
|
||||
<result column="totalAmount" property="totalAmount" jdbcType="DECIMAL"/>
|
||||
<result column="alipayCount" property="alipayCount" jdbcType="INTEGER"/>
|
||||
@@ -66,6 +68,8 @@
|
||||
<result column="wxMicroMallPubCount" property="wxMicroMallPubCount" jdbcType="INTEGER"/>
|
||||
<result column="wxPub2Count" property="wxPub2Count" jdbcType="INTEGER"/>
|
||||
<result column="wxPub2H5Count" property="wxPub2H5Count" jdbcType="INTEGER"/>
|
||||
<result column="googleCount" property="googleCount" jdbcType="INTEGER"/>
|
||||
<result column="payermaxCount" property="payermaxCount" jdbcType="INTEGER"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="getHistoryRechargeAmount" resultType="java.lang.Long">
|
||||
@@ -159,6 +163,8 @@
|
||||
max(CASE a.channel WHEN 'wx_wap' THEN a.amount ELSE 0 END ) wx_wap,
|
||||
max(CASE a.channel WHEN 'alipay_wap' THEN a.amount ELSE 0 END ) alipay_wap,
|
||||
max(CASE a.channel WHEN 'wx_mini_app_channel' THEN a.amount ELSE 0 END ) wx_mini_app,
|
||||
max(CASE a.channel WHEN 'google_play_billing' THEN a.amount ELSE 0 END ) google,
|
||||
max(CASE a.channel WHEN 'payermax' THEN a.amount ELSE 0 END ) payermax,
|
||||
max(CASE a.channel WHEN 'companyAccount' THEN a.amount ELSE 0 END ) companyAccount,
|
||||
convert(sum(a.amount),decimal(10,2)) as totalAmount
|
||||
<if test="statisticCount">
|
||||
@@ -173,6 +179,8 @@
|
||||
max(CASE a.channel WHEN 'wx_wap' THEN a.count ELSE 0 END ) wxWapCount,
|
||||
max(CASE a.channel WHEN 'alipay_wap' THEN a.count ELSE 0 END ) alipayWapCount,
|
||||
max(CASE a.channel WHEN 'wx_mini_app_channel' THEN a.count ELSE 0 END ) miniPayCount,
|
||||
max(CASE a.channel WHEN 'google_play_billing' THEN a.count ELSE 0 END ) googleCount,
|
||||
max(CASE a.channel WHEN 'payermax' THEN a.count ELSE 0 END ) payermaxCount,
|
||||
max(CASE a.channel WHEN 'companyAccount' THEN a.count ELSE 0 END ) companyAccountCount,
|
||||
SUM(a.count) as totalCount
|
||||
</if>
|
||||
|
@@ -7,7 +7,7 @@ package com.accompany.business.constant;
|
||||
*/
|
||||
public enum ChargeChannelEnum {
|
||||
|
||||
wx(0, "微信支付"),
|
||||
/*wx(0, "微信支付"),
|
||||
wx_wap(1, "微信H5支付"),
|
||||
wx_pub(2, "微信公众号"),
|
||||
alipay(3, "支付宝"),
|
||||
@@ -19,7 +19,9 @@ public enum ChargeChannelEnum {
|
||||
wx_mp(9, "微信小程序支付"),
|
||||
wx_micro_mall_pub(10, "微商城公众号"),
|
||||
wx_pub2(11, "平台公众号"),
|
||||
wx_pub2_h5(12, "平台公众号H5支付"),
|
||||
wx_pub2_h5(12, "平台公众号H5支付"),*/
|
||||
google(13, "google"),
|
||||
payermax(14, "payermax"),
|
||||
|
||||
;
|
||||
|
||||
|
Reference in New Issue
Block a user