小程序主页接口
This commit is contained in:
@@ -41,5 +41,5 @@ public interface ProductMapper extends BaseMapper<Product> {
|
||||
|
||||
List<RecommendProVO> selectRecommendProductList(@Param("lng") String lng, @Param("lat") String lat, @Param("address") String address,
|
||||
@Param("classify") Integer classify, @Param("orderType") Integer orderType,
|
||||
@Param("distanceType") Integer distanceType);
|
||||
@Param("distanceType") Integer distanceType, @Param("name") String name);
|
||||
}
|
||||
|
||||
@@ -106,8 +106,8 @@ public class HomePageServiceImpl implements HomePageService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<RecommendProVO> getProd(String lng, String lat, String address, Integer classify, Integer orderType, Integer distanceType) {
|
||||
public Page<RecommendProVO> getProd(String lng, String lat, String address, Integer classify, Integer orderType, Integer distanceType, String name) {
|
||||
PageHelper.startPage(PageUtil.buildPageHelp());
|
||||
return PageUtil.convert(new PageInfo<>(productMapper.selectRecommendProductList(lng, lat, address, classify, orderType, distanceType)));
|
||||
return PageUtil.convert(new PageInfo<>(productMapper.selectRecommendProductList(lng, lat, address, classify, orderType, distanceType, name)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -173,6 +173,10 @@
|
||||
<if test="address != null and address != ''">
|
||||
and (b.cities like concat('%', #{address}, '%') or b.districts like concat('%', #{address}, '%'))
|
||||
</if>
|
||||
|
||||
<if test="name != null and name != ''">
|
||||
and a.name like concat('%', #{name}, '%')
|
||||
</if>
|
||||
<if test="classify != null">
|
||||
and c.category_id = #{classify}
|
||||
</if>
|
||||
|
||||
Reference in New Issue
Block a user