Browse Source

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

魏熙美 6 years ago
parent
commit
a4a23d9660
20 changed files with 231 additions and 11 deletions
  1. 13
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/TpHotelController.java
  2. 11
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/TpShopController.java
  3. 1
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpHotelImgMapper.java
  4. 7
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpHotelMapper.java
  5. 14
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpShopMapper.java
  6. 14
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpHotel.java
  7. 15
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpRentalHouse.java
  8. 29
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpShop.java
  9. 7
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/TpHotelServicel.java
  10. 7
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/TpShopServicel.java
  11. 21
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TpHotelServiceimpl.java
  12. 4
    4
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TpRentalHouseServicelImpl.java
  13. 56
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TpShopServicelmpl.java
  14. 1
    1
      CODE/smart-community/app-api/src/main/resources/mapper/TpHotelImgMapper.xml
  15. 7
    2
      CODE/smart-community/app-api/src/main/resources/mapper/TpHotelMapper.xml
  16. 7
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TpShopMapper.xml
  17. 1
    1
      CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/HotelController.java
  18. 1
    1
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/HotelServiceImpl.java
  19. 1
    0
      CODE/smart-community/property-api/src/main/resources/mapper/HotelRoomMapper.xml
  20. 14
    0
      VUECODE/smart-property-manage/src/views/grogshop/grogshopRoomAdd.vue

+ 13
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/TpHotelController.java View File

45
         ResponseBean responseBean = tpHotelServicel.getHotel(userElement);
45
         ResponseBean responseBean = tpHotelServicel.getHotel(userElement);
46
         return responseBean;
46
         return responseBean;
47
     }
47
     }
48
+
49
+    @ApiOperation(value = "当前小区酒店是否需要展示", notes = "当前小区酒店是否需要展示")
50
+    @ApiImplicitParams({
51
+            @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token")
52
+    })
53
+    @RequestMapping(value = "/CommunityHotel",method = RequestMethod.GET)
54
+    public Object getHotelCommunity(HttpSession session){
55
+        UserElement userElement = getUserElement(session);
56
+        ResponseBean responseBean = tpHotelServicel.getHotelCommunity(userElement);
57
+        return responseBean;
58
+    }
59
+
60
+
48
 }
61
 }

+ 11
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/TpShopController.java View File

62
         return responseBean;
62
         return responseBean;
63
     }
63
     }
64
 
64
 
65
+    @ApiOperation(value = "首页商铺信息", notes = "首页商铺信息")
66
+    @ApiImplicitParams({
67
+            @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
68
+    })
69
+    @RequestMapping(value = "/getShopCommunity",method = RequestMethod.GET)
70
+    public Object getShopCommunity(HttpSession session){
71
+        UserElement userElement = getUserElement(session);
72
+        ResponseBean responseBean = tpShopServicel.getShopCommunity(userElement);
73
+        return responseBean;
74
+    }
75
+
65
 
76
 
66
 
77
 
67
 }
78
 }

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpHotelImgMapper.java View File

20
     int updateByPrimaryKey(TpHotelImg record);
20
     int updateByPrimaryKey(TpHotelImg record);
21
 
21
 
22
 
22
 
23
-    List<String> selectHotelImg(@Param("hotelId") Integer id, @Param("communityId") Integer communityId);
23
+    List<String> selectHotelImg(@Param("hotelId") Integer id, @Param("communityId") Integer communityId,@Param("type") Integer type);
24
 }
24
 }

+ 7
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpHotelMapper.java View File

25
      * @return
25
      * @return
26
      */
26
      */
27
     TpHotel selectCommunityHotel(@Param("communityId") Integer CommunityId);
27
     TpHotel selectCommunityHotel(@Param("communityId") Integer CommunityId);
28
+
29
+    /**
30
+     * 酒店开关是否存在
31
+     * @param communityId
32
+     * @return
33
+     */
34
+    String hotelSetting(@Param("communityId") Integer communityId);
28
 }
35
 }

+ 14
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpShopMapper.java View File

28
      * @return
28
      * @return
29
      */
29
      */
30
     List<TpShop> selectcommunityIdShop(@Param("communityId") Integer communityId,@Param("houseName") String houseName,@Param("tpShopTypeId") Integer tpShopTypeId);
30
     List<TpShop> selectcommunityIdShop(@Param("communityId") Integer communityId,@Param("houseName") String houseName,@Param("tpShopTypeId") Integer tpShopTypeId);
