This commit is contained in:
齐天大圣 2024-03-11 14:07:54 +08:00
parent a389ac5d43
commit e9a65f91dd
3 changed files with 11 additions and 15 deletions

View File

@ -47,17 +47,12 @@ public class CardValueController extends BaseController {
/** /**
* 分页查询所有数据(小程序端) * 分页查询所有数据(小程序端)
* @param pageNo
* @param pageSize
* @param cardValue * @param cardValue
* @return * @return
*/ */
@GetMapping("appletL") @GetMapping("appletL")
public ResponseObject selectAllApplet(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo, public ResponseObject selectAppletL(@Param("cardValue") CardValue cardValue) {
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize, return getSuccessResult(this.cardValueService.selectAppletL(cardValue));
@Param("cardValue") CardValue cardValue) {
Page page = new Page(pageNo, pageSize);
return getSuccessResult(this.cardValueService.selectAllApplet(page, cardValue));
} }
/** /**

View File

@ -7,6 +7,7 @@ import com.fuint.business.marketingActivity.cardValue.dto.CardValueDTO;
import com.fuint.business.marketingActivity.cardValue.entity.CardValue; import com.fuint.business.marketingActivity.cardValue.entity.CardValue;
import com.fuint.business.marketingActivity.cardValue.vo.CardValueAppletVO; import com.fuint.business.marketingActivity.cardValue.vo.CardValueAppletVO;
import com.fuint.business.marketingActivity.cardValue.vo.CardValueVO; import com.fuint.business.marketingActivity.cardValue.vo.CardValueVO;
import com.fuint.business.marketingActivity.cardValue.vo.CardValueVOs;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.List;
@ -33,7 +34,7 @@ public interface CardValueService extends IService<CardValue> {
* @param cardValue * @param cardValue
* @return * @return
*/ */
IPage selectAllApplet(Page page, CardValue cardValue); List<CardValueVOs> selectAppletL(CardValue cardValue);
/** /**
* 通过主键查询单条数据(充值) * 通过主键查询单条数据(充值)

View File

@ -99,13 +99,12 @@ public class CardValueServiceImpl extends ServiceImpl<CardValueMapper, CardValue
} }
/** /**
* 分页查询所有数据(小程序端) * 查询所有数据(小程序端)
* @param page
* @param cardValue * @param cardValue
* @return * @return
*/ */
@Override @Override
public IPage selectAllApplet(Page page, CardValue cardValue) { public List<CardValueVOs> selectAppletL(CardValue cardValue) {
LambdaQueryWrapper<CardValue> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<CardValue> queryWrapper = new LambdaQueryWrapper<>();
//构建查询条件 //构建查询条件
if (ObjectUtils.isNotEmpty(cardValue.getIsonline())){ if (ObjectUtils.isNotEmpty(cardValue.getIsonline())){
@ -118,8 +117,9 @@ public class CardValueServiceImpl extends ServiceImpl<CardValueMapper, CardValue
queryWrapper.eq(CardValue::getStoreId,cardValue.getStoreId()); queryWrapper.eq(CardValue::getStoreId,cardValue.getStoreId());
} }
queryWrapper.orderByDesc(CardValue::getCreateTime); queryWrapper.orderByDesc(CardValue::getCreateTime);
IPage page1 = page(page, queryWrapper); List<CardValue> records = list(queryWrapper);
List<CardValue> records = page1.getRecords(); //IPage page1 = page(page, queryWrapper);
//List<CardValue> records = page1.getRecords();
CardValueVOs cardValueVO = new CardValueVOs(); CardValueVOs cardValueVO = new CardValueVOs();
ArrayList<CardValueVOs> cardValueVOs = new ArrayList<>(); ArrayList<CardValueVOs> cardValueVOs = new ArrayList<>();
//返回储值卡活动进度状态 //返回储值卡活动进度状态
@ -153,8 +153,8 @@ public class CardValueServiceImpl extends ServiceImpl<CardValueMapper, CardValue
cardValueVOs.add(cardValueVO); cardValueVOs.add(cardValueVO);
} }
} }
page1.setRecords(cardValueVOs); //page1.setRecords(cardValueVOs);
return page1; return cardValueVOs;
} }
public IPage selectAll(Page page, CardValue cardValue) { public IPage selectAll(Page page, CardValue cardValue) {