This commit is contained in:
sw 2024-11-11 16:00:06 +08:00
parent adccfd43fd
commit 7060da15d7
17 changed files with 175 additions and 46 deletions

View File

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

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

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

@ -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>
<!--统计总行数-->

View File

@ -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();

View File

@ -296,20 +296,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}
@ -318,13 +351,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') &gt;= date_format(#{cardValueRecord.params.beginTime},'%y%m%d')
and date_format(createTime,'%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(create_time,'%y%m%d') &lt;= date_format(#{cardValueRecord.params.endTime},'%y%m%d')
and date_format(createTime,'%y%m%d') &lt;= 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

View File

@ -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);
}
}

View File

@ -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);
/**
* 统计总行数

View File

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

View File

@ -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);
}

View File

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

View File

@ -38,6 +38,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;
@ -888,7 +889,7 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
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) {