31
+
32
+    /**
33
+     * 查询当前小区商铺是否展示
34
+     * @param communityId
35
+     * @return
36
+     */
37
+    String shopSetting(@Param("communityId") Integer communityId);
38
+
39
+    /**
40
+     * 查询当前小区下的所有商铺
41
+     * @param communityId
42
+     * @return
43
+     */
44
+    List<TpShop> selectShopCommunity(@Param("communityId") Integer communityId);
31
 }
45
 }

+ 14
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpHotel.java View File

5
 
5
 
6
 public class TpHotel {
6
 public class TpHotel {
7
     private Integer id;
7
     private Integer id;
8
+
9
+    /**
10
+     * 酒店名称
11
+     */
12
+    private String hotelName;
13
+
8
     /**
14
     /**
9
      * 小区ID
15
      * 小区ID
10
      */
16
      */
60
      */
66
      */
61
     private List<TpHotelRoom> tpHotelRoomsList;
67
     private List<TpHotelRoom> tpHotelRoomsList;
62
 
68
 
69
+    public String getHotelName() {
70
+        return hotelName;
71
+    }
72
+
73
+    public void setHotelName(String hotelName) {
74
+        this.hotelName = hotelName;
75
+    }
76
+
63
     public void setTpHotelRoomsList(List<TpHotelRoom> tpHotelRoomsList) {
77
     public void setTpHotelRoomsList(List<TpHotelRoom> tpHotelRoomsList) {
64
         this.tpHotelRoomsList = tpHotelRoomsList;
78
         this.tpHotelRoomsList = tpHotelRoomsList;
65
     }
79
     }

+ 15
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpRentalHouse.java View File

1
 package com.community.huiju.model;
1
 package com.community.huiju.model;
2
 
2
 
3
 import java.util.Date;
3
 import java.util.Date;
4
+import java.util.List;
4
 
5
 
5
 public class TpRentalHouse {
6
 public class TpRentalHouse {
6
     /**
7
     /**
161
      */
162
      */
162
     private String homeImg;
163
     private String homeImg;
163
 
164
 
165
+    /**
166
+     * 标签数组
167
+     * @return
168
+     */
169
+    private List<String> houseLabelArr;;
170
+
171
+    public List<String> getHouseLabelArr() {
172
+        return houseLabelArr;
173
+    }
174
+
175
+    public void setHouseLabelArr(List<String> houseLabelArr) {
176
+        this.houseLabelArr = houseLabelArr;
177
+    }
178
+
164
     public String getHomeImg() {
179
     public String getHomeImg() {
165
         return homeImg;
180
         return homeImg;
166
     }
181
     }

+ 29
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpShop.java View File

1
 package com.community.huiju.model;
1
 package com.community.huiju.model;
2
 
2
 
3
 import java.util.Date;
3
 import java.util.Date;
4
+import java.util.List;
4
 
5
 
5
 public class TpShop {
6
 public class TpShop {
6
 
7
 
92
      */
93
      */
93
     private String shopImg;
94
     private String shopImg;
94
 
95
 
96
+    /**
97
+     * 商铺信息
98
+     * @return
99
+     */
100
+    private List<TpShopImg> tpShopImgList;
101
+
102
+    /**
103
+     * 商铺类型
104
+     * @return
105
+     */
106
+    private List<TpShopType> tpShopTypeList;
107
+
108
+    public List<TpShopType> getTpShopTypeList() {
109
+        return tpShopTypeList;
110
+    }
111
+
112
+    public void setTpShopTypeList(List<TpShopType> tpShopTypeList) {
113
+        this.tpShopTypeList = tpShopTypeList;
114
+    }
115
+
116
+    public List<TpShopImg> getTpShopImgList() {
117
+        return tpShopImgList;
118
+    }
119
+
120
+    public void setTpShopImgList(List<TpShopImg> tpShopImgList) {
121
+        this.tpShopImgList = tpShopImgList;
122
+    }
123
+
95
     public String getShopImg() {
124
     public String getShopImg() {
96
         return shopImg;
125
         return shopImg;
97
     }
126
     }

+ 7
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/TpHotelServicel.java View File

17
      * @return
17
      * @return
18
      */
18
      */
19
     ResponseBean getHotel(UserElement userElement);
19
     ResponseBean getHotel(UserElement userElement);
20
+
21
+    /**
22
+     * 获取当前小区酒店信息
23
+     * @param userElement
24
+     * @return
25
+     */
26
+    ResponseBean getHotelCommunity(UserElement userElement);
20
 }
27
 }

+ 7
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/TpShopServicel.java View File

26
      * @return
26
      * @return
27
      */
27
      */
28
     ResponseBean getShopDetails(UserElement userElement, Integer id);
28
     ResponseBean getShopDetails(UserElement userElement, Integer id);
29
+
30
+    /**
31
+     * 获取当前小区下的所有商铺
32
+     * @param userElement
33
+     * @return
34
+     */
35
+    ResponseBean getShopCommunity(UserElement userElement);
29
 }
36
 }

+ 21
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TpHotelServiceimpl.java View File

47
             List<TpHotelRoom> tpHotelRoom = tpHotelRoomMapper.selectHotelRoomList(userElement.getCommunityId(),tpHotel.getId());
47
             List<TpHotelRoom> tpHotelRoom = tpHotelRoomMapper.selectHotelRoomList(userElement.getCommunityId(),tpHotel.getId());
48
             tpHotel.setTpHotelRoomsList(tpHotelRoom);
48
             tpHotel.setTpHotelRoomsList(tpHotelRoom);
49
             // 查询当前酒店所有的banner图
49
             // 查询当前酒店所有的banner图
50
-            List<String> img = tpHotelImgMapper.selectHotelImg(tpHotel.getId(), userElement.getCommunityId());
50
+            List<String> img = tpHotelImgMapper.selectHotelImg(tpHotel.getId(), userElement.getCommunityId(),2);
51
             Map map = new HashMap<>();
51
             Map map = new HashMap<>();
52
             map.put("tpHotel", tpHotel);
52
             map.put("tpHotel", tpHotel);
53
             map.put("img", img);
53
             map.put("img", img);
55
         }
55
         }
