12/7
This commit is contained in:
@@ -48,12 +48,15 @@ public interface LpkGiftCardMapper extends BaseMapper<LpkGiftCard> {
|
|||||||
IPage<LpkGiftCardListVo> recordDetails(IPage<LpkGiftCard> page, @Param(Constants.WRAPPER) QueryWrapper<LpkGiftCard> qw);
|
IPage<LpkGiftCardListVo> recordDetails(IPage<LpkGiftCard> page, @Param(Constants.WRAPPER) QueryWrapper<LpkGiftCard> qw);
|
||||||
|
|
||||||
List<LpkGiftCardExport> exportExcel(@Param(Constants.WRAPPER) QueryWrapper<LpkGiftCard> qw);
|
List<LpkGiftCardExport> exportExcel(@Param(Constants.WRAPPER) QueryWrapper<LpkGiftCard> qw);
|
||||||
|
|
||||||
Integer updateState(@Param("serialNumbers") List<Integer> serialNumbers, @Param("state") String state, @Param("bankSid") String bankSid, @Param("recordSid") String recordSid);
|
Integer updateState(@Param("serialNumbers") List<Integer> serialNumbers, @Param("state") String state, @Param("bankSid") String bankSid, @Param("recordSid") String recordSid);
|
||||||
|
|
||||||
@Select("select count(id) from lpk_giftcard where recordSid=#{recordSid} and grantRecordSid is not null")
|
@Select("select count(id) from lpk_giftcard where recordSid=#{recordSid} and grantRecordSid is not null")
|
||||||
Integer cardGrantCount(@Param("recordSid") String recordSid);
|
Integer cardGrantCount(@Param("recordSid") String recordSid);
|
||||||
|
|
||||||
@Select("update lpk_giftcard set isItInvalid='1' where giftbagSid=#{giftbagSid} and state!=#{state} ")
|
@Select("update lpk_giftcard set isItInvalid='1' where giftbagSid=#{giftbagSid} and state!=#{state} ")
|
||||||
Integer updateIsItInvalid(@Param("giftbagSid") String giftbagSid, @Param("state") String state);
|
Integer updateIsItInvalid(@Param("giftbagSid") String giftbagSid, @Param("state") String state);
|
||||||
|
|
||||||
// List<LpkGiftCardWordVo> selGiftCard(@Param("serialNumbers") List<Integer> serialNumbers);
|
// List<LpkGiftCardWordVo> selGiftCard(@Param("serialNumbers") List<Integer> serialNumbers);
|
||||||
List<LpkGiftCardWordVo> selGiftCard();
|
IPage<LpkGiftCardWordVo> selGiftCard(IPage<LpkGiftCard> page, @Param(Constants.WRAPPER) QueryWrapper<LpkGiftCard> qw);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -129,6 +129,8 @@
|
|||||||
<!-- </select>-->
|
<!-- </select>-->
|
||||||
<select id="selGiftCard" resultType="com.yxt.yyth.api.lpkgiftcard.LpkGiftCardWordVo">
|
<select id="selGiftCard" resultType="com.yxt.yyth.api.lpkgiftcard.LpkGiftCardWordVo">
|
||||||
select card.*,bag.name as bagName from lpk_giftcard card left join lpk_giftbag bag on bag.sid =card.giftbagSid
|
select card.*,bag.name as bagName from lpk_giftcard card left join lpk_giftbag bag on bag.sid =card.giftbagSid
|
||||||
limit 8
|
<where>
|
||||||
|
${ew.sqlSegment}
|
||||||
|
</where>
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -2,6 +2,7 @@ package com.yxt.yyth.biz.lpkgiftcard;
|
|||||||
|
|
||||||
import cn.hutool.core.img.ImgUtil;
|
import cn.hutool.core.img.ImgUtil;
|
||||||
import cn.hutool.extra.qrcode.QrCodeUtil;
|
import cn.hutool.extra.qrcode.QrCodeUtil;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.yxt.common.core.query.PagerQuery;
|
import com.yxt.common.core.query.PagerQuery;
|
||||||
import com.yxt.common.core.result.ResultBean;
|
import com.yxt.common.core.result.ResultBean;
|
||||||
import com.yxt.common.core.vo.PagerVo;
|
import com.yxt.common.core.vo.PagerVo;
|
||||||
@@ -62,8 +63,26 @@ public class LpkGiftCardRest {
|
|||||||
}
|
}
|
||||||
@GetMapping("/getCardByBank")
|
@GetMapping("/getCardByBank")
|
||||||
@ApiOperation(value = "生成礼包卡信息")
|
@ApiOperation(value = "生成礼包卡信息")
|
||||||
public ResultBean getCardByBank() {
|
public JSONObject getCardByBank(@RequestParam(value = "pageNo",defaultValue = "1")Integer pageNo,
|
||||||
return lpkGiftCardService.getCardByBank();
|
@RequestParam(value = "pageSize",defaultValue = "8")Integer pageSize,
|
||||||
|
@RequestParam(value = "printAll",required = false) String printAll,
|
||||||
|
@RequestParam(value = "end",defaultValue = "") String end,
|
||||||
|
@RequestParam(value = "start",defaultValue = "") String start) {
|
||||||
|
PagerQuery<LpkGiftCardListQuery> pq=new PagerQuery<>();
|
||||||
|
LpkGiftCardListQuery q=new LpkGiftCardListQuery();
|
||||||
|
pq.setCurrent(pageNo);
|
||||||
|
pq.setSize(pageSize);
|
||||||
|
|
||||||
|
q.setNoEnd(end);
|
||||||
|
q.setNoStart(start);
|
||||||
|
pq.setParams(q);
|
||||||
|
|
||||||
|
PagerVo<LpkGiftCardWordVo> p=lpkGiftCardService.getCardByBank(pq).getData();
|
||||||
|
JSONObject jsonObject=new JSONObject();
|
||||||
|
jsonObject.put("date",p.getRecords());
|
||||||
|
jsonObject.put("total",p.getPages());
|
||||||
|
jsonObject.put("count",p.getTotal());
|
||||||
|
return jsonObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/cardList")
|
@PostMapping("/cardList")
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user