Commit 1849c744 authored by hezhen's avatar hezhen
parents 6e1e3240 3cb8c1a8
...@@ -9,4 +9,7 @@ public class CompanySearchDTO { ...@@ -9,4 +9,7 @@ public class CompanySearchDTO {
Integer addrCity; Integer addrCity;
String lon; String lon;
String lat; String lat;
Integer state = 1;
Integer isShow = 1;
Integer isDel = 0;
} }
...@@ -208,7 +208,7 @@ public class BranchCompanyBiz extends BaseBiz<BranchCompanyMapper, BranchCompany ...@@ -208,7 +208,7 @@ public class BranchCompanyBiz extends BaseBiz<BranchCompanyMapper, BranchCompany
public PageDataVO<BranchCompany> search(CompanySearchDTO vo) { public PageDataVO<BranchCompany> search(CompanySearchDTO vo) {
PageHelper.startPage(vo.getPage(), vo.getLimit()); PageHelper.startPage(vo.getPage(), vo.getLimit());
PageInfo<BranchCompany> branchCompanyPageInfo = new PageInfo<>(mapper.search(vo.getLon(), vo.getLat(), vo.getAddrCity())); PageInfo<BranchCompany> branchCompanyPageInfo = new PageInfo<>(mapper.search(vo.getLon(), vo.getLat(), vo.getAddrCity(), vo.getState(), vo.getIsShow(), vo.getIsDel()));
return PageDataVO.pageInfo(branchCompanyPageInfo); return PageDataVO.pageInfo(branchCompanyPageInfo);
} }
......
...@@ -12,7 +12,7 @@ import java.util.List; ...@@ -12,7 +12,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
public interface BranchCompanyMapper extends Mapper<BranchCompany>, SelectByIdListMapper<BranchCompany,Integer> { public interface BranchCompanyMapper extends Mapper<BranchCompany>, SelectByIdListMapper<BranchCompany,Integer> {
List<BranchCompany> search(@Param("lon") String lon, @Param("lat") String lat, @Param("addrCity") Integer addrCity); List<BranchCompany> search(@Param("lon") String lon, @Param("lat") String lat, @Param("addrCity") Integer addrCity, Integer state, Integer isShow, Integer isDel);
List<BranchCompany> selectByZoneId(Map<String, Object> param); List<BranchCompany> selectByZoneId(Map<String, Object> param);
List<Integer> findCompanyIdsByAreaId(@Param("areaId") Integer areaId); List<Integer> findCompanyIdsByAreaId(@Param("areaId") Integer areaId);
......
...@@ -36,6 +36,15 @@ ...@@ -36,6 +36,15 @@
<if test="lon != null and lat != null"> <if test="lon != null and lat != null">
and longitude is not null and latitude is not null and longitude is not null and latitude is not null
</if> </if>
<if test="state != null">
and state = #{state}
</if>
<if test="isShow != null">
and is_show = #{isShow}
</if>
<if test="isDel != null">
and is_del = #{isDel}
</if>
</where> </where>
<if test="lon != null and lat != null"> <if test="lon != null and lat != null">
order by distance asc order by distance asc
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment