This commit is contained in:
cun-nan 2024-03-07 14:10:07 +08:00
parent 42afda3a8a
commit b2dfaa9579
4 changed files with 8 additions and 5 deletions

View File

@ -4,7 +4,7 @@
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="活动名称" prop="name">
<el-input
v-model="queryParams.name"
v-model="queryParams.activeName"
placeholder="请输入活动名称"
clearable
@keyup.enter.native="handleQuery"
@ -714,7 +714,8 @@ export default {
let data = {
status:this.status
}
getCardFavorableLists(data).then(response => {
this.queryParams.status = this.status
getCardFavorableLists(this.queryParams).then(response => {
this.activeConsumptionList = response.data.records;
this.total = response.data.total;
console.log(response)

View File

@ -42,7 +42,7 @@ public class ActiveOneCouponController extends BaseController {
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
@Param("activeOneCoupon") ActiveOneCoupon activeOneCoupon) {
Page page = new Page(pageNo, pageSize);
return getSuccessResult(this.activeOneCouponService.select(page, new QueryWrapper<>(activeOneCoupon)));
return getSuccessResult(this.activeOneCouponService.select(page, activeOneCoupon));
}
/**

View File

@ -20,7 +20,7 @@ public interface ActiveOneCouponService extends IService<ActiveOneCoupon> {
boolean add(ActiveOneCouponDTO activeOneCouponDTO);
IPage select(Page page, QueryWrapper<ActiveOneCoupon> activeOneCouponQueryWrapper);
IPage select(Page page, ActiveOneCoupon activeOneCoupon);
ActiveOneCouponVO getOneById(Serializable id);

View File

@ -122,10 +122,12 @@ public class ActiveOneCouponServiceImpl extends ServiceImpl<ActiveOneCouponMappe
}
@Override
public IPage select(Page page, QueryWrapper<ActiveOneCoupon> activeOneCouponQueryWrapper) {
public IPage select(Page page, ActiveOneCoupon activeOneCoupon) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
LambdaQueryWrapper<ActiveOneCoupon> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(nowAccountInfo.getStoreId() != null, ActiveOneCoupon::getStoreId, nowAccountInfo.getStoreId());
if (ObjectUtil.isNotEmpty(activeOneCoupon.getActiveName()))
queryWrapper.like(ActiveOneCoupon::getActiveName, activeOneCoupon.getActiveName());
IPage page1 = page(page, queryWrapper);
List<ActiveOneCoupon> records = page1.getRecords();
ArrayList<ActiveOneCouponVO> activeOneCouponVOArrayList = new ArrayList<>();