diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableServiceImpl.java index 7c0dace8e..3e11e934d 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableServiceImpl.java @@ -154,7 +154,7 @@ public class CardFavorableServiceImpl extends ServiceImpl iPageList = this.cardFuelRecordService.queryByPage(page, cardFuelRecord); return getSuccessResult(iPageList); } - + + /** + * 分页查询(小程序端) + * + * @param cardFuelRecord 筛选条件 + * @param pageNo 分页对象 + * @return 查询结果 + */ + @GetMapping("queryByPageApplet") + public ResponseObject queryByPageApplet(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo, + @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize, + @Param("cardFuelRecord") CardFuelRecord cardFuelRecord) { + Page page = new Page(pageNo, pageSize); + IPage< CardFuelRecord> iPageList = this.cardFuelRecordService.queryByPageApplet(page, cardFuelRecord); + return getSuccessResult(iPageList); + } + /** diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/CardFuelRecordMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/CardFuelRecordMapper.java index 998b68e03..bccbeaf2e 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/CardFuelRecordMapper.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/CardFuelRecordMapper.java @@ -92,5 +92,13 @@ public interface CardFuelRecordMapper { */ IPage selectFuelRecord(@Param("page") Page page, CardFuelRecord cardFuelRecord); + /** + * 分页查询(小程序端) + * @param page + * @param cardFuelRecord + * @return + */ + IPage queryByPageApplet(@Param("page") Page page, @Param("cardFuelRecord") CardFuelRecord cardFuelRecord); } + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/xml/CardFuelRecordMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/xml/CardFuelRecordMapper.xml index 5e64bb4ae..97f6915d0 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/xml/CardFuelRecordMapper.xml +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/xml/CardFuelRecordMapper.xml @@ -356,6 +356,20 @@ ORDER BY create_time; + + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/CardFuelRecordService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/CardFuelRecordService.java index 838661fc7..a0645183d 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/CardFuelRecordService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/CardFuelRecordService.java @@ -80,4 +80,11 @@ public interface CardFuelRecordService { */ IPage selectFuelRecord(@Param("page") Page page, CardFuelRecord cardFuelRecord); + /** + * 分页查询(小程序端) + * @param page + * @param cardFuelRecord + * @return + */ + IPage queryByPageApplet(Page page, CardFuelRecord cardFuelRecord); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelRecordServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelRecordServiceImpl.java index cce2d7343..90d898cb1 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelRecordServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelRecordServiceImpl.java @@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.TypeReference; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.fuint.api.fuyou.entity.MerchantConfig; @@ -321,4 +322,19 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService { return this.cardFuelRecordMapper.selectFuelRecord(page, cardFuelRecord); } + /** + * 分页查询(小程序端) + * @param page + * @param cardFuelRecord + * @return + */ + @Override + public IPage queryByPageApplet(Page page, CardFuelRecord cardFuelRecord) { + //获取登录用户id + AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); + Integer id = nowAccountInfo.getId(); + cardFuelRecord.setMtUserId(id); + return this.cardFuelRecordMapper.queryByPageApplet(page,cardFuelRecord); + } + } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/vo/CardFuelRecordVo.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/vo/CardFuelRecordVo.java new file mode 100644 index 000000000..926404b56 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/vo/CardFuelRecordVo.java @@ -0,0 +1,12 @@ +package com.fuint.business.marketingActivity.cardFule.vo; + +import com.fuint.business.marketingActivity.cardFule.entity.CardFuelRecord; +import lombok.Data; + +import java.io.Serializable; + +@Data +public class CardFuelRecordVo extends CardFuelRecord implements Serializable { + //所剩升数 + private Double oilLitres; +}