Merge remote-tracking branch 'origin/master'

# Conflicts:
#	fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/mapper/CardFavorableRecordMapper.java
#	fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/mapper/xml/CardFavorableRecordMapper.xml
This commit is contained in:
齐天大圣 2023-12-13 17:11:02 +08:00
commit b429636651
76 changed files with 1821 additions and 168 deletions

View File

@ -5,49 +5,70 @@
<el-radio-button label="literCard">升数卡记录</el-radio-button>
</el-radio-group>
<div v-if="tabPosition=='giftCard'">
<el-table ref="tables" v-loading="loading" :data="list">
<el-table-column prop="date" label="所属油站"/>
<el-table-column prop="date" label="变动账户"/>
<el-table-column prop="date" label="类型"/>
<el-table-column label="详细信息">
<el-table-column prop="name" label="变动金额"/>
<el-table-column prop="address" label="变动前余额"/>
<el-table-column prop="address" label="变动后余额"/>
<el-table ref="tables" v-loading="loading" :data="cardList">
<el-table-column align="center" prop="storeName" label="所属油站"/>
<!-- <el-table-column prop="date" label="变动账户"/> -->
<el-table-column align="center" prop="changeType" label="类型">
<template slot-scope="scope">
<el-tag v-if="scope.row.changeType == 0">减少</el-tag>
<el-tag type="success" v-else>增加</el-tag>
</template>
</el-table-column>
<el-table-column prop="date" label="订单号"/>
<el-table-column prop="date" label="描述"/>
<el-table-column prop="date" label="变动时间"/>
<el-table-column align="center" label="详细信息">
<el-table-column align="center" prop="balance" label="变动金额"/>
<el-table-column align="center" prop="address" label="变动前余额">
<template slot-scope="scope">
<span>{{ scope.row.afterTheChange?scope.row.afterTheChange + scope.row.balance : '/'}}</span>
</template>
</el-table-column>
<el-table-column align="center" prop="afterTheChange" label="变动后余额">
<template slot-scope="scope">
<span>{{ scope.row.afterTheChange?scope.row.afterTheChange : '/'}}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column align="center" prop="orderNo" label="订单号"/>
<el-table-column align="center" prop="fromType" label="描述"/>
<el-table-column align="center" prop="createTime" label="变动时间"/>
</el-table>
<pagination
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.pageSize"
@pagination="getList"
:total="cardTotal"
:page.sync="queryCardParams.page"
:limit.sync="queryCardParams.pageSize"
@pagination="getCardList"
/>
</div>
<div v-else>
<el-table ref="tables" v-loading="loading" :data="list">
<el-table-column label="所属油站" prop="id" align="center"/>
<el-table-column label="变动账户" align="center"/>
<el-table-column label="类型" align="center" prop="userNo"/>
<el-table-column label="变动升数" align="center" prop="name" />
<el-table-column label="订单号" align="center" prop="balance"/>
<el-table-column label="描述" align="center" prop="balance"/>
<el-table-column label="变动时间" align="center" prop="point"/>
<el-table ref="tables2" v-loading="loading" :data="fuelList">
<el-table-column align="center" label="所属油站" prop="storeName"/>
<el-table-column align="center" label="变动账户" prop="oilType" />
<el-table-column label="类型" align="center" prop="changeType">
<template slot-scope="scope">
<el-tag v-if="scope.row.changeType == 0">减少</el-tag>
<el-tag type="success" v-else>增加</el-tag>
</template>
</el-table-column>
<el-table-column label="变动升数" align="center" prop="balance"/>
<el-table-column label="订单号" align="center" prop="orderNo"/>
<el-table-column label="描述" align="center" prop="fromType"/>
<el-table-column label="变动时间" align="center" prop="createTime"/>
</el-table>
<pagination
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.pageSize"
@pagination="getList"
:total="fuelTotal"
:page.sync="queryFuelParams.page"
:limit.sync="queryFuelParams.pageSize"
@pagination="getFuelList"
/>
</div>
</div>
</template>
<script>
import { getCardRecordList, getFuelRecordList } from "@/api/userInfoOrder.js";
export default {
props:["pUserId"],
data(){
@ -56,19 +77,50 @@ export default {
userId:"",
loading:false,
list:[],
total:0,
queryParams:{
cardList:[],
fuelList:[],
cardTotal:0,
fuelTotal:0,
queryCardParams:{
page:1,
pageSize:10,
},
queryFuelParams:{
page:1,
pageSize:10,
}
}
},
created() {
this.userId = this.pUserId;
// this.userId = this.pUserId;
this.userId = this.$route.query.id;
this.getCardList()
this.getFuelList()
},
methods:{
getList(){
getCardList() {
this.loading = true
this.queryCardParams.userId = this.userId
getCardRecordList(this.queryCardParams).then(res=>{
if (res.code == 200) {
this.cardList = res.data.records
this.cardTotal = res.data.total
this.loading = false
}
})
},
getFuelList() {
this.loading = true
this.queryFuelParams.userId = this.userId
getFuelRecordList(this.queryFuelParams).then(res=>{
if (res.code == 200) {
this.fuelList = res.data.records
this.fuelTotal = res.data.total
this.loading = false
}
})
}
}
}

View File

@ -1,6 +1,6 @@
<template>
<div>
<el-radio-group v-model="cardList" size="mini" style="margin-bottom: 30px;">
<el-radio-group v-model="cardList" size="mini" style="margin-bottom: 30px;" @change="changeStatus()">
<el-radio-button label="notUse">未使用</el-radio-button>
<el-radio-button label="used">已使用</el-radio-button>
<el-radio-button label="expired">已过期</el-radio-button>
@ -8,19 +8,36 @@
</el-radio-group>
<div>
<el-table ref="tables" v-loading="loading" :data="list">
<el-table-column prop="date" label="所属油站"/>
<el-table-column prop="date" label="优惠券名称"/>
<el-table-column prop="date" label="卡券类型"/>
<el-table-column prop="date" label="满减金额"/>
<el-table-column prop="date" label="券面额"/>
<el-table-column prop="date" label="适用油品"/>
<el-table-column prop="date" label="状态"/>
<el-table-column label="卡券可用规则">
<el-table-column prop="name" label="有效期"/>
<el-table-column prop="address" label="周期与时段"/>
<el-table-column align="center" prop="storeName" label="所属油站"/>
<el-table-column align="center" prop="cardFavorableName" label="优惠券名称"/>
<el-table-column align="center" prop="type" label="卡券类型">
<template slot-scope="scope">
<el-tag v-if="scope.row.type == 0">油品券</el-tag>
<el-tag v-if="scope.row.type == 1" type="success">商品券</el-tag>
<el-tag v-if="scope.row.type == 2" type="warning">通用券</el-tag>
</template>
</el-table-column>
<el-table-column prop="date" label="领取时间"/>
<el-table-column prop="date" label="描述"/>
<el-table-column align="center" prop="fullDeduction" label="满减金额"/>
<el-table-column align="center" prop="discountAmount" label="券面额"/>
<el-table-column align="center" prop="oilType" label="适用油品"/>
<el-table-column align="center" prop="status" label="状态">
<template slot-scope="scope">
<el-tag v-if="scope.row.status == 0">未使用</el-tag>
<el-tag v-if="scope.row.status == 1" type="success">已使用</el-tag>
<el-tag v-if="scope.row.status == 2" type="warning">已过期</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="卡券可用规则">
<el-table-column align="center" prop="name" label="有效期">
<template slot-scope="scope">
{{ scope.row.startTime }}{{ scope.row.endTime }}
</template>
</el-table-column>
<el-table-column align="center" prop="availablePeriod" label="周期与时段"/>
</el-table-column>
<el-table-column align="center" prop="createTime" label="领取时间"/>
<el-table-column align="center" prop="exchangeFrom" label="描述"/>
</el-table>
<pagination
@ -34,6 +51,8 @@
</template>
<script>
import { getCardFavorableList } from "@/api/userInfoOrder.js";
export default {
props:["pUserId"],
data(){
@ -44,17 +63,45 @@ export default {
list:[],
total:0,
queryParams:{
status: 0,
page:1,
pageSize:10,
}
}
},
created() {
this.userId = this.pUserId;
// this.userId = this.pUserId;
this.userId = this.$route.query.id;
this.getList()
},
methods:{
getList(){
this.loading = true
this.queryParams.userId = this.userId
getCardFavorableList(this.queryParams).then(res=>{
if (res.code == 200) {
this.list = res.data.records
this.total = res.data.total
this.loading = false
}
})
},
changeStatus() {
console.log("12312312312312312",this.cardList)
if (this.cardList == 'notUse') {
this.queryParams.status = 0
} else if (this.cardList == 'used') {
this.queryParams.status = 1
} else if (this.cardList == 'expired') {
this.queryParams.status = 2
} else {
this.queryParams.status = ''
}
this.getList()
}
}
}

View File

@ -1,15 +1,23 @@
<template>
<div>
<el-table ref="tables" v-loading="loading" :data="list">
<el-table-column label="所属油站" prop="id" align="center"/>
<el-table-column label="订单时间" align="center"/>
<el-table-column label="订单金额" align="center" prop="userNo"/>
<el-table-column label="商品数量" align="center" prop="name" />
<el-table-column label="储值卡" align="center" prop="mobile"/>
<el-table-column label="实付金额" align="center" prop="balance"/>
<el-table-column label="付款类型" align="center" prop="balance"/>
<el-table-column label="订单号" align="center" prop="balance"/>
<el-table-column label="订单类型" align="center" prop="point"/>
<el-table-column label="所属油站" prop="storeName" align="center"/>
<el-table-column label="订单时间" prop="createTime" align="center"/>
<el-table-column label="订单金额" align="center" prop="amount"/>
<el-table-column label="商品数量" align="center" prop="goodsNum" />
<!-- <el-table-column label="储值卡" align="center" prop="mobile"/> -->
<el-table-column label="实付金额" align="center" prop="payAmount"/>
<el-table-column label="付款类型" align="center" prop="payType">
<template slot-scope="scope">
<span v-if="scope.row.payType == 'CASH'">现金支付</span>
<span v-else-if="scope.row.payType == 'WECHAT'">微信支付</span>
<span v-else-if="scope.row.payType == 'ALIPAY'">支付宝支付</span>
<span v-else>{{ scope.row.payType }}</span>
</template>
</el-table-column>
<el-table-column label="订单号" align="center" prop="orderNo"/>
<!-- <el-table-column label="订单类型" align="center" prop="point"/> -->
</el-table>
<pagination
@ -22,6 +30,8 @@
</template>
<script>
import { getMtOrderList } from "@/api/userInfoOrder.js";
export default {
props:["pUserId"],
data(){
@ -37,11 +47,22 @@ export default {
}
},
created() {
this.userId = this.pUserId;
// this.userId = this.pUserId;
this.userId = this.$route.query.id;
this.getList()
},
methods:{
getList(){
this.loading = true
this.queryParams.userId = this.userId
getMtOrderList(this.queryParams).then(res=>{
if (res.code == 200) {
this.list = res.data.records
this.total = res.data.total
this.loading = false
}
})
}
}
}

View File

@ -1,16 +1,35 @@
<template>
<div>
<el-table ref="tables" v-loading="loading" :data="list">
<el-table-column label="所属油站" prop="id" align="center"/>
<el-table-column label="订单时间" align="center"/>
<el-table-column label="交易终端" align="center" prop="userNo"/>
<el-table-column label="油品/油枪" align="center" prop="name" />
<el-table-column label="订单金额" align="center" prop="mobile"/>
<el-table-column label="优惠金额" align="center" prop="gradeId"/>
<el-table-column label="实付金额" align="center" prop="balance"/>
<el-table-column label="付款类型" align="center" prop="balance"/>
<el-table-column label="订单号" align="center" prop="balance"/>
<el-table-column label="订单类型" align="center" prop="point"/>
<el-table-column label="所属油站" prop="storeName" align="center"/>
<el-table-column label="订单时间" align="center" prop="createTime"/>
<el-table-column label="交易终端" align="center" prop="payType">
<template slot-scope="scope">
<span v-if="scope.row.terminal == 'applet'">小程序</span>
<span v-else>{{ scope.row.terminal }}</span>
</template>
</el-table-column>
<el-table-column label="油品/油枪" align="center" prop="name" >
<template slot-scope="scope">
{{ scope.row.oilGunNum }}/{{ scope.row.oilName }}
</template>
</el-table-column>
<el-table-column label="订单金额" align="center" prop="orderAmount"/>
<el-table-column label="优惠金额" align="center" prop="discountAmount"/>
<el-table-column label="实付金额" align="center" prop="payAmount"/>
<el-table-column label="付款类型" align="center" prop="payType">
<template slot-scope="scope">
<span v-if="scope.row.payType == 'CASH'">现金支付</span>
<span v-else-if="scope.row.payType == 'WECHAT'">微信支付</span>
<span v-else-if="scope.row.payType == 'ALIPAY'">支付宝支付</span>
<span v-else>{{ scope.row.payType }}</span>
</template>
</el-table-column>
<el-table-column label="订单号" align="center" prop="orderNo" width="220px"/>
<el-table-column label="订单类型" align="center" prop="orderType"/>
</el-table>
<pagination
@ -23,6 +42,8 @@
</template>
<script>
import { getOilOrderList } from "@/api/userInfoOrder.js";
export default {
props:["pUserId"],
data(){
@ -38,11 +59,22 @@ export default {
}
},
created() {
this.userId = this.pUserId;
// this.userId = this.pUserId;
this.userId = this.$route.query.id;
this.getList()
},
methods:{
getList(){
this.loading = true
this.queryParams.userId = this.userId
getOilOrderList(this.queryParams).then(res=>{
if (res.code == 200) {
this.list = res.data.records
this.total = res.data.total
this.loading = false
}
})
}
}
}

View File

@ -1,11 +1,19 @@
<template>
<div>
<el-table ref="tables" v-loading="loading" :data="list">
<el-table-column label="所属油站" prop="id" align="center"/>
<el-table-column label="变动时间" align="center"/>
<el-table-column label="类型" align="center" prop="userNo"/>
<el-table-column label="变动积分" align="center" prop="name" />
<el-table-column label="描述" align="center" prop="balance"/>
<el-table-column label="所属油站" prop="storeName" align="center"/>
<el-table-column label="变动时间" prop="createTime" align="center"/>
<el-table-column label="类型" align="center" prop="changeType">
<template slot-scope="scope">
<el-tag v-if="scope.row.changeType == 0">减少</el-tag>
<el-tag type="success" v-else>增加</el-tag>
</template>
</el-table-column>
<el-table-column label="变动积分" align="center" prop="pointsChange" />
<el-table-column label="变动后积分" align="center" prop="currentPoints" />
<el-table-column label="描述" align="center" prop="changeReason"/>
</el-table>
<pagination
@ -18,6 +26,8 @@
</template>
<script>
import { getIntegralDetailList } from "@/api/userInfoOrder.js";
export default {
props:["pUserId"],
data(){
@ -33,11 +43,22 @@ export default {
}
},
created() {
this.userId = this.pUserId;
// this.userId = this.pUserId;
this.userId = this.$route.query.id;
this.getList()
},
methods:{
getList(){
this.loading = true
this.queryParams.userId = this.userId
getIntegralDetailList(this.queryParams).then(res=>{
if (res.code == 200) {
this.list = res.data.records
this.total = res.data.total
this.loading = false
}
})
}
}
}

View File

@ -52,6 +52,15 @@ public class IntegralDetailController extends BaseController {
return getSuccessResult(iPageList);
}
@GetMapping("queryByPageUni2")
public ResponseObject queryByPageUni2(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
@Param("integralDetail") IntegralDetail integralDetail) {
Page page = new Page(pageNo, pageSize);
IPage< IntegralDetail> iPageList = this.integralDetailService.queryByPageUni2(page, integralDetail);
return getSuccessResult(iPageList);
}

View File

@ -91,6 +91,11 @@ public class IntegralOrdersController extends BaseController {
return getSuccessResult(this.integralOrdersService.update(integralOrders));
}
@PutMapping("editUni")
public ResponseObject editUni(@RequestBody IntegralOrders integralOrders) {
return getSuccessResult(this.integralOrdersService.updateUni(integralOrders));
}
// /**
// * 处理发货 修改该快递单号
// * @param integralOrders

View File

@ -39,6 +39,8 @@ public class IntegralDetail extends BaseEntity {
private String changeReason;
private String changeType;
private String storeName;
/**
* 店铺ID
*/

View File

@ -28,19 +28,20 @@
<!--查询指定行数据-->
<select id="queryAllByLimit" resultMap="IntegralDetailMap">
select
id, user_id, points_change, current_points, type, change_reason, store_id, create_time, update_time, create_by, update_by,change_type
from integral_detail
ms.name storeName, id.id, id.user_id, id.points_change, id.current_points, id.type, id.change_reason, id.store_id, id.create_time, id.update_time, id.create_by, id.update_by,id.change_type
from integral_detail id
left join mt_store ms on ms.id = id.store_id
<where>
<if test="integralDetail.chainStoreId != null">
and chain_store_id = #{integralDetail.chainStoreId}
and id.chain_store_id = #{integralDetail.chainStoreId}
</if>
<if test="integralDetail.storeId != null">
and store_id = #{integralDetail.storeId}
and id.store_id = #{integralDetail.storeId}
</if>
<if test="integralDetail.userId != null">
and user_id = #{integralDetail.userId}
and id.user_id = #{integralDetail.userId}
</if>
</where>
order by create_time desc

View File

@ -192,11 +192,11 @@
</if>
<if test="integralOrders.params.endTime != null and integralOrders.params.endTime != ''">
and date_format(io.create_time,'%y%m%d') &lt;= date_format(#{integralOrders.params.endTime},'%y%m%d')
</if>
<if test="integralOrders.orderStatus != null and integralOrders.orderStatus != '' and integralOrders.orderStatus != 0 ">
</if>
<if test="integralOrders.orderStatus != null and integralOrders.orderStatus != '' ">
and (
(#{integralOrders.orderStatus} = 1 and (io.order_status = '待处理' or io.order_status = '待发货' or io.order_status = '已发货')) or
(#{integralOrders.orderStatus} = 2 and (io.order_status = '已完成')) or
(#{integralOrders.orderStatus} = 2 and (io.order_status = '已完成' )) or
(#{integralOrders.orderStatus} = 3 and (io.order_status = '已退款' or io.order_status = '已拒绝')) or
(#{integralOrders.orderStatus} = 4 and io.order_status = '未支付')
)

View File

@ -32,6 +32,14 @@ public interface IntegralDetailService {
IPage<IntegralDetail> queryByPage(@Param("page") Page page, IntegralDetail integralDetail);
IPage<IntegralDetail> queryByPageUni(@Param("page") Page page, IntegralDetail integralDetail);
/**
* 后台段 个人统计使用 和上面的区别是获取token的storeId
* @param page
* @param integralDetail
* @return
*/
IPage<IntegralDetail> queryByPageUni2(@Param("page") Page page, IntegralDetail integralDetail);
/**
* 新增数据
*

View File

@ -55,6 +55,7 @@ public interface IntegralOrdersService {
* @return 实例对象
*/
IntegralOrders update(IntegralOrders integralOrders);
IntegralOrders updateUni(IntegralOrders integralOrders);
/**
* 通过主键删除数据

View File

@ -57,6 +57,13 @@ public class IntegralDetailServiceImpl implements IntegralDetailService {
return this.integralDetailMapper.queryAllByLimit(page, integralDetail);
}
@Override
public IPage<IntegralDetail> queryByPageUni2(@Param("page") Page page, IntegralDetail integralDetail) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
integralDetail.setStoreId(nowAccountInfo.getStoreId());
return this.integralDetailMapper.queryAllByLimit(page, integralDetail);
}
/**
* 新增数据
*

View File

@ -86,7 +86,7 @@ public class IntegralOrdersServiceImpl implements IntegralOrdersService {
public IPage<IntegralOrdersVO> queryByPageUni(@Param("page") Page page, @Param("integralOrders") IntegralOrdersDTO integralOrders) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
integralOrders.setUserId(nowAccountInfo.getId());
return integralOrdersDao.queryAllByLimit(page, integralOrders);
return integralOrdersDao.queryByPageUni(page, integralOrders);
}
/**
* 新增数据
@ -116,6 +116,12 @@ public class IntegralOrdersServiceImpl implements IntegralOrdersService {
return this.queryById(integralOrders.getId());
}
@Override
public IntegralOrders updateUni(IntegralOrders integralOrders) {
this.integralOrdersDao.update(integralOrders);
return this.queryById(integralOrders.getId());
}
/**
* 通过主键删除数据
*

View File

@ -199,7 +199,7 @@ public class IntegralSettingsServiceImpl implements IntegralSettingsService {
public Integer todayIsSignIn(Integer storeId) {
// 查询是否开启签到功能
IntegralSettings integralSettings = integralSettingsMapper.getByStoreId(storeId);
if (integralSettings.getSignInFunction() == 0 || integralSettings.getPointsObtained().length() > 10) {
if (!ObjectUtil.isEmpty(integralSettings) && (integralSettings.getSignInFunction() == 0 || integralSettings.getPointsObtained().length() > 10)) {
List<IntegralDetail> signInGifts = integralDetailMapper.signInGifts("签到赠送");
if (signInGifts.size() > 0) {
// 已经签到过

View File

@ -44,6 +44,23 @@ public class CardFavorableRecordController extends BaseController {
return getSuccessResult(this.cardFavorableRecordService.select(page,cardFavorableRecord));
}
/**
* 分页查询所有数据( 根据用户id查询)
*
* @param pageNo
* @param pageSize
* @param cardFavorableRecord
* @return
*/
@GetMapping("getCardFavorableList")
public ResponseObject getCardFavorableList(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
@Param("cardFuelDiesel") CardFavorableRecord cardFavorableRecord) {
Page page = new Page(pageNo, pageSize);
return getSuccessResult(this.cardFavorableRecordService.getCardFavorableList(page,cardFavorableRecord));
}
/**
* 通过主键查询单条数据
*

View File

@ -4,8 +4,11 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.marketingActivity.cardFavorable.dto.CardFavorableDTOS;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord;
import com.fuint.business.marketingActivity.cardFavorable.vo.CouponVO;
import com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableRecordVO;
import org.apache.ibatis.annotations.Param;
import java.util.HashMap;
import java.util.List;
@ -23,6 +26,9 @@ public interface CardFavorableRecordMapper extends BaseMapper<CardFavorableRecor
*/
HashMap<String,Integer> selectTotal(@Param("storeId")Integer storeId,@Param("id")Integer id);
IPage<CardFavorableRecordVO> getCardFavorableList(@Param("page")Page page,@Param("cardFavorableRecord") CardFavorableRecord cardFavorableRecord);
/**
* 查询优惠券接口(小程序)
* @param cardFavorableDTOS

View File

@ -22,6 +22,38 @@
where store_id = #{storeId}
and card_favorable_id = #{id}
</select>
<select id="getCardFavorableList"
resultType="com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableRecordVO">
select
ms.`name` storeName,
cf.name cardFavorableName,
cf.type type,
cf.full_deduction fullDeduction,
cf.discount_amount discountAmount,
cf.oil_type oilType,
cf.available_period availablePeriod,
cfr.status status,
cfr.start_time startTime,
cfr.end_time endTime,
cfr.create_time createTime,
cfr.exchange_from exchangeFrom
FROM
card_favorable_record cfr
left join card_favorable cf ON cfr.card_favorable_id = cf.id
left join mt_store ms on ms.id = cfr.store_id
<where>
<if test="cardFavorableRecord.storeId != null">
and cfr.store_id = #{cardFavorableRecord.storeId}
</if>
<if test="cardFavorableRecord.mtUserId != null">
and cfr.mt_user_id = #{cardFavorableRecord.mtUserId}
</if>
<if test="cardFavorableRecord.status != null">
and cfr.status = #{cardFavorableRecord.status}
</if>
</where>
order by cfr.create_time DESC
</select>
<select id="selectAllByCondition" resultType="com.fuint.business.marketingActivity.cardFavorable.vo.CouponVO">
SELECT

View File

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord;
import com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableRecordVO;
import java.io.Serializable;
import java.util.Map;
@ -24,6 +25,9 @@ public interface CardFavorableRecordService extends IService<CardFavorableRecord
*/
IPage select(Page page, CardFavorableRecord cardFavorableRecord);
IPage<CardFavorableRecordVO> getCardFavorableList(Page page, CardFavorableRecord cardFavorableRecord);
/**
* 统计优惠券数量
* @return

View File

@ -8,6 +8,7 @@ import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorable;
import com.fuint.business.marketingActivity.cardFavorable.mapper.CardFavorableRecordMapper;
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord;
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableRecordService;
import com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableRecordVO;
import com.fuint.common.util.TokenUtil;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.stereotype.Service;
@ -66,9 +67,16 @@ public class CardFavorableRecordServiceImpl extends ServiceImpl<CardFavorableRec
return page1;
}
/**
* 统计优惠券使用数量
*/
@Override
public IPage<CardFavorableRecordVO> getCardFavorableList(Page page, CardFavorableRecord cardFavorableRecord) {
return cardFavorableRecordMapper.getCardFavorableList(page,cardFavorableRecord);
}
/**
* 统计优惠券使用数量
*/
/**
*
* @return

View File

@ -0,0 +1,35 @@
package com.fuint.business.marketingActivity.cardFavorable.vo;
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord;
import lombok.Data;
@Data
public class CardFavorableRecordVO extends CardFavorableRecord {
private String storeName;
/**
* 优惠券名称
*/
private String cardFavorableName;
/**
* 优惠券类型
*/
private String type;
/**
* 满减金额
*/
private String fullDeduction;
/**
* 优惠金额
*/
private String discountAmount;
/**
* 可用时段
*
*/
private String availablePeriod;
/**
* 可用油品
*/
private String oilType;
private String oilName;
}

View File

@ -4,6 +4,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.marketingActivity.cardFule.entity.CardFuelChange;
import com.fuint.business.marketingActivity.cardFule.service.CardFuelChangeService;
import com.fuint.business.marketingActivity.cardFule.vo.CardFuelChangeVo;
import com.fuint.business.order.entity.CardBalanceChange;
import com.fuint.business.order.vo.CardBalanceChangeVo;
import com.fuint.framework.web.BaseController;
import com.fuint.framework.web.ResponseObject;
import org.springframework.web.bind.annotation.*;
@ -42,8 +45,15 @@ public class CardFuelChangeController extends BaseController {
IPage< CardFuelChange> iPageList = this.cardFuelChangeService.queryByPage(page, cardFuelChange);
return getSuccessResult(iPageList);
}
@GetMapping("getFuelRecordList")
public ResponseObject getFuelRecordList(CardFuelChange cardFuelChange,
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
Page page =new Page(pageNo,pageSize);
IPage<CardFuelChangeVo> list = cardFuelChangeService.getFuelRecordList(page,cardFuelChange);
return getSuccessResult(list);
}
/**
* 通过主键查询单条数据

View File

@ -41,10 +41,10 @@ public class CardFuelChange extends BaseEntity {
* 油量变化值
*/
private Double balance;
/**
* 创建时间
*/
private Date createTime;
// /**
// * 创建时间
// */
// private Date createTime;
/**
* 创建人
*/
@ -70,6 +70,16 @@ public class CardFuelChange extends BaseEntity {
*/
private String unit;
/**
* 余额变化之后的值
*/
private Double afterTheChange;
/**
* 订单编号
*/
private String orderNo;

View File

@ -3,6 +3,7 @@ package com.fuint.business.marketingActivity.cardFule.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.marketingActivity.cardFule.entity.CardFuelChange;
import com.fuint.business.marketingActivity.cardFule.vo.CardFuelChangeVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Pageable;
import java.util.List;
@ -31,6 +32,7 @@ public interface CardFuelChangeMapper {
* @return 对象列表
*/
IPage<CardFuelChange> queryAllByLimit(@Param("page") Page page, CardFuelChange cardFuelChange);
IPage<CardFuelChangeVo> getFuelRecordList(@Param("page") Page page,@Param("cardFuelChange") CardFuelChange cardFuelChange);
/**
* 统计总行数

View File

@ -127,6 +127,27 @@
</if>
</where>
</select>
<select id="getFuelRecordList"
resultType="com.fuint.business.marketingActivity.cardFule.vo.CardFuelChangeVo">
select
ms.name storeName,
cfc.oil_type oilType,
cfc.change_type changeType,
cfc.balance balance,
cfc.order_no orderNo,
cfc.from_type from_type,
cfc.create_time createTime
from card_fuel_change cfc
left join mt_store ms on ms.id = cfc.store_id
<where>
<if test="cardFuelChange.userId != null">
and cfc.user_id = #{cardFuelChange.userId}
</if>
<if test="cardFuelChange.storeId != null">
and cfc.store_id = #{cardFuelChange.storeId}
</if>
</where>
</select>
<!--新增所有列-->
<insert id="insert" keyProperty="id" useGeneratedKeys="true">

View File

@ -3,6 +3,7 @@ package com.fuint.business.marketingActivity.cardFule.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.marketingActivity.cardFule.entity.CardFuelChange;
import com.fuint.business.marketingActivity.cardFule.vo.CardFuelChangeVo;
import io.lettuce.core.dynamic.annotation.Param;
@ -31,6 +32,9 @@ public interface CardFuelChangeService {
*/
IPage<CardFuelChange> queryByPage(@Param("page") Page page, CardFuelChange cardFuelChange);
IPage<CardFuelChangeVo> getFuelRecordList(@Param("page") Page page, CardFuelChange cardFuelChange);
/**
* 新增数据
*

View File

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.marketingActivity.cardFule.entity.CardFuelChange;
import com.fuint.business.marketingActivity.cardFule.mapper.CardFuelChangeMapper;
import com.fuint.business.marketingActivity.cardFule.service.CardFuelChangeService;
import com.fuint.business.marketingActivity.cardFule.vo.CardFuelChangeVo;
import org.springframework.stereotype.Service;
import com.fuint.common.util.TokenUtil;
import io.lettuce.core.dynamic.annotation.Param;
@ -50,6 +51,14 @@ public class CardFuelChangeServiceImpl implements CardFuelChangeService {
return this.cardFuelChangeMapper.queryAllByLimit(page, cardFuelChange);
}
@Override
public IPage<CardFuelChangeVo> getFuelRecordList(@Param("page") Page page, CardFuelChange cardFuelChange) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
cardFuelChange.setStoreId(nowAccountInfo.getStoreId());
return this.cardFuelChangeMapper.getFuelRecordList(page, cardFuelChange);
}
/**
* 新增数据
*

View File

@ -0,0 +1,9 @@
package com.fuint.business.marketingActivity.cardFule.vo;
import com.fuint.business.marketingActivity.cardFule.entity.CardFuelChange;
import lombok.Data;
@Data
public class CardFuelChangeVo extends CardFuelChange {
private String storeName;
}

View File

@ -16,6 +16,7 @@ import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.Serializable;
import java.util.List;
@ -49,6 +50,16 @@ public class CardValueRecordController extends BaseController {
return getSuccessResult(this.cardValueRecordService.page(page, new QueryWrapper<>(cardValueRecord)));
}
/**
*导出订单
*@paramresponse
*/
@PostMapping("exportExcel")
public void exportExcel(HttpServletResponse response,@RequestBody CardValueRecord cardValueRecord) {
this.cardValueRecordService.export(response, cardValueRecord);
}
/**
* 通过主键查询单条数据
*

View File

@ -6,8 +6,11 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.integral.entity.IntegralDetail;
import com.fuint.business.marketingActivity.cardValue.dto.CardValueRecordDTO;
import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord;
import com.fuint.business.marketingActivity.cardValue.vo.Excel.CardValueRecordExcel;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 储值充值表(CardValueRecord)表数据库访问层
*
@ -21,6 +24,8 @@ public interface CardValueRecordMapper extends BaseMapper<CardValueRecord> {
IPage<CardValueRecordDTO> selectAllRecord(@Param("page") Page page, @Param("cardValueRecord") CardValueRecordDTO cardValueRecord);
List<CardValueRecordExcel> selectListExport(@Param("cardValueRecord") CardValueRecord cardValueRecord);
}

View File

@ -83,6 +83,46 @@
</where>
ORDER BY combined_result.createTime
</select>
<select id="selectListExport"
resultType="com.fuint.business.marketingActivity.cardValue.vo.Excel.CardValueRecordExcel">
select
name name,
mobile mobile,
real_name realName,
staff_mobile staffMobile,
bid_balance bidBalance,
recharge_balance rechargeBalance,
gift_balance giftBalance,
payment_type paymentType,
CASE
WHEN pay_status = 'paid' THEN '已支付'
WHEN pay_status = 'payFail' THEN '支付失败'
WHEN pay_status = 'unpaid' THEN '未支付'
ELSE '未知'
END AS payStatus,
remark remark,
fringe_benefit fringeBenefit,
create_time createTime
FROM card_value_record
<where>
<if test="cardValueRecord.mtUserId != null">
and mt_user_id = #{cardValueRecord.mtUserId}
</if>
<if test="cardValueRecord.storeId != null">
and store_id = #{cardValueRecord.storeId}
</if>
<if test="cardValueRecord.mtStaffId != null">
and mt_staff_id = #{cardValueRecord.mtStaffId}
</if>
<if test="cardValueRecord.mobile != null">
and mobile = #{cardValueRecord.mobile}
</if>
<if test="cardValueRecord.paymentType != null">
and payment_type = #{cardValueRecord.paymentType}
</if>
</where>
</select>
</mapper>

View File

@ -9,6 +9,8 @@ import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord;
import com.fuint.business.petrolStationManagement.entity.OilGun;
import io.lettuce.core.dynamic.annotation.Param;
import javax.servlet.http.HttpServletResponse;
/**
* 储值充值表(CardValueRecord)表服务接口
*
@ -44,5 +46,5 @@ public interface CardValueRecordService extends IService<CardValueRecord> {
IPage<CardValueRecordDTO> selectAllRecord(@Param("page") Page page, CardValueRecordDTO cardValueRecord);
void export(HttpServletResponse response, CardValueRecord cardValueRecord);
}

View File

@ -1,6 +1,7 @@
package com.fuint.business.marketingActivity.cardValue.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.excel.EasyExcel;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -16,6 +17,7 @@ import com.fuint.business.marketingActivity.cardValue.dto.CardValueRecordDTO;
import com.fuint.business.marketingActivity.cardValue.mapper.CardValueRecordMapper;
import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord;
import com.fuint.business.marketingActivity.cardValue.service.CardValueRecordService;
import com.fuint.business.marketingActivity.cardValue.vo.Excel.CardValueRecordExcel;
import com.fuint.business.order.entity.CardBalanceChange;
import com.fuint.business.order.service.CardBalanceChangeService;
import com.fuint.business.userManager.entity.LJUser;
@ -33,6 +35,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.*;
@ -340,6 +343,7 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
@Override
public IPage<CardValueRecordDTO> selectCardRecord(@Param("page") Page page, CardValueRecordDTO cardValueRecord) {
cardValueRecord.setStoreId(TokenUtil.getNowAccountInfo().getStoreId());
cardValueRecord.setMtUserId(TokenUtil.getNowAccountInfo().getId());
return this.cardValueRecordMapper.selectCardRecord(page, cardValueRecord);
@ -359,6 +363,31 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
return this.cardValueRecordMapper.selectAllRecord(page, cardValueRecord);
}
public void export(HttpServletResponse response, CardValueRecord cardValueRecord) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
Integer storeId = nowAccountInfo.getStoreId();
cardValueRecord.setStoreId(storeId);
List<CardValueRecordExcel> cashierOrderExcels = baseMapper.selectListExport(cardValueRecord);
// 设置文件名字
String fileName = "订单"+System.currentTimeMillis() + ".xlsx";
// 设置响应头信息
response.setContentType("application/vnd.ms-excel");
response.setCharacterEncoding("utf-8");
response.setHeader("Content-disposition", "attachment;filename=demo.xlsx");
try{
// 写入文件数据
EasyExcel.write(response.getOutputStream(), CardValueRecordExcel.class).sheet("download").doWrite(cashierOrderExcels);
}catch(Exception e) {
e.printStackTrace();
throw new RuntimeException(e);
}
}
}

View File

@ -0,0 +1,59 @@
package com.fuint.business.marketingActivity.cardValue.vo.Excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord;
import lombok.Data;
@Data
public class CardValueRecordExcel {
@ExcelProperty("会员名称")
@ColumnWidth(15)
private String name;
@ExcelProperty("会员手机号")
@ColumnWidth(15)
private String mobile;
@ExcelProperty("操作人")
@ColumnWidth(15)
private String realName;
@ExcelProperty("操作人手机号")
@ColumnWidth(15)
private String staffMobile;
@ExcelProperty("储值卡面值")
@ColumnWidth(15)
private String bidBalance;
@ExcelProperty("储值卡实售金额")
@ColumnWidth(15)
private String rechargeBalance;
@ExcelProperty("储值卡赠送金额")
@ColumnWidth(15)
private String giftBalance;
@ExcelProperty("支付方式")
@ColumnWidth(15)
private String paymentType;
@ExcelProperty("支付状态")
@ColumnWidth(15)
private String payStatus;
@ExcelProperty("充值备注")
@ColumnWidth(15)
private String remark;
@ExcelProperty("附加福利")
@ColumnWidth(15)
private String fringeBenefit;
@ExcelProperty("创建时间")
@ColumnWidth(15)
private String createTime;
}

View File

@ -0,0 +1,34 @@
package com.fuint.business.order.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.order.entity.CardBalanceChange;
import com.fuint.business.order.entity.CashierOrder;
import com.fuint.business.order.service.CardBalanceChangeService;
import com.fuint.business.order.service.CashierOrderService;
import com.fuint.business.order.vo.CardBalanceChangeVo;
import com.fuint.framework.web.BaseController;
import com.fuint.framework.web.ResponseObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/business/CardBalanceChange")
public class CardBalanceChangeController extends BaseController {
@Autowired
private CardBalanceChangeService cardBalanceChangeService;
@GetMapping("getCardRecordList")
public ResponseObject getCardRecordList(CardBalanceChange cardBalanceChange,
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
Page page =new Page(pageNo,pageSize);
IPage<CardBalanceChangeVo> list = cardBalanceChangeService.getCardRecordList(page,cardBalanceChange);
return getSuccessResult(list);
}
}

View File

@ -9,6 +9,8 @@ import com.fuint.framework.web.ResponseObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
/**
* 收银员订单信息 controller层
*/
@ -34,6 +36,15 @@ public class CashierOrderController extends BaseController {
return getSuccessResult(list);
}
/**
* 导出订单
* @param response
*/
@PostMapping("exportExcel")
public void exportExcel(HttpServletResponse response,@RequestBody CashierOrder order) {
this.cashierOrderService.export(response, order);
}
/**
* 根据id查询收银台订单详情
* @param id

View File

@ -4,12 +4,14 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.order.entity.LJOrder;
import com.fuint.business.order.service.LJOrderService;
import com.fuint.business.order.vo.LJOrderVo;
import com.fuint.framework.web.BaseController;
import com.fuint.framework.web.ResponseObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;
/**
@ -37,6 +39,31 @@ public class LJOrderController extends BaseController {
return getSuccessResult(list);
}
/**
*导出订单
*@paramresponse
*/
@PostMapping("exportExcel")
public void exportExcel(HttpServletResponse response,@RequestBody LJOrder order) {
this.orderService.export(response, order);
}
/**
* 个人订单查询
* @param order
* @param pageNo
* @param pageSize
* @return
*/
@GetMapping("/getMtOrderList")
public ResponseObject getMtOrderList(LJOrder order,
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
Page page =new Page(pageNo,pageSize);
IPage<LJOrderVo> list = orderService.getMtOrderList(page,order);
return getSuccessResult(list);
}
/**
* 根据订单号查询订单信息
* @param map

View File

@ -12,6 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
@ -37,6 +38,15 @@ public class OilOrderController extends BaseController {
return getSuccessResult(list);
}
/**
*导出订单
*@paramresponse
*/
@PostMapping("exportExcel")
public void exportExcel(HttpServletResponse response, @RequestBody OilOrder order) {
this.orderService.export(response, order);
}
/**
* 根据userId查询会员订单信息
* @param order
@ -53,6 +63,23 @@ public class OilOrderController extends BaseController {
return getSuccessResult(list);
}
/**
* 根据userId查询会员订单信息 传参
* @param order
* @param pageNo
* @param pageSize
* @return
*/
@GetMapping("/userOrders2")
public ResponseObject oilOrderList2(OilOrder order,
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
Page page =new Page(pageNo,pageSize);
IPage<OilOrderVo> list = orderService.selectOilOrderByUserId2(page,order);
return getSuccessResult(list);
}
/**
* 根据id查询油品订单信息
* @param id

View File

@ -51,5 +51,16 @@ public class CardBalanceChange extends BaseEntity implements Serializable {
*/
private Double balance;
/**
* 余额变化之后的值
*/
private Double afterTheChange;
/**
* 订单编号
*/
private String orderNo;
}

View File

@ -1,7 +1,15 @@
package com.fuint.business.order.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.order.entity.CardBalanceChange;
import com.fuint.business.order.entity.CashierOrder;
import com.fuint.business.order.vo.CardBalanceChangeVo;
import org.apache.ibatis.annotations.Param;
public interface CardBalanceChangeMapper extends BaseMapper<CardBalanceChange> {
IPage<CardBalanceChangeVo> getCardRecordList(@Param("page")Page page, @Param("cardBalanceChange") CardBalanceChange cardBalanceChange);
}

View File

@ -5,8 +5,11 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.order.entity.CashierOrder;
import com.fuint.business.order.vo.CashierOrderVo;
import com.fuint.business.order.vo.Excel.CashierOrderExcel;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface CashierOrderMapper extends BaseMapper<CashierOrder> {
/**
@ -17,6 +20,9 @@ public interface CashierOrderMapper extends BaseMapper<CashierOrder> {
*/
public IPage<CashierOrder> selectCashierOrderList(Page page, @Param("order") CashierOrder order);
List<CashierOrderExcel> selectCashierOrderListExport(@Param("order") CashierOrder order);
/**
* 根据id查询收银台订单详情
* @param id

View File

@ -4,8 +4,12 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.order.entity.LJOrder;
import com.fuint.business.order.vo.Excel.LJOrderExcel;
import com.fuint.business.order.vo.LJOrderVo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 订单信息 Mapper层
*/
@ -17,4 +21,9 @@ public interface LJOrderMapper extends BaseMapper<LJOrder> {
* @return
*/
public IPage<LJOrder> selectOrderList(Page page, @Param("order") LJOrder order);
List<LJOrderExcel> selectOrderListExcel(@Param("order") LJOrder order);
IPage<LJOrderVo> getMtOrderList(Page page, @Param("order") LJOrder order);
}

View File

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.order.entity.OilOrder;
import com.fuint.business.order.vo.Excel.OilOrderExcel;
import com.fuint.business.order.vo.OilOrderVo;
import org.apache.ibatis.annotations.Param;
@ -22,6 +23,8 @@ public interface OilOrderMapper extends BaseMapper<OilOrder> {
*/
public IPage<OilOrder> selectOilOrderList(Page page, @Param("order") OilOrder order);
List<OilOrderExcel> selectOilOrderListExcel(@Param("order") OilOrder order);
/**
* 根据userid查询油品订单信息
* @param page
@ -30,6 +33,8 @@ public interface OilOrderMapper extends BaseMapper<OilOrder> {
*/
public IPage<OilOrder> selectOilOrderByUserId(Page page, @Param("order") OilOrder order);
public IPage<OilOrderVo> selectOilOrderByUserId2(Page page, @Param("order") OilOrder order);
/**
* 根据订单号模糊查询油品订单信息
* @param orderNo

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.fuint.business.order.mapper.CardBalanceChangeMapper">
<select id="getCardRecordList" resultType="com.fuint.business.order.vo.CardBalanceChangeVo">
select
ms.name storeName,
cbc.change_type changeType,
cbc.from_type fromType,
cbc.after_the_change afterTheChange,
cbc.order_no orderNo,
cbc.from_type fromType,
cbc.create_time createTime,
cbc.balance balance
from
card_balance_change cbc
left join mt_store ms on ms.id = cbc.store_id
<where>
<if test="cardBalanceChange.userId != null">
and cbc.user_id = #{cardBalanceChange.userId}
</if>
<if test="cardBalanceChange.storeId != null">
and cbc.store_id = #{cardBalanceChange.storeId}
</if>
</where>
</select>
</mapper>

View File

@ -33,4 +33,46 @@
where co.id = #{id};
</select>
<select id="selectCashierOrderListExport" resultType="com.fuint.business.order.vo.Excel.CashierOrderExcel">
select
st.real_name realName,
st.mobile,
co.order_no orderNo,
co.amount amount,
co.pay_amount payAmount,
co.oil_order_amount oilOrderAmount,
co.goods_order_amount goodsOrderAmount,
co.pay_user payUser,
CASE
WHEN co.status = 'paid' THEN '已支付'
WHEN co.status = 'payFail' THEN '支付失败'
WHEN co.status = 'unpaid' THEN '未支付'
ELSE '未知'
END AS status,
co.pay_time payTime
from cashier_order co
left join mt_staff st on co.staff_id = st.id
<where>
co.store_id = #{order.storeId}
<if test="order.staffId != null and order.staffId != ''">
and co.staff_id = #{order.staffId}
</if>
<if test="order.orderNo != null and order.orderNo != ''">
and order_no like concat('%', #{order.orderNo}, '%')
</if>
<if test="order.terminal != null and order.terminal != ''">
and terminal like concat('%', #{order.terminal}, '%')
</if>
<if test="order.params.beginTime != null and order.params.beginTime != ''"><!-- 开始时间检索 -->
and date_format(pay_time,'%y%m%d') &gt;= date_format(#{order.params.beginTime},'%y%m%d')
</if>
<if test="order.params.endTime != null and order.params.endTime != ''"><!-- 结束时间检索 -->
and date_format(pay_time,'%y%m%d') &lt;= date_format(#{order.params.endTime},'%y%m%d')
</if>
</where>
</select>
</mapper>

View File

@ -29,4 +29,70 @@
</if>
</where>
</select>
</mapper>
<select id="getMtOrderList" resultType="com.fuint.business.order.vo.LJOrderVo">
select
ms.name storeName,
oo.create_time createTime,
oo.amount amount,
oo.pay_amount payAmount,
oo.goods_num goodsNum,
oo.pay_type payType,
oo.order_no orderNo
from mt_order oo
left join mt_store ms on ms.id = oo.store_id
<where>
<if test="order.userId != null">
and oo.user_id = #{order.userId}
</if>
<if test="order.storeId != null">
and oo.store_id = #{order.storeId}
</if>
</where>
</select>
<select id="selectOrderListExcel" resultType="com.fuint.business.order.vo.Excel.LJOrderExcel">
select
st.real_name realName,
st.mobile,
oo.terminal terminal,
oo.order_no orderNo,
oo.amount amount,
oo.discount discount,
oo.goods_num goodsNum,
oo.pay_amount payAmount,
oo.pay_user payUser,
oo.pay_type payType,
oo.pay_time payTime,
CASE
WHEN oo.status = 'paid' THEN '已支付'
WHEN oo.status = 'payFail' THEN '支付失败'
WHEN oo.status = 'unpaid' THEN '未支付'
ELSE '未知'
END AS status
from mt_order oo
left join mt_staff st on oo.staff_id = st.id
<where>
oo.store_id = #{order.storeId}
<if test="order.staffId != null and order.staffId != ''">
and staff_id = #{order.staffId}
</if>
<if test="order.payType != null and order.payType != ''">
and pay_type = #{order.payType}
</if>
<if test="order.orderNo != null and order.orderNo != ''">
and order_no like concat('%', #{order.orderNo}, '%')
</if>
<if test="order.payUser != null and order.payUser != ''">
and pay_user like concat('%', #{order.payUser}, '%')
</if>
<if test="order.params.beginTime != null and order.params.beginTime != ''"><!-- 开始时间检索 -->
and date_format(oo.create_time,'%y%m%d') &gt;= date_format(#{order.params.beginTime},'%y%m%d')
</if>
<if test="order.params.endTime != null and order.params.endTime != ''"><!-- 结束时间检索 -->
and date_format(oo.create_time,'%y%m%d') &lt;= date_format(#{order.params.endTime},'%y%m%d')
</if>
</where>
</select>
</mapper>

View File

@ -76,4 +76,91 @@
</where>
</select>
<select id="selectOilOrderByUserId2" resultType="com.fuint.business.order.vo.OilOrderVo">
select
ms.name storeName,
onu.oil_name oilName,
oo.create_time createTime,
oo.pay_type payType,
oo.terminal terminal,
oo.oil_gun_num oilGunNum,
oo.order_amount orderAmount,
oo.discount_amount discountAmount,
oo.pay_amount payAmount,
oo.pay_type payType,
oo.order_no orderNo,
oo.order_type orderType
from oil_order oo
left join oil_name onu on oo.oils = onu.id
left join mt_store ms on ms.id = oo.store_id
<where>
<if test="order.userId != null">
and user_id = #{order.userId}
</if>
<if test="order.storeId != null">
and store_id = #{order.storeId}
</if>
</where>
</select>
<select id="selectOilOrderListExcel" resultType="com.fuint.business.order.vo.Excel.OilOrderExcel">
select
st.real_name realName,
st.mobile,
co.terminal terminal,
onu.oil_name oilName,
co.order_no orderNo,
CONCAT(onu.oil_name ,'/', co.oil_gun_num) oilGunNum,
co.order_amount orderAmount,
co.discount_amount discountAmount,
co.pay_amount payAmount,
co.pay_user payUser,
CASE
WHEN co.order_status = 'paid' THEN '已支付'
WHEN co.order_status = 'payFail' THEN '支付失败'
WHEN co.order_status = 'unpaid' THEN '未支付'
ELSE '未知'
END AS orderStatus,
co.invoicing invoicing,
co.pay_time payTime
from oil_order co
left join oil_name onu on co.oils = onu.id
left join mt_staff st on co.staff_id = st.id
<where>
co.store_id = #{order.storeId}
<if test="order.userId != null and order.userId != ''">
and user_id = #{order.userId}
</if>
<if test="order.staffId != null and order.staffId != ''">
and staff_id = #{order.staffId}
</if>
<if test="order.terminal != null and order.terminal != ''">
and terminal = #{order.terminal}
</if>
<if test="order.oilGunNum != null and order.oilGunNum != ''">
and oil_gun_num = #{order.oilGunNum}
</if>
<if test="order.payType != null and order.payType != ''">
and pay_type = #{order.payType}
</if>
<if test="order.orderStatus != null and order.orderStatus != ''">
and order_status != #{order.orderStatus}
</if>
<if test="order.orderNo != null and order.orderNo != ''">
and order_no like concat('%', #{order.orderNo}, '%')
</if>
<if test="order.payUser != null and order.payUser != ''">
and pay_user like concat('%', #{order.payUser}, '%')
</if>
<if test="order.params.beginTime != null and order.params.beginTime != ''"><!-- 开始时间检索 -->
and date_format(pay_time,'%y%m%d') &gt;= date_format(#{order.params.beginTime},'%y%m%d')
</if>
<if test="order.params.endTime != null and order.params.endTime != ''"><!-- 结束时间检索 -->
and date_format(pay_time,'%y%m%d') &lt;= date_format(#{order.params.endTime},'%y%m%d')
</if>
</where>
</select>
</mapper>

View File

@ -1,7 +1,11 @@
package com.fuint.business.order.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fuint.business.order.entity.CardBalanceChange;
import com.fuint.business.order.entity.CashierOrder;
import com.fuint.business.order.vo.CardBalanceChangeVo;
public interface CardBalanceChangeService extends IService<CardBalanceChange> {
/**
@ -10,4 +14,8 @@ public interface CardBalanceChangeService extends IService<CardBalanceChange> {
* @return
*/
public int insertCardBalance(CardBalanceChange cardBalanceChange);
IPage<CardBalanceChangeVo> getCardRecordList(Page page, CardBalanceChange cardBalanceChange);
}

View File

@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fuint.business.order.entity.CashierOrder;
import javax.servlet.http.HttpServletResponse;
/**
* 收银员订单信息 业务层
*/
@ -17,6 +19,8 @@ public interface CashierOrderService extends IService<CashierOrder> {
*/
public IPage<CashierOrder> selectCashierOrderList(Page page, CashierOrder order);
void export(HttpServletResponse response, CashierOrder order);
/**
* 根据id查询商品订单信息
* @param id

View File

@ -4,6 +4,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fuint.business.order.entity.LJOrder;
import com.fuint.business.order.vo.LJOrderVo;
import javax.servlet.http.HttpServletResponse;
/**
* 订单信息 业务层
@ -17,6 +20,12 @@ public interface LJOrderService extends IService<LJOrder> {
*/
public IPage<LJOrder> selectOrderList(Page page, LJOrder order);
void export(HttpServletResponse response, LJOrder order);
public IPage<LJOrderVo> getMtOrderList(Page page, LJOrder order);
/**
* 根据订单号查询商品订单信息
* @param orderNo

View File

@ -4,9 +4,11 @@ import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fuint.business.order.entity.CashierOrder;
import com.fuint.business.order.entity.OilOrder;
import com.fuint.business.order.vo.OilOrderVo;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
@ -22,6 +24,9 @@ public interface OilOrderService extends IService<OilOrder> {
*/
public IPage<OilOrder> selectOilOrderList(Page page, OilOrder order);
void export(HttpServletResponse response, OilOrder order);
/**
* 根据条件分页查询油品订单信息
* @param page
@ -29,6 +34,7 @@ public interface OilOrderService extends IService<OilOrder> {
* @return
*/
public IPage<OilOrder> selectOilOrderByUserId(Page page, OilOrder order);
public IPage<OilOrderVo> selectOilOrderByUserId2(Page page, OilOrder order);
/**
* 根据订单号查询油品订单信息

View File

@ -1,9 +1,13 @@
package com.fuint.business.order.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.order.entity.CardBalanceChange;
import com.fuint.business.order.entity.CashierOrder;
import com.fuint.business.order.mapper.CardBalanceChangeMapper;
import com.fuint.business.order.service.CardBalanceChangeService;
import com.fuint.business.order.vo.CardBalanceChangeVo;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.TokenUtil;
import org.springframework.stereotype.Service;
@ -18,4 +22,13 @@ public class CardBalanceChangeServiceImpl extends ServiceImpl<CardBalanceChangeM
int row = baseMapper.insert(cardBalanceChange);
return row;
}
@Override
public IPage<CardBalanceChangeVo> getCardRecordList(Page page, CardBalanceChange cardBalanceChange) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
Integer storeId = nowAccountInfo.getStoreId();
cardBalanceChange.setStoreId(storeId);
IPage<CardBalanceChangeVo> cardBalanceChangeVoIPage = baseMapper.getCardRecordList(page, cardBalanceChange);
return cardBalanceChangeVoIPage;
}
}

View File

@ -1,5 +1,6 @@
package com.fuint.business.order.service.impl;
import com.alibaba.excel.EasyExcel;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -8,10 +9,16 @@ import com.fuint.business.order.entity.CashierOrder;
import com.fuint.business.order.mapper.CashierOrderMapper;
import com.fuint.business.order.service.CashierOrderService;
import com.fuint.business.order.vo.CashierOrderVo;
import com.fuint.business.order.vo.Excel.CashierOrderExcel;
import com.fuint.business.petrolStationManagement.entity.OilTank;
import com.fuint.business.petrolStationManagement.vo.OilTankExcel;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.TokenUtil;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
@Service
public class CashierOrderServiceImpl extends ServiceImpl<CashierOrderMapper, CashierOrder> implements CashierOrderService {
@Override
@ -23,6 +30,32 @@ public class CashierOrderServiceImpl extends ServiceImpl<CashierOrderMapper, Cas
return cashierOrderIPage;
}
public void export(HttpServletResponse response, CashierOrder order) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
Integer storeId = nowAccountInfo.getStoreId();
order.setStoreId(storeId);
List<CashierOrderExcel> cashierOrderExcels = baseMapper.selectCashierOrderListExport(order);
// 设置文件名字
String fileName = "订单"+System.currentTimeMillis() + ".xlsx";
// 设置响应头信息
response.setContentType("application/vnd.ms-excel");
response.setCharacterEncoding("utf-8");
response.setHeader("Content-disposition", "attachment;filename=demo.xlsx");
try{
// 写入文件数据
EasyExcel.write(response.getOutputStream(), CashierOrderExcel.class).sheet("download").doWrite(cashierOrderExcels);
}catch(Exception e) {
e.printStackTrace();
throw new RuntimeException(e);
}
}
@Override
public CashierOrder queryCashierOrder(int id) {
CashierOrderVo cashierOrderVo = baseMapper.selectCashierOrderById(id);

View File

@ -1,5 +1,6 @@
package com.fuint.business.order.service.impl;
import com.alibaba.excel.EasyExcel;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -11,11 +12,16 @@ import com.fuint.business.convenienceSore.service.StockTrackService;
import com.fuint.business.order.entity.LJOrder;
import com.fuint.business.order.mapper.LJOrderMapper;
import com.fuint.business.order.service.LJOrderService;
import com.fuint.business.order.vo.Excel.LJOrderExcel;
import com.fuint.business.order.vo.LJOrderVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.TokenUtil;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
@Service
public class LJOrderServiceImpl extends ServiceImpl<LJOrderMapper, LJOrder> implements LJOrderService {
@Override
@ -27,6 +33,41 @@ public class LJOrderServiceImpl extends ServiceImpl<LJOrderMapper, LJOrder> impl
return ljOrderIPage;
}
public void export(HttpServletResponse response, LJOrder order) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
Integer storeId = nowAccountInfo.getStoreId();
order.setStoreId(storeId);
List<LJOrderExcel> lJOrderExcels = baseMapper.selectOrderListExcel(order);
// 设置文件名字
String fileName = "订单"+System.currentTimeMillis() + ".xlsx";
// 设置响应头信息
response.setContentType("application/vnd.ms-excel");
response.setCharacterEncoding("utf-8");
response.setHeader("Content-disposition", "attachment;filename=demo.xlsx");
try{
// 写入文件数据
EasyExcel.write(response.getOutputStream(), LJOrderExcel.class).sheet("download").doWrite(lJOrderExcels);
}catch(Exception e) {
e.printStackTrace();
throw new RuntimeException(e);
}
}
@Override
public IPage<LJOrderVo> getMtOrderList(Page page, LJOrder order) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
Integer storeId = nowAccountInfo.getStoreId();
order.setStoreId(storeId);
IPage<LJOrderVo> ljOrderIPage = baseMapper.getMtOrderList(page, order);
return ljOrderIPage;
}
@Override
public LJOrder selectGoodsOrder(String orderNo) {
QueryWrapper queryWrapper = new QueryWrapper<>();

View File

@ -1,6 +1,7 @@
package com.fuint.business.order.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@ -16,6 +17,7 @@ import com.fuint.business.convenienceSore.service.LJGoodsService;
import com.fuint.business.order.entity.*;
import com.fuint.business.order.mapper.OilOrderMapper;
import com.fuint.business.order.service.*;
import com.fuint.business.order.vo.Excel.OilOrderExcel;
import com.fuint.business.order.vo.OilOrderVo;
import com.fuint.business.petrolStationManagement.entity.OilName;
import com.fuint.business.petrolStationManagement.entity.OilNumber;
@ -40,6 +42,7 @@ import com.fuint.system.config.service.SysConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletResponse;
import java.text.SimpleDateFormat;
import java.util.*;
@ -75,6 +78,31 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
return oilOrderIPage;
}
public void export(HttpServletResponse response, OilOrder order) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
Integer storeId = nowAccountInfo.getStoreId();
order.setStoreId(storeId);
List<OilOrderExcel> cashierOrderExcels = baseMapper.selectOilOrderListExcel(order);
// 设置文件名字
// String fileName = "订单"+System.currentTimeMillis() + ".xlsx";
// 设置响应头信息
response.setContentType("application/vnd.ms-excel");
response.setCharacterEncoding("utf-8");
response.setHeader("Content-disposition", "attachment;filename=demo.xlsx");
try{
// 写入文件数据
EasyExcel.write(response.getOutputStream(), OilOrderExcel.class).sheet("download").doWrite(cashierOrderExcels);
}catch(Exception e) {
e.printStackTrace();
throw new RuntimeException(e);
}
}
@Override
public IPage<OilOrder> selectOilOrderByUserId(Page page, OilOrder order) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
@ -83,6 +111,14 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
return iPage;
}
@Override
public IPage<OilOrderVo> selectOilOrderByUserId2(Page page, OilOrder order) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
order.setStoreId(nowAccountInfo.getStoreId());
IPage<OilOrderVo> iPage = baseMapper.selectOilOrderByUserId2(page,order);
return iPage;
}
@Override
public OilOrder selectOilOrderByOrderNo(String orderNo) {
QueryWrapper queryWrapper = new QueryWrapper<>();

View File

@ -0,0 +1,9 @@
package com.fuint.business.order.vo;
import com.fuint.business.order.entity.CardBalanceChange;
import lombok.Data;
@Data
public class CardBalanceChangeVo extends CardBalanceChange {
private String storeName;
}

View File

@ -0,0 +1,63 @@
package com.fuint.business.order.vo.Excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.Data;
@Data
public class CashierOrderExcel {
// 员工姓名
@ExcelProperty("员工姓名")
private String realName;
// 员工手机号
@ExcelProperty("员工手机号")
@ColumnWidth(15)
private String mobile;
/**
* 订单号
*/
@ExcelProperty("订单号")
@ColumnWidth(15)
private String orderNo;
/**
*订单金额
*/
@ExcelProperty("订单金额")
@ColumnWidth(15)
private String amount;
/**
*实付金额
*/
@ExcelProperty("实付金额")
@ColumnWidth(15)
private String payAmount;
/**
* 油品金额
*/
@ExcelProperty("油品金额")
@ColumnWidth(15)
private String oilOrderAmount;
/**
* 商品金额
*/
@ExcelProperty("商品金额")
@ColumnWidth(15)
private String goodsOrderAmount;
/**
* 付款用户
*/
@ExcelProperty("付款用户")
@ColumnWidth(15)
private String payUser;
/**
* 状态
*/
@ExcelProperty("状态")
private String status;
/**
* 交易时间
*/
@ExcelProperty("交易时间")
@ColumnWidth(20)
private String payTime;
}

View File

@ -0,0 +1,58 @@
package com.fuint.business.order.vo.Excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.Data;
@Data
public class LJOrderExcel {
@ExcelProperty("员工姓名")
@ColumnWidth(15)
private String realName;
@ExcelProperty("员工手机号")
@ColumnWidth(15)
private String mobile;
@ExcelProperty("终端")
@ColumnWidth(15)
private String terminal;
@ExcelProperty("订单号")
@ColumnWidth(20)
private String orderNo;
@ExcelProperty("订单金额")
@ColumnWidth(15)
private String amount;
@ExcelProperty("优惠金额")
@ColumnWidth(15)
private String discount;
@ExcelProperty("商品数量")
@ColumnWidth(15)
private String goodsNum;
@ExcelProperty("实付金额")
@ColumnWidth(15)
private String payAmount;
@ExcelProperty("付款用户")
@ColumnWidth(15)
private String payUser;
@ExcelProperty("付款类型")
@ColumnWidth(15)
private String payType;
@ExcelProperty("交易时间")
@ColumnWidth(20)
private String payTime;
@ExcelProperty("支付状态")
@ColumnWidth(15)
private String status;
}

View File

@ -0,0 +1,55 @@
package com.fuint.business.order.vo.Excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.Data;
@Data
public class OilOrderExcel {
// 员工姓名
@ExcelProperty("员工姓名")
@ColumnWidth(15)
private String realName;
// 员工手机号
@ExcelProperty("员工手机号")
@ColumnWidth(15)
private String mobile;
@ExcelProperty("终端")
@ColumnWidth(15)
private String terminal;
@ExcelProperty("订单号")
@ColumnWidth(25)
private String orderNo;
@ExcelProperty(value = {"订单信息", "油品"})
@ColumnWidth(15)
private String oilGunNum;
@ExcelProperty(value = {"订单信息", "订单金额"})
@ColumnWidth(15)
private String orderAmount;
@ExcelProperty(value = {"订单信息", "优惠金额"})
@ColumnWidth(15)
private String discountAmount;
@ExcelProperty(value = {"付款信息", "实付金额"})
@ColumnWidth(15)
private String payAmount;
@ExcelProperty(value = {"付款信息", "付款用户"})
@ColumnWidth(15)
private String payUser;
@ExcelProperty(value = {"付款信息", "付款状态"})
@ColumnWidth(15)
private String orderStatus;
@ExcelProperty("开票标识")
@ColumnWidth(15)
private String invoicing ;
@ExcelProperty("交易时间")
@ColumnWidth(20)
private String payTime;
}

View File

@ -0,0 +1,9 @@
package com.fuint.business.order.vo;
import com.fuint.business.order.entity.LJOrder;
import lombok.Data;
@Data
public class LJOrderVo extends LJOrder {
private String storeName;
}

View File

@ -7,4 +7,7 @@ import lombok.Data;
public class OilOrderVo extends OilOrder {
// 油品单价
private Double oilPrice;
//
private String storeName;
private String oilName;
}

View File

@ -30,6 +30,7 @@ public class AccountInfo implements Serializable {
private Integer merchantId;
private String merchantName;
private Integer storeId;
private Integer chainStoreId;
private String storeName;
private Integer staffId;
//部门主键

View File

@ -160,10 +160,11 @@ public class AccountServiceImpl extends ServiceImpl<TAccountMapper, TAccount> im
accountInfo.setMerchantName(mtMerchant.getName());
}
}
if (account.getStoreId() != null && account.getStoreId() > 0) {
if (account.getStoreId() != null && account.getStoreId() >= 0) {
MtStore mtStore = mtStoreMapper.selectById(account.getStoreId());
if (mtStore != null) {
accountInfo.setStoreName(mtStore.getName());
accountInfo.setChainStoreId(mtStore.getChainStoreId());
}
}
return accountInfo;

View File

@ -3,8 +3,6 @@ module.exports = {
// baseUrl: 'https://vue.ruoyi.vip/prod-api',
baseUrl: 'http://192.168.0.196:8080/',
// baseUrl: 'http://192.168.1.6:8008/',
// baseUrl: 'http://192.168.1.5:8002/cdJdc',
imagesUrl: 'http://www.nuoyunr.com/lananRsc',
// 应用信息
appInfo: {

View File

@ -113,6 +113,13 @@
"navigationStyle": "custom"
}
},
{
"path": "PointsGoodsDetails/PointsGoodsDetails",
"style": {
"navigationBarTitleText": "积分订单详情",
"navigationStyle": "custom"
}
},
{
"path": "Pointsdetail/Pointsdetail",
"style": {

View File

@ -98,9 +98,6 @@
<view class="juanniu" @click="goOil()">
<view class="">一键加油</view>
</view>
</view>
<view style="height: 88px; width: 100%;"></view>
</view>
@ -190,7 +187,7 @@
tabbar
},
methods: {
// t
// t
isExistStoreId() {
if (uni.getStorageSync("inviteStoreId") != "") {
this.getStore(uni.getStorageSync("inviteStoreId"));
@ -649,4 +646,4 @@
}
</style>
</style>

View File

@ -59,7 +59,7 @@
<view class="inputkuang" @click="show = true">
<view class="sbox"></view>
<view class="sbox" style="text-align: center;font-weight: bold;">{{value}}</view>
<view class="sbox-hui">{{value}}L</view>
<view class="sbox-hui">{{liters}}L</view>
</view>
<view class="wrap-box">
<view class="box-oil1" :class=" {'xz' :aindex == index }" @click="getAIndex(index,item)"
@ -112,6 +112,7 @@
data() {
return {
value: '',
liters:"",
show: false,
pic: 0,
hindex: 0,
@ -344,7 +345,8 @@
},
valChange(val) {
// value+=
this.value += val;
this.value += val;
this.liters = (this.value/this.oilPrice).toFixed(2)
console.log(this.value);
},
// 退

View File

@ -17,6 +17,7 @@
<image src="../../static/imgs/mjyh.png" v-if="item.name == '满减营销活动'"></image>
<image src="../../static/imgs/xryl.png" v-if="item.name == '新人有礼活动'"></image>
<image src="../../static/imgs/yqyl.png" v-if="item.name == '推荐有礼活动'"></image>
<image src="../../static/imgs/chongzhi.png" v-if="item.name == '储值卡充值活动'"></image>
</view>
<view class="box-size">
<view class="box-s-title">{{item.name || "活动标题"}}</view>

View File

@ -0,0 +1,322 @@
<template>
<view class="content">
<view class="container">
<view class="my-header">
<view class="my-icons" @click="goback"> <uni-icons type="left" size="16"></uni-icons> </view>
<view class="my-text">订单详情</view>
<view class="my-icons"></view>
</view>
<view class="top-box">
<view class="tiao"></view>
<view class="t-top">
<view class="top-icon">
<uni-icons type="checkmarkempty" color="#ffffff" size="18"></uni-icons>
</view>
<view class="">
<view class="title-lan">兑换成功</view>
<view class="size-hui">商品正在路上请耐心等待</view>
</view>
</view>
<view class="t-b-box">
<view class="goodsimg">
<image :src="baseUrl+form.coverImage" mode=""></image>
</view>
<view class="right-r-box">
<view class="-title">{{form.giftName}}</view>
<view class="b-bt">
<view class="h-size"> X{{form.exchangeQuantity}} </view>
<view class="r-size">
{{form.amount?"¥"+form.amount:''}}
{{form.amount && form.integral ? '+':''}}
{{form.integral ? form.integral+'积分':''}}
</view>
</view>
</view>
</view>
</view>
<view class="d-box">
<view class="t-top">订单信息</view>
<view class="gang-box">
<view class="left-size">订单编号</view>
<view class="right-size">{{form.orderNumber}}</view>
</view>
<view class="gang-box">
<view class="left-size">快递单号</view>
<view class="right-size" v-if="shippingType == '物流配送'">
<span>{{form.courierCompanies}}{{form.theTrackingNumber}}</span>
</view>
<view class="right-size" else>门店自提</view>
</view>
<view class="gang-box">
<view class="left-size">兑换时间</view>
<view class="right-size">{{form.createTime}}</view>
</view>
<view class="gang-box">
<view class="left-size">所需积分</view>
<view class="right-size">
{{form.amount?"¥"+form.amount:''}}
{{form.amount && form.integral ? '+':''}}
{{form.integral ? form.integral+'积分':''}}
</view>
</view>
</view>
<view class="d-box">
<view class="t-top">物流信息</view>
<u-steps :current="flag" direction="column">
<u-steps-item title="已下单" :desc="form.createTime">
</u-steps-item>
<u-steps-item title="已发货" :desc="form.shippingTime?form.shippingTime:'--'">
</u-steps-item>
<u-steps-item title="运输中"></u-steps-item>
</u-steps>
</view>
</view>
</view>
</template>
<script>
import config from '@/config'
import request from '../../utils/request'
export default {
data() {
return {
title: '',
baseUrl: config.baseUrl,
pointsGoodsDetails: '',
flag: '0',
form: {
orderNumber: '',
createTime: '',
shippingTime: '',
integral: '',
coverImage: '',
giftName: '',
exchangeQuantity: '',
exchangeMethod: '',
shippingType: '',
amount: '',
courierCompanies: '',
theTrackingNumber: ''
}
}
},
components: {
},
onShow() {
uni.$on('pointsGoodsDetails', (data) => {
this.pointsGoodsDetails = data
if (this.pointsGoodsDetails != null) {
// this.dataProcessing()
this.form.orderNumber = this.pointsGoodsDetails.orderNumber
this.form.createTime = this.pointsGoodsDetails.createTime
this.form.coverImage = this.pointsGoodsDetails.coverImage
this.form.giftName = this.pointsGoodsDetails.giftName
this.form.exchangeQuantity = this.pointsGoodsDetails.exchangeQuantity
this.form.exchangeMethod = this.pointsGoodsDetails.exchangeMethod
this.form.integral = this.pointsGoodsDetails.integral
this.form.amount = this.pointsGoodsDetails.amount
this.form.shippingTime = this.pointsGoodsDetails.shippingTime
this.form.shippingType = this.pointsGoodsDetails.shippingType
this.form.courierCompanies = this.pointsGoodsDetails.courierCompanies
this.form.theTrackingNumber = this.pointsGoodsDetails.theTrackingNumber
//
if (this.pointsGoodsDetails.orderStatus) {
let status = this.pointsGoodsDetails.orderStatus;
if (status == '已发货') {
this.flag = 1
} else if (status == '已完成') {
this.flag = 2
}
}
}
})
uni.$emit('pointsGoodsDetailsUn')
},
methods: {
goback() {
uni.navigateBack()
}
}
}
</script>
<style scoped lang="scss">
.content {
background: #f4f5f6;
}
.container {
width: 100%;
height: 100vh;
box-sizing: border-box;
padding-top: 88px;
}
.my-header {
width: 100%;
height: 88px;
background: #ffffff;
display: flex;
align-items: center;
justify-content: space-between;
color: #000;
box-sizing: border-box;
padding: 0px 15px;
padding-top: 40px;
.my-icons {
width: 20px;
}
position: fixed;
top: 0px;
}
.top-box {
width: 95%;
box-sizing: border-box;
background: #ffffff;
border-radius: 6px;
overflow: hidden;
margin: 10px auto;
}
.tiao {
width: 100%;
height: 4px;
background-color: #0082FC;
}
.t-top {
width: 95%;
box-sizing: border-box;
margin: 0 auto;
border-bottom: 1px solid #EEEEEE;
padding: 10px 0px;
display: flex;
align-items: center;
}
.top-icon {
width: 30px;
height: 30px;
border-radius: 50%;
background-color: #0082FC;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
color: #ffffff;
margin-right: 10px;
}
.size-hui {
font-size: 12px;
color: #999999;
}
.title-lan {
font-size: 20px;
font-weight: bold;
color: #0082FC;
margin-bottom: 5px;
}
.t-b-box {
width: 95%;
box-sizing: border-box;
margin: 0 auto;
padding: 10px 0px;
display: flex;
justify-content: space-between;
}
.goodsimg {
width: 90px;
height: 90px;
border-radius: 8px;
overflow: hidden;
image {
width: 100%;
height: 100%;
}
}
.right-r-box {
width: 70%;
}
.-title {
font-size: 16px;
font-weight: bold;
margin-bottom: 50px;
}
.b-bt {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
}
.h-size {
font-size: 14px;
color: #999999;
}
.r-size {
font-size: 14px;
font-weight: bold;
color: #FB3524;
}
.d-box {
width: 95%;
border-radius: 8px;
background: #ffffff;
box-sizing: border-box;
padding: 10px;
margin: 10px auto;
}
.gang-box {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 10px;
}
.left-size {
color: #666666;
}
.right-size {
color: #333333;
}
</style>

View File

@ -9,13 +9,19 @@
</view>
<!-- 顶部区域 -->
<view class="top-lanmu">
<view style="width: 90%;margin: 0 auto;">
<view class="title-bai">{{myPoints}}</view>
<view class="size-bai">
<uni-icons type="location" color="#ffffff" size="16"></uni-icons>
<text>{{storeName}}</text>
<!-- <uni-icons type="right" color="#ffffff" size="16"></uni-icons> -->
<view class="hby">
<view class="">
<view class="title-bai">{{myPoints}} <text style="font-size: 16px;">积分</text> </view>
<view class="size-bai">
<uni-icons type="location" color="#ffffff" size="16"></uni-icons>
<text>{{storeName}}</text>
<!-- <uni-icons type="right" color="#ffffff" size="16"></uni-icons> -->
</view>
</view>
<view class="tp">
<image src="../../static/imgs/hby.png" mode=""></image>
</view>
</view>
<view class="box-bai">
@ -44,49 +50,51 @@
<view class="">我的订单</view>
</view>
</view>
</view>
<view class="bai-center">
<scroll-view scroll-x="true" class="tap-top">
<view class="sz" @click="transferIndex(-1)">
<view class="box" :class="{'xztap': qhindex === -1}">全部</view>
<view class="gang" v-if="qhindex === -1"></view>
</view>
<view class="sz" v-for="(item, index) in categoryList" :key="index"
@click="transferIndex(index,item.id)">
<view class="box" :class="{'xztap': qhindex === index}">{{item.categoryName}}</view>
<view class="gang" v-if="qhindex === index"></view>
</view>
</scroll-view>
<view class="wrap-box">
<view class="box-goods" v-for="(item,index) in integralGiftList" :key="index"
@click="godetails(item)">
<view class="goods-img">
<image :src="baseUrl+item.coverImage" mode=""></image>
<view class="bai-center">
<scroll-view scroll-x="true" class="tap-top">
<view class="sz" @click="transferIndex(-1)">
<view class="box" :class="{'xztap': qhindex === -1}">全部</view>
<view class="gang" v-if="qhindex === -1"></view>
</view>
<view class="goods-title">
{{item.giftName}}
<view class="sz" v-for="(item, index) in categoryList" :key="index"
@click="transferIndex(index,item.id)">
<view class="box" :class="{'xztap': qhindex === index}">{{item.categoryName}}</view>
<view class="gang" v-if="qhindex === index"></view>
</view>
<view class="good-red">
<view style="display: flex;align-items: center;">
<view class="bi" v-if="item.exchangeMethod != '金额'">
<image src="../../static/imgs/jb.png" mode=""></image>
</view>
<view style="color: #FC1708;font-weight: bold;">
<span
v-if="item.exchangeMethod == '积分' || item.exchangeMethod == '积分+金额' || item.exchangeMethod == '积分+加钱购'">{{item.exchangePoints}}</span>
<span v-if="item.exchangeMethod == '积分+金额'">+</span>
<span
v-if="item.exchangeMethod == '金额' || item.exchangeMethod == '积分+金额'">{{item.exchangeAmount}}</span>
</scroll-view>
<view class="wrap-box">
<view class="box-goods" v-for="(item,index) in integralGiftList" :key="index"
@click="godetails(item)">
<view class="goods-img">
<image :src="baseUrl+item.coverImage" mode=""></image>
</view>
<view class="goods-title">
{{item.giftName}}
</view>
<view class="good-red">
<view style="display: flex;align-items: center;">
<view class="bi" v-if="item.exchangeMethod != '金额'">
<image src="../../static/imgs/jb.png" mode=""></image>
</view>
<view style="color: #FC1708;font-weight: bold;">
<span
v-if="item.exchangeMethod == '积分' || item.exchangeMethod == '积分+金额' || item.exchangeMethod == '积分+加钱购'">{{item.exchangePoints}}</span>
<span v-if="item.exchangeMethod == '积分+金额'">+</span>
<span
v-if="item.exchangeMethod == '金额' || item.exchangeMethod == '积分+金额'">{{item.exchangeAmount}}</span>
</view>
</view>
<view class="hui-time">
库存:{{item.remainingInventory === -1?"不限":item.remainingInventory}}
</view>
</view>
<view class="hui-time">库存:{{item.remainingInventory === -1?"不限":item.remainingInventory}}
<view class="anniux">
<text>立即兑换</text>
</view>
</view>
<view class="anniux">
<text>立即兑换</text>
</view>
</view>
</view>
</view>
@ -247,22 +255,20 @@
</script>
<style scoped lang="scss">
.content {
background: #f4f5f6;
}
.content {}
.container {
width: 100%;
box-sizing: border-box;
padding-top: 88px;
background: #f4f5f6;
background: linear-gradient(180deg, #ff5c28 0%, #ff5c28 20%, #ffd8d8 37%, #ffd8d8 100%);
padding-bottom: 40px;
}
.my-header {
width: 100%;
height: 88px;
background: #1678ff;
background: #ff5c28;
display: flex;
align-items: center;
justify-content: space-between;
@ -283,8 +289,9 @@
.top-lanmu {
width: 100%;
height: 100px;
background: linear-gradient(180deg, #1678ff 0%, #3e8dfd 57%, #f4f5f6 100%);
// background: linear-gradient(180deg, #ff5c28 0%, #ff5c28 57%, #ffd8d8 100%);
box-sizing: border-box;
padding-top: 1px;
}
@ -301,6 +308,7 @@
align-items: center;
justify-content: space-around;
font-size: 14px;
margin-top: 0px;
}
@ -339,7 +347,7 @@
margin: 0 auto;
box-sizing: border-box;
padding: 10px;
margin-top: 75px;
margin-top: 15px;
}
.tap-top {
@ -375,10 +383,11 @@
}
.gang {
width: 128rpx;
width: 38rpx;
height: 8rpx;
background: #1678ff;
background: #ff5c28;
border-radius: 14rpx;
}
.wrap-box {
@ -448,4 +457,22 @@
height: 100%;
}
}
.hby {
width: 90%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: space-between;
}
.tp {
width: 200px;
height: 120px;
image {
width: 100%;
height: 100%;
}
}
</style>

View File

@ -15,7 +15,7 @@
</view>
</view>
<view class="goods-box" v-for="(item,index) in orderList">
<view class="goods-box" v-for="(item,index) in orderList" :key="item.id" @click="orderDetails(item)">
<view class="goods-top">
<view class="goods-img">
<image :src="baseUrl+item.coverImage" mode=""></image>
@ -24,7 +24,8 @@
<view class="title-s">{{item.giftName}}</view>
<view class="hui-s">{{item.createTime}}</view>
<view class="right-size">
<view class="jg">{{item.amount?"¥"+item.amount:''}}
<view class="jg">
{{item.amount?"¥"+item.amount:''}}
{{item.amount && item.integral ? '+':''}}
{{item.integral?item.integral+'积分':''}}
</view>
@ -33,17 +34,17 @@
</view>
</view>
<view class="goods-bottom" v-if="actinput == 1 ">
<view class="sh-anniu">
<view class="sh-anniu" @click="confirmTheReceipt(item.id)">
<text>确认收货</text>
</view>
</view>
<view class="goods-bottom" v-if="actinput == 2 ">
<view class="sh-anniu">
<view class="sh-anniu" @click="refund()">
<text>点击退款</text>
</view>
</view>
<view class="goods-bottom" v-if="actinput == 3 ">
<view class="sh-anniu">
<view class="sh-anniu" @click="payment()">
<text>去付款</text>
</view>
</view>
@ -103,9 +104,15 @@
methods: {
getindex(index) {
this.actinput = index
console.log("index", index)
if (index != 0) {
this.query.orderStatus = index
// if (index == 1) {
// this.query.orderStatus = ''
// }else {
// this.query.orderStatus = this.taplist[index].title
// }
} else {
this.query.orderStatus = ''
}
@ -129,6 +136,40 @@
}
})
},
//
orderDetails(data) {
console.log("dara", data)
uni.$on('pointsGoodsDetailsUn', function() {
uni.$emit('pointsGoodsDetails', data)
})
uni.navigateTo({
url: '/pagesHome/PointsGoodsDetails/PointsGoodsDetails',
})
},
confirmTheReceipt(data) {
let params = {
id: data,
orderStatus: '已完成'
}
request({
url: 'business/integral/integralOrders/editUni',
method: 'put',
data: params
}).then((res) => {
if (res.code == 200) {
this.orderList = res.data.records
this.getIntegralOrderList()
}
})
},
refund(data) {
},
payment(data) {
},
}
}
</script>

View File

@ -157,6 +157,8 @@
}
})
uni.$emit('un')
// storeId
this.getInfoByStoreId()
},
onShow() {
@ -199,7 +201,9 @@
// remaining_inventory
console.log('当前值为: ' + e.value)
console.log('当前值为123: ' + this.goodsInfo.remainingInventory)
if (e.value >= this.goodsInfo.remainingInventory) {
//
if (e.value >= this.goodsInfo.remainingInventory && this.goodsInfo.remainingInventory != -1) { // -1
e.value = this.goodsInfo.remainingInventory
this.value = this.goodsInfo.remainingInventory
this.flag = true
@ -345,6 +349,7 @@
},
// storeId
getInfoByStoreId() {
console.log("helllllllllllllllllllllllllo")
request({
url: '/business/storeInformation/store/storeInfoUni',
method: 'get',

View File

@ -73,6 +73,7 @@
</view>
</view>
</view>
<view style="height: 340px; width: 100%;"></view>
<view class="bottom-box">
<view class="bottom-bai-box">

View File

@ -18,7 +18,9 @@
积分签到
</view>
<view class="anniu" v-if="!flag">
已签到
<span v-if="flag2">已签到</span>
<span v-if="!flag2">未开通签到</span>
</view>
</view>
</view>
@ -55,7 +57,9 @@
title: '',
myPoints: 0, //
flag: true,
storeId: uni.getStorageSync('storeId')
flag2: true,
storeId: uni.getStorageSync('storeId'),
chainStoreId: uni.getStorageSync('chainStoreId'),
}
},
@ -66,13 +70,20 @@
this.getUserInfoList();
this.getTodayIsSignIn();
},
// onLoad() {
// this.getUserInfoList();
// this.getTodayIsSignIn();
// },
methods: {
//
getUserInfoList() {
request({
url: '/business/userManager/user/getByUniApp',
method: 'get',
// params:{}
params: {
chainStoreId: this.chainStoreId
}
}).then((res) => {
if (res.code == 200) {
this.myPoints = res.data.points
@ -100,8 +111,14 @@
if (res.code == 200) {
if (res.data != 0) {
this.flag = false
} else {
} else if (
res.data == -2
) {
this.flag = true
this.flag2 = true
} else {
this.flag2 = false
}
}
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB