update 首页店铺列表模糊查询修改
This commit is contained in:
@@ -34,7 +34,7 @@ public interface LeaseMachineMapper extends BaseMapper<LeaseMachine> {
|
|||||||
* 根据id集合查询店铺信息
|
* 根据id集合查询店铺信息
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<ShopInfoDto> getExistsMachineShop(@Param("ids") Set<Long> ids, @Param("coin") String coin , @Param("algorithm") String algorithm);
|
List<ShopInfoDto> getExistsMachineShop(@Param("ids") Set<Long> ids, @Param("keyword") String keyword );
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ public class LeaseMachineServiceImpl extends ServiceImpl<LeaseMachineMapper, Lea
|
|||||||
return PageResult.success(new ArrayList<>());
|
return PageResult.success(new ArrayList<>());
|
||||||
}
|
}
|
||||||
PageHelper.startPage(productPageVo.getPageNum(), productPageVo.getPageSize());
|
PageHelper.startPage(productPageVo.getPageNum(), productPageVo.getPageSize());
|
||||||
List<ShopInfoDto> existsMachineShop = leaseMachineMapper.getExistsMachineShop(shopIds, productPageVo.getCoin(), productPageVo.getAlgorithm());
|
List<ShopInfoDto> existsMachineShop = leaseMachineMapper.getExistsMachineShop(shopIds, productPageVo.getKeyword());
|
||||||
PageInfo<ShopInfoDto> pageInfo = new PageInfo<>(existsMachineShop);
|
PageInfo<ShopInfoDto> pageInfo = new PageInfo<>(existsMachineShop);
|
||||||
//店铺支付方式
|
//店铺支付方式
|
||||||
List<PayTypeDto> payType = leaseShopConfigMapper.getPayType(new ArrayList<>(shopIds));
|
List<PayTypeDto> payType = leaseShopConfigMapper.getPayType(new ArrayList<>(shopIds));
|
||||||
|
|||||||
@@ -33,6 +33,9 @@ public class ProductPageVo extends PageVo{
|
|||||||
@ApiModelProperty(value = "算法")
|
@ApiModelProperty(value = "算法")
|
||||||
private String algorithm;
|
private String algorithm;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "关键字")
|
||||||
|
private String keyword;
|
||||||
|
|
||||||
@ApiModelProperty(value = "用户邮箱(个人中心商品列表)")
|
@ApiModelProperty(value = "用户邮箱(个人中心商品列表)")
|
||||||
private String userEmail;
|
private String userEmail;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,20 +55,23 @@
|
|||||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
<choose>
|
<if test="keyword != null and keyword != ''">
|
||||||
<when test="coin != null and coin != ''">
|
AND (sub.coin LIKE CONCAT('%', #{keyword}, '%') OR sub.algorithm LIKE CONCAT('%', #{keyword}, '%'))
|
||||||
AND (sub.coin LIKE CONCAT('%', #{coin}, '%')
|
</if>
|
||||||
<if test="algorithm != null and algorithm != ''">
|
<!-- <choose>-->
|
||||||
AND sub.algorithm LIKE CONCAT('%', #{algorithm}, '%')
|
<!-- <when test="coin != null and coin != ''">-->
|
||||||
</if>
|
<!-- AND (sub.coin LIKE CONCAT('%', #{coin}, '%')-->
|
||||||
)
|
<!-- <if test="algorithm != null and algorithm != ''">-->
|
||||||
</when>
|
<!-- AND sub.algorithm LIKE CONCAT('%', #{algorithm}, '%')-->
|
||||||
<otherwise>
|
<!-- </if>-->
|
||||||
<if test="algorithm != null and algorithm != ''">
|
<!-- )-->
|
||||||
AND sub.algorithm LIKE CONCAT('%', #{algorithm}, '%')
|
<!-- </when>-->
|
||||||
</if>
|
<!-- <otherwise>-->
|
||||||
</otherwise>
|
<!-- <if test="algorithm != null and algorithm != ''">-->
|
||||||
</choose>
|
<!-- AND sub.algorithm LIKE CONCAT('%', #{algorithm}, '%')-->
|
||||||
|
<!-- </if>-->
|
||||||
|
<!-- </otherwise>-->
|
||||||
|
<!-- </choose>-->
|
||||||
GROUP BY ls.id, ls.name, ls.image, ls.description, ls.sale_number
|
GROUP BY ls.id, ls.name, ls.image, ls.description, ls.sale_number
|
||||||
ORDER BY ls.fee_rate DESC, ls.sale_number DESC
|
ORDER BY ls.fee_rate DESC, ls.sale_number DESC
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
Reference in New Issue
Block a user