56
         return responseBean;
56
         return responseBean;
57
     }
57
     }
58
+
59
+    @Override
60
+    public ResponseBean getHotelCommunity(UserElement userElement) {
61
+        ResponseBean response= new ResponseBean<>();
62
+        // 查询当前的酒店是否展示
63
+        TpHotel tpHotel = null;
64
+        List<String> img = null;
65
+        String  hotelSetting= tpHotelMapper.hotelSetting(userElement.getCommunityId());
66
+        if (null != hotelSetting){
67
+             tpHotel= tpHotelMapper.selectCommunityHotel(userElement.getCommunityId());
68
+            List<TpHotelRoom> tpHotelRoom = tpHotelRoomMapper.selectHotelRoomList(userElement.getCommunityId(),tpHotel.getId());
69
+            tpHotel.setTpHotelRoomsList(tpHotelRoom);
70
+            img = tpHotelImgMapper.selectHotelImg(tpHotel.getId(), userElement.getCommunityId(),2);
71
+        }
72
+        Map map = new HashMap<>();
73
+        map.put("tpHotel", tpHotel);
74
+        map.put("img", img);
75
+        response.addSuccess(map);
76
+        return response;
77
+    }
58
 }
78
 }

+ 4
- 4
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TpRentalHouseServicelImpl.java View File

15
 import org.springframework.beans.factory.annotation.Autowired;
15
 import org.springframework.beans.factory.annotation.Autowired;
16
 import org.springframework.stereotype.Service;
16
 import org.springframework.stereotype.Service;
17
 
17
 
18
-import java.util.ArrayList;
19
-import java.util.HashMap;
20
-import java.util.List;
21
-import java.util.Map;
18
+import java.util.*;
22
 
19
 
23
 /**
20
 /**
24
  * version V1.0
21
  * version V1.0
42
         //使用分页插件
39
         //使用分页插件
43
         Page<TpRentalHouse> pageTpRentalHouseList = PageHelper.startPage(pageNum, pageSize);
40
         Page<TpRentalHouse> pageTpRentalHouseList = PageHelper.startPage(pageNum, pageSize);
44
         List<TpRentalHouse> tpRentalHouseList= tpRentalHouseMapper.getRentalHouse(houseName,rentalType,houseType,rentalPrice,priceFluctuate);
41
         List<TpRentalHouse> tpRentalHouseList= tpRentalHouseMapper.getRentalHouse(houseName,rentalType,houseType,rentalPrice,priceFluctuate);
42
+            // 把字符串转数组
45
         for (TpRentalHouse tpRentalHouse:tpRentalHouseList){
43
         for (TpRentalHouse tpRentalHouse:tpRentalHouseList){
44
+            String [] result = tpRentalHouse.getHouseLabel().split(",");
45
+            tpRentalHouse.setHouseLabelArr(Arrays.asList(result));
46
             // 根据 tpRentalHouse.getId()和img_type为2查询列表图
46
             // 根据 tpRentalHouse.getId()和img_type为2查询列表图
47
             List<TpRentalHouseImg> tpRentalHouseImgList= tpRentalHouseImgMapper.selectRentalHouseImg(tpRentalHouse.getId(),1);
47
             List<TpRentalHouseImg> tpRentalHouseImgList= tpRentalHouseImgMapper.selectRentalHouseImg(tpRentalHouse.getId(),1);
48
              if (null != tpRentalHouseImgList){
48
              if (null != tpRentalHouseImgList){

+ 56
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TpShopServicelmpl.java View File

76
         response.addSuccess(hashMap);
76
         response.addSuccess(hashMap);
77
         return response;
77
         return response;
78
     }
78
     }
79
+
80
+    @Override
81
+    public ResponseBean getShopCommunity(UserElement userElement) {
82
+        ResponseBean response = new ResponseBean<>();
83
+        // 当前线下商铺是否展示
84
+        String shopSetting= tpShopMapper.shopSetting(userElement.getCommunityId());
85
+        List<TpShop> tpShopList = null;
86
+        List<TpShopType> tpShopType =null;
87
+        if (null != shopSetting){
88
+            tpShopList= tpShopMapper.selectShopCommunity(userElement.getCommunityId());
89
+            for (TpShop tpShop:tpShopList){
90
+                // 1 表示查询当前首页图片
91
+                List<TpShopImg> tpShopImgList= tpShopImgMapper.selectShopIdCommunity(userElement.getCommunityId(),tpShop.getId(),1);
92
+                tpShop.setTpShopImgList(tpShopImgList);
93
+            }
94
+            // 查询当前商铺类型
95
+             tpShopType= tpShopTypeMapper.selectCommunityIdShop(userElement.getCommunityId());
96
+        }
97
+        //购物
98
+        List<String> tpShopTypeImgShop= new ArrayList<>();
99
+        //购物车3x
100
+        tpShopTypeImgShop.add("http://jingcheng-h5temp.oss-cn-shanghai.aliyuncs.com/1557816503894.png?Expires=1559643891&OSSAccessKeyId=LTAIkc75dpkJw8Lb");
101
+        //购物车2x
102
+        tpShopTypeImgShop.add("http://jingcheng-h5temp.oss-cn-shanghai.aliyuncs.com/1557816639291.png?Expires=1559644026&OSSAccessKeyId=LTAIkc75dpkJw8Lb");
103
+
104
+        //美食图片
105
+        List<String> tpShopTypeImgCate= new ArrayList<>();
106
+        // 美食图片3x
107
+        tpShopTypeImgCate.add("http://jingcheng-h5temp.oss-cn-shanghai.aliyuncs.com/1557816913843.png?Expires=1559644301&OSSAccessKeyId=LTAIkc75dpkJw8Lb");
108
+       // 美食图片2x
109
+        tpShopTypeImgCate.add("http://jingcheng-h5temp.oss-cn-shanghai.aliyuncs.com/1557816963921.png?Expires=1559644351&OSSAccessKeyId=LTAIkc75dpkJw8Lb");
110
+
111
+        //休闲
112
+        List<String> tpShopTypeImgRecreation= new ArrayList<>();
113
+        // 休闲3x
114
+        tpShopTypeImgRecreation.add("http://jingcheng-h5temp.oss-cn-shanghai.aliyuncs.com/1557817084664.png?Expires=1559644472&OSSAccessKeyId=LTAIkc75dpkJw8Lb");
115
+       // 休闲2x
116
+        tpShopTypeImgRecreation.add("http://jingcheng-h5temp.oss-cn-shanghai.aliyuncs.com/1557817102003.png?Expires=1559644489&OSSAccessKeyId=LTAIkc75dpkJw8Lb");
117
+
118
+        // 运动图片
119
+        List<String> tpShopTypeImgExercise= new ArrayList<>();
120
+        // 运动图片3x
121
+        tpShopTypeImgExercise.add("http://jingcheng-h5temp.oss-cn-shanghai.aliyuncs.com/1557817239384.png?Expires=1559644626&OSSAccessKeyId=LTAIkc75dpkJw8Lb");
122
+        // 运动图片2x
123
+        tpShopTypeImgExercise.add("http://jingcheng-h5temp.oss-cn-shanghai.aliyuncs.com/1557817273156.png?Expires=1559644660&OSSAccessKeyId=LTAIkc75dpkJw8Lb");
124
+        Map<String,Object> hashMap= new HashMap<>();
125
+        hashMap.put("tpShopType",tpShopType);
126
+        hashMap.put("tpShopList",tpShopList);
127
+        hashMap.put("tpShopTypeImgShop",tpShopTypeImgShop);
128
+        hashMap.put("tpShopTypeImgCate",tpShopTypeImgCate);
129
+        hashMap.put("tpShopTypeImgRecreation",tpShopTypeImgRecreation);
130
+        hashMap.put("tpShopTypeImgExercise",tpShopTypeImgExercise);
131
+        response.addSuccess(hashMap);
132
+        return response;
133
+
134
+    }
79
 }
135
 }

+ 1
- 1
CODE/smart-community/app-api/src/main/resources/mapper/TpHotelImgMapper.xml View File

110
     from tp_hotel_img
110
     from tp_hotel_img
111
     where community_id = #{communityId,jdbcType=INTEGER}
111
     where community_id = #{communityId,jdbcType=INTEGER}
112
       and hotel_id = #{hotelId,jdbcType=INTEGER}
112
       and hotel_id = #{hotelId,jdbcType=INTEGER}
113
-      and img_type = 2
113
+      and img_type = #{type}
114
   </select>
114
   </select>
115
 
115
 
116
 
116
 

+ 7
- 2
CODE/smart-community/app-api/src/main/resources/mapper/TpHotelMapper.xml View File

12
     <result column="create_user" property="createUser" jdbcType="INTEGER" />
12
     <result column="create_user" property="createUser" jdbcType="INTEGER" />
13
     <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
13
     <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
14
     <result column="update_user" property="updateUser" jdbcType="INTEGER" />
14
     <result column="update_user" property="updateUser" jdbcType="INTEGER" />
15
+    <result column="hotel_name" property="hotelName" jdbcType="VARCHAR" />
15
   </resultMap>
16
   </resultMap>
16
   <resultMap id="ResultMapWithBLOBs" type="com.community.huiju.model.TpHotel" extends="BaseResultMap" >
17
   <resultMap id="ResultMapWithBLOBs" type="com.community.huiju.model.TpHotel" extends="BaseResultMap" >
17
     <result column="hotel_introduction" property="hotelIntroduction" jdbcType="LONGVARCHAR" />
18
     <result column="hotel_introduction" property="hotelIntroduction" jdbcType="LONGVARCHAR" />
18
   </resultMap>
19
   </resultMap>
19
   <sql id="Base_Column_List" >
20
   <sql id="Base_Column_List" >
20
-    id, community_id, hotel_tel, hotel_address, hotel_longitude, hotel_latitude, create_date, 
21
+    id,hotel_name community_id, hotel_tel, hotel_address, hotel_longitude, hotel_latitude, create_date,
21
     create_user, update_date, update_user
22
     create_user, update_date, update_user
22
   </sql>
23
   </sql>
23
   <sql id="Blob_Column_List" >
24
   <sql id="Blob_Column_List" >
184
 
185
 
185
   <select id="selectCommunityHotel" parameterType="integer" resultMap="ResultMapWithBLOBs">
186
   <select id="selectCommunityHotel" parameterType="integer" resultMap="ResultMapWithBLOBs">
186
     select
187
     select
187
-    id, community_id, hotel_tel, hotel_address, hotel_longitude, hotel_latitude, create_date,
188
+    id,hotel_name, community_id, hotel_tel, hotel_address, hotel_longitude, hotel_latitude, create_date,
188
     create_user, update_date, update_user,hotel_introduction
189
     create_user, update_date, update_user,hotel_introduction
189
     from tp_hotel
190
     from tp_hotel
190
     where community_id = #{communityId,jdbcType=INTEGER}
191
     where community_id = #{communityId,jdbcType=INTEGER}
191
   </select>
192
   </select>
193
+  
194
+  <select id="hotelSetting" resultType="integer">
195
+    select id from tp_hotel_setting where  community_id = #{communityId};
196
+  </select>
192
 
197
 
193
 </mapper>
198
 </mapper>

+ 7
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpShopMapper.xml View File

276
     </where>
276
     </where>
277
   </select>
277
   </select>
278
 
278
 
279
+  <select id="shopSetting" resultType="string">
280
+    select id from tp_shop_setting where community_id = #{communityId}
281
+  </select>
282
+
283
+  <select id="selectShopCommunity" resultMap="ResultMapWithBLOBs">
284
+    select * from tp_shop WHERE community_id = #{communityId} order by sort desc LIMIT 4
285
+  </select>
279
 
286
 
280
 </mapper>
287
 </mapper>

+ 1
- 1
CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/HotelController.java View File

51
         return responseBean;
51
         return responseBean;
52
     }
52
     }
53
 
53
 
54
-    @ApiOperation(value = "工单列表", notes = "工单列表")
54
+    @ApiOperation(value = "添加房间", notes = "添加房间")
55
     @ApiImplicitParams({
55
     @ApiImplicitParams({
56
             @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "roomNo:房间号" +
56
             @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "roomNo:房间号" +
57
                     "roomName:房间名称" +
57
                     "roomName:房间名称" +

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

81
         Hotel hotel= tpHotelMapper.selectHotel(userElement.getCommunityId());
81
         Hotel hotel= tpHotelMapper.selectHotel(userElement.getCommunityId());
82
         hotelRoom.setCommunityId(userElement.getCommunityId())
82
         hotelRoom.setCommunityId(userElement.getCommunityId())
83
                 .setHotelId(hotel.getId())
83
                 .setHotelId(hotel.getId())
84
-                .setPrice(String.valueOf(Double.valueOf(hotelRoom.getPrice())))
84
+                .setPrice(String.valueOf(hotelRoom.getPrice()))
85
                 .setCreateDate(LocalDateTime.now())
85
                 .setCreateDate(LocalDateTime.now())
86
                 .setCreateUser(userElement.getId());
86
                 .setCreateUser(userElement.getId());
87
         tpHotelRoomMapper.insert(hotelRoom);
87
         tpHotelRoomMapper.insert(hotelRoom);

+ 1
- 0
CODE/smart-community/property-api/src/main/resources/mapper/HotelRoomMapper.xml View File

22
                 AND date_format(create_date, '%Y-%m-%d') <![CDATA[>= ]]> date_format(#{beginTime}, '%Y-%m-%d')
22
                 AND date_format(create_date, '%Y-%m-%d') <![CDATA[>= ]]> date_format(#{beginTime}, '%Y-%m-%d')
23
                 AND date_format(create_date, '%Y-%m-%d')<![CDATA[<= ]]> date_format(#{endTime}, '%Y-%m-%d')
23
                 AND date_format(create_date, '%Y-%m-%d')<![CDATA[<= ]]> date_format(#{endTime}, '%Y-%m-%d')
24
             </if>
24
             </if>
25
+            order by sort desc
25
         </where>
26
         </where>
26
     </select>
27
     </select>
27
 
28
 

+ 14
- 0
VUECODE/smart-property-manage/src/views/grogshop/grogshopRoomAdd.vue View File

58
   },
58
   },
59
   methods: {
59
   methods: {
60
     submitForm(){
60
     submitForm(){
61
+      if(this.ruleForm.roomNo =='null'){
62
+        this.$message.error('请输入房间号');
63
+      }
64
+      if(this.ruleForm.roomName =='null'){
65
+        this.$message.error('请输入房间名称');
66
+      }
67
+      if(this.ruleForm.roomNo =='null'){
68
+        this.$message.error('请输入房间号');
69
+      }
61
       this.$store.dispatch('HotelRoomAdd', this.ruleForm).then((res) => {
70
       this.$store.dispatch('HotelRoomAdd', this.ruleForm).then((res) => {
71
+        this.$router.push({ name: 'grogshop-grogshopRoom' })
72
+         this.$message({
73
+          message: '新增房间成功',
74
+          type: 'success'
75
+        });
62
       }).catch(() => {
76
       }).catch(() => {
63
         console.log('error HotelRoom')
77
         console.log('error HotelRoom')
64
       })
78
       })