Compare commits
7 Commits
4078f4b651
...
28d72ff386
Author | SHA1 | Date | |
---|---|---|---|
28d72ff386 | |||
6907e0b430 | |||
06fc225429 | |||
4049003f3d | |||
bbd18122b2 | |||
19b7d7c08f | |||
7060da15d7 |
@ -14,17 +14,19 @@
|
||||
</div>
|
||||
<el-table :data="tableData" align="center" style="width: 100%">
|
||||
<el-table-column label="序号" type="index" align="center"> </el-table-column>
|
||||
<el-table-column prop="groupOriented" label="活动名称" align="center" width="165">
|
||||
<el-table-column prop="activeName" label="活动名称" align="center" width="165">
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column prop="createBy" label="会员等级" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.groupOriented == 1">普通群体</span>
|
||||
<span v-if="scope.row.groupOriented == 2">等级会员</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createBy" label="会员等级" align="center"> </el-table-column>
|
||||
<el-table-column prop="createBy" label="充值金额" align="center"> </el-table-column>
|
||||
<el-table-column prop="createBy" label="赠送金额" align="center"> </el-table-column>
|
||||
<el-table-column prop="createBy" label="赠送积分" align="center"> </el-table-column>
|
||||
<el-table-column prop="createBy" label="赠送成长值" align="center"> </el-table-column>
|
||||
<el-table-column prop="bidBalance" label="充值金额" align="center"> </el-table-column>
|
||||
<el-table-column prop="giftBalance" label="赠送金额" align="center"> </el-table-column>
|
||||
<el-table-column prop="points" label="赠送积分" align="center"> </el-table-column>
|
||||
<el-table-column prop="growthValue" label="赠送成长值" align="center"> </el-table-column>
|
||||
<!-- <el-table-column label="活动信息" align="center">-->
|
||||
<!-- <el-table-column prop="rechargeBalance" label="充值金额" align="center" > </el-table-column>-->
|
||||
<!-- <el-table-column prop="giftBalance" label="赠送金额" align="center" > </el-table-column>-->
|
||||
@ -41,14 +43,14 @@
|
||||
<el-table-column prop="activityProgress" label="活动状态" align="center" >
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.isonline == 0"> <el-tag>已上架</el-tag></span>
|
||||
<span v-if="scope.row.isonline == 1"> <el-tag>未下架</el-tag></span>
|
||||
<span v-if="scope.row.isonline == 1"> <el-tag>已下架</el-tag></span>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="销售信息" align="center">
|
||||
<el-table-column prop="rechargeBalance" label="充值本金(元)" align="center" > </el-table-column>
|
||||
<el-table-column prop="giftBalance" label="赠送金额(元)" align="center" > </el-table-column>
|
||||
<el-table-column prop="points" label="会员人数" align="center" > </el-table-column>
|
||||
<el-table-column prop="participationNo" label="会员人数" align="center" > </el-table-column>
|
||||
<!-- <el-table-column prop="growthValue" label="赠送成长值" align="center" > </el-table-column>-->
|
||||
</el-table-column>
|
||||
|
||||
|
@ -59,7 +59,7 @@
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.activeStatus == 0"> <el-tag>已上架</el-tag></span>
|
||||
<span v-if="scope.row.activeStatus == 1"> <el-tag>未下架</el-tag></span>
|
||||
<span v-if="scope.row.activeStatus == 1"> <el-tag>已下架</el-tag></span>
|
||||
|
||||
|
||||
</template>
|
||||
|
@ -65,8 +65,8 @@
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<div slot="reference" class="name-wrapper">
|
||||
<div style="color: #FF9655" v-if="scope.row.approvalStatus == 'await'">待审核</div>
|
||||
<div style="color: #0DC291" v-if="scope.row.approvalStatus == 'qrts'" >已审核入库</div>
|
||||
<div style="color: #FF9655" v-if="scope.row.approvalStatus == 'await'">待入库</div>
|
||||
<div style="color: #0DC291" v-if="scope.row.approvalStatus == 'qrts'" >已入库</div>
|
||||
<div style="color: #F44522" v-if="scope.row.approvalStatus == 'yzf'" >已作废</div>
|
||||
<div style="color: #409EFF" v-if="scope.row.approvalStatus == 'ysh'" >已审核</div>
|
||||
</div>
|
||||
|
@ -67,8 +67,8 @@
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<div slot="reference" class="name-wrapper">
|
||||
<div style="color: #FF9655" v-if="scope.row.approvalStatus == 'await'">待审核</div>
|
||||
<div style="color: #0DC291" v-if="scope.row.approvalStatus == 'qrts'" >已审核入库</div>
|
||||
<div style="color: #FF9655" v-if="scope.row.approvalStatus == 'await'">待入库</div>
|
||||
<div style="color: #0DC291" v-if="scope.row.approvalStatus == 'qrts'" >已入库</div>
|
||||
<div style="color: #F44522" v-if="scope.row.approvalStatus == 'yzf'" >已作废</div>
|
||||
<div style="color: #409EFF" v-if="scope.row.approvalStatus == 'ysh'" >已审核</div>
|
||||
</div>
|
||||
|
@ -53,7 +53,7 @@
|
||||
width="50">
|
||||
</el-table-column>
|
||||
<el-table-column label="分类名称" align="center" prop="categoryName"/>
|
||||
<el-table-column label="排序" align="center" prop="sort" />
|
||||
<el-table-column label="创建人" align="createBy" prop="sort" />
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<div slot="reference" class="name-wrapper">
|
||||
|
@ -68,8 +68,8 @@
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<div slot="reference" class="name-wrapper">
|
||||
<div style="color: #00CAFF" v-if="scope.row.status == 'await'">待审核</div>
|
||||
<div style="color: #0DC291" v-if="scope.row.status == 'qrts'">已审核入库</div>
|
||||
<div style="color: #00CAFF" v-if="scope.row.status == 'await'">待入库</div>
|
||||
<div style="color: #0DC291" v-if="scope.row.status == 'qrts'">已入库</div>
|
||||
<div style="color: #F44522" v-if="scope.row.status == 'yzf'">已作废</div>
|
||||
<div style="color: #FF770F" v-if="scope.row.status == 'ysh'">已审核</div>
|
||||
</div>
|
||||
|
@ -110,14 +110,14 @@
|
||||
type="text"
|
||||
v-if="scope.row.status == 'await'"
|
||||
@click="dispose(scope.row)"
|
||||
>油品入库
|
||||
>采购审核
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
v-else-if="scope.row.status == 'ysh'"
|
||||
@click="dispose(scope.row)"
|
||||
>采购审核
|
||||
>油品入库
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
|
@ -147,7 +147,7 @@
|
||||
<el-table-column prop="payAmount" label="实收金额(元)" align="center"> </el-table-column>
|
||||
<el-table-column prop="balanceAmount" label="会员付款金额(元)" align="center" />
|
||||
<el-table-column prop="payUser" label="付款用户" align="center"> </el-table-column>
|
||||
<el-table-column prop="payType" label="付款方式" align="center">
|
||||
<el-table-column prop="payType" label="支付方式" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>{{getType(payList,scope.row.payType)}}</span>
|
||||
</template>
|
||||
|
@ -284,6 +284,7 @@ export default {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.left-img{
|
||||
margin-left: 20px;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 300px;
|
||||
@ -292,8 +293,10 @@ export default {
|
||||
background-size: 100% 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.checkbox-input-container {
|
||||
|
||||
display: flex;
|
||||
align-items: center; /* 垂直居中对齐 */
|
||||
gap: 10px; /* 设置复选框和输入框之间的间距 */
|
||||
@ -356,6 +359,7 @@ export default {
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
background-color: #f7f7f8;
|
||||
}
|
||||
.logo {
|
||||
width: 200px; /* 根据需要调整图片宽度 */
|
||||
@ -422,6 +426,8 @@ avatar-uploader .el-upload {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
background-color: #FFFFFF;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
/* 使按钮居中对齐 */
|
||||
@ -432,9 +438,12 @@ avatar-uploader .el-upload {
|
||||
}
|
||||
.fatrelative{
|
||||
position: relative;
|
||||
margin-left: 20px;
|
||||
background-color: #FFFFFF;
|
||||
margin-top: 20px;
|
||||
width: 36%;
|
||||
}
|
||||
.relative {
|
||||
margin-top: 20px;
|
||||
position:absolute;
|
||||
|
||||
}
|
||||
|
@ -206,6 +206,7 @@ export default {
|
||||
},
|
||||
getList(){
|
||||
getAppListApi(this.queryParams).then(res=>{
|
||||
console.log(2222222222)
|
||||
this.tableData = res.data.records;
|
||||
this.total = res.data.total
|
||||
})
|
||||
|
@ -25,37 +25,38 @@
|
||||
<!--查询指定行数据-->
|
||||
<select id="queryAllByLimit" resultMap="IntegralGiftCategoryMap">
|
||||
select
|
||||
id, category_name, sort, status, store_id, create_time, update_time, create_by, update_by
|
||||
from integral_gift_category
|
||||
igc.id, igc.category_name, igc.sort, igc.status, igc.store_id, igc.create_time, igc.update_time, igc.create_by, igc.update_by,ta.real_name as createBy
|
||||
from integral_gift_category igc
|
||||
left join mt_staff ta on igc.create_by=ta.id
|
||||
<where>
|
||||
store_id = #{integralGiftCategory.storeId}
|
||||
igc.store_id = #{integralGiftCategory.storeId}
|
||||
|
||||
<if test="integralGiftCategory.id != null">
|
||||
and id = #{integralGiftCategory.id}
|
||||
and igc.id = #{integralGiftCategory.id}
|
||||
</if>
|
||||
<if test="integralGiftCategory.categoryName != null and integralGiftCategory.categoryName != ''">
|
||||
and category_name like CONCAT ('%',#{integralGiftCategory.categoryName},'%')
|
||||
and igc.category_name like CONCAT ('%',#{integralGiftCategory.categoryName},'%')
|
||||
</if>
|
||||
<if test="integralGiftCategory.sort != null">
|
||||
and sort = #{integralGiftCategory.sort}
|
||||
and igc.sort = #{integralGiftCategory.sort}
|
||||
</if>
|
||||
<if test="integralGiftCategory.status != null and integralGiftCategory.status != ''">
|
||||
and status = #{integralGiftCategory.status}
|
||||
and igc.status = #{integralGiftCategory.status}
|
||||
</if>
|
||||
<if test="integralGiftCategory.createTime != null">
|
||||
and create_time = #{integralGiftCategory.createTime}
|
||||
and igc.create_time = #{integralGiftCategory.createTime}
|
||||
</if>
|
||||
<if test="integralGiftCategory.updateTime != null">
|
||||
and update_time = #{integralGiftCategory.updateTime}
|
||||
and igc.update_time = #{integralGiftCategory.updateTime}
|
||||
</if>
|
||||
<if test="integralGiftCategory.createBy != null">
|
||||
and create_by = #{integralGiftCategory.createBy}
|
||||
and igc.create_by = #{integralGiftCategory.createBy}
|
||||
</if>
|
||||
<if test="integralGiftCategory.updateBy != null">
|
||||
and update_by = #{integralGiftCategory.updateBy}
|
||||
and igc.update_by = #{integralGiftCategory.updateBy}
|
||||
</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
order by igc.create_time desc
|
||||
</select>
|
||||
|
||||
<!--统计总行数-->
|
||||
|
@ -64,7 +64,7 @@ public class CardValueRecordController extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public ResponseObject selectAllPage(@RequestParam(value = "pageNo[page]",defaultValue = "1") Integer pageNo,
|
||||
public ResponseObject selectAllPage(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
|
||||
CardValueRecord cardValueRecord) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
|
@ -297,20 +297,53 @@
|
||||
</select>
|
||||
<select id="selectCardValueRecordList"
|
||||
resultType="com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord">
|
||||
select * from card_value_record
|
||||
<where>
|
||||
SELECT * from (SELECT order_no as paymentNo,
|
||||
pay_type as paymentType,
|
||||
name,
|
||||
mobile,
|
||||
pay_amount as rechargeBalance,
|
||||
discount as giftBalance,
|
||||
amount as bidBalance,
|
||||
payment_type as payChannel,
|
||||
remark,
|
||||
real_name as realName,
|
||||
update_time as updateTime,
|
||||
create_time as createTime,
|
||||
status as payStatus,
|
||||
staff_id mt_staff_id,
|
||||
card_fule_id as card_value_id,
|
||||
store_id from card_fule_orders
|
||||
UNION all
|
||||
SELECT
|
||||
payment_no as paymentNo,
|
||||
payment_type as paymentType,
|
||||
name,
|
||||
mobile,
|
||||
recharge_balance as rechargeBalance,
|
||||
gift_balance as giftBalance,
|
||||
bid_balance as bidBalance,
|
||||
`pay_channel` as payChannel,
|
||||
remark,
|
||||
real_name,
|
||||
update_time as updateTime,
|
||||
create_time as createTime,
|
||||
status as payStatus,
|
||||
mt_staff_id,
|
||||
card_value_id,
|
||||
store_id from card_value_record) a
|
||||
where
|
||||
store_id = #{cardValueRecord.storeId}
|
||||
<if test="cardValueRecord.mtStaffId != null and cardValueRecord.mtStaffId != ''">
|
||||
and mt_staff_id = #{cardValueRecord.mtStaffId}
|
||||
</if>
|
||||
<if test="cardValueRecord.paymentType != null and cardValueRecord.paymentType != ''">
|
||||
and payment_type = #{cardValueRecord.paymentType}
|
||||
and paymentType = #{cardValueRecord.paymentType}
|
||||
</if>
|
||||
<if test="cardValueRecord.payChannel != null and cardValueRecord.payChannel != ''">
|
||||
and pay_channel = #{cardValueRecord.payChannel}
|
||||
and payChannel = #{cardValueRecord.payChannel}
|
||||
</if>
|
||||
<if test="cardValueRecord.paymentNo != null and cardValueRecord.paymentNo != ''">
|
||||
and payment_no like concat('%', #{cardValueRecord.paymentNo}, '%')
|
||||
and paymentNo like concat('%', #{cardValueRecord.paymentNo}, '%')
|
||||
</if>
|
||||
<if test="cardValueRecord.cardValueId != null and cardValueRecord.cardValueId != ''">
|
||||
and card_value_id = #{cardValueRecord.cardValueId}
|
||||
@ -319,13 +352,13 @@
|
||||
and mobile like concat('%', #{cardValueRecord.mobile}, '%')
|
||||
</if>
|
||||
<if test="cardValueRecord.params.beginTime != null and cardValueRecord.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') >= date_format(#{cardValueRecord.params.beginTime},'%y%m%d')
|
||||
and date_format(createTime,'%y%m%d') >= date_format(#{cardValueRecord.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="cardValueRecord.params.endTime != null and cardValueRecord.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') <= date_format(#{cardValueRecord.params.endTime},'%y%m%d')
|
||||
and date_format(createTime,'%y%m%d') <= date_format(#{cardValueRecord.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
|
||||
order by createTime desc
|
||||
</select>
|
||||
<select id="getAmountAndConsume" resultType="java.util.Map">
|
||||
select
|
||||
|
@ -519,7 +519,6 @@ public class AllOrderInfoController extends BaseController {
|
||||
this.allOrderInfoService.exportExcelBackOrderMsgsApi(response, allOrderInfoRes);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 交易对账
|
||||
* 交易明细分页查询
|
||||
|
@ -185,5 +185,9 @@ public class OilOrder extends BaseEntity implements Serializable {
|
||||
private Long deptId;
|
||||
@TableField(exist = false)
|
||||
private List<Long> storeIds;
|
||||
/**
|
||||
* 储值卡赠送金额消费
|
||||
*/
|
||||
private Double balanceGiftAmount;
|
||||
}
|
||||
|
||||
|
@ -1218,8 +1218,9 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
|
||||
handoverMap.put("baseInfo",baseInfo);
|
||||
// 获取订单汇总
|
||||
Map<String, Object> orderSummaryMap = orderSummary1(startTime, formattedEndTime, staffId);
|
||||
orderSummaryMap.put("orderall",Double.valueOf(orderSummaryMap.get("oilOrder").toString())+Double.valueOf(orderSummaryMap.get("rechargeAll").toString()));
|
||||
orderSummaryMap.put("orderalls",Double.valueOf(orderSummaryMap.get("receiptsMoney").toString())+Double.valueOf(orderSummaryMap.get("onAccount").toString()));
|
||||
|
||||
orderSummaryMap.put("orderall",new BigDecimal(orderSummaryMap.get("oilOrder").toString()).add(new BigDecimal(orderSummaryMap.get("rechargeAll").toString())));
|
||||
orderSummaryMap.put("orderalls",new BigDecimal(orderSummaryMap.get("receiptsMoney").toString()).add(new BigDecimal(orderSummaryMap.get("onAccount").toString())));
|
||||
handoverMap.put("orderSummary",orderSummaryMap);
|
||||
// 支付方式汇总
|
||||
List<Map<String, Object>> paymentAggregationMap = paymentAggregation1(startTime, formattedEndTime, staffId);
|
||||
@ -1275,8 +1276,8 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
|
||||
Map<String, Object> allStatistics = new HashMap<>();
|
||||
Map<String, Object> oilOrderStatistics = handoverRecordMapper.oilOrderStatistics1(startTime, endTime, nowAccountInfo.getStoreId(), staffId);
|
||||
allStatistics.putAll(oilOrderStatistics);
|
||||
allStatistics.put("operatingAmount", Double.valueOf(oilOrderStatistics.get("oilOrder").toString())- Double.valueOf(oilOrderStatistics.get("onAccount").toString()));
|
||||
allStatistics.put("trueAmount", Double.valueOf(oilOrderStatistics.get("receiptsMoney").toString())- Double.valueOf(oilOrderStatistics.get("onAccount").toString()));
|
||||
allStatistics.put("operatingAmount",new BigDecimal(oilOrderStatistics.get("oilOrder").toString()).add(new BigDecimal(oilOrderStatistics.get("onAccount").toString())));
|
||||
allStatistics.put("trueAmount",new BigDecimal(oilOrderStatistics.get("receiptsMoney").toString()).add(new BigDecimal(oilOrderStatistics.get("onAccount").toString())));
|
||||
return allStatistics;
|
||||
}
|
||||
|
||||
|
@ -636,7 +636,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
order.setBalanceAmount(Double.valueOf(balanceAmount));
|
||||
order.setOilCardAmount(Double.valueOf(oilCardAmount));
|
||||
order.setActiveAmount(activeAmount);
|
||||
|
||||
order.setBalanceGiftAmount( this.countCardBalance(Double.valueOf(balanceAmount), userId, storeId, orderNo));
|
||||
order.setStoreId(storeId);
|
||||
order.setUserId(userId);
|
||||
order.setStaffId(staffId);
|
||||
@ -1935,20 +1935,35 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
LJStore store = storeService.selectStoreByStoreId(storeId);
|
||||
UserBalance balance = userBalanceService.selectUserBalance(userId, store.getChainStoreId());
|
||||
if (ObjectUtil.isNotEmpty(balance)) {
|
||||
|
||||
|
||||
//计算余额
|
||||
//消费金额
|
||||
BigDecimal num1 = new BigDecimal(amount.toString());
|
||||
//总余额
|
||||
BigDecimal num2 = new BigDecimal(balance.getCardBalance().toString());
|
||||
//赠送余额
|
||||
BigDecimal num3 = new BigDecimal(balance.getGiveAmount().toString());
|
||||
//总本金
|
||||
BigDecimal num4 = num2.subtract(num3);
|
||||
//赠送余额比例金额
|
||||
BigDecimal num5 =num3.divide(num4,2,BigDecimal.ROUND_DOWN).multiply(num1).setScale(2,BigDecimal.ROUND_DOWN);
|
||||
//剩余赠送余额
|
||||
BigDecimal num6 =num3.subtract(num5);
|
||||
//修改余额信息
|
||||
Double beforeBalance = balance.getCardBalance();
|
||||
Double afterBalance = beforeBalance - amount;
|
||||
if ((beforeBalance - amount) < 0.0) {
|
||||
BigDecimal num7 =num2.subtract(num1);
|
||||
|
||||
if (num7.doubleValue() < 0.0) {
|
||||
return false;
|
||||
}
|
||||
cardBalanceChange.setAfterTheChange(afterBalance);
|
||||
balance.setCardBalance(afterBalance);
|
||||
cardBalanceChange.setAfterTheChange(num7.doubleValue());
|
||||
balance.setCardBalance(num7.doubleValue());
|
||||
balance.setGiveAmount(num6.doubleValue());
|
||||
// 修改加油次数
|
||||
Integer consumeNum = balance.getConsumeNum();
|
||||
balance.setConsumeNum(consumeNum + 1);
|
||||
userBalanceService.updateUserBalance(balance);
|
||||
}
|
||||
|
||||
// 添加余额记录信息
|
||||
cardBalanceChange.setUserId(userId);
|
||||
cardBalanceChange.setChangeType("0");
|
||||
@ -1956,7 +1971,6 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
cardBalanceChange.setBalance(amount);
|
||||
cardBalanceChange.setOrderNo(orderNo);
|
||||
cardBalanceChange.setStoreId(storeId);
|
||||
|
||||
cardBalanceChangeService.insertCardBalance(cardBalanceChange);
|
||||
return true;
|
||||
}
|
||||
@ -2416,4 +2430,31 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
}
|
||||
return baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 计算储值赠送金额的话费
|
||||
*
|
||||
* @param amount
|
||||
* @param userId
|
||||
* @param storeId
|
||||
*/
|
||||
private Double countCardBalance(Double amount, Integer userId, Integer storeId, String orderNo) {
|
||||
// 根据用户id查询用户余额信息
|
||||
LJStore store = storeService.selectStoreByStoreId(storeId);
|
||||
UserBalance balance = userBalanceService.selectUserBalance(userId, store.getChainStoreId());
|
||||
|
||||
//消费金额
|
||||
BigDecimal num1 = new BigDecimal(amount.toString());
|
||||
//总余额
|
||||
BigDecimal num2 = new BigDecimal(balance.getCardBalance().toString());
|
||||
//赠送余额
|
||||
BigDecimal num3 = new BigDecimal(balance.getGiveAmount().toString());
|
||||
//总本金
|
||||
BigDecimal num4 = num2.subtract(num3);
|
||||
//赠送余额比例金额
|
||||
BigDecimal num5 = num3.divide(num4, 2, BigDecimal.ROUND_DOWN).multiply(num1).setScale(2, BigDecimal.ROUND_DOWN);
|
||||
|
||||
return num5.doubleValue();
|
||||
}
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ public class SysNotifyController extends BaseController {
|
||||
|
||||
boolean b = this.sysNotifyService.sendNotifyOne(id);
|
||||
if (b) {
|
||||
return getFailureResult(200, "发送成功");
|
||||
return getSuccessResult("发送成功");
|
||||
}
|
||||
else {
|
||||
return getFailureResult(500, "发送失败用户不存在");
|
||||
@ -127,6 +127,20 @@ public class SysNotifyController extends BaseController {
|
||||
return getSuccessResult(this.sysNotifyService.deleteById(id));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param sysNotify 筛选条件
|
||||
* @param pageNo 分页对象
|
||||
* @return 查询结果
|
||||
*/
|
||||
@GetMapping("queryByPages")
|
||||
public ResponseObject queryByPages(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
|
||||
@Param("sysNotify") SysNotify sysNotify) {
|
||||
Page page = new Page(pageNo, pageSize);
|
||||
IPage< SysNotify> iPageList = this.sysNotifyService.queryByPages(page, sysNotify);
|
||||
return getSuccessResult(iPageList);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -33,6 +33,14 @@ public interface SysNotifyMapper extends BaseMapper<SysNotify> {
|
||||
* @return 对象列表
|
||||
*/
|
||||
IPage<SysNotify> queryAllByLimit(@Param("page") Page page, @Param("entity") SysNotify sysNotify);
|
||||
/**
|
||||
* 查询指定行数据
|
||||
*
|
||||
* @param sysNotify 查询条件
|
||||
* @param page 分页对象
|
||||
* @return 对象列表
|
||||
*/
|
||||
IPage<SysNotify> queryAllByLimits(@Param("page") Page page, @Param("entity") SysNotify sysNotify);
|
||||
|
||||
/**
|
||||
* 统计总行数
|
||||
|
@ -14,13 +14,14 @@
|
||||
<result property="appStatus" column="app_status" jdbcType="INTEGER"/>
|
||||
<result property="createTime" column="create_time" jdbcType="VARCHAR"/>
|
||||
<result property="createByName" column="create_by_name" jdbcType="VARCHAR"/>
|
||||
<result property="orgId" column="org_id" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<!--查询单个-->
|
||||
<select id="queryById" resultMap="SysAppMap">
|
||||
select
|
||||
id,org_name,unified_social_credit_code,app_id,legal_representative_name,
|
||||
legal_representative_id,legal_representative_contact,app_status,app_key,legal_representative_wechat
|
||||
legal_representative_id,legal_representative_contact,app_status,app_key,legal_representative_wechat,org_id
|
||||
from sys_app
|
||||
where id = #{id}
|
||||
</select>
|
||||
@ -29,7 +30,7 @@ legal_representative_id,legal_representative_contact,app_status,app_key,legal_re
|
||||
<select id="queryAllByLimit" resultMap="SysAppMap">
|
||||
select
|
||||
id,org_name,unified_social_credit_code,app_id,legal_representative_name,
|
||||
legal_representative_id,legal_representative_contact,app_status,create_time,create_by_name,app_key,legal_representative_wechat
|
||||
legal_representative_id,legal_representative_contact,app_status,create_time,create_by_name,app_key,legal_representative_wechat,org_id
|
||||
from sys_app
|
||||
<where>
|
||||
<if test="sysApp.id != null">
|
||||
|
@ -138,5 +138,35 @@ notification_name = values(notification_name)notification_type = values(notifica
|
||||
delete from sys_notify where id = #{id}
|
||||
</delete>
|
||||
|
||||
|
||||
<!--查询指定行数据-->
|
||||
<select id="queryAllByLimits" resultMap="SysNotifyMap">
|
||||
select *
|
||||
from sys_notify
|
||||
<where>
|
||||
<if test="entity.id != null">
|
||||
and id = #{entity.id}
|
||||
</if>
|
||||
<if test="entity.storeId != null">
|
||||
and store_id = #{entity.storeId}
|
||||
</if>
|
||||
<if test="entity.notificationName != null and entity.notificationName != ''">
|
||||
and notification_name = #{entity.notificationName}
|
||||
</if>
|
||||
<if test="entity.notificationType != null and entity.notificationType != ''">
|
||||
and notification_type = #{entity.notificationType}
|
||||
</if>
|
||||
<if test="entity.templateContent != null and entity.templateContent != ''">
|
||||
and template_content = #{entity.templateContent}
|
||||
</if>
|
||||
<if test="entity.recipientRoles != null and entity.recipientRoles != ''">
|
||||
and recipient_roles like concat('%', #{entity.recipientRoles}, '%')
|
||||
</if>
|
||||
<if test="entity.templateStatus != null">
|
||||
and template_status = #{entity.templateStatus}
|
||||
</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
|
@ -58,4 +58,13 @@ public interface SysNotifyService extends IService<SysNotify> {
|
||||
*/
|
||||
boolean deleteById(Integer id);
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param sysNotify 筛选条件
|
||||
* @param page 分页对象
|
||||
* @return 查询结果
|
||||
*/
|
||||
IPage<SysNotify> queryByPages(@Param("page") Page page, SysNotify sysNotify);
|
||||
}
|
||||
|
@ -93,8 +93,10 @@ public class SysBannerServiceImpl implements SysBannerService {
|
||||
|
||||
@Override
|
||||
public SysBanner queryByName(String bannerName) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
HashMap<String, Object> objectObjectHashMap = new HashMap<>();
|
||||
objectObjectHashMap.put("banner_name",bannerName);
|
||||
objectObjectHashMap.put("store_id",nowAccountInfo.getStoreId());
|
||||
List<SysBanner> sysBanners = sysBannerMapper.selectByMap(objectObjectHashMap);
|
||||
|
||||
return sysBanners.size() > 0 ? sysBanners.get(0) : null;
|
||||
|
@ -99,6 +99,35 @@ public class SysNotifyServiceImpl extends ServiceImpl<SysNotifyMapper, SysNotif
|
||||
return sysNotifyIPage;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param sysNotify 筛选条件
|
||||
* @param page 分页对象
|
||||
* @return 查询结果
|
||||
*/
|
||||
@Override
|
||||
public IPage<SysNotify> queryByPages(@Param("page") Page page, SysNotify sysNotify) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
sysNotify.setStoreId(nowAccountInfo.getStoreId());
|
||||
IPage<SysNotify> sysNotifyIPage = this.sysNotifyMapper.queryAllByLimits(page, sysNotify);
|
||||
for (SysNotify record : sysNotifyIPage.getRecords()) {
|
||||
List<TDuty> tDuties = dutyService.selectyDutyIds(record.getRecipientRoles());
|
||||
StringBuilder recipientRolesNameBuilder = new StringBuilder();
|
||||
for (TDuty tDuty : tDuties) {
|
||||
if (recipientRolesNameBuilder.length() > 0) {
|
||||
recipientRolesNameBuilder.append(",");
|
||||
}
|
||||
recipientRolesNameBuilder.append(tDuty.getDutyName());
|
||||
}
|
||||
record.setRecipientRolesName(recipientRolesNameBuilder.toString());
|
||||
}
|
||||
return sysNotifyIPage;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
@ -290,8 +319,10 @@ public class SysNotifyServiceImpl extends ServiceImpl<SysNotifyMapper, SysNotif
|
||||
|
||||
// 遍历 JSON 数组中的每个对象
|
||||
for (int i = 0; i < jsonArray.size(); i++) {
|
||||
String mm= jsonArray.get(i).toString();
|
||||
JSONObject userObject = jsonArray.getJSONObject(i);
|
||||
Integer userId = userObject.getInteger("id");
|
||||
//Integer userId = userObject.getInteger("id");
|
||||
Integer userId=Integer.valueOf(mm);
|
||||
|
||||
// 根据 userId 查询员工信息
|
||||
TAccount account = tAccountMapper.selectById(userId);
|
||||
|
@ -0,0 +1,24 @@
|
||||
package com.fuint.business.userManager.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class LJUserDto implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
//会员人数
|
||||
private Integer userNum ;
|
||||
// 注销会员人数
|
||||
private Integer logOffUserNum ;
|
||||
// 会员总积分
|
||||
private Integer allPoints ;
|
||||
// 消耗积分
|
||||
private Integer consumePoints ;
|
||||
// 会员累计充值
|
||||
private Double accumulateRecharge ;
|
||||
// 会员总余额
|
||||
private Double allBalance ;
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package com.fuint.business.userManager.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class LJUserStaticesDto implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
// 充值总额
|
||||
private Double rechargeAmount;
|
||||
// 充值本金
|
||||
private Double rechargePrincipal;
|
||||
// 充值赠送
|
||||
private Double rechargeGive;
|
||||
// 消费总额
|
||||
private Double consumeAmount;
|
||||
// 消费本金
|
||||
private Double consumePrincipal ;
|
||||
// 消费赠送
|
||||
private Double consumeGive;
|
||||
// 退款总额
|
||||
private Double refundAmount;
|
||||
// 退款本金
|
||||
private Double refundPrincipal;
|
||||
// 退款赠送
|
||||
private Double refundGive0;
|
||||
// 注销总额
|
||||
private Double logOffAmount;
|
||||
// 注销本金
|
||||
private Double logOffPrincipal;
|
||||
// 注销赠送
|
||||
private Double logOffGive;
|
||||
// 会员总余额
|
||||
private Double userBalance;
|
||||
// 剩余本金
|
||||
private Double residuePrincipal;
|
||||
// 剩余赠送
|
||||
private Double residueGive;
|
||||
}
|
@ -4,6 +4,8 @@ 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.userGroup.entity.UserGroup;
|
||||
import com.fuint.business.userManager.dto.LJUserDto;
|
||||
import com.fuint.business.userManager.dto.LJUserStaticesDto;
|
||||
import com.fuint.business.userManager.entity.LJUser;
|
||||
import com.fuint.business.userManager.vo.LJUserVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@ -112,4 +114,8 @@ public interface LJUserMapper extends BaseMapper<LJUser> {
|
||||
Integer selectUserCountByChainStoreId(@Param("chainStoreId") Integer chainStoreId);
|
||||
|
||||
List<LJUserVo> findUserList(@Param("user") LJUserVo user);
|
||||
|
||||
LJUserDto queryUserMsg(@Param("storeId") Integer storeId);
|
||||
|
||||
LJUserStaticesDto selectAmountStatistics(@Param("storeId") Integer storeId);
|
||||
}
|
||||
|
@ -310,7 +310,8 @@
|
||||
mub.card_balance cardBalance,
|
||||
mub.points,
|
||||
mub.growth_value growthValue,
|
||||
mub.refuel_money refuelMoney
|
||||
mub.refuel_money refuelMoney,
|
||||
mub.give_amount giveAmount
|
||||
from mt_user mu
|
||||
left join mt_user_balance mub on mu.id = mub.mt_user_id
|
||||
where mu.id = #{userId}
|
||||
@ -419,6 +420,33 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="queryUserMsg" resultType="com.fuint.business.userManager.dto.LJUserDto">
|
||||
select (SELECT count(id) from mt_user_balance where user_status = 0) as userNum,
|
||||
sum(CASE WHEN mub.user_status = 1 THEN 1 ELSE 0 END) as logOffUserNum,
|
||||
sum(mub.points) as allPoints,
|
||||
sum(mub.used_points) as consumePoints,
|
||||
sum(CASE WHEN cbc.change_type = 1 THEN cbc.balance ELSE 0 END) as accumulateRecharge,
|
||||
sum(mub.card_balance) as allBalance
|
||||
FROM mt_user mu
|
||||
LEFT JOIN mt_user_balance mub ON mu.id = mub.mt_user_id
|
||||
left join card_balance_change cbc on cbc.user_id=mu.id
|
||||
|
||||
</select>
|
||||
|
||||
<select id="selectAmountStatistics" resultType="com.fuint.business.userManager.dto.LJUserStaticesDto">
|
||||
select (SELECT count(id) from mt_user_balance where user_status = 0) as userNum,
|
||||
sum(CASE WHEN mub.user_status = 1 THEN 1 ELSE 0 END) as logOffUserNum,
|
||||
sum(mub.points) as allPoints,
|
||||
sum(mub.used_points) as consumePoints,
|
||||
sum(CASE WHEN cbc.change_type = 1 THEN cbc.balance ELSE 0 END) as accumulateRecharge,
|
||||
sum(mub.card_balance) as allBalance
|
||||
FROM mt_user mu
|
||||
LEFT JOIN mt_user_balance mub ON mu.id = mub.mt_user_id
|
||||
left join card_balance_change cbc on cbc.user_id=mu.id
|
||||
|
||||
</select>
|
||||
|
||||
<select id="findUserList" resultType="com.fuint.business.userManager.vo.LJUserVo">
|
||||
SELECT
|
||||
mu.*
|
||||
|
@ -4,6 +4,8 @@ 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.userGroup.entity.UserGroup;
|
||||
import com.fuint.business.userManager.dto.LJUserDto;
|
||||
import com.fuint.business.userManager.dto.LJUserStaticesDto;
|
||||
import com.fuint.business.userManager.entity.LJUser;
|
||||
import com.fuint.business.userManager.vo.LJUserVo;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@ -197,13 +199,13 @@ public interface LJUserService extends IService<LJUser> {
|
||||
* 会员分析-会员统计-会员人数
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> selectUserNum();
|
||||
LJUserDto selectUserNum();
|
||||
|
||||
/**
|
||||
* 会员分析-会员统计-会员金额统计
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> selectAmountStatistics();
|
||||
LJUserStaticesDto selectAmountStatistics();
|
||||
|
||||
/**
|
||||
* 会员分析-会员统计-会员发放积分统计
|
||||
|
@ -104,4 +104,5 @@ public interface UserBalanceService extends IService<UserBalance> {
|
||||
* @param orderNo 订单号
|
||||
*/
|
||||
void growthValue(Integer userId, Integer chainStoreId,Integer storeId, String consumptioType, Double money,String fromType, String orderNo);
|
||||
|
||||
}
|
||||
|
@ -23,6 +23,8 @@ import com.fuint.business.order.service.OilOrderService;
|
||||
import com.fuint.business.storeInformation.entity.LJStore;
|
||||
import com.fuint.business.storeInformation.service.ILJStoreService;
|
||||
import com.fuint.business.userGroup.entity.UserGroup;
|
||||
import com.fuint.business.userManager.dto.LJUserDto;
|
||||
import com.fuint.business.userManager.dto.LJUserStaticesDto;
|
||||
import com.fuint.business.userManager.entity.*;
|
||||
import com.fuint.business.userManager.mapper.LJUserMapper;
|
||||
import com.fuint.business.userManager.mapper.MtInvitationMapper;
|
||||
@ -38,6 +40,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.Period;
|
||||
import java.time.ZoneId;
|
||||
@ -810,142 +813,149 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> selectUserNum() {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
List<LJUserVo> ljUserVos = selectUsersList();
|
||||
// 会员人数
|
||||
Integer userNum = 0;
|
||||
// 注销会员人数
|
||||
Integer logOffUserNum = 0;
|
||||
// 会员总积分
|
||||
Integer allPoints = 0;
|
||||
// 消耗积分
|
||||
Integer consumePoints = 0;
|
||||
// 会员累计充值
|
||||
Double accumulateRecharge = 0.0;
|
||||
// 会员总余额
|
||||
Double allBalance = 0.0;
|
||||
|
||||
if (ObjectUtil.isNotEmpty(ljUserVos)){
|
||||
userNum = ljUserVos.size();
|
||||
Integer points = 0;
|
||||
Double usedAmount = 0.0;
|
||||
Double giveAmount = 0.0;
|
||||
for (LJUserVo ljUserVo : ljUserVos) {
|
||||
points += ljUserVo.getPoints();
|
||||
if (ObjectUtil.isNotEmpty(ljUserVo.getUsedPoints())) consumePoints += ljUserVo.getUsedPoints();
|
||||
allBalance += ljUserVo.getCardBalance();
|
||||
if (ObjectUtil.isNotEmpty(ljUserVo.getUsedAmount())) usedAmount += ljUserVo.getUsedAmount();
|
||||
if (ObjectUtil.isNotEmpty(ljUserVo.getGiveAmount())) giveAmount += ljUserVo.getGiveAmount();
|
||||
if (ljUserVo.getUserStatus().equals("1")){
|
||||
logOffUserNum += 1;
|
||||
}
|
||||
}
|
||||
allPoints = points + consumePoints;
|
||||
accumulateRecharge = allBalance + usedAmount + giveAmount;
|
||||
allBalance += giveAmount;
|
||||
}
|
||||
|
||||
map.put("userNum",userNum);
|
||||
map.put("logOffUserNum",logOffUserNum);
|
||||
map.put("allPoints",allPoints);
|
||||
map.put("consumePoints",consumePoints);
|
||||
map.put("accumulateRecharge",accumulateRecharge);
|
||||
map.put("allBalance",allBalance);
|
||||
return map;
|
||||
public LJUserDto selectUserNum() {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
LJUserDto ljUserDto = ljUserMapper.queryUserMsg(nowAccountInfo.getStoreId());
|
||||
// Map<String, Object> map = new HashMap<>();
|
||||
//
|
||||
// List<LJUserVo> ljUserVos = selectUsersList();
|
||||
//
|
||||
//// 会员人数
|
||||
// Integer userNum = 0;
|
||||
//// 注销会员人数
|
||||
// Integer logOffUserNum = 0;
|
||||
//// 会员总积分
|
||||
// Integer allPoints = 0;
|
||||
//// 消耗积分
|
||||
// Integer consumePoints = 0;
|
||||
//// 会员累计充值
|
||||
// Double accumulateRecharge = 0.0;
|
||||
//// 会员总余额
|
||||
// Double allBalance = 0.0;
|
||||
//
|
||||
// if (ObjectUtil.isNotEmpty(ljUserVos)){
|
||||
// userNum = ljUserVos.size();
|
||||
// Integer points = 0;
|
||||
// Double usedAmount = 0.0;
|
||||
// Double giveAmount = 0.0;
|
||||
// for (LJUserVo ljUserVo : ljUserVos) {
|
||||
// points += ljUserVo.getPoints();
|
||||
// if (ObjectUtil.isNotEmpty(ljUserVo.getUsedPoints())) consumePoints += ljUserVo.getUsedPoints();
|
||||
// allBalance += ljUserVo.getCardBalance();
|
||||
// if (ObjectUtil.isNotEmpty(ljUserVo.getUsedAmount())) usedAmount += ljUserVo.getUsedAmount();
|
||||
// if (ObjectUtil.isNotEmpty(ljUserVo.getGiveAmount())) giveAmount += ljUserVo.getGiveAmount();
|
||||
// if (ljUserVo.getUserStatus().equals("1")){
|
||||
// logOffUserNum += 1;
|
||||
// }
|
||||
// }
|
||||
// allPoints = points + consumePoints;
|
||||
// accumulateRecharge = allBalance + usedAmount + giveAmount;
|
||||
// allBalance += giveAmount;
|
||||
// }
|
||||
//
|
||||
// map.put("userNum",userNum);
|
||||
// map.put("logOffUserNum",logOffUserNum);
|
||||
// map.put("allPoints",allPoints);
|
||||
// map.put("consumePoints",consumePoints);
|
||||
// map.put("accumulateRecharge",accumulateRecharge);
|
||||
// map.put("allBalance",allBalance);
|
||||
return ljUserDto;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> selectAmountStatistics() {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
// 充值总额
|
||||
Double rechargeAmount = 0.0;
|
||||
// 充值本金
|
||||
Double rechargePrincipal = 0.0;
|
||||
// 充值赠送
|
||||
Double rechargeGive = 0.0;
|
||||
// 消费总额
|
||||
Double consumeAmount = 0.0;
|
||||
// 消费本金
|
||||
Double consumePrincipal = 0.0;
|
||||
// 消费赠送
|
||||
Double consumeGive = 0.0;
|
||||
// 退款总额
|
||||
Double refundAmount = 0.0;
|
||||
// 退款本金
|
||||
Double refundPrincipal = 0.0;
|
||||
// 退款赠送
|
||||
Double refundGive = 0.0;
|
||||
// 注销总额
|
||||
Double logOffAmount = 0.0;
|
||||
// 注销本金
|
||||
Double logOffPrincipal = 0.0;
|
||||
// 注销赠送
|
||||
Double logOffGive = 0.0;
|
||||
// 会员总余额
|
||||
Double userBalance = 0.0;
|
||||
// 剩余本金
|
||||
Double residuePrincipal = 0.0;
|
||||
// 剩余赠送
|
||||
Double residueGive = 0.0;
|
||||
public LJUserStaticesDto selectAmountStatistics() {
|
||||
|
||||
List<CardBalanceChange> cardBalanceChanges1 = cardBalanceChangeService.selectList("1");
|
||||
if (ObjectUtil.isNotEmpty(cardBalanceChanges1)) {
|
||||
for (CardBalanceChange cardBalanceChange : cardBalanceChanges1) {
|
||||
rechargePrincipal += cardBalanceChange.getBalance();
|
||||
if (ObjectUtil.isNotEmpty(cardBalanceChange.getGiveBalance()))
|
||||
rechargeGive += cardBalanceChange.getGiveBalance();
|
||||
}
|
||||
rechargeAmount += rechargePrincipal + rechargeGive;
|
||||
}
|
||||
List<CardBalanceChange> cardBalanceChanges = cardBalanceChangeService.selectList("0");
|
||||
if (ObjectUtil.isNotEmpty(cardBalanceChanges)) {
|
||||
for (CardBalanceChange cardBalanceChange : cardBalanceChanges) {
|
||||
if (cardBalanceChange.getFromType().equals("油品订单消费")){
|
||||
consumePrincipal += cardBalanceChange.getBalance();
|
||||
if (ObjectUtil.isNotEmpty(cardBalanceChange.getGiveBalance()))
|
||||
consumeGive += cardBalanceChange.getGiveBalance();
|
||||
}else {
|
||||
refundPrincipal += cardBalanceChange.getBalance();
|
||||
if (ObjectUtil.isNotEmpty(cardBalanceChange.getGiveBalance()))
|
||||
refundGive += cardBalanceChange.getGiveBalance();
|
||||
}
|
||||
}
|
||||
consumeAmount = consumePrincipal + consumeGive;
|
||||
refundAmount = refundPrincipal + refundGive;
|
||||
}
|
||||
|
||||
List<LJUserVo> ljUserVos = selectUsersList();
|
||||
if (ObjectUtil.isNotEmpty(ljUserVos)){
|
||||
for (LJUserVo ljUserVo : ljUserVos) {
|
||||
residuePrincipal += ljUserVo.getCardBalance();
|
||||
if (ObjectUtil.isNotEmpty(ljUserVo.getGiveAmount())) residueGive += ljUserVo.getGiveAmount();
|
||||
|
||||
if (ljUserVo.getUserStatus().equals("1")){
|
||||
logOffPrincipal += ljUserVo.getCardBalance();
|
||||
if (ObjectUtil.isNotEmpty(ljUserVo.getGiveAmount())) logOffGive += ljUserVo.getGiveAmount();
|
||||
}
|
||||
}
|
||||
logOffAmount = logOffPrincipal + logOffGive;
|
||||
userBalance = residuePrincipal + residueGive;
|
||||
}
|
||||
|
||||
map.put("rechargeAmount",rechargeAmount);
|
||||
map.put("rechargePrincipal",rechargePrincipal);
|
||||
map.put("rechargeGive",rechargeGive);
|
||||
map.put("consumeAmount",consumeAmount);
|
||||
map.put("consumePrincipal",consumePrincipal);
|
||||
map.put("consumeGive",consumeGive);
|
||||
map.put("refundAmount",refundAmount);
|
||||
map.put("refundPrincipal",refundPrincipal);
|
||||
map.put("refundGive",refundGive);
|
||||
map.put("logOffAmount",logOffAmount);
|
||||
map.put("logOffPrincipal",logOffPrincipal);
|
||||
map.put("logOffGive",logOffGive);
|
||||
map.put("userBalance",userBalance);
|
||||
map.put("residuePrincipal",residuePrincipal);
|
||||
map.put("residueGive",residueGive);
|
||||
return map;
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
LJUserStaticesDto ljUserStaticesDto = ljUserMapper.selectAmountStatistics(nowAccountInfo.getStoreId());
|
||||
// Map<String, Object> map = new HashMap<>();
|
||||
//// 充值总额
|
||||
// Double rechargeAmount = 0.0;
|
||||
//// 充值本金
|
||||
// Double rechargePrincipal = 0.0;
|
||||
//// 充值赠送
|
||||
// Double rechargeGive = 0.0;
|
||||
//// 消费总额
|
||||
// Double consumeAmount = 0.0;
|
||||
//// 消费本金
|
||||
// Double consumePrincipal = 0.0;
|
||||
//// 消费赠送
|
||||
// Double consumeGive = 0.0;
|
||||
//// 退款总额
|
||||
// Double refundAmount = 0.0;
|
||||
//// 退款本金
|
||||
// Double refundPrincipal = 0.0;
|
||||
//// 退款赠送
|
||||
// Double refundGive = 0.0;
|
||||
//// 注销总额
|
||||
// Double logOffAmount = 0.0;
|
||||
//// 注销本金
|
||||
// Double logOffPrincipal = 0.0;
|
||||
//// 注销赠送
|
||||
// Double logOffGive = 0.0;
|
||||
//// 会员总余额
|
||||
// Double userBalance = 0.0;
|
||||
//// 剩余本金
|
||||
// Double residuePrincipal = 0.0;
|
||||
//// 剩余赠送
|
||||
// Double residueGive = 0.0;
|
||||
// BigDecimal bigDecimal = new BigDecimal("0");
|
||||
// List<CardBalanceChange> cardBalanceChanges1 = cardBalanceChangeService.selectList("1");
|
||||
// if (ObjectUtil.isNotEmpty(cardBalanceChanges1)) {
|
||||
// for (CardBalanceChange cardBalanceChange : cardBalanceChanges1) {
|
||||
// rechargePrincipal += cardBalanceChange.getBalance();
|
||||
// if (ObjectUtil.isNotEmpty(cardBalanceChange.getGiveBalance()))
|
||||
// rechargeGive += cardBalanceChange.getGiveBalance();
|
||||
// }
|
||||
// rechargeAmount += rechargePrincipal + rechargeGive;
|
||||
// }
|
||||
// List<CardBalanceChange> cardBalanceChanges = cardBalanceChangeService.selectList("0");
|
||||
// if (ObjectUtil.isNotEmpty(cardBalanceChanges)) {
|
||||
// for (CardBalanceChange cardBalanceChange : cardBalanceChanges) {
|
||||
// if (cardBalanceChange.getFromType().equals("油品订单消费")){
|
||||
// consumePrincipal += cardBalanceChange.getBalance();
|
||||
// if (ObjectUtil.isNotEmpty(cardBalanceChange.getGiveBalance()))
|
||||
// consumeGive += cardBalanceChange.getGiveBalance();
|
||||
// }else {
|
||||
// refundPrincipal += cardBalanceChange.getBalance();
|
||||
// if (ObjectUtil.isNotEmpty(cardBalanceChange.getGiveBalance()))
|
||||
// refundGive += cardBalanceChange.getGiveBalance();
|
||||
// }
|
||||
// }
|
||||
// consumeAmount = consumePrincipal + consumeGive;
|
||||
// refundAmount = refundPrincipal + refundGive;
|
||||
// }
|
||||
//
|
||||
// List<LJUserVo> ljUserVos = selectUsersList();
|
||||
// if (ObjectUtil.isNotEmpty(ljUserVos)){
|
||||
// for (LJUserVo ljUserVo : ljUserVos) {
|
||||
// residuePrincipal += ljUserVo.getCardBalance();
|
||||
// if (ObjectUtil.isNotEmpty(ljUserVo.getGiveAmount())) residueGive += ljUserVo.getGiveAmount();
|
||||
//
|
||||
// if (ljUserVo.getUserStatus().equals("1")){
|
||||
// logOffPrincipal += ljUserVo.getCardBalance();
|
||||
// if (ObjectUtil.isNotEmpty(ljUserVo.getGiveAmount())) logOffGive += ljUserVo.getGiveAmount();
|
||||
// }
|
||||
// }
|
||||
// logOffAmount = logOffPrincipal + logOffGive;
|
||||
// userBalance = residuePrincipal + residueGive;
|
||||
// }
|
||||
//
|
||||
// map.put("rechargeAmount",rechargeAmount);
|
||||
// map.put("rechargePrincipal",rechargePrincipal);
|
||||
// map.put("rechargeGive",rechargeGive);
|
||||
// map.put("consumeAmount",consumeAmount);
|
||||
// map.put("consumePrincipal",consumePrincipal);
|
||||
// map.put("consumeGive",consumeGive);
|
||||
// map.put("refundAmount",refundAmount);
|
||||
// map.put("refundPrincipal",refundPrincipal);
|
||||
// map.put("refundGive",refundGive);
|
||||
// map.put("logOffAmount",logOffAmount);
|
||||
// map.put("logOffPrincipal",logOffPrincipal);
|
||||
// map.put("logOffGive",logOffGive);
|
||||
// map.put("userBalance",userBalance);
|
||||
// map.put("residuePrincipal",residuePrincipal);
|
||||
// map.put("residueGive",residueGive);
|
||||
return ljUserStaticesDto;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,10 +1,10 @@
|
||||
# \u57FA\u672C\u914D\u7F6E
|
||||
server.port=8080
|
||||
env.profile=dev
|
||||
#env.properties.path=C:/Users/qq244432/Desktop/project/oil-station/fuintBackend/configure/
|
||||
env.properties.path=D:/work/sw/fuintBackend/configure/
|
||||
#env.properties.path=F:/work/oilSystem/fuintBackend/configure/
|
||||
#env.properties.path=D:/oil/new-oil/oilSystem/fuintBackend/configure/
|
||||
env.properties.path=D:/code/bulidmap/oil-station/fuintBackend/configure
|
||||
#env.properties.path=D:/code/bulidmap/oil-station/fuintBackend/configure
|
||||
#env.properties.path=D:/work/oilSystem/fuintBackend/configure/
|
||||
#env.properties.path=/www/wwwroot/shenlanshuke/oilAdmin/
|
||||
|
||||
|
@ -568,6 +568,7 @@ export default {
|
||||
dicts: ['CardCoupon_type'],
|
||||
data() {
|
||||
return {
|
||||
orderNo:'',
|
||||
disOil: 0.00,
|
||||
disGoods: 0.00,
|
||||
loadingPreferential: false,
|
||||
@ -1053,6 +1054,7 @@ export default {
|
||||
await getCheckTheStatusOfYourPaymentApi(id).then(async response => {
|
||||
if (response.data != null) {
|
||||
const payStatus = response.data.payStatus
|
||||
this_.orderNo=response.data.paymentNo
|
||||
if (payStatus === "unpaid") {
|
||||
this_.isQuery = true;
|
||||
} else if (payStatus === "paid") {
|
||||
@ -1118,7 +1120,6 @@ export default {
|
||||
this.$message.error('请选择输入充值本金');
|
||||
return
|
||||
}
|
||||
console.log(selectCard,1122)
|
||||
this.payForm.rechargeBalance = selectCard.rechargeBalance
|
||||
this.payForm.lockupPrice = selectCard.lockupPrice
|
||||
this.payForm.realyPayBills = selectCard.rechargeBalance
|
||||
@ -1227,8 +1228,13 @@ export default {
|
||||
console.log(1226)
|
||||
let payTypeText = payTypeMap[this.payForm.paymentType]
|
||||
let actualPay = this.payForm.paymentType == 'CASH' ? this.payForm.authCode:this.payForm.realyPayBills
|
||||
|
||||
let mm=[]
|
||||
mm.push({
|
||||
orderNo:this.orderNo,
|
||||
payUser:this.chooseVipUser.mobile
|
||||
})
|
||||
let a = {
|
||||
oilOrder:mm,
|
||||
// 充值金额
|
||||
realyPayBills:this.payForm.realyPayBills,
|
||||
//赠送金额
|
||||
@ -1430,10 +1436,11 @@ export default {
|
||||
|
||||
let isPaySuccess = false;
|
||||
console.log(_this.payForm, 1089)
|
||||
_this.payForm.cardCouponList=null
|
||||
// 调用 支付接口 并产生 订单 返回订单号
|
||||
await addLJGoods(_this.payForm).then(async response => {
|
||||
_this.orderNo = response.data.orderNo;
|
||||
|
||||
this.orderNo = response.data.orderNo;
|
||||
//支付成功 后需要打印小票
|
||||
console.log("支付成功", response)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user