Compare commits
8 Commits
7910334283
...
7ca2a339b2
Author | SHA1 | Date |
---|---|---|
Jruome | 7ca2a339b2 | |
Jruome | e85f2e75a7 | |
tangqian | 1813516c54 | |
tangqian | 6be709216e | |
tangqian | cb5b989e20 | |
tangqian | 77ffc74c3d | |
tangqian | 5e74237e04 | |
tangqian | ff734c3ac3 |
|
@ -1320,8 +1320,7 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
|
|||
});
|
||||
phoneRecordMapper.insertBatch(recordDOS);
|
||||
try {
|
||||
// 用于支付测试 TODO
|
||||
// phoneRecordService.insertPhone(phoneRecordAdds);
|
||||
phoneRecordService.insertPhone(phoneRecordAdds);
|
||||
} catch (Exception e) {
|
||||
log.info("调取提报新增报错{}", e);
|
||||
}
|
||||
|
|
|
@ -47,28 +47,28 @@ public class WxPayStrategy implements IPayStrategy{
|
|||
Long requiredTenantId = TenantContextHolder.getRequiredTenantId();
|
||||
TenantDTO tenant = tenantApi.getTenant(requiredTenantId);
|
||||
InitOrderResponse response = new InitOrderResponse();
|
||||
// WxPayService wxPayService = wxPayOneAutoConfiguration.wxPayOneService();
|
||||
// Assert.notNull(wxPayService, "获取微信支付配置失败!");
|
||||
// WxPayUnifiedOrderV3Request wxPayRequest = new WxPayUnifiedOrderV3Request();
|
||||
// int sum = orderDO.getPayPrice().multiply(new BigDecimal("100")).intValue();
|
||||
// wxPayRequest.setAmount(new WxPayUnifiedOrderV3Request.Amount().setTotal(sum));
|
||||
// wxPayRequest.setDescription(tenant.getName());
|
||||
// wxPayRequest.setOutTradeNo(orderDO.getOrderId());
|
||||
// wxPayRequest.setNotifyUrl(payProperties.getNotifyUrl());
|
||||
// wxPayRequest.setPayer(new WxPayUnifiedOrderV3Request.Payer().setOpenid(openid));
|
||||
// wxPayRequest.setSceneInfo(new WxPayUnifiedOrderV3Request.SceneInfo().setPayerClientIp(ServletUtils.getClientIP(servletRequest)));
|
||||
// wxPayRequest.setAppid(payProperties.getAppId());
|
||||
// wxPayRequest.setMchid(payProperties.getMchId());
|
||||
// try {
|
||||
// WxPayUnifiedOrderV3Result wxPayUnifiedOrderV3Result = wxPayService.unifiedOrderV3(TradeTypeEnum.JSAPI, wxPayRequest);
|
||||
// WxPayUnifiedOrderV3Result.JsapiResult jsapiResult = wxPayUnifiedOrderV3Result.getPayInfo(TradeTypeEnum.JSAPI, payProperties.getAppId(), payProperties.getMchId(), wxPayService.getConfig().getPrivateKey());
|
||||
// InitOrderResponse.JsapiResult jsapiResultNew = new InitOrderResponse.JsapiResult();
|
||||
// BeanUtils.copyProperties(jsapiResult, jsapiResultNew);
|
||||
// response.setJsapiResult(jsapiResultNew);
|
||||
// BeanUtils.copyProperties(wxPayUnifiedOrderV3Result, response);
|
||||
// } catch (Exception e) {
|
||||
// log.error(e.getMessage());
|
||||
// }
|
||||
WxPayService wxPayService = wxPayOneAutoConfiguration.wxPayOneService();
|
||||
Assert.notNull(wxPayService, "获取微信支付配置失败!");
|
||||
WxPayUnifiedOrderV3Request wxPayRequest = new WxPayUnifiedOrderV3Request();
|
||||
int sum = orderDO.getPayPrice().multiply(new BigDecimal("100")).intValue();
|
||||
wxPayRequest.setAmount(new WxPayUnifiedOrderV3Request.Amount().setTotal(sum));
|
||||
wxPayRequest.setDescription(tenant.getName());
|
||||
wxPayRequest.setOutTradeNo(orderDO.getOrderId());
|
||||
wxPayRequest.setNotifyUrl(payProperties.getNotifyUrl());
|
||||
wxPayRequest.setPayer(new WxPayUnifiedOrderV3Request.Payer().setOpenid(openid));
|
||||
wxPayRequest.setSceneInfo(new WxPayUnifiedOrderV3Request.SceneInfo().setPayerClientIp(ServletUtils.getClientIP(servletRequest)));
|
||||
wxPayRequest.setAppid(payProperties.getAppId());
|
||||
wxPayRequest.setMchid(payProperties.getMchId());
|
||||
try {
|
||||
WxPayUnifiedOrderV3Result wxPayUnifiedOrderV3Result = wxPayService.unifiedOrderV3(TradeTypeEnum.JSAPI, wxPayRequest);
|
||||
WxPayUnifiedOrderV3Result.JsapiResult jsapiResult = wxPayUnifiedOrderV3Result.getPayInfo(TradeTypeEnum.JSAPI, payProperties.getAppId(), payProperties.getMchId(), wxPayService.getConfig().getPrivateKey());
|
||||
InitOrderResponse.JsapiResult jsapiResultNew = new InitOrderResponse.JsapiResult();
|
||||
BeanUtils.copyProperties(jsapiResult, jsapiResultNew);
|
||||
response.setJsapiResult(jsapiResultNew);
|
||||
BeanUtils.copyProperties(wxPayUnifiedOrderV3Result, response);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
`cy_recharge_order_info` info
|
||||
LEFT JOIN cy_recharge_order ord ON info.recharge_order_id = ord.id
|
||||
WHERE
|
||||
ord.paid = 1
|
||||
ord.paid != 0
|
||||
<if test="null != startTime">
|
||||
and info.create_time >= #{startTime}
|
||||
</if>
|
||||
|
|
|
@ -252,7 +252,7 @@
|
|||
and b.nickname like CONCAT('%',#{data.nickname},'%')
|
||||
</if>
|
||||
<if test="data.realName !=null and data.realName!=''">
|
||||
and x.real_name like CONCAT('%',#{data.realName},'%')
|
||||
and x.nickname like CONCAT('%',#{data.realName},'%')
|
||||
</if>
|
||||
<if test="data.userPhone !=null and data.userPhone!=''">
|
||||
and a.user_phone like CONCAT('%',#{data.userPhone},'%')
|
||||
|
|
|
@ -1,35 +1,4 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="100px">
|
||||
<el-form-item label="快速查看" class="width100" prop="type">
|
||||
<el-radio-group v-model="queryParams.type" type="button" class="mr20" size="small" @change="handleChange">
|
||||
<el-radio-button v-for="(item,i) in lookList" :label=i+1 :key="i">{{item.name}}</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="选择日期" class="width100" prop="dateLimit">
|
||||
<el-date-picker @change="onchangeTime" v-model="queryParams.dateLimit" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss" size="small" type="datetimerange" start-placeholder="开始时间"
|
||||
end-placeholder="结束时间" placement="bottom-end" placeholder="自定义时间" style="width: 220px;" ></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<div class="statistics">
|
||||
<div v-for="(item,index) in statisticsList" :key="index" :class="[item.class,'statistics_item']">
|
||||
<span>{{item.name}}</span>
|
||||
<span v-if="index<2">¥{{item.value}}</span>
|
||||
<span v-else>{{item.value}} 单</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
<!-- <div class="dashboard-editor-container">-->
|
||||
|
||||
<!-- <panel-group @handleSetLineChartData="handleSetLineChartData" />-->
|
||||
|
@ -101,54 +70,11 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
lineChartData: lineChartData.newVisitis,
|
||||
queryParams: {
|
||||
type:4
|
||||
},
|
||||
// list:[],
|
||||
lookList:[{name:'今日'},{name:'上周'},{name:'上月'},{name:'全部'}],
|
||||
statisticsList:[{name:'总销售金额',class:'totalMoney',value:0},{name:'总退款金额',class:'totalWithdrawMoney',value:0},{name:'总订单数量(单)',class:'totalNum',value:0},{name:'240档订单数量(单)',class:'threeTotalNum',value:0},{name:'400档订单数量(单)',class:'twoTotalNum',value:0},{name:'640档订单数量(单)',class:'oneTotalNum',value:0}],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
handleChange(){
|
||||
this.queryParams ={type:this.queryParams.type}
|
||||
this.getList()
|
||||
},
|
||||
onchangeTime(value){
|
||||
this.queryParams.type = null
|
||||
this.queryParams.startTime = value[0]
|
||||
this.queryParams.endTime = value[1]
|
||||
},
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
// 执行查询
|
||||
statisticsAll(this.queryParams).then(response => {
|
||||
this.statisticsList.forEach((item,index) =>{
|
||||
for (let key in response.data){
|
||||
if(item.class === key){
|
||||
item.value = response.data[key] || 0
|
||||
}
|
||||
}
|
||||
})
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.queryParams ={
|
||||
type: 4
|
||||
};
|
||||
this.handleQuery();
|
||||
},
|
||||
handleSetLineChartData(type) {
|
||||
this.lineChartData = lineChartData[type]
|
||||
}
|
||||
|
|
|
@ -0,0 +1,221 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="100px">
|
||||
<el-form-item label="快速查看" class="width100" prop="type">
|
||||
<el-radio-group v-model="queryParams.type" type="button" class="mr20" size="small" @change="handleChange">
|
||||
<el-radio-button v-for="(item,i) in lookList" :label=i+1 :key="i">{{item.name}}</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="选择日期" class="width100" prop="dateLimit">
|
||||
<el-date-picker @change="onchangeTime" v-model="queryParams.dateLimit" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss" size="small" type="datetimerange" start-placeholder="开始时间"
|
||||
end-placeholder="结束时间" placement="bottom-end" placeholder="自定义时间" style="width: 220px;" ></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<div class="statistics">
|
||||
<div v-for="(item,index) in statisticsList" :key="index" :class="[item.class,'statistics_item']">
|
||||
<span>{{item.name}}</span>
|
||||
<span v-if="index<2">¥{{item.value}}</span>
|
||||
<span v-else>{{item.value}} 单</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
<!-- <div class="dashboard-editor-container">-->
|
||||
|
||||
<!-- <panel-group @handleSetLineChartData="handleSetLineChartData" />-->
|
||||
|
||||
<!-- <el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;">-->
|
||||
<!-- <line-chart :chart-data="lineChartData" />-->
|
||||
<!-- </el-row>-->
|
||||
|
||||
<!-- <el-row :gutter="32">-->
|
||||
<!-- <el-col :xs="24" :sm="24" :lg="8">-->
|
||||
<!-- <div class="chart-wrapper">-->
|
||||
<!-- <raddar-chart />-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :xs="24" :sm="24" :lg="8">-->
|
||||
<!-- <div class="chart-wrapper">-->
|
||||
<!-- <pie-chart />-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :xs="24" :sm="24" :lg="8">-->
|
||||
<!-- <div class="chart-wrapper">-->
|
||||
<!-- <bar-chart />-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
|
||||
|
||||
<!-- </div>-->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PanelGroup from '@/views/dashboard/PanelGroup'
|
||||
import LineChart from '@/views/dashboard/LineChart'
|
||||
import RaddarChart from '@/views/dashboard/RaddarChart'
|
||||
import PieChart from '@/views/dashboard/PieChart'
|
||||
import BarChart from '@/views/dashboard/BarChart'
|
||||
import creatComment from "@/views/mall/product/comment/creatComment.vue";
|
||||
import {
|
||||
statisticsAll
|
||||
} from '@/api/index';
|
||||
const lineChartData = {
|
||||
newVisitis: {
|
||||
expectedData: [100, 120, 161, 134, 105, 160, 165],
|
||||
actualData: [120, 82, 91, 154, 162, 140, 145]
|
||||
},
|
||||
messages: {
|
||||
expectedData: [200, 192, 120, 144, 160, 130, 140],
|
||||
actualData: [180, 160, 151, 106, 145, 150, 130]
|
||||
},
|
||||
purchases: {
|
||||
expectedData: [80, 100, 121, 104, 105, 90, 100],
|
||||
actualData: [120, 90, 100, 138, 142, 130, 130]
|
||||
},
|
||||
shoppings: {
|
||||
expectedData: [130, 140, 141, 142, 145, 150, 160],
|
||||
actualData: [120, 82, 91, 154, 162, 140, 130]
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'Index',
|
||||
components: {
|
||||
creatComment,
|
||||
PanelGroup,
|
||||
LineChart,
|
||||
RaddarChart,
|
||||
PieChart,
|
||||
BarChart
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
lineChartData: lineChartData.newVisitis,
|
||||
queryParams: {
|
||||
type:4
|
||||
},
|
||||
// list:[],
|
||||
lookList:[{name:'今日'},{name:'上周'},{name:'上月'},{name:'全部'}],
|
||||
statisticsList:[{name:'总销售金额',class:'totalMoney',value:0},{name:'总退款金额',class:'totalWithdrawMoney',value:0},{name:'总订单数量(单)',class:'totalNum',value:0},{name:'240档订单数量(单)',class:'threeTotalNum',value:0},{name:'400档订单数量(单)',class:'twoTotalNum',value:0},{name:'640档订单数量(单)',class:'oneTotalNum',value:0}],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
handleChange(){
|
||||
this.queryParams ={type:this.queryParams.type}
|
||||
this.getList()
|
||||
},
|
||||
onchangeTime(value){
|
||||
this.queryParams.type = null
|
||||
this.queryParams.startTime = value[0]
|
||||
this.queryParams.endTime = value[1]
|
||||
},
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
// 执行查询
|
||||
statisticsAll(this.queryParams).then(response => {
|
||||
this.statisticsList.forEach((item,index) =>{
|
||||
for (let key in response.data){
|
||||
if(item.class === key){
|
||||
item.value = response.data[key] || 0
|
||||
}
|
||||
}
|
||||
})
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.queryParams ={
|
||||
type: 4
|
||||
};
|
||||
this.handleQuery();
|
||||
},
|
||||
handleSetLineChartData(type) {
|
||||
this.lineChartData = lineChartData[type]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.statistics{
|
||||
width: 100%;
|
||||
height: 30%;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
flex-wrap: wrap;
|
||||
border-bottom: 1px solid #e6ebf5;
|
||||
.statistics_item{
|
||||
border-radius: 10px;
|
||||
width: 240px;
|
||||
min-height: 90px;
|
||||
margin: 10px 6%;
|
||||
font-size: 20px;
|
||||
color: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
word-wrap: break-word;
|
||||
span:nth-of-type(1){
|
||||
margin-left: 20px;
|
||||
}
|
||||
span:nth-of-type(2){
|
||||
margin-left: 40px;
|
||||
}
|
||||
}
|
||||
.totalMoney{
|
||||
background: rgb(77,157,255);
|
||||
}
|
||||
.totalNum{
|
||||
background: rgb(95,212,89);
|
||||
}
|
||||
.totalWithdrawMoney{
|
||||
background: rgb(171,109,234);
|
||||
}
|
||||
.threeTotalNum{
|
||||
background: rgb(255,154,1);
|
||||
}
|
||||
.twoTotalNum{
|
||||
background: rgb(10,193,224);
|
||||
}
|
||||
.oneTotalNum{
|
||||
background: rgb(10,196,160);
|
||||
}
|
||||
}
|
||||
.dashboard-editor-container {
|
||||
padding: 32px;
|
||||
background-color: rgb(240, 242, 245);
|
||||
position: relative;
|
||||
|
||||
.chart-wrapper {
|
||||
background: #fff;
|
||||
padding: 16px 16px 0;
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width:1024px) {
|
||||
.chart-wrapper {
|
||||
padding: 8px;
|
||||
}
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue