Commit bfaee3cdabbc6d14cc9e3aa1b25db805ab1bd11e
1 parent
d28de956
修改图片样式
Showing
2 changed files
with
6 additions
and
1 deletions
trash-garbage/src/main/java/com/trash/garbage/service/impl/GarOrderServiceImpl.java
| ... | ... | @@ -713,6 +713,10 @@ public class GarOrderServiceImpl extends ServiceImpl<GarOrderMapper, GarOrder> |
| 713 | 713 | |
| 714 | 714 | |
| 715 | 715 | private void handleDistance(TransportationEnterpriseVo vo, GarAddress address) { |
| 716 | + if(Objects.isNull(vo) || StringUtils.isEmpty(vo.getOfficeAddressGps()) || StringUtils.indexOf(vo.getOfficeAddressGps(),",")==-1 || Objects.isNull(address)){ | |
| 717 | + vo.setDistance(9999999); | |
| 718 | + return; | |
| 719 | + } | |
| 716 | 720 | String[] params = vo.getOfficeAddressGps().split(","); |
| 717 | 721 | double distance = calculateDistance(Double.parseDouble(params[1]), Double.parseDouble(params[0]), address.getGarLatitude(), address.getGarLongitude()); |
| 718 | 722 | vo.setDistance(distance); | ... | ... |
trash-unit/src/main/resources/mapper/unit/TransportationEnterpriseMapper.xml
| ... | ... | @@ -50,7 +50,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 50 | 50 | |
| 51 | 51 | <select id="selectTransportationEnterpriseList" parameterType="TransportationEnterprise" resultMap="TransportationEnterpriseResult"> |
| 52 | 52 | <include refid="selectTransportationEnterpriseVo"/> |
| 53 | - <where> | |
| 53 | + <where> | |
| 54 | + <if test="id != null and id != ''"> and id = #{id}</if> | |
| 54 | 55 | <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> |
| 55 | 56 | <if test="abbreviation != null and abbreviation != ''"> and abbreviation = #{abbreviation}</if> |
| 56 | 57 | <if test="registrationArea != null and registrationArea != ''"> and registration_area = #{registrationArea}</if> | ... | ... |