Compare commits

..

No commits in common. "28d72ff38688eed22fd374949df0194b6092fe9e" and "4078f4b6519708b7a0f2ab7beb699b30c801ccb0" have entirely different histories.

33 changed files with 202 additions and 506 deletions

View File

@ -14,19 +14,17 @@
</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="activeName" label="活动名称" align="center" width="165">
</el-table-column>
<el-table-column prop="createBy" label="会员等级" align="center">
<el-table-column prop="groupOriented" label="活动名称" align="center" width="165">
<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="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 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 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>-->
@ -43,14 +41,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="participationNo" 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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -53,7 +53,7 @@
width="50">
</el-table-column>
<el-table-column label="分类名称" align="center" prop="categoryName"/>
<el-table-column label="创建人" align="createBy" prop="sort" />
<el-table-column label="排序" align="center" prop="sort" />
<el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope">
<div slot="reference" class="name-wrapper">

View File

@ -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>

View File

@ -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"

View File

@ -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>

View File

@ -284,7 +284,6 @@ export default {
<style lang="scss" scoped>
.left-img{
margin-left: 20px;
position: relative;
display: inline-block;
width: 300px;
@ -293,10 +292,8 @@ 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; /* 设置复选框和输入框之间的间距 */
@ -359,7 +356,6 @@ export default {
.container {
display: flex;
background-color: #f7f7f8;
}
.logo {
width: 200px; /* 根据需要调整图片宽度 */
@ -426,8 +422,6 @@ avatar-uploader .el-upload {
display: flex;
flex-direction: column;
gap: 10px;
background-color: #FFFFFF;
margin-top: 20px;
}
/* 使按钮居中对齐 */
@ -438,12 +432,9 @@ avatar-uploader .el-upload {
}
.fatrelative{
position: relative;
background-color: #FFFFFF;
margin-top: 20px;
width: 36%;
margin-left: 20px;
}
.relative {
margin-top: 20px;
position:absolute;
}

View File

@ -206,7 +206,6 @@ export default {
},
getList(){
getAppListApi(this.queryParams).then(res=>{
console.log(2222222222)
this.tableData = res.data.records;
this.total = res.data.total
})

View File

@ -25,38 +25,37 @@
<!--查询指定行数据-->
<select id="queryAllByLimit" resultMap="IntegralGiftCategoryMap">
select
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
id, category_name, sort, status, store_id, create_time, update_time, create_by, update_by
from integral_gift_category
<where>
igc.store_id = #{integralGiftCategory.storeId}
store_id = #{integralGiftCategory.storeId}
<if test="integralGiftCategory.id != null">
and igc.id = #{integralGiftCategory.id}
and id = #{integralGiftCategory.id}
</if>
<if test="integralGiftCategory.categoryName != null and integralGiftCategory.categoryName != ''">
and igc.category_name like CONCAT ('%',#{integralGiftCategory.categoryName},'%')
and category_name like CONCAT ('%',#{integralGiftCategory.categoryName},'%')
</if>
<if test="integralGiftCategory.sort != null">
and igc.sort = #{integralGiftCategory.sort}
and sort = #{integralGiftCategory.sort}
</if>
<if test="integralGiftCategory.status != null and integralGiftCategory.status != ''">
and igc.status = #{integralGiftCategory.status}
and status = #{integralGiftCategory.status}
</if>
<if test="integralGiftCategory.createTime != null">
and igc.create_time = #{integralGiftCategory.createTime}
and create_time = #{integralGiftCategory.createTime}
</if>
<if test="integralGiftCategory.updateTime != null">
and igc.update_time = #{integralGiftCategory.updateTime}
and update_time = #{integralGiftCategory.updateTime}
</if>
<if test="integralGiftCategory.createBy != null">
and igc.create_by = #{integralGiftCategory.createBy}
and create_by = #{integralGiftCategory.createBy}
</if>
<if test="integralGiftCategory.updateBy != null">
and igc.update_by = #{integralGiftCategory.updateBy}
and update_by = #{integralGiftCategory.updateBy}
</if>
</where>
order by igc.create_time desc
order by create_time desc
</select>
<!--统计总行数-->

View File

@ -64,7 +64,7 @@ public class CardValueRecordController extends BaseController {
* @return
*/
@GetMapping("/list")
public ResponseObject selectAllPage(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
public ResponseObject selectAllPage(@RequestParam(value = "pageNo[page]",defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
CardValueRecord cardValueRecord) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();

View File

@ -297,53 +297,20 @@
</select>
<select id="selectCardValueRecordList"
resultType="com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord">
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
select * from card_value_record
<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 paymentType = #{cardValueRecord.paymentType}
and payment_type = #{cardValueRecord.paymentType}
</if>
<if test="cardValueRecord.payChannel != null and cardValueRecord.payChannel != ''">
and payChannel = #{cardValueRecord.payChannel}
and pay_channel = #{cardValueRecord.payChannel}
</if>
<if test="cardValueRecord.paymentNo != null and cardValueRecord.paymentNo != ''">
and paymentNo like concat('%', #{cardValueRecord.paymentNo}, '%')
and payment_no like concat('%', #{cardValueRecord.paymentNo}, '%')
</if>
<if test="cardValueRecord.cardValueId != null and cardValueRecord.cardValueId != ''">
and card_value_id = #{cardValueRecord.cardValueId}
@ -352,13 +319,13 @@
and mobile like concat('%', #{cardValueRecord.mobile}, '%')
</if>
<if test="cardValueRecord.params.beginTime != null and cardValueRecord.params.beginTime != ''"><!-- 开始时间检索 -->
and date_format(createTime,'%y%m%d') &gt;= date_format(#{cardValueRecord.params.beginTime},'%y%m%d')
and date_format(create_time,'%y%m%d') &gt;= date_format(#{cardValueRecord.params.beginTime},'%y%m%d')
</if>
<if test="cardValueRecord.params.endTime != null and cardValueRecord.params.endTime != ''"><!-- 结束时间检索 -->
and date_format(createTime,'%y%m%d') &lt;= date_format(#{cardValueRecord.params.endTime},'%y%m%d')
and date_format(create_time,'%y%m%d') &lt;= date_format(#{cardValueRecord.params.endTime},'%y%m%d')
</if>
order by createTime desc
</where>
order by create_time desc
</select>
<select id="getAmountAndConsume" resultType="java.util.Map">
select

View File

@ -519,6 +519,7 @@ public class AllOrderInfoController extends BaseController {
this.allOrderInfoService.exportExcelBackOrderMsgsApi(response, allOrderInfoRes);
}
/**
* 交易对账
* 交易明细分页查询

View File

@ -185,9 +185,5 @@ public class OilOrder extends BaseEntity implements Serializable {
private Long deptId;
@TableField(exist = false)
private List<Long> storeIds;
/**
* 储值卡赠送金额消费
*/
private Double balanceGiftAmount;
}

View File

@ -1218,9 +1218,8 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
handoverMap.put("baseInfo",baseInfo);
// 获取订单汇总
Map<String, Object> orderSummaryMap = orderSummary1(startTime, formattedEndTime, staffId);
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())));
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()));
handoverMap.put("orderSummary",orderSummaryMap);
// 支付方式汇总
List<Map<String, Object>> paymentAggregationMap = paymentAggregation1(startTime, formattedEndTime, staffId);
@ -1276,8 +1275,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",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())));
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()));
return allStatistics;
}

View File

@ -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,35 +1935,20 @@ 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);
// 修改余额信息
BigDecimal num7 =num2.subtract(num1);
if (num7.doubleValue() < 0.0) {
Double beforeBalance = balance.getCardBalance();
Double afterBalance = beforeBalance - amount;
if ((beforeBalance - amount) < 0.0) {
return false;
}
cardBalanceChange.setAfterTheChange(num7.doubleValue());
balance.setCardBalance(num7.doubleValue());
balance.setGiveAmount(num6.doubleValue());
cardBalanceChange.setAfterTheChange(afterBalance);
balance.setCardBalance(afterBalance);
// 修改加油次数
Integer consumeNum = balance.getConsumeNum();
balance.setConsumeNum(consumeNum + 1);
userBalanceService.updateUserBalance(balance);
}
// 添加余额记录信息
cardBalanceChange.setUserId(userId);
cardBalanceChange.setChangeType("0");
@ -1971,6 +1956,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
cardBalanceChange.setBalance(amount);
cardBalanceChange.setOrderNo(orderNo);
cardBalanceChange.setStoreId(storeId);
cardBalanceChangeService.insertCardBalance(cardBalanceChange);
return true;
}
@ -2430,31 +2416,4 @@ 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();
}
}

View File

@ -65,7 +65,7 @@ public class SysNotifyController extends BaseController {
boolean b = this.sysNotifyService.sendNotifyOne(id);
if (b) {
return getSuccessResult("发送成功");
return getFailureResult(200, "发送成功");
}
else {
return getFailureResult(500, "发送失败用户不存在");
@ -127,20 +127,6 @@ 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);
}
}

View File

@ -33,14 +33,6 @@ 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);
/**
* 统计总行数

View File

@ -14,14 +14,13 @@
<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,org_id
legal_representative_id,legal_representative_contact,app_status,app_key,legal_representative_wechat
from sys_app
where id = #{id}
</select>
@ -30,7 +29,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,org_id
legal_representative_id,legal_representative_contact,app_status,create_time,create_by_name,app_key,legal_representative_wechat
from sys_app
<where>
<if test="sysApp.id != null">

View File

@ -138,35 +138,5 @@ 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>

View File

@ -58,13 +58,4 @@ public interface SysNotifyService extends IService<SysNotify> {
*/
boolean deleteById(Integer id);
/**
* 分页查询
*
* @param sysNotify 筛选条件
* @param page 分页对象
* @return 查询结果
*/
IPage<SysNotify> queryByPages(@Param("page") Page page, SysNotify sysNotify);
}

View File

@ -93,10 +93,8 @@ 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;

View File

@ -99,35 +99,6 @@ 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;
}
/**
* 新增数据
*
@ -319,10 +290,8 @@ 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=Integer.valueOf(mm);
Integer userId = userObject.getInteger("id");
// 根据 userId 查询员工信息
TAccount account = tAccountMapper.selectById(userId);

View File

@ -1,24 +0,0 @@
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 ;
}

View File

@ -1,40 +0,0 @@
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;
}

View File

@ -4,8 +4,6 @@ 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;
@ -114,8 +112,4 @@ 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);
}

View File

@ -310,8 +310,7 @@
mub.card_balance cardBalance,
mub.points,
mub.growth_value growthValue,
mub.refuel_money refuelMoney,
mub.give_amount giveAmount
mub.refuel_money refuelMoney
from mt_user mu
left join mt_user_balance mub on mu.id = mub.mt_user_id
where mu.id = #{userId}
@ -420,33 +419,6 @@
</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.*

View File

@ -4,8 +4,6 @@ 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;
@ -199,13 +197,13 @@ public interface LJUserService extends IService<LJUser> {
* 会员分析-会员统计-会员人数
* @return
*/
LJUserDto selectUserNum();
Map<String,Object> selectUserNum();
/**
* 会员分析-会员统计-会员金额统计
* @return
*/
LJUserStaticesDto selectAmountStatistics();
Map<String,Object> selectAmountStatistics();
/**
* 会员分析-会员统计-会员发放积分统计

View File

@ -104,5 +104,4 @@ public interface UserBalanceService extends IService<UserBalance> {
* @param orderNo 订单号
*/
void growthValue(Integer userId, Integer chainStoreId,Integer storeId, String consumptioType, Double money,String fromType, String orderNo);
}

View File

@ -23,8 +23,6 @@ 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;
@ -40,7 +38,6 @@ 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;
@ -813,149 +810,142 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
}
@Override
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;
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;
}
@Override
public LJUserStaticesDto selectAmountStatistics() {
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;
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;
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;
}
@Override

View File

@ -1,10 +1,10 @@
# \u57FA\u672C\u914D\u7F6E
server.port=8080
env.profile=dev
env.properties.path=D:/work/sw/fuintBackend/configure/
#env.properties.path=C:/Users/qq244432/Desktop/project/oil-station/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/

View File

@ -568,7 +568,6 @@ export default {
dicts: ['CardCoupon_type'],
data() {
return {
orderNo:'',
disOil: 0.00,
disGoods: 0.00,
loadingPreferential: false,
@ -1054,7 +1053,6 @@ 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") {
@ -1120,6 +1118,7 @@ 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
@ -1228,13 +1227,8 @@ 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,
//
@ -1436,11 +1430,10 @@ 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)