魏熙美 6 years ago
parent
commit
fd17267f0b

+ 6
- 1
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/HotelServiceImpl.java View File

20
 import com.community.huiju.model.User;
20
 import com.community.huiju.model.User;
21
 import com.community.huiju.service.IHotelService;
21
 import com.community.huiju.service.IHotelService;
22
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
22
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
23
+import org.apache.commons.lang3.StringUtils;
23
 import org.springframework.beans.factory.annotation.Autowired;
24
 import org.springframework.beans.factory.annotation.Autowired;
24
 import org.springframework.stereotype.Service;
25
 import org.springframework.stereotype.Service;
25
 
26
 
212
      */
213
      */
213
     @Override
214
     @Override
214
     public ResponseBean addHotel(Hotel hotel, UserElement userElement) {
215
     public ResponseBean addHotel(Hotel hotel, UserElement userElement) {
216
+        ResponseBean responseBean = new ResponseBean();
217
+        if (StringUtils.isBlank(hotel.getHotelLongitude()) || StringUtils.isBlank(hotel.getHotelLatitude())) {
218
+            responseBean.addError("地理坐标不能为空!");
219
+            return responseBean;
220
+        }
215
         if (hotel.getHotelSettingValue()){
221
         if (hotel.getHotelSettingValue()){
216
             // 为true时判断tp_hotel_setting是否存在当前小区
222
             // 为true时判断tp_hotel_setting是否存在当前小区
217
             QueryWrapper<HotelSetting> hotelSettingQuery = new QueryWrapper<>();
223
             QueryWrapper<HotelSetting> hotelSettingQuery = new QueryWrapper<>();
229
             queryWrapper.eq("community_id",userElement.getCommunityId());
235
             queryWrapper.eq("community_id",userElement.getCommunityId());
230
             hotelSettingMapper.delete(queryWrapper);
236
             hotelSettingMapper.delete(queryWrapper);
231
         }
237
         }
232
-        ResponseBean responseBean = new ResponseBean();
233
         if (null != hotel.getId()){
238
         if (null != hotel.getId()){
234
             updateHotel(hotel,userElement);
239
             updateHotel(hotel,userElement);
235
         }else{
240
         }else{

+ 4
- 0
VUECODE/smart-property-manage/src/views/grogshop/configindex.vue View File

212
       this.$refs[formName].resetFields()
212
       this.$refs[formName].resetFields()
213
     },
213
     },
214
     updateRental() {
214
     updateRental() {
215
+      if (this.listData.hotelLongitude === '' || this.listData.hotelLatitude === '') {
216
+        this.$message.error('地理坐标不能为空!')
217
+        return
218
+      }
215
       // 加载框
219
       // 加载框
216
       const loading = this.$loading({
220
       const loading = this.$loading({
217
         lock: true,
221
         lock: true,