小程序囤油卡

This commit is contained in:
齐天大圣 2023-12-14 15:54:53 +08:00
parent 29b2f0f586
commit e0be7fbed7
7 changed files with 75 additions and 2 deletions

View File

@ -154,7 +154,7 @@ public class CardFavorableServiceImpl extends ServiceImpl<CardFavorableMapper, C
/**
* 查询优惠券接口(小程序)
* @param page
* @param cardFavorable
* @param cardFavorableDTOS
* @return
*/
@Override

View File

@ -44,7 +44,23 @@ public class CardFuelRecordController extends BaseController {
IPage< CardFuelRecord> 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);
}
/**

View File

@ -92,5 +92,13 @@ public interface CardFuelRecordMapper {
*/
IPage<CardFuelRecordDTO> selectFuelRecord(@Param("page") Page page, CardFuelRecord cardFuelRecord);
/**
* 分页查询(小程序端)
* @param page
* @param cardFuelRecord
* @return
*/
IPage<CardFuelRecord> queryByPageApplet(@Param("page") Page page, @Param("cardFuelRecord") CardFuelRecord cardFuelRecord);
}

View File

@ -356,6 +356,20 @@
ORDER BY create_time;
</select>
<select id="queryByPageApplet"
resultType="com.fuint.business.marketingActivity.cardFule.vo.CardFuelRecordVo">
SELECT
*
FROM
card_fuel_record
<where>
<if test=" cardFuelRecord.mtUserId != null and cardFuelRecord.mtUserId != ''">
and mt_user_id = #{cardFuelRecord.mtUserId}
</if>
</where>
order by create_time
</select>
</mapper>

View File

@ -80,4 +80,11 @@ public interface CardFuelRecordService {
*/
IPage<CardFuelRecordDTO> selectFuelRecord(@Param("page") Page page, CardFuelRecord cardFuelRecord);
/**
* 分页查询(小程序端)
* @param page
* @param cardFuelRecord
* @return
*/
IPage<CardFuelRecord> queryByPageApplet(Page page, CardFuelRecord cardFuelRecord);
}

View File

@ -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<CardFuelRecord> queryByPageApplet(Page page, CardFuelRecord cardFuelRecord) {
//获取登录用户id
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
Integer id = nowAccountInfo.getId();
cardFuelRecord.setMtUserId(id);
return this.cardFuelRecordMapper.queryByPageApplet(page,cardFuelRecord);
}
}

View File

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