Selaa lähdekoodia

Merge branch '2.0.0' of http://git.ycjcjy.com/fuxingfan/smartCommunity into 2.0.0

魏熙美 6 vuotta sitten
vanhempi
commit
6656b61137

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/MessageServiceImpl.java Näytä tiedosto

@@ -80,7 +80,7 @@ public class MessageServiceImpl implements MessageServiceI {
80 80
 			// 查询工单是否待评价,如果为待评价把Content改为工单的标题
81 81
 			TpTicket tpTicket= tpTicketMapper.selectByPrimaryKey(tpMessage.getTicketId());
82 82
 			if (null != tpTicket) {
83
-				if (!"".equals(tpMessage.getTicketId()) && "5".equals(tpTicket.getStatus())) {
83
+				if (!"".equals(tpMessage.getTicketId())) {
84 84
 					tpMessage.setContent(tpTicket.getTicketTitle());
85 85
 				}
86 86
 			}

+ 3
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TpRentalHouseServicelImpl.java Näytä tiedosto

@@ -40,7 +40,9 @@ public class TpRentalHouseServicelImpl implements TpRentalHouseServicel {
40 40
         List<TpRentalHouse> tpRentalHouseList= tpRentalHouseMapper.getRentalHouse(houseName,rentalType,houseType,rentalPrice,priceFluctuate,userElement.getCommunityId());
41 41
             // 把字符串转数组
42 42
         for (TpRentalHouse tpRentalHouse:tpRentalHouseList){
43
-            String [] result = tpRentalHouse.getHouseLabel().split(",");
43
+            String houseLabel= tpRentalHouse.getHouseLabel();
44
+            String houseLabelarr= houseLabel.replace(",", ",");
45
+            String [] result = houseLabelarr.split(",");
44 46
             tpRentalHouse.setHouseLabelArr(Arrays.asList(result));
45 47
             // 根据 tpRentalHouse.getId()和img_type为2查询列表图
46 48
             List<TpRentalHouseImg> tpRentalHouseImgList= tpRentalHouseImgMapper.selectRentalHouseImg(tpRentalHouse.getId(),1);

+ 1
- 1
CODE/smart-community/app-api/src/main/resources/mapper/TpHotelMapper.xml Näytä tiedosto

@@ -191,7 +191,7 @@
191 191
     where community_id = #{communityId,jdbcType=INTEGER}
192 192
   </select>
193 193
   
194
-  <select id="hotelSetting" resultType="integer">
194
+  <select id="hotelSetting" resultType="string">
195 195
     select id from tp_hotel_setting where  community_id = #{communityId};
196 196
   </select>
197 197
 

+ 10
- 10
CODE/smart-community/app-api/src/main/resources/mapper/TpRentalHouseMapper.xml Näytä tiedosto

@@ -537,31 +537,31 @@
537 537
       </if>
538 538
 
539 539
       <if test="rentalPrice == 1" >
540
-        and  '1000' >= rh.rental_price
540
+        and rh.rental_price <![CDATA[<= ]]> 1000
541 541
       </if>
542 542
 
543 543
       <if test="rentalPrice == 2" >
544
-        and  '1500' >= rh.rental_type
545
-        and  rh.rental_price >= '1000'
544
+        and  rh.rental_price <![CDATA[>= ]]> 1000
545
+        and  rh.rental_price <![CDATA[<= ]]> 1500
546 546
       </if>
547 547
 
548 548
       <if test="rentalPrice == 3" >
549
-        and  '2000' >= rh.rental_type
550
-        and  rh.rental_price >= '1500'
549
+        and  rh.rental_price <![CDATA[>= ]]> 1500
550
+        and  rh.rental_price <![CDATA[<= ]]> 2000
551 551
       </if>
552 552
 
553 553
       <if test="rentalPrice == 4" >
554
-        and  '3000' >= rh.rental_type
555
-        and  rh.rental_price >= '2000'
554
+        and  rh.rental_price <![CDATA[>= ]]> 2000
555
+        and  rh.rental_price <![CDATA[<= ]]> 3000
556 556
       </if>
557 557
 
558 558
       <if test="rentalPrice == 5" >
559
-        and  '4000' >= rh.rental_type
560
-        and  rh.rental_price >= '3000'
559
+        and  rh.rental_price <![CDATA[>= ]]> 3000
560
+        and  rh.rental_price<![CDATA[ <= ]]> 4000
561 561
       </if>
562 562
 
563 563
       <if test="rentalPrice == 6" >
564
-        and  rh.rental_price >= '4000'
564
+        and  rh.rental_price >= 4000
565 565
       </if>
566 566
 
567 567
       <if test="priceFluctuate == 1" >

+ 2
- 2
CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/HotelController.java Näytä tiedosto

@@ -112,7 +112,7 @@ public class HotelController extends BaseController {
112 112
 
113 113
     @ApiOperation(value = "修改当前房间上架或下架状态", notes = "修改当前房间上架或下架状态")
114 114
     @ApiImplicitParams({
115
-            @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "id:房间ID,roomStatus:(1:是已上架 2:是已下架)"
115
+            @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "id:[]房间ID,roomStatus:(1:是已上架 2:是已下架)"
116 116
             )})
117 117
     @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
118 118
     @RequestMapping(value = "/hotelRoomRoomStatus", method = RequestMethod.POST)
@@ -135,7 +135,7 @@ public class HotelController extends BaseController {
135 135
         return responseBean;
136 136
     }
137 137
     
138
-    @ApiOperation(value = "添加房间", notes = "添加房间")
138
+    @ApiOperation(value = "添加酒店", notes = "添加酒店")
139 139
     @ApiImplicitParams({
140 140
             @ApiImplicitParam(paramType = "body", dataType = "Hotel", name = "hotel", value = "酒店"),
141 141
             @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")

+ 5
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/model/Hotel.java Näytä tiedosto

@@ -97,4 +97,9 @@ public class Hotel implements Serializable {
97 97
     @TableField(exist = false)
98 98
     private Boolean hotelSettingValue;
99 99
 
100
+    /**
101
+     * 酒店名称
102
+     */
103
+    private String hotelName;
104
+
100 105
 }

+ 24
- 13
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/HotelServiceImpl.java Näytä tiedosto

@@ -1,5 +1,6 @@
1 1
 package com.community.huiju.service.impl;
2 2
 
3
+import com.alibaba.fastjson.JSONArray;
3 4
 import com.alibaba.fastjson.JSONObject;
4 5
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
5 6
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -149,14 +150,18 @@ public class HotelServiceImpl extends ServiceImpl<HotelMapper, Hotel> implements
149 150
     public ResponseBean hotelRoomRoomStatus(String parameter, UserElement userElement) {
150 151
         ResponseBean responseBean= new ResponseBean<>();
151 152
         JSONObject object= JSONObject.parseObject(parameter);
152
-        Integer id= object.getInteger("id");
153
-        String roomStatus= object.getString("roomStatus");
154
-        HotelRoom hotelRoom= tpHotelRoomMapper.selectById(id);
155
-        hotelRoom.setRoomStatus(roomStatus);
156
-        hotelRoom.setUpdateDate(LocalDateTime.now());
157
-        hotelRoom.setUpdateUser(userElement.getId());
158
-        tpHotelRoomMapper.updateById(hotelRoom);
159
-        responseBean.addSuccess("成功");
153
+        JSONArray arr= object.getJSONArray("id");
154
+        Integer[] arrId= arr.toArray(new Integer[]{});
155
+        for (Integer id:arrId){
156
+            String roomStatus= object.getString("roomStatus");
157
+            HotelRoom hotelRoom= tpHotelRoomMapper.selectById(id);
158
+            hotelRoom.setRoomStatus(roomStatus);
159
+            hotelRoom.setUpdateDate(LocalDateTime.now());
160
+            hotelRoom.setUpdateUser(userElement.getId());
161
+            tpHotelRoomMapper.updateById(hotelRoom);
162
+            responseBean.addSuccess("成功");
163
+        }
164
+
160 165
         return responseBean;
161 166
     }
162 167
     
@@ -208,11 +213,17 @@ public class HotelServiceImpl extends ServiceImpl<HotelMapper, Hotel> implements
208 213
     @Override
209 214
     public ResponseBean addHotel(Hotel hotel, UserElement userElement) {
210 215
         if (hotel.getHotelSettingValue()){
211
-            HotelSetting hotelSetting = new HotelSetting();
212
-            hotelSetting.setCommunityId(userElement.getCommunityId());
213
-            hotelSetting.setCreateDate(LocalDateTime.now());
214
-            hotelSetting.setCreateUser(userElement.getId());
215
-            hotelSettingMapper.insert(hotelSetting);
216
+            // 为true时判断tp_hotel_setting是否存在当前小区
217
+            QueryWrapper<HotelSetting> hotelSettingQuery = new QueryWrapper<>();
218
+            hotelSettingQuery.eq("community_id",userElement.getCommunityId());
219
+            HotelSetting communitySetting= hotelSettingMapper.selectOne(hotelSettingQuery);
220
+            if (null == communitySetting) {
221
+                HotelSetting hotelSetting = new HotelSetting();
222
+                hotelSetting.setCommunityId(userElement.getCommunityId());
223
+                hotelSetting.setCreateDate(LocalDateTime.now());
224
+                hotelSetting.setCreateUser(userElement.getId());
225
+                hotelSettingMapper.insert(hotelSetting);
226
+            }
216 227
         }else {
217 228
             QueryWrapper<HotelSetting> queryWrapper = new QueryWrapper<>();
218 229
             queryWrapper.eq("community_id",userElement.getCommunityId());

+ 1
- 1
VUECODE/smart-property-manage/src/api/grogshop.js Näytä tiedosto

@@ -60,7 +60,7 @@ export function hotelRoomRoomStatus(data) {
60 60
     url: '/hotelRoomRoomStatus',
61 61
     method: 'post',
62 62
     data: {
63
-      id: data.id,
63
+      roomStatusIds: data.roomStatusIds,
64 64
       roomStatus: data.roomStatus
65 65
     }
66 66
   })

+ 8
- 1
VUECODE/smart-property-manage/src/views/grogshop/configindex.vue Näytä tiedosto

@@ -37,6 +37,9 @@
37 37
           <img width="100%" :src="dialogImageUrl" alt="">
38 38
         </el-dialog>
39 39
       </el-form-item>
40
+      <el-form-item label="酒店名称" prop="hotelName">
41
+        <el-input v-model="listData.hotelName"/>
42
+      </el-form-item>
40 43
       <el-form-item label="联系电话" prop="hotelTel">
41 44
         <el-input v-model="listData.hotelTel"/>
42 45
       </el-form-item>
@@ -93,7 +96,8 @@ export default {
93 96
         hotelAddress: '',
94 97
         hotelLongitude: '',
95 98
         hotelLatitude: '',
96
-        hotelIntroduction: ''
99
+        hotelIntroduction: '',
100
+        hotelName: ''
97 101
       },
98 102
       dialogImageUrl: '',
99 103
       dialogVisible: false,
@@ -120,6 +124,9 @@ export default {
120 124
         appCarouselImg: [
121 125
           { required: true, message: '轮播图', trigger: 'blur' }
122 126
         ],
127
+        hotelName: [
128
+          { required: true, message: '酒店名称', trigger: 'blur' }
129
+        ],
123 130
       }
124 131
     }
125 132
   },

+ 7
- 13
VUECODE/smart-property-manage/src/views/grogshop/grogshopRoom.vue Näytä tiedosto

@@ -37,8 +37,8 @@
37 37
       <el-row>
38 38
       <el-button type="success" @click="addHotelRoom()">新增</el-button>
39 39
       <el-button type="info" @click="addHotelEndit()">编辑</el-button>
40
-       <el-button type="primary" @click="addHotelEnditRoom(1)">上架房间</el-button>
41
-      <el-button type="danger" @click="addHotelEnditRoom(2)">下架房间</el-button>
40
+       <el-button type="primary" @click="enditRoom(1)">上架房间</el-button>
41
+      <el-button type="danger" @click="enditRoom(2)">下架房间</el-button>
42 42
       </el-row>
43 43
 
44 44
     </el-form>
@@ -102,7 +102,8 @@ export default {
102 102
             beginTime: '',
103 103
             endTime: '',
104 104
             roomStatus: '',
105
-            editUser: ''      
105
+            editUser: '',
106
+            roomStatusIds: []       
106 107
           },
107 108
            deleteIds: [], // 选择的id集合
108 109
            total: 0,
@@ -195,16 +196,9 @@ export default {
195 196
     clickTitle(ids){
196 197
     this.$router.push({ name: 'grogshop-grogshopRoomEdit', query: { id: ids}})
197 198
     },
198
-    addHotelEnditRoom(ides){
199
-       const SID = this.deleteIds
200
-      if (SID.length > 1) {
201
-        this.$message.error('只能选择一行数据进行修改!')
202
-        return
203
-      }
204
-      console.log('ides',ides)
205
-        const ids = this.deleteIds[0]
206
-         this.listQuery.id = ids
207
-         this.listQuery.roomStatus = ides
199
+    enditRoom(){
200
+         const ids = this.deleteIds
201
+         this.listQuery.roomStatusIds = ids
208 202
          this.$store.dispatch('HotelRoomRoomStatus', this.listQuery).then((res) => {
209 203
          this.$message({
210 204
           message: '成功',

+ 4
- 3
VUECODE/smart-property-manage/src/views/social/activity/add/index.vue Näytä tiedosto

@@ -14,7 +14,7 @@
14 14
           :before-upload="beforeAvatarUpload"
15 15
           class="avatar-uploader"
16 16
           name="uploadFiles"
17
-          action="http://106.14.20.193:8086/property-api/uploadimage">
17
+          :action="uploadImgUrl">
18 18
           <img v-if="imageUrl" :src="imageUrl" class="avatar">
19 19
           <i v-else  class="el-icon-plus avatar-uploader-icon"/>
20 20
         </el-upload>
@@ -33,7 +33,7 @@
33 33
           :on-remove="handleRemove"
34 34
           :on-success="handleSuccessContentImg"
35 35
           name="uploadFiles"
36
-          action="http://106.14.20.193:8086/property-api/uploadimage"
36
+          :action="uploadImgUrl"
37 37
           list-type="picture-card">
38 38
           <i class="el-icon-plus"/>
39 39
         </el-upload>
@@ -116,7 +116,8 @@ export default {
116 116
         sort: [
117 117
           { required: true, message: '请输入权重值', trigger: 'change' }
118 118
         ]
119
-      }
119
+      },
120
+      uploadImgUrl: process.env.BASE_API + '/uploadimage',
120 121
     }
121 122
   },
122 123
   methods: {

+ 5
- 4
VUECODE/smart-property-manage/src/views/social/activity/edi/index.vue Näytä tiedosto

@@ -13,8 +13,8 @@
13 13
           :on-success="handleAvatarSuccess"
14 14
           :before-upload="beforeAvatarUpload"
15 15
           class="avatar-uploader"
16
-          name="uploadFiles"
17
-          action="http://106.14.20.193:8086/property-api/uploadimage">
16
+          :name="uploadFiles"
17
+          :action="uploadImgUrl">
18 18
           <img v-if="imageUrl" :src="imageUrl" class="avatar">
19 19
           <i v-else class="el-icon-plus avatar-uploader-icon"/>
20 20
         </el-upload>
@@ -34,7 +34,7 @@
34 34
           :on-success="handleSuccessContentImg"
35 35
           :file-list="activityContentList"
36 36
           name="uploadFiles"
37
-          action="http://106.14.20.193:8086/property-api/uploadimage"
37
+          :action="uploadImgUrl"
38 38
           list-type="picture-card">
39 39
           <i class="el-icon-plus"/>
40 40
         </el-upload>
@@ -120,7 +120,8 @@ export default {
120 120
         sort: [
121 121
           { required: true, message: '请输入权重值', trigger: 'change' }
122 122
         ]
123
-      }
123
+      },
124
+      uploadImgUrl: process.env.BASE_API + '/uploadimage',
124 125
     }
125 126
   },
126 127
   mounted() {

+ 4
- 3
VUECODE/smart-property-manage/src/views/social/announcement/add.vue Näytä tiedosto

@@ -15,7 +15,7 @@
15 15
           :before-upload="beforeAvatarUpload"
16 16
           class="avatar-uploader"
17 17
           name="uploadFiles"
18
-          action="http://106.14.20.193:8086/property-api/uploadimage">
18
+          :action="uploadImgUrl">
19 19
           <img v-if="imageUrl" :src="imageUrl" class="avatar">
20 20
           <i v-else class="el-icon-plus avatar-uploader-icon"/>
21 21
         </el-upload>
@@ -35,7 +35,7 @@
35 35
           :on-remove="handleRemove"
36 36
           :on-success="handleSuccessContentImg"
37 37
           name="uploadFiles"
38
-          action="http://106.14.20.193:8086/property-api/uploadimage"
38
+          :action="uploadImgUrl"
39 39
           list-type="picture-card">
40 40
           <i class="el-icon-plus"/>
41 41
         </el-upload>
@@ -84,7 +84,8 @@ export default {
84 84
         sort: [
85 85
           { required: true, message: '请输入权重值', trigger: 'change' }
86 86
         ]
87
-      }
87
+      },
88
+      uploadImgUrl: process.env.BASE_API + '/uploadimage',
88 89
     }
89 90
   },
90 91
   methods: {

+ 4
- 3
VUECODE/smart-property-manage/src/views/social/announcement/edit.vue Näytä tiedosto

@@ -14,7 +14,7 @@
14 14
           :before-upload="beforeAvatarUpload"
15 15
           class="avatar-uploader"
16 16
           name="uploadFiles"
17
-          action="http://106.14.20.193:8086/property-api/uploadimage">
17
+          :action="uploadImgUrl">
18 18
           <img v-if="Urlimage" :src="Urlimage" class="avatar">
19 19
           <i v-else class="el-icon-plus avatar-uploader-icon"/>
20 20
         </el-upload>
@@ -34,7 +34,7 @@
34 34
           :on-success="handleSuccessContentImg"
35 35
           :file-list="contentImgList"
36 36
           name="uploadFiles"
37
-          action="http://106.14.20.193:8086/property-api/uploadimage"
37
+          :action="uploadImgUrl"
38 38
           list-type="picture-card">
39 39
           <i class="el-icon-plus"/>
40 40
         </el-upload>
@@ -83,7 +83,8 @@ export default {
83 83
         sort: [
84 84
           { required: true, message: '请输入权重值', trigger: 'change' }
85 85
         ]
86
-      }
86
+      },
87
+      uploadImgUrl: process.env.BASE_API + '/uploadimage',
87 88
     }
88 89
   },
89 90
   mounted() {

+ 3
- 2
VUECODE/smart-property-manage/src/views/social/transaction/transactionAdd.vue Näytä tiedosto

@@ -27,7 +27,7 @@
27 27
           :on-remove="handleRemove"
28 28
           :on-success="handleSuccessContentImg"
29 29
           name="uploadFiles"
30
-          action="http://106.14.20.193:8086/property-api/uploadimage"
30
+          :action="uploadImgUrl"
31 31
           list-type="picture-card">
32 32
           <i class="el-icon-plus"/>
33 33
         </el-upload>
@@ -92,7 +92,8 @@ export default {
92 92
           { required: true, message: '请输入权重值', trigger: 'change' }
93 93
         ]
94 94
       },
95
-      lock: false
95
+      lock: false,
96
+      uploadImgUrl: process.env.BASE_API + '/uploadimage',
96 97
     }
97 98
   },
98 99
   methods: {

+ 3
- 2
VUECODE/smart-property-manage/src/views/social/transaction/transactionEdit.vue Näytä tiedosto

@@ -29,7 +29,7 @@
29 29
           :on-success="handleSuccessContentImg"
30 30
           :file-list="contentImgList"
31 31
           name="uploadFiles"
32
-          action="http://106.14.20.193:8086/property-api/uploadimage"
32
+          :action="uploadImgUrl"
33 33
           list-type="picture-card">
34 34
           <i class="el-icon-plus"/>
35 35
         </el-upload>
@@ -96,7 +96,8 @@ export default {
96 96
         sort: [
97 97
           { required: true, message: '请输入权重值', trigger: 'change' }
98 98
         ]
99
-      }
99
+      },
100
+      uploadImgUrl: process.env.BASE_API + '/uploadimage',
100 101
     }
101 102
   },
102 103
   mounted() {