fanli/src/main/java/com/yeshi/fanli/controller/web/WebGoodsClassController.java
@@ -40,7 +40,7 @@ * @param page * @param out */ @RequestMapping(value = "getCouponList", method = RequestMethod.GET) @RequestMapping(value = "getCouponList") public void getCouponList(AcceptData acceptData, String callback, int page, PrintWriter out) { List<TaoBaoCoupon> taoBaoCoupons = taoBaoCouponService.getTaoBaoCouponListBykeys(null, page); int count = taoBaoCouponService.getCount(""); fanli/src/main/java/com/yeshi/fanli/mapping/taobao/TaoBaoCouponMapper.xml
@@ -149,27 +149,35 @@ </select> <select id="getCount" resultType="java.lang.Integer"> select count(*) from TaoBaoCoupon tbc where tbc.title like '%#{key}%' select count(*) from yeshi_ec_taobao_coupon tbc <if test="key != null and key !='' "> where tbc.title like '%#{key}%' </if> </select> <select id="getTaoBaoCouponListBykeys" resultMap="BaseResultMap"> select * from yeshi_ec_taobao_coupon tbc where tbc.showType = 3 AND where tbc.showType = 3 <if test="list != null"> AND <foreach collection="list" index="index" item="item" open="(" separator="or" close=")"> tbc.title LIKE '%${item}%' </foreach> </if> LIMIT ${start},${count} </select> <select id="countTaoBaoCouponListBykeys" resultType="java.lang.Integer"> select count(tbc.id) from yeshi_ec_taobao_coupon tbc where tbc.showType = 3 AND <foreach collection="list" index="index" item="item" open="(" separator="or" close=")"> tbc.title LIKE '%${item}%' </foreach> where tbc.showType = 3 <if test="list != null"> AND <foreach collection="list" index="index" item="item" open="(" separator="or" close=")"> tbc.title LIKE '%${item}%' </foreach> </if> </select> <select id="getTaoBaoCouponByActionId" resultMap="BaseResultMap"> fanli/src/main/java/com/yeshi/fanli/service/impl/goods/TaoBaoCouponServiceImpl.java
@@ -86,9 +86,8 @@ @Override public List<TaoBaoCoupon> getTaoBaoCouponListBykeys(List<String> searchKeys, int page) { if (searchKeys == null || searchKeys.size() == 0) { searchKeys = new ArrayList<String>(); searchKeys.add(""); if (searchKeys != null && searchKeys.size() == 0) { searchKeys = null; } return taoBaoCouponMapper.getTaoBaoCouponListBykeys((page - 1) * Constant.PAGE_SIZE, Constant.PAGE_SIZE,searchKeys); @@ -96,11 +95,9 @@ @Override public int getCount(List<String> searchKeys) { if (searchKeys == null || searchKeys.size() == 0) { searchKeys = new ArrayList<String>(); searchKeys.add(""); if (searchKeys != null && searchKeys.size() == 0) { searchKeys = null; } return taoBaoCouponMapper.countTaoBaoCouponListBykeys(searchKeys); }