bug
This commit is contained in:
parent
9df5ee4f7d
commit
15c4c2ed3d
@ -117,3 +117,10 @@
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.el-pagination.is-background .el-pager li:not(.disabled).active{
|
||||||
|
background-color: #FF9655 !important;
|
||||||
|
}
|
||||||
|
.el-pagination.is-background .el-pager li:hover{
|
||||||
|
color: #FF9655 !important;/*hover时候的文字颜色*/
|
||||||
|
}
|
||||||
|
@ -371,18 +371,40 @@
|
|||||||
<el-input v-model="form2.mobile"
|
<el-input v-model="form2.mobile"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
maxlength="12000"
|
maxlength="12000"
|
||||||
style="width: 85%;height: 300px;"
|
style="width: 85%;"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
placeholder="请输入会员手机号,多个手机号换行操作,每行一个会员手机号!单次最大支持1000个会员手机号认证~">
|
placeholder="请输入会员手机号,多个手机号换行操作,每行一个会员手机号!单次最大支持1000个会员手机号认证~">
|
||||||
</el-input>
|
</el-input>
|
||||||
<div>
|
<div>
|
||||||
<div style="color: grey;font-size: 12px;height: 18px;margin-left: 8%">
|
<div style="color: grey;font-size: 12px;margin-left: 8%">
|
||||||
多个会员手机号换行操作,每行为一个会员手机号,单次最大支持1000个会员手机号认证,请确保用户手机号已注册为油站会员(在会员列表已显示),否则无法添加认证信息
|
多个会员手机号换行操作,每行为一个会员手机号,单次最大支持1000个会员手机号认证,请确保用户手机号已注册为油站会员(在会员列表已显示),否则无法添加认证信息
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<div style="margin: 50px 0">
|
||||||
|
<div style="font-weight: bold;margin-bottom: 20px">批量上传</div>
|
||||||
|
<div style="margin-bottom: 20px">
|
||||||
|
<a style="margin-left: 50px;color: #00afff;"
|
||||||
|
href="/fuint-application/business/userManager/certifiedMember/export"> 导入模板下载.xlsx </a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-upload
|
||||||
|
class="upload-demo"
|
||||||
|
v-loading="uploading"
|
||||||
|
action="/fuint-application/business/userManager/certifiedMember/import"
|
||||||
|
:headers="headers"
|
||||||
|
:limit="1"
|
||||||
|
:on-change="handleChange"
|
||||||
|
style="margin-left: 50px"
|
||||||
|
:file-list="fileList">
|
||||||
|
<el-button size="small" type="success" icon="el-icon-upload">点击上传</el-button>
|
||||||
|
<div slot="tip" style="margin-top: 20px;color: grey;font-size: 12px;line-height: 20px">
|
||||||
|
只能上传xls/xlsx文件,单次最大支持1000个会员手机号认证且不超过1M 超出请分文件处理,请确保用户手机号已注册为油站会员(在会员列表已显示),否则无法添加认证信息
|
||||||
|
</div>
|
||||||
|
</el-upload>
|
||||||
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitFormMembers">确 定</el-button>
|
<el-button type="primary" @click="submitFormMembers">确 定</el-button>
|
||||||
@ -841,6 +863,9 @@ export default {
|
|||||||
headers: {
|
headers: {
|
||||||
'Access-Token': getToken(),
|
'Access-Token': getToken(),
|
||||||
},
|
},
|
||||||
|
uploading: false,
|
||||||
|
// 文件上传信息
|
||||||
|
fileList: [],
|
||||||
result:{},
|
result:{},
|
||||||
isEdit:false,
|
isEdit:false,
|
||||||
// 上传图片信息
|
// 上传图片信息
|
||||||
@ -1316,6 +1341,20 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 批量导入
|
||||||
|
handleChange(file, fileList) {
|
||||||
|
this.uploading = true;
|
||||||
|
if(file.status === 'success'){
|
||||||
|
this.uploading = false;
|
||||||
|
this.fileList.splice(0,1)
|
||||||
|
this.openMembers = false;
|
||||||
|
this.openResult = true;
|
||||||
|
this.title = "会员认证结果";
|
||||||
|
this.result = file.response.data;
|
||||||
|
this.reset2();
|
||||||
|
this.getListMember();
|
||||||
|
}
|
||||||
|
},
|
||||||
// 提交按钮 批量认证会员信息
|
// 提交按钮 批量认证会员信息
|
||||||
submitFormMembers: function() {
|
submitFormMembers: function() {
|
||||||
this.$refs["form2"].validate(valid => {
|
this.$refs["form2"].validate(valid => {
|
||||||
|
10
fuintAdmin_zt/src/api/indexBanner/index.js
Normal file
10
fuintAdmin_zt/src/api/indexBanner/index.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询首页店铺数量信息
|
||||||
|
export function storeTotalIndex(query) {
|
||||||
|
return request({
|
||||||
|
url: '/backendApi/store/getStoreTotal',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
@ -125,3 +125,9 @@
|
|||||||
background-color: #FF4347 !important;
|
background-color: #FF4347 !important;
|
||||||
border-color: #FF4347 !important;
|
border-color: #FF4347 !important;
|
||||||
}
|
}
|
||||||
|
.el-pagination.is-background .el-pager li:not(.disabled).active{
|
||||||
|
background-color: #FF9655 !important;
|
||||||
|
}
|
||||||
|
.el-pagination.is-background .el-pager li:hover{
|
||||||
|
color: #FF9655 !important;/*hover时候的文字颜色*/
|
||||||
|
}
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<img src="./../assets/images/l-one.png" style="width: 80px;height: 80px">
|
<img src="./../assets/images/l-one.png" style="width: 80px;height: 80px">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="r-title">568</div>
|
<div class="r-title">{{ storeTotal.allTotal || 0 }}</div>
|
||||||
<div class="r-size">合作油站总数</div>
|
<div class="r-size">合作油站总数</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -19,8 +19,8 @@
|
|||||||
<img src="./../assets/images/l-two.png" style="width: 80px;height: 80px">
|
<img src="./../assets/images/l-two.png" style="width: 80px;height: 80px">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="r-title">568</div>
|
<div class="r-title">{{ storeTotal.weekTotal || 0 }}</div>
|
||||||
<div class="r-size">合作油站总数</div>
|
<div class="r-size">7日活跃油站汇总数</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="san-box" style="background: linear-gradient( 90deg, #9CDCA0 0%, #5BC557 100%);">
|
<div class="san-box" style="background: linear-gradient( 90deg, #9CDCA0 0%, #5BC557 100%);">
|
||||||
@ -28,8 +28,8 @@
|
|||||||
<img src="./../assets/images/l-three.png" style="width: 80px;height: 80px">
|
<img src="./../assets/images/l-three.png" style="width: 80px;height: 80px">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="r-title">568</div>
|
<div class="r-title">{{ storeTotal.monthTotal || 0 }}</div>
|
||||||
<div class="r-size">合作油站总数</div>
|
<div class="r-size">本月新增油站数</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -152,6 +152,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import echarts from "echarts";
|
import echarts from "echarts";
|
||||||
|
import {storeTotalIndex} from "@/api/indexBanner";
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
data(){
|
data(){
|
||||||
@ -183,13 +184,22 @@ export default {
|
|||||||
value: '',
|
value: '',
|
||||||
value1: [new Date(2000, 10, 10, 10, 10), new Date(2000, 10, 11, 10, 10)],
|
value1: [new Date(2000, 10, 10, 10, 10), new Date(2000, 10, 11, 10, 10)],
|
||||||
imagePath: process.env.VUE_APP_SERVER_URL,
|
imagePath: process.env.VUE_APP_SERVER_URL,
|
||||||
|
// 店铺数量
|
||||||
|
storeTotal:{},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.getStoreTotal()
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initChart()
|
this.initChart()
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
getStoreTotal(){
|
||||||
|
storeTotalIndex().then(res => {
|
||||||
|
this.storeTotal = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
initChart() {
|
initChart() {
|
||||||
const chart = echarts.init(document.getElementById('ccc'))
|
const chart = echarts.init(document.getElementById('ccc'))
|
||||||
const chart1 = echarts.init(document.getElementById('cccc'))
|
const chart1 = echarts.init(document.getElementById('cccc'))
|
||||||
|
@ -230,4 +230,9 @@ public class AllOrderInfoController extends BaseController {
|
|||||||
public ResponseObject getOperatingDataPos(AllOrderInfoDto allOrderInfo){
|
public ResponseObject getOperatingDataPos(AllOrderInfoDto allOrderInfo){
|
||||||
return getSuccessResult(allOrderInfoService.getOperatingDataPos(allOrderInfo));
|
return getSuccessResult(allOrderInfoService.getOperatingDataPos(allOrderInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/getAmount")
|
||||||
|
public ResponseObject getAmount(AllOrderInfoVo allOrderInfo){
|
||||||
|
return getSuccessResult(allOrderInfoService.getAmount(allOrderInfo));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,28 +20,33 @@ public interface AllOrderInfoMapper extends BaseMapper<AllOrderInfo> {
|
|||||||
|
|
||||||
IPage<AllOrderInfoVo> getPageList(@Param("page") Page page, @Param("allOrderInfo") AllOrderInfo allOrderInfo);
|
IPage<AllOrderInfoVo> getPageList(@Param("page") Page page, @Param("allOrderInfo") AllOrderInfo allOrderInfo);
|
||||||
|
|
||||||
String sumPayMoney( @Param("allOrderInfo") AllOrderInfo allOrderInfo);
|
String sumPayMoney(@Param("allOrderInfo") AllOrderInfo allOrderInfo);
|
||||||
|
|
||||||
// 根据storeId List查询总流水
|
// 根据storeId List查询总流水
|
||||||
BigDecimal allStream(@Param("list") List<MtStore> mtStoreList);
|
BigDecimal allStream(@Param("list") List<MtStore> mtStoreList);
|
||||||
|
|
||||||
AllOrderInfoVo getTradingData(@Param("allOrderInfo") AllOrderInfoDto allOrderInfo);
|
AllOrderInfoVo getTradingData(@Param("allOrderInfo") AllOrderInfoDto allOrderInfo);
|
||||||
|
|
||||||
IPage<AllOrderInfoVo> getTradingPage(@Param("page") Page page, @Param("allOrderInfo") AllOrderInfo allOrderInfo);
|
IPage<AllOrderInfoVo> getTradingPage(@Param("page") Page page, @Param("allOrderInfo") AllOrderInfo allOrderInfo);
|
||||||
|
|
||||||
IPage<AllOrderInfoVo> getTradingPage(@Param("page") Page page, @Param("allOrderInfo") AllOrderInfoDto allOrderInfo);
|
IPage<AllOrderInfoVo> getTradingPage(@Param("page") Page page, @Param("allOrderInfo") AllOrderInfoDto allOrderInfo);
|
||||||
|
|
||||||
AllOrderInfoVo getRunningWaterByInstituion(@Param("allOrderInfo") AllOrderInfoDto allOrderInfo);
|
AllOrderInfoVo getRunningWaterByInstituion(@Param("allOrderInfo") AllOrderInfoDto allOrderInfo);
|
||||||
|
|
||||||
|
|
||||||
// 计算不活跃的店铺数量
|
// 计算不活跃的店铺数量
|
||||||
AllOrderInfoVo getStoreNDynamic(@Param("allOrderInfo") AllOrderInfoDto allOrderInfo);
|
AllOrderInfoVo getStoreNDynamic(@Param("allOrderInfo") AllOrderInfoDto allOrderInfo);
|
||||||
|
|
||||||
IPage<AllOrderInfoVo> getRunningWaterByDay(@Param("page") Page page, @Param("allOrderInfo") AllOrderInfoDto allOrderInfo);
|
IPage<AllOrderInfoVo> getRunningWaterByDay(@Param("page") Page page, @Param("allOrderInfo") AllOrderInfoDto allOrderInfo);
|
||||||
AllOrderInfoVo getRunningWaterByDayData( @Param("allOrderInfo") AllOrderInfoDto allOrderInfo);
|
|
||||||
|
AllOrderInfoVo getRunningWaterByDayData(@Param("allOrderInfo") AllOrderInfoDto allOrderInfo);
|
||||||
|
|
||||||
AllOrderInfoVo getRunningWaterByData(@Param("allOrderInfo") AllOrderInfoDto allOrderInfo);
|
AllOrderInfoVo getRunningWaterByData(@Param("allOrderInfo") AllOrderInfoDto allOrderInfo);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据支付状态查询订单笔数
|
* 根据支付状态查询订单笔数
|
||||||
|
*
|
||||||
* @param allOrderInfo
|
* @param allOrderInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -52,4 +57,14 @@ public interface AllOrderInfoMapper extends BaseMapper<AllOrderInfo> {
|
|||||||
AllOrderInfoVo getHandOverList(HandoverRecord record);
|
AllOrderInfoVo getHandOverList(HandoverRecord record);
|
||||||
|
|
||||||
AllOrderInfoVo getOneByOrderNo(String orderNo);
|
AllOrderInfoVo getOneByOrderNo(String orderNo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据条件查询笔数
|
||||||
|
*
|
||||||
|
* @param allOrderInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Integer selectTotal(@Param("allOrderInfo") AllOrderInfo allOrderInfo);
|
||||||
|
|
||||||
|
Double selectAllAmount(@Param("allOrderInfo") AllOrderInfo allOrderInfo);
|
||||||
}
|
}
|
@ -402,6 +402,41 @@
|
|||||||
from all_order_info
|
from all_order_info
|
||||||
where order_no = #{orderNo}
|
where order_no = #{orderNo}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectTotal" resultType="java.lang.Integer">
|
||||||
|
select count(*) from all_order_info
|
||||||
|
<where>
|
||||||
|
<if test="allOrderInfo.storeId != null and allOrderInfo.storeId != ''">
|
||||||
|
and store_id = #{allOrderInfo.storeId}
|
||||||
|
</if>
|
||||||
|
<if test="allOrderInfo.status != null and allOrderInfo.status != ''">
|
||||||
|
and status = #{allOrderInfo.status}
|
||||||
|
</if>
|
||||||
|
<if test="allOrderInfo.params.beginTime != null and allOrderInfo.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||||
|
and date_format(create_time,'%y%m%d') >= date_format(#{allOrderInfo.params.beginTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="allOrderInfo.params.endTime != null and allOrderInfo.params.endTime != ''"><!-- 结束时间检索 -->
|
||||||
|
and date_format(create_time,'%y%m%d') <= date_format(#{allOrderInfo.params.endTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
<select id="selectAllAmount" resultType="java.lang.Double"
|
||||||
|
parameterType="com.fuint.business.order.entity.AllOrderInfo">
|
||||||
|
select sum(pay_money) from all_order_info
|
||||||
|
<where>
|
||||||
|
<if test="allOrderInfo.storeId != null and allOrderInfo.storeId != ''">
|
||||||
|
and store_id = #{allOrderInfo.storeId}
|
||||||
|
</if>
|
||||||
|
<if test="allOrderInfo.status != null and allOrderInfo.status != ''">
|
||||||
|
and status = #{allOrderInfo.status}
|
||||||
|
</if>
|
||||||
|
<if test="allOrderInfo.params.beginTime != null and allOrderInfo.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||||
|
and date_format(create_time,'%y%m%d') >= date_format(#{allOrderInfo.params.beginTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="allOrderInfo.params.endTime != null and allOrderInfo.params.endTime != ''"><!-- 结束时间检索 -->
|
||||||
|
and date_format(create_time,'%y%m%d') <= date_format(#{allOrderInfo.params.endTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
<!-- WHERE-->
|
<!-- WHERE-->
|
||||||
<!-- DATE(pay_time) = CURDATE();-->
|
<!-- DATE(pay_time) = CURDATE();-->
|
||||||
<!-- <if test="startTime != null "><!– 开始时间检索 –>-->
|
<!-- <if test="startTime != null "><!– 开始时间检索 –>-->
|
||||||
|
@ -96,4 +96,17 @@ public interface AllOrderInfoService {
|
|||||||
AllOrderInfoVo getOneByOrderNo(String orderNo);
|
AllOrderInfoVo getOneByOrderNo(String orderNo);
|
||||||
|
|
||||||
AllOrderInfo getOneByOrderNos(String orderNo);
|
AllOrderInfo getOneByOrderNos(String orderNo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询某个时间段内店铺数量
|
||||||
|
* @param map
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Integer selectStoreTotal(Map<String,String> map);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String,Object> getAmount(AllOrderInfoVo allOrderInfoVo);
|
||||||
}
|
}
|
||||||
|
@ -975,6 +975,54 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
|||||||
return allOrderInfoMapper.getOneByOrderNo(orderNo);
|
return allOrderInfoMapper.getOneByOrderNo(orderNo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer selectStoreTotal(Map<String, String> map) {
|
||||||
|
String startTime = map.get("startTime");
|
||||||
|
String endTime = map.get("endTime");
|
||||||
|
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||||
|
if (ObjectUtil.isNotEmpty(startTime) && ObjectUtil.isNotEmpty(endTime)){
|
||||||
|
queryWrapper.apply(true,"create_time BETWEEN '" + startTime + "' and '" + endTime + "'");
|
||||||
|
}
|
||||||
|
queryWrapper.groupBy("store_id");
|
||||||
|
List<AllOrderInfo> allOrderInfos = baseMapper.selectList(queryWrapper);
|
||||||
|
Integer row = 0;
|
||||||
|
if (ObjectUtil.isNotEmpty(allOrderInfos)) row = allOrderInfos.size();
|
||||||
|
return row;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> getAmount(AllOrderInfoVo allOrderInfoVo) {
|
||||||
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
Integer tradeTotal = baseMapper.selectTotal(allOrderInfoVo);
|
||||||
|
Double tradeAmount = baseMapper.selectAllAmount(allOrderInfoVo);
|
||||||
|
allOrderInfoVo.setStatus("refund");
|
||||||
|
Integer refundTotal = baseMapper.selectTotal(allOrderInfoVo);
|
||||||
|
Double refundAmount = baseMapper.selectAllAmount(allOrderInfoVo);
|
||||||
|
Double averagePrice = tradeAmount/tradeTotal;
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||||
|
|
||||||
|
LocalDate date1 = LocalDate.parse(allOrderInfoVo.getParams().get("beginTime").toString(), formatter);
|
||||||
|
LocalDate date2 = LocalDate.parse(allOrderInfoVo.getParams().get("endTime").toString(), formatter);
|
||||||
|
|
||||||
|
Integer daysBetween = Math.toIntExact(ChronoUnit.DAYS.between(date1, date2));
|
||||||
|
Double dayTradeAmount = tradeAmount/daysBetween;
|
||||||
|
Integer dayTradeTotal = tradeTotal/daysBetween;
|
||||||
|
Map<String, String> map1 = new HashMap<>();
|
||||||
|
map1.put("startTime",allOrderInfoVo.getParams().get("beginTime").toString());
|
||||||
|
map1.put("endTime",allOrderInfoVo.getParams().get("endTime").toString());
|
||||||
|
Integer storeTotal = selectStoreTotal(map1);
|
||||||
|
|
||||||
|
map.put("tradeTotal",tradeTotal);
|
||||||
|
map.put("tradeAmount",tradeAmount);
|
||||||
|
map.put("refundTotal",refundTotal);
|
||||||
|
map.put("refundAmount",refundAmount);
|
||||||
|
map.put("averagePrice",averagePrice);
|
||||||
|
map.put("dayTradeAmount",dayTradeAmount);
|
||||||
|
map.put("dayTradeTotal",dayTradeTotal);
|
||||||
|
map.put("storeTotal",storeTotal);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private long dayCount(String beginTimeStr, String endTimeStr ) {
|
private long dayCount(String beginTimeStr, String endTimeStr ) {
|
||||||
// 将字符串表示的时间转换成 LocalDate 对象
|
// 将字符串表示的时间转换成 LocalDate 对象
|
||||||
|
@ -2,6 +2,7 @@ package com.fuint.business.store.controller;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.fuint.business.storeInformation.entity.LJStore;
|
||||||
import com.fuint.common.util.Constants;
|
import com.fuint.common.util.Constants;
|
||||||
import com.fuint.common.dto.AccountInfo;
|
import com.fuint.common.dto.AccountInfo;
|
||||||
import com.fuint.common.dto.StoreDto;
|
import com.fuint.common.dto.StoreDto;
|
||||||
@ -347,4 +348,10 @@ public class BackendStoreController extends BaseController {
|
|||||||
public ResponseObject getByStroeName(MtStore storeName) {
|
public ResponseObject getByStroeName(MtStore storeName) {
|
||||||
return getSuccessResult(storeService.getByStroeName(storeName));
|
return getSuccessResult(storeService.getByStroeName(storeName));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 中台首页店铺数量查询
|
||||||
|
@GetMapping("/getStoreTotal")
|
||||||
|
public ResponseObject getStoreTotal(LJStore store){
|
||||||
|
return getSuccessResult(storeService.getStoreTotal(store));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.fuint.business.store.service;
|
package com.fuint.business.store.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.fuint.business.storeInformation.entity.LJStore;
|
||||||
import com.fuint.common.dto.StoreDto;
|
import com.fuint.common.dto.StoreDto;
|
||||||
import com.fuint.framework.exception.BusinessCheckException;
|
import com.fuint.framework.exception.BusinessCheckException;
|
||||||
import com.fuint.framework.pagination.PaginationRequest;
|
import com.fuint.framework.pagination.PaginationRequest;
|
||||||
@ -113,4 +114,6 @@ public interface StoreService extends IService<MtStore> {
|
|||||||
|
|
||||||
|
|
||||||
List<Map<Object,Object>> getByStroeName(MtStore storeName);
|
List<Map<Object,Object>> getByStroeName(MtStore storeName);
|
||||||
|
|
||||||
|
Map<String,Object> getStoreTotal(LJStore store);
|
||||||
}
|
}
|
||||||
|
@ -2,14 +2,17 @@ package com.fuint.business.store.service.impl;
|
|||||||
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.fuint.business.order.mapper.AllOrderInfoMapper;
|
import com.fuint.business.order.mapper.AllOrderInfoMapper;
|
||||||
|
import com.fuint.business.order.service.AllOrderInfoService;
|
||||||
import com.fuint.business.store.entity.MtStore;
|
import com.fuint.business.store.entity.MtStore;
|
||||||
import com.fuint.business.store.mapper.MtStoreMapper;
|
import com.fuint.business.store.mapper.MtStoreMapper;
|
||||||
import com.fuint.business.store.service.StoreService;
|
import com.fuint.business.store.service.StoreService;
|
||||||
|
import com.fuint.business.storeInformation.entity.LJStore;
|
||||||
import com.fuint.common.dto.AccountInfo;
|
import com.fuint.common.dto.AccountInfo;
|
||||||
import com.fuint.common.dto.StoreDto;
|
import com.fuint.common.dto.StoreDto;
|
||||||
import com.fuint.common.enums.StatusEnum;
|
import com.fuint.common.enums.StatusEnum;
|
||||||
@ -40,6 +43,7 @@ import org.apache.shiro.authc.UsernamePasswordToken;
|
|||||||
import org.apache.shiro.subject.Subject;
|
import org.apache.shiro.subject.Subject;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.data.domain.PageImpl;
|
import org.springframework.data.domain.PageImpl;
|
||||||
import org.springframework.data.domain.PageRequest;
|
import org.springframework.data.domain.PageRequest;
|
||||||
import org.springframework.data.redis.core.RedisTemplate;
|
import org.springframework.data.redis.core.RedisTemplate;
|
||||||
@ -48,6 +52,9 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.text.DateFormat;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
@ -67,6 +74,9 @@ public class StoreServiceImpl extends ServiceImpl<MtStoreMapper, MtStore> implem
|
|||||||
private MtMerchantMapper mtMerchantMapper;
|
private MtMerchantMapper mtMerchantMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private ISysDeptService iSysDeptService;
|
private ISysDeptService iSysDeptService;
|
||||||
|
@Resource
|
||||||
|
@Lazy
|
||||||
|
private AllOrderInfoService allOrderInfoService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商户接口
|
* 商户接口
|
||||||
@ -605,6 +615,40 @@ public class StoreServiceImpl extends ServiceImpl<MtStoreMapper, MtStore> implem
|
|||||||
return objects;
|
return objects;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> getStoreTotal(LJStore store) {
|
||||||
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("if_delete","0");
|
||||||
|
Integer allTotal = baseMapper.selectCount(queryWrapper);
|
||||||
|
|
||||||
|
// 查询过去七天活跃的数据
|
||||||
|
Map<String,String> map1 = new HashMap<>();
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
calendar.add(Calendar.DATE, -7); // 减去7天
|
||||||
|
Date sevenDaysAgo = calendar.getTime();
|
||||||
|
String startTime = sdf.format(sevenDaysAgo);
|
||||||
|
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
|
||||||
|
String endTime = dateFormat.format(new Date());
|
||||||
|
map1.put("startTime",startTime);
|
||||||
|
map1.put("endTime",endTime);
|
||||||
|
Integer weekTotal = allOrderInfoService.selectStoreTotal(map1);
|
||||||
|
|
||||||
|
// 查询过去一个月的数据
|
||||||
|
LocalDate now1 = LocalDate.now();
|
||||||
|
LocalDate sevenDaysAgo1 = now1.minusDays(30);
|
||||||
|
QueryWrapper queryWrapperSevenDays1 = new QueryWrapper<>();
|
||||||
|
queryWrapperSevenDays1.eq("if_delete","0");
|
||||||
|
queryWrapperSevenDays1.ge("create_time", sevenDaysAgo1);
|
||||||
|
Integer monthTotal = baseMapper.selectCount(queryWrapperSevenDays1);
|
||||||
|
|
||||||
|
map.put("allTotal",allTotal);
|
||||||
|
map.put("weekTotal",ObjectUtil.isNotEmpty(weekTotal) ? weekTotal : 0);
|
||||||
|
map.put("monthTotal",monthTotal);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 将在部门里面删除的在油站中删除
|
// 将在部门里面删除的在油站中删除
|
||||||
public void beachDelStore() {
|
public void beachDelStore() {
|
||||||
|
@ -1,16 +1,33 @@
|
|||||||
package com.fuint.business.userManager.controller;
|
package com.fuint.business.userManager.controller;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.alibaba.excel.EasyExcel;
|
||||||
|
import com.alibaba.excel.EasyExcelFactory;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.fuint.business.userManager.entity.CertifiedMember;
|
import com.fuint.business.userManager.entity.CertifiedMember;
|
||||||
|
import com.fuint.business.userManager.entity.FixingLevel;
|
||||||
|
import com.fuint.business.userManager.entity.UserStatistic;
|
||||||
|
import com.fuint.business.userManager.listener.EasyExcelListener;
|
||||||
import com.fuint.business.userManager.service.CertifiedMemberService;
|
import com.fuint.business.userManager.service.CertifiedMemberService;
|
||||||
|
import com.fuint.business.userManager.service.FixingLevelService;
|
||||||
|
import com.fuint.business.userManager.vo.CertifiedMemberVo;
|
||||||
|
import com.fuint.business.userManager.vo.LJUserVo;
|
||||||
import com.fuint.framework.web.BaseController;
|
import com.fuint.framework.web.BaseController;
|
||||||
import com.fuint.framework.web.ResponseObject;
|
import com.fuint.framework.web.ResponseObject;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -22,6 +39,9 @@ public class CertifiedMemberController extends BaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private CertifiedMemberService certifiedMemberService;
|
private CertifiedMemberService certifiedMemberService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private FixingLevelService fixingLevelService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据条件分页查询固定等级信息
|
* 根据条件分页查询固定等级信息
|
||||||
* @param certifiedMember
|
* @param certifiedMember
|
||||||
@ -114,6 +134,87 @@ public class CertifiedMemberController extends BaseController {
|
|||||||
return getSuccessResult(map1);
|
return getSuccessResult(map1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 导入模板示例
|
||||||
|
@RequestMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, HttpServletRequest request) {
|
||||||
|
|
||||||
|
try {
|
||||||
|
String filenames = "导入模板示列";
|
||||||
|
String userAgent = request.getHeader("User-Agent");
|
||||||
|
if (userAgent.contains("MSIE") || userAgent.contains("Trident")) {
|
||||||
|
filenames = URLEncoder.encode(filenames, "UTF-8");
|
||||||
|
} else {
|
||||||
|
filenames = new String(filenames.getBytes("UTF-8"), "ISO-8859-1");
|
||||||
|
}
|
||||||
|
response.setContentType("application/json.ms-exce");
|
||||||
|
response.setCharacterEncoding("utf-8");
|
||||||
|
response.addHeader("Content-Disposition", "filename=" + filenames + ".xlsx");
|
||||||
|
|
||||||
|
CertifiedMemberVo certifiedMember = new CertifiedMemberVo();
|
||||||
|
certifiedMember.setFixingLevelName("出租车认证");
|
||||||
|
certifiedMember.setMobile("15487415241");
|
||||||
|
|
||||||
|
List<CertifiedMemberVo> list = new ArrayList<>();
|
||||||
|
list.add(certifiedMember);
|
||||||
|
|
||||||
|
EasyExcel.write(response.getOutputStream(), CertifiedMemberVo.class).sheet("sheet").doWrite(list);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导入认证会员信息
|
||||||
|
@RequestMapping("/import")
|
||||||
|
public ResponseObject myImport(MultipartFile file) throws IOException {
|
||||||
|
Map<String,Integer> map = new HashMap<>();
|
||||||
|
int error = 0;
|
||||||
|
int certified = 0;
|
||||||
|
int success = 0;
|
||||||
|
int total = 0;
|
||||||
|
try {
|
||||||
|
//获取文件名
|
||||||
|
String filename = file.getOriginalFilename();
|
||||||
|
//获取文件流
|
||||||
|
InputStream inputStream = file.getInputStream();
|
||||||
|
//实例化实现了AnalysisEventListener接口的类
|
||||||
|
EasyExcelListener listener = new EasyExcelListener();
|
||||||
|
|
||||||
|
EasyExcelFactory.read(inputStream, CertifiedMemberVo.class, listener).headRowNumber(1).build().readAll();
|
||||||
|
//获取数据
|
||||||
|
List<Object> list = listener.getDatas();
|
||||||
|
total = list.size();
|
||||||
|
if (list.size() >= 1) {
|
||||||
|
for (int i = 0; i < list.size(); i++) {
|
||||||
|
CertifiedMemberVo certifiedMemberVo = (CertifiedMemberVo) list.get(i);
|
||||||
|
FixingLevel fixingLevel = fixingLevelService.selectFixingLevelByName(certifiedMemberVo.getFixingLevelName());
|
||||||
|
if (ObjectUtil.isNotEmpty(fixingLevel)) {
|
||||||
|
CertifiedMember certifiedMember = new CertifiedMember();
|
||||||
|
certifiedMember.setFixingLevelId(fixingLevel.getId());
|
||||||
|
certifiedMember.setMobile(certifiedMemberVo.getMobile());
|
||||||
|
int row = certifiedMemberService.insertCertifiedMember(certifiedMember);
|
||||||
|
if (row == 1) {
|
||||||
|
success++;
|
||||||
|
} else if (row == 2 || row == 3) {
|
||||||
|
error++;
|
||||||
|
} else {
|
||||||
|
certified++;
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
error++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
map.put("success",success);
|
||||||
|
map.put("error",error);
|
||||||
|
map.put("certified",certified);
|
||||||
|
map.put("total",total);
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return getSuccessResult(map);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改固定等级信息
|
* 修改固定等级信息
|
||||||
* @param certifiedMember
|
* @param certifiedMember
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.fuint.business.userManager.entity;
|
package com.fuint.business.userManager.entity;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
@ -50,6 +51,7 @@ public class CertifiedMember extends BaseEntity implements Serializable {
|
|||||||
* 手机号
|
* 手机号
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty("手机号")
|
@ApiModelProperty("手机号")
|
||||||
|
@ExcelProperty(value = "手机号码(必填)")
|
||||||
private String mobile;
|
private String mobile;
|
||||||
/**
|
/**
|
||||||
* 车牌号
|
* 车牌号
|
||||||
|
@ -0,0 +1,13 @@
|
|||||||
|
package com.fuint.business.userManager.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.fuint.business.userManager.entity.CertifiedMember;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class CertifiedMemberVo extends CertifiedMember {
|
||||||
|
@ExcelProperty(value = "固定等级名称")
|
||||||
|
private String fixingLevelName;
|
||||||
|
}
|
@ -48,6 +48,8 @@ public class ShiroConfig {
|
|||||||
filterMap.put("/static/**","anon");
|
filterMap.put("/static/**","anon");
|
||||||
//会员模板导出
|
//会员模板导出
|
||||||
filterMap.put("/excel/export","anon");
|
filterMap.put("/excel/export","anon");
|
||||||
|
//认证会员模板导出
|
||||||
|
filterMap.put("/business/userManager/certifiedMember/export","anon");
|
||||||
//根据地理位置获取最近的店铺信息
|
//根据地理位置获取最近的店铺信息
|
||||||
filterMap.put("/business/storeInformation/store/recentlyStore","anon");
|
filterMap.put("/business/storeInformation/store/recentlyStore","anon");
|
||||||
filterMap.put("/business/storeInformation/store/isRecharge","anon");
|
filterMap.put("/business/storeInformation/store/isRecharge","anon");
|
||||||
|
@ -117,3 +117,10 @@
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.el-pagination.is-background .el-pager li:not(.disabled).active{
|
||||||
|
background-color: #FF9655 !important;
|
||||||
|
}
|
||||||
|
.el-pagination.is-background .el-pager li:hover{
|
||||||
|
color: #FF9655 !important;/*hover时候的文字颜色*/
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user