dingxin 6 anni fa
parent
commit
1ee2260a87
65 ha cambiato i file con 4067 aggiunte e 680 eliminazioni
  1. 22
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/FSController.java
  2. 15
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/HkController.java
  3. 0
    42
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/VisualIntercomContrller.java
  4. 20
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaUserLicense.java
  5. 14
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/IFuShiService.java
  6. 8
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/IHKService.java
  7. 0
    22
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/IVisualIntercomService.java
  8. 21
    5
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/FaceServicelimpl.java
  9. 42
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/FuShiServiceImpl.java
  10. 31
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/HKServiceImpl.java
  11. 9
    4
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserLicenseServiceImpl.java
  12. 10
    3
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java
  13. 1
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaVistorServiceImpl.java
  14. 0
    40
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/VisualIntercomServiceImpl.java
  15. 13
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/WxPayServiceImpl.java
  16. 29
    8
      CODE/smart-community/app-api/src/main/resources/mapper/TaUserLicenseMapper.xml
  17. 34
    0
      CODE/smart-community/community-common/src/main/java/com/community/commom/fushi/FuShiRequestAPI.java
  18. 10
    0
      CODE/smart-community/community-common/src/main/java/com/community/commom/fushi/FushiConstant.java
  19. 38
    39
      CODE/smart-community/community-common/src/main/java/com/community/commom/hk/HKOpenApi.java
  20. 62
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/TaUserLicenseOrderController.java
  21. 20
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/TpRentalHouseController.java
  22. 20
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/TpRentalHouseImgController.java
  23. 110
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/TpShopController.java
  24. 20
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/TpShopImgController.java
  25. 16
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TaUserLicenseOrderMapper.java
  26. 16
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TpRentalHouseImgMapper.java
  27. 16
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TpRentalHouseMapper.java
  28. 19
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TpShopImgMapper.java
  29. 118
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TaUserLicenseOrder.java
  30. 178
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpRentalHouse.java
  31. 51
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpRentalHouseImg.java
  32. 19
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpShop.java
  33. 51
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpShopImg.java
  34. 29
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ITaUserLicenseOrderService.java
  35. 16
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ITpRentalHouseImgService.java
  36. 16
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ITpRentalHouseService.java
  37. 16
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ITpShopImgService.java
  38. 23
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ITpShopService.java
  39. 44
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TaUserLicenseOrderServiceImpl.java
  40. 20
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpRentalHouseImgServiceImpl.java
  41. 20
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpRentalHouseServiceImpl.java
  42. 20
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpShopImgServiceImpl.java
  43. 147
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpShopServiceImpl.java
  44. 5
    0
      CODE/smart-community/property-api/src/main/resources/mapper/TaUserLicenseOrderMapper.xml
  45. 5
    0
      CODE/smart-community/property-api/src/main/resources/mapper/TpRentalHouseImgMapper.xml
  46. 5
    0
      CODE/smart-community/property-api/src/main/resources/mapper/TpRentalHouseMapper.xml
  47. 13
    0
      CODE/smart-community/property-api/src/main/resources/mapper/TpShopImgMapper.xml
  48. 84
    69
      VUECODE/smart-operate-manage/src/components/Wangeditor/index.vue
  49. 0
    2
      VUECODE/smart-property-manage/index.html
  50. 18
    0
      VUECODE/smart-property-manage/src/api/license.js
  51. 43
    0
      VUECODE/smart-property-manage/src/api/shopType.js
  52. 85
    69
      VUECODE/smart-property-manage/src/components/Wangeditor/index.vue
  53. 50
    0
      VUECODE/smart-property-manage/src/router/index.js
  54. 3
    2
      VUECODE/smart-property-manage/src/store/index.js
  55. 23
    0
      VUECODE/smart-property-manage/src/store/modules/license.js
  56. 46
    1
      VUECODE/smart-property-manage/src/store/modules/shopType.js
  57. 221
    0
      VUECODE/smart-property-manage/src/views/bill/license/index.vue
  58. 315
    0
      VUECODE/smart-property-manage/src/views/rental/rentalAdd.vue
  59. 330
    0
      VUECODE/smart-property-manage/src/views/rental/rentalEdit.vue
  60. 328
    0
      VUECODE/smart-property-manage/src/views/rental/rentalIndex.vue
  61. 315
    0
      VUECODE/smart-property-manage/src/views/shop/shopAdd.vue
  62. 332
    0
      VUECODE/smart-property-manage/src/views/shop/shopEdit.vue
  63. 36
    18
      VUECODE/smart-property-manage/src/views/shop/shopIndex.vue
  64. 213
    177
      文档/MYSQL/smartCommunity.pdb
  65. 213
    177
      文档/MYSQL/smartCommunity.pdm

+ 22
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/FSController.java Vedi File

@@ -31,6 +31,28 @@ public class FSController extends BaseController {
31 31
         return responseBean;
32 32
     }
33 33
 
34
+    @RequestMapping(value = "/car/parkGetMonthCardInfoByCarNo/{carNo}", method = RequestMethod.GET)
35
+    @ApiOperation(value = "获取月租车信息(通过车牌号)", notes = "获取月租车信息(通过车牌号)")
36
+    @ApiImplicitParams({
37
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "path", name = "carNo", value = "车牌号")
38
+    })
39
+    public ResponseBean parkGetMonthCardInfoByCarNo(@PathVariable("carNo") String carNo) {
40
+        ResponseBean responseBean = new ResponseBean();
41
+        responseBean = iFuShiService.parkGetMonthCardInfoByCarNo(carNo);
42
+        return responseBean;
43
+    }
44
+
45
+    @RequestMapping(value = "/car/parkGetTempCarPaymentInfoByCarNo/{carNo}", method = RequestMethod.GET)
46
+    @ApiOperation(value = "获取临时车信息(通过车牌号)", notes = "获取临时车信息(通过车牌号)")
47
+    @ApiImplicitParams({
48
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "path", name = "carNo", value = "车牌号")
49
+    })
50
+    public ResponseBean parkGetTempCarPaymentInfoByCarNo(@PathVariable("carNo") String carNo) {
51
+        ResponseBean responseBean = new ResponseBean();
52
+        responseBean = iFuShiService.parkGetTempCarPaymentInfoByCarNo(carNo);
53
+        return responseBean;
54
+    }
55
+
34 56
     @RequestMapping(value = "/car/apiThirdPartyMonthCardPay", method = RequestMethod.POST)
35 57
     @ApiOperation(value = "月卡续费", notes = "月卡续费")
36 58
     @ApiImplicitParams({

+ 15
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/HkController.java Vedi File

@@ -14,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
14 14
 import org.springframework.cloud.context.config.annotation.RefreshScope;
15 15
 import org.springframework.web.bind.annotation.*;
16 16
 
17
+import javax.servlet.http.HttpServletRequest;
17 18
 import javax.servlet.http.HttpSession;
18 19
 
19 20
 /**
@@ -50,10 +51,24 @@ public class HkController {
50 51
 		return responseBean;
51 52
 	}
52 53
 
54
+	@Deprecated
53 55
 	@RequestMapping(value = "/downloadAuthorityByDeviceUuids", method = RequestMethod.POST)
54 56
 	public ResponseBean pushHKPerson() {
55 57
 		ResponseBean responseBean = new ResponseBean();
56 58
 		responseBean = ihkService.downloadAuthorityByDeviceUuids();
57 59
 		return responseBean;
58 60
 	}
61
+
62
+	@ApiOperation(value = "门口机开门", notes = "门口机开门")
63
+	@ApiImplicitParams({
64
+			@ApiImplicitParam(dataTypeClass = Integer.class, paramType = "query", name = "userVerifyId", value = "用户审核房产id")
65
+	})
66
+	@RequestMapping(value = "/visual/syncControl", method = RequestMethod.GET)
67
+	public ResponseBean syncControl(@RequestParam("userVerifyId") Integer userVerifyId, HttpServletRequest request, HttpSession session){
68
+		ResponseBean responseBean = new ResponseBean();
69
+		responseBean = ihkService.syncControl(userVerifyId);
70
+		return responseBean;
71
+	}
72
+
73
+
59 74
 }

+ 0
- 42
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/VisualIntercomContrller.java Vedi File

@@ -1,42 +0,0 @@
1
-package com.community.huiju.controller;
2
-
3
-import com.community.commom.constant.Constant;
4
-import com.community.commom.mode.ResponseBean;
5
-import com.community.commom.session.UserElement;
6
-import com.community.huiju.service.IVisualIntercomService;
7
-import io.swagger.annotations.Api;
8
-import io.swagger.annotations.ApiImplicitParam;
9
-import io.swagger.annotations.ApiImplicitParams;
10
-import io.swagger.annotations.ApiOperation;
11
-import org.springframework.beans.factory.annotation.Autowired;
12
-import org.springframework.cloud.context.config.annotation.RefreshScope;
13
-import org.springframework.web.bind.annotation.RequestMapping;
14
-import org.springframework.web.bind.annotation.RequestMethod;
15
-import org.springframework.web.bind.annotation.RestController;
16
-
17
-import javax.servlet.http.HttpServletRequest;
18
-import javax.servlet.http.HttpSession;
19
-
20
-@RestController
21
-@RefreshScope
22
-@RequestMapping("/")
23
-@Api(value = "可视对讲 API", description = "可视对讲 API")
24
-public class VisualIntercomContrller extends BaseController {
25
-
26
-    @Autowired
27
-    private IVisualIntercomService iVisualIntercomService;
28
-
29
-    @ApiOperation(value = "门口机开门", notes = "门口机开门")
30
-    @ApiImplicitParams({
31
-            @ApiImplicitParam(dataTypeClass = String.class, paramType = "header", name = "X-Auth-Token", value = "token")
32
-    })
33
-    @RequestMapping(value = "/visual/syncControl", method = RequestMethod.GET)
34
-    public ResponseBean syncControl(HttpServletRequest request, HttpSession session){
35
-        ResponseBean responseBean = new ResponseBean();
36
-        UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
37
-        responseBean = iVisualIntercomService.syncControl(userElement);
38
-        return responseBean;
39
-    }
40
-
41
-
42
-}

+ 20
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaUserLicense.java Vedi File

@@ -27,6 +27,10 @@ public class TaUserLicense {
27 27
 
28 28
     private Integer updateUser;
29 29
 
30
+    private Integer renewTime;
31
+
32
+    private Integer licenseType;
33
+
30 34
     public Integer getId() {
31 35
         return id;
32 36
     }
@@ -122,4 +126,20 @@ public class TaUserLicense {
122 126
     public void setUpdateUser(Integer updateUser) {
123 127
         this.updateUser = updateUser;
124 128
     }
129
+
130
+    public Integer getRenewTime() {
131
+        return renewTime;
132
+    }
133
+
134
+    public void setRenewTime(Integer renewTime) {
135
+        this.renewTime = renewTime;
136
+    }
137
+
138
+    public Integer getLicenseType() {
139
+        return licenseType;
140
+    }
141
+
142
+    public void setLicenseType(Integer licenseType) {
143
+        this.licenseType = licenseType;
144
+    }
125 145
 }

+ 14
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/IFuShiService.java Vedi File

@@ -60,4 +60,18 @@ public interface IFuShiService {
60 60
      * @return
61 61
      */
62 62
     ResponseBean apiGetOfflineFee(String CarNoOrCardNo);
63
+
64
+    /**
65
+     * 获取月租车信息(通过车牌号)
66
+     * @param CarNo
67
+     * @return
68
+     */
69
+    ResponseBean parkGetMonthCardInfoByCarNo(String CarNo);
70
+
71
+    /**
72
+     * 获取临时车信息(通过车牌号)
73
+     * @param CarNo
74
+     * @return
75
+     */
76
+    ResponseBean parkGetTempCarPaymentInfoByCarNo(String CarNo);
63 77
 }

+ 8
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/IHKService.java Vedi File

@@ -21,4 +21,12 @@ public interface IHKService {
21 21
      */
22 22
     ResponseBean downloadAuthorityByDeviceUuids();
23 23
 
24
+    /**
25
+     * 异步反控开门 (远程开门)
26
+     *
27
+     * @param userVerifyId 审核ID
28
+     * @return
29
+     */
30
+    ResponseBean syncControl(Integer userVerifyId);
31
+
24 32
 }

+ 0
- 22
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/IVisualIntercomService.java Vedi File

@@ -1,22 +0,0 @@
1
-package com.community.huiju.service;
2
-
3
-import com.community.commom.mode.ResponseBean;
4
-import com.community.commom.session.UserElement;
5
-
6
-/**
7
- * 可视对讲的业务
8
- * @author weiximei
9
- */
10
-public interface IVisualIntercomService {
11
-
12
-    /**
13
-     * 反控开门
14
-     *
15
-     *      app端, 发送开门指令
16
-     *
17
-     * @param userElement 用户信息体
18
-     * @return
19
-     */
20
-    ResponseBean syncControl(UserElement userElement);
21
-
22
-}

+ 21
- 5
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/FaceServicelimpl.java Vedi File

@@ -159,7 +159,7 @@ public class FaceServicelimpl implements FaceServiceI {
159 159
         face.setFaceImg(faceImg);
160 160
         face.setUpdateUser(userElement.getId());
161 161
         face.setUpdateDate(new Date());
162
-        ResponseBean resps = checKout(faceImg, face, false, uploadFile, activeUser, userVerify.getCommunityId(), userVerify.getRoomNoId(), userVerify.getUnitId(), tpEquipmentTree.getAppkey(), tpEquipmentTree.getSecret());
162
+        ResponseBean resps = checKout(faceImg, face, false, uploadFile, activeUser, userVerify.getCommunityId(), userVerify.getRoomNoId(), userVerify.getUnitId(), tpEquipmentTree.getAppkey(), tpEquipmentTree.getSecret(), tpEquipmentTree.getHttpServer());
163 163
         if (resps.getCode().equals("0")) {
164 164
             resps.addSuccess((Object) faceImg);
165 165
         } else {
@@ -170,8 +170,20 @@ public class FaceServicelimpl implements FaceServiceI {
170 170
 
171 171
     /**
172 172
      * 验证图片是否为人脸,推送海康
173
+     * @param faceImg
174
+     * @param taFace
175
+     * @param isA
176
+     * @param uploadFile
177
+     * @param userId
178
+     * @param communityId
179
+     * @param roomNoId
180
+     * @param unitId
181
+     * @param appkey
182
+     * @param secret
183
+     * @param openapi_ip_port_http 海康服务器地址
184
+     * @return
173 185
      */
174
-    public ResponseBean checKout(String faceImg, TaFace taFace, boolean isA, MultipartFile uploadFile, Integer userId, Integer communityId, Integer roomNoId, Integer unitId, String  appkey, String secret) {
186
+    public ResponseBean checKout(String faceImg, TaFace taFace, boolean isA, MultipartFile uploadFile, Integer userId, Integer communityId, Integer roomNoId, Integer unitId, String  appkey, String secret, String openapi_ip_port_http) {
175 187
         ResponseBean responseBean = new ResponseBean();
176 188
         TaUser user = taUserMapper.selectByPrimaryKey(userId);
177 189
         if (user.getHkUserId() == null) {
@@ -188,7 +200,7 @@ public class FaceServicelimpl implements FaceServiceI {
188 200
             Integer faceNum = (Integer) jsonObject.get("face_num");
189 201
 
190 202
             /*推送海康*/
191
-            String data = HKOpenApi.HKpersonGroupId(uploadFile, user.getHkUserId(), user.getHkPersonNo(), user.getUserName(), user.getHkCardNo(), appkey, secret);
203
+            String data = HKOpenApi.HKpersonGroupId(uploadFile, user.getHkUserId(), user.getHkPersonNo(), user.getUserName(), user.getHkCardNo(), appkey, secret, openapi_ip_port_http);
192 204
             /*boolean isA为true进行添加,为false进行修改*/
193 205
             if (0 == type && 1 == faceNum) {
194 206
                 if (null == data) {
@@ -220,6 +232,7 @@ public class FaceServicelimpl implements FaceServiceI {
220 232
                 map.put("personIds", String.valueOf(user.getHkUserId()));
221 233
                 map.put("deviceUuids", deviceUuids.substring(0, deviceUuids.lastIndexOf(",")));
222 234
                 map.put("type", 1);
235
+                map.put("openapi_ip_port_http", tpEquipmentTree.getHttpServer());
223 236
                 HKOpenApi.downloadFaceAndFingerInfos(map);
224 237
 
225 238
                 //可视对讲时 指定人员人脸权限下载
@@ -229,7 +242,7 @@ public class FaceServicelimpl implements FaceServiceI {
229 242
                 // TODO 根据期楼栋号,来查询出门口机
230 243
                 List<String> visualList = new ArrayList<>();
231 244
                 visualList.add("10010100000");
232
-                HKOpenApi.visualIntercom(tpEquipmentTree.getOpUserUuid(), 1, userIdList, visualList, tpEquipmentTree.getAppkey(), tpEquipmentTree.getSecret());
245
+                HKOpenApi.visualIntercom(tpEquipmentTree.getOpUserUuid(), 1, userIdList, visualList, tpEquipmentTree.getAppkey(), tpEquipmentTree.getSecret(), tpEquipmentTree.getHttpServer());
233 246
             } else {
234 247
                 responseBean.addError("请录入正确图片");
235 248
             }
@@ -333,7 +346,7 @@ public class FaceServicelimpl implements FaceServiceI {
333 346
         if (null == face) {
334 347
             boolean isA = true;
335 348
             if (Constant.EFFECTIVE_STATUS.equals(taUser.getStatus())) {
336
-                ResponseBean responseBean = checKout(faceImg, taFace, isA, uploadFile, userid, userVerify.getCommunityId(), userVerify.getRoomNoId(), userVerify.getUnitId(),tpEquipmentTree.getAppkey(), tpEquipmentTree.getSecret());
349
+                ResponseBean responseBean = checKout(faceImg, taFace, isA, uploadFile, userid, userVerify.getCommunityId(), userVerify.getRoomNoId(), userVerify.getUnitId(),tpEquipmentTree.getAppkey(), tpEquipmentTree.getSecret(), tpEquipmentTree.getHttpServer());
337 350
                 if (responseBean.getCode().equals("0")) {
338 351
                     responseBean.addSuccess("图片录入成功");
339 352
                 } else {
@@ -433,6 +446,7 @@ public class FaceServicelimpl implements FaceServiceI {
433 446
         selectUserFaceMap.put("opUserUuid", tpEquipmentTree.getOpUserUuid());
434 447
         selectUserFaceMap.put("appkey", tpEquipmentTree.getAppkey());
435 448
         selectUserFaceMap.put("secret", tpEquipmentTree.getSecret());
449
+        selectUserFaceMap.put("openapi_ip_port_http", tpEquipmentTree.getHttpServer());
436 450
         // 查询人脸信息
437 451
         HKOpenApi.selectUserFace(selectUserFaceMap);
438 452
 
@@ -442,6 +456,7 @@ public class FaceServicelimpl implements FaceServiceI {
442 456
         deleteUserMap.put("doorUuids", doorUuids.substring(0, doorUuids.lastIndexOf(",")));
443 457
         deleteUserMap.put("appkey", tpEquipmentTree.getAppkey());
444 458
         deleteUserMap.put("secret", tpEquipmentTree.getSecret());
459
+        deleteUserMap.put("openapi_ip_port_http", tpEquipmentTree.getHttpServer());
445 460
         // 删除当前人脸设备信息
446 461
         String data= HKOpenApi.deleteUser(deleteUserMap);
447 462
         JSONObject object= JSONObject.parseObject(data);
@@ -462,6 +477,7 @@ public class FaceServicelimpl implements FaceServiceI {
462 477
         appointJurisdictionMap.put("doorUuids", doorUuids.substring(0, doorUuids.lastIndexOf(",")));
463 478
         appointJurisdictionMap.put("operateType",3);
464 479
         appointJurisdictionMap.put("includeFinger",0);
480
+        appointJurisdictionMap.put("openapi_ip_port_http", tpEquipmentTree.getHttpServer());
465 481
 
466 482
          HKOpenApi.appointJurisdiction(appointJurisdictionMap);
467 483
         // HKOpenApi.selectUserSynchronization();

+ 42
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/FuShiServiceImpl.java Vedi File

@@ -41,7 +41,10 @@ public class FuShiServiceImpl implements IFuShiService {
41 41
     private Map<String,Object> getFuShiInfo(String jsonString) {
42 42
         JSONObject jsonObject = JSONObject.parseObject(jsonString);
43 43
         Map<String, Object> map = Maps.newHashMap();
44
-        map.put("JsonParam", jsonObject.getJSONObject("JsonParam").getInnerMap());
44
+        Map<String, Object> jsonParam = jsonObject.getJSONObject("JsonParam").getInnerMap();
45
+        // 移除优惠券
46
+        jsonParam.remove("CouponList");
47
+        map.put("JsonParam", jsonParam);
45 48
         map.put("Redirect", jsonObject.getString("Redirect"));
46 49
         map.put("DataType", jsonObject.getInteger("DataType"));
47 50
         return map;
@@ -123,4 +126,42 @@ public class FuShiServiceImpl implements IFuShiService {
123 126
         responseBean.addSuccess(map);
124 127
         return responseBean;
125 128
     }
129
+
130
+    /**
131
+     * 获取月租车信息(通过车牌号)
132
+     * @param CarNo
133
+     * @return
134
+     */
135
+    @LogAnnotation(value = LogEnums.DA_SU, alias = "获取月租车信息(通过车牌号)")
136
+    @Override
137
+    public ResponseBean parkGetMonthCardInfoByCarNo(String CarNo) {
138
+        ResponseBean responseBean = new ResponseBean();
139
+        String parkGetMonthCardInfoByCarNo = fuShiRequestAPI.parkGetMonthCardInfoByCarNo(fuShiProperties.getParkingCode(), CarNo);
140
+        JSONObject jsonObject = JSONObject.parseObject(parkGetMonthCardInfoByCarNo);
141
+        Map<String, Object> map = Maps.newHashMap();
142
+        Map<String, Object> result = jsonObject.getJSONObject("Result").getInnerMap();
143
+        result.remove("CouponList");
144
+        map.put("Result", result);
145
+        responseBean.addSuccess(map);
146
+        return responseBean;
147
+    }
148
+
149
+    /**
150
+     * 获取临时车信息(通过车牌号)
151
+     * @param CarNo
152
+     * @return
153
+     */
154
+    @LogAnnotation(value = LogEnums.DA_SU, alias = "获取临时车信息(通过车牌号)")
155
+    @Override
156
+    public ResponseBean parkGetTempCarPaymentInfoByCarNo(String CarNo) {
157
+        ResponseBean responseBean = new ResponseBean();
158
+        String parkGetMonthCardInfoByCarNo = fuShiRequestAPI.parkGetTempCarPaymentInfoByCarNo(fuShiProperties.getParkingCode(), CarNo);
159
+        JSONObject jsonObject = JSONObject.parseObject(parkGetMonthCardInfoByCarNo);
160
+        Map<String, Object> map = Maps.newHashMap();
161
+        Map<String, Object> result = jsonObject.getJSONObject("Result").getInnerMap();
162
+        result.remove("CouponList");
163
+        map.put("Result", result);
164
+        responseBean.addSuccess(map);
165
+        return responseBean;
166
+    }
126 167
 }

+ 31
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/HKServiceImpl.java Vedi File

@@ -110,6 +110,7 @@ public class HKServiceImpl implements IHKService {
110 110
         map.put("doorUuids", doorUuids.substring(0, doorUuids.lastIndexOf(",")));
111 111
         map.put("secret", tpEquipmentTree.getSecret());
112 112
         map.put("appkey", tpEquipmentTree.getAppkey());
113
+        map.put("openapi_ip_port_http", tpEquipmentTree.getHttpServer());
113 114
         HKOpenApi.addAuthoritiesByPersonIds(map);
114 115
 
115 116
         // 下发门禁权限
@@ -120,6 +121,7 @@ public class HKServiceImpl implements IHKService {
120 121
         downloadAuthorityByPersonIdsMap.put("includeFinger",1);
121 122
         downloadAuthorityByPersonIdsMap.put("secret", tpEquipmentTree.getSecret());
122 123
         downloadAuthorityByPersonIdsMap.put("appkey", tpEquipmentTree.getAppkey());
124
+        downloadAuthorityByPersonIdsMap.put("openapi_ip_port_http", tpEquipmentTree.getHttpServer());
123 125
         HKOpenApi.downloadAuthorityByPersonIds(downloadAuthorityByPersonIdsMap);
124 126
 
125 127
         //--------- 可视对讲 ----------
@@ -142,6 +144,7 @@ public class HKServiceImpl implements IHKService {
142 144
     }
143 145
 
144 146
     @Override
147
+    @Deprecated
145 148
     public ResponseBean downloadAuthorityByDeviceUuids() {
146 149
         ResponseBean responseBean = new ResponseBean();
147 150
         // 下发门禁权限
@@ -162,6 +165,7 @@ public class HKServiceImpl implements IHKService {
162 165
         parDept.put("pageNo", 1);
163 166
         parDept.put("pageSize", 100);
164 167
         parDept.put("deptName", Constant.DEPT_RESIDENTS);
168
+        parDept.put("openapi_ip_port_http", tpEquipmentTree.getHttpServer());
165 169
         // 部门UUID
166 170
         String deptUuid = getDeptUUID(parDept);
167 171
 
@@ -173,6 +177,7 @@ public class HKServiceImpl implements IHKService {
173 177
         parUser.put("deptUuid", deptUuid);
174 178
         parUser.put("secret", tpEquipmentTree.getSecret());
175 179
         parUser.put("appkey", tpEquipmentTree.getAppkey());
180
+        parUser.put("openapi_ip_port_http", tpEquipmentTree.getHttpServer());
176 181
         Map<String, Object> resultMap = JSONObject.parseObject(HKOpenApi.addUser(parUser), HashMap.class);
177 182
         int errorCode = (int) resultMap.get("errorCode");
178 183
         if (errorCode == 0) {
@@ -243,6 +248,7 @@ public class HKServiceImpl implements IHKService {
243 248
         parOpenCard.put("endTime", time);
244 249
         parOpenCard.put("secret", tpEquipmentTree.getSecret());
245 250
         parOpenCard.put("appkey", tpEquipmentTree.getAppkey());
251
+        parOpenCard.put("openapi_ip_port_http", tpEquipmentTree.getHttpServer());
246 252
         JSONObject openCardJSON = JSONObject.parseObject(HKOpenApi.openCard(parOpenCard));
247 253
         int code = (int) openCardJSON.get("errorCode");
248 254
         if (code == 0) {
@@ -301,7 +307,32 @@ public class HKServiceImpl implements IHKService {
301 307
         downloadFingerMap.put("opType", 1);
302 308
         downloadFingerMap.put("personIds", map.get("personIds"));
303 309
         downloadFingerMap.put("longNums", map.get("longNums"));
310
+        downloadFingerMap.put("openapi_ip_port_http", map.get("openapi_ip_port_http"));
304 311
         // 可视对讲 指定人员指纹权限下载
305 312
         HKOpenApi.downloadFinger(downloadFingerMap);
306 313
     }
314
+
315
+    @Override
316
+    public ResponseBean syncControl(Integer userVerifyId) {
317
+        ResponseBean responseBean = new ResponseBean();
318
+
319
+        // 查询当前的房产
320
+        TaUserVerify userVerify = taUserVerifyMapper.selectByPrimaryKey(userVerifyId);
321
+        TpEquipmentTree tpEquipmentTree = tpEquipmentTreeMapper.selectByCommunityId(userVerify.getCommunityId());
322
+
323
+        // TODO 查询设备编号
324
+
325
+        Map<String,Object> parMap = com.beust.jcommander.internal.Maps.newHashMap();
326
+        parMap.put("longNums", "10010100000");
327
+        parMap.put("openapi_ip_port_http", tpEquipmentTree.getHttpServer());
328
+        String data = HKOpenApi.syncControl(parMap);
329
+        JSONObject jsonObject = JSONObject.parseObject(data);
330
+        int errorCode = jsonObject.getInteger("errorCode");
331
+        if (errorCode == 0) {
332
+            responseBean.addSuccess("操作成功!");
333
+            return responseBean;
334
+        }
335
+        responseBean.addError("操作失败!");
336
+        return responseBean;
337
+    }
307 338
 }

+ 9
- 4
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserLicenseServiceImpl.java Vedi File

@@ -53,6 +53,10 @@ public class TaUserLicenseServiceImpl implements ITaUserLicenseService {
53 53
         // 获取最新的车牌信息
54 54
         getTaUserLicense(carNo, taUserLicense);
55 55
 
56
+        if (taUserLicense.getLicenseType().intValue() != 1) {
57
+            throw new WisdomException("该车牌不是月租车!");
58
+        }
59
+
56 60
         int rows = 0;
57 61
         if (null == taUserLicense.getId()) {
58 62
             rows = taUserLicenseMapper.insertSelective(taUserLicense);
@@ -129,18 +133,19 @@ public class TaUserLicenseServiceImpl implements ITaUserLicenseService {
129 133
 
130 134
         // 获取到的车牌信息
131 135
         Map<String,Object> map = (Map<String,Object>)resultCar;
132
-        Integer dataType = (Integer) map.get("DataType");
133
-        if (dataType.intValue() != 1) {
134
-            throw new WisdomException("该车牌不是月租车!");
135
-        }
136 136
 
137 137
         Map<String,Object> jsonParam = (Map<String, Object>) map.get("JsonParam");
138 138
 
139
+        Integer dataType = (Integer) map.get("DataType");
140
+        // 车类型
141
+        taUserLicense.setLicenseType(dataType);
142
+
139 143
         taUserLicense.setLicensePlate(carNo);
140 144
         String price = String.valueOf(Double.valueOf(((BigDecimal) jsonParam.get("Cost")).toString()) * 100);
141 145
         taUserLicense.setUnitPrice(price.substring(0, price.lastIndexOf(".")));
142 146
         taUserLicense.setCreateDate(new Date());
143 147
         taUserLicense.setParkingLot(String.valueOf(jsonParam.get("ParkingName")));
148
+        taUserLicense.setRenewTime(Integer.valueOf(String.valueOf(jsonParam.get("RenewTime"))));
144 149
 
145 150
         SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
146 151
         try {

+ 10
- 3
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java Vedi File

@@ -119,6 +119,9 @@ public class TaUserServiceImpl implements ITaUserService {
119 119
     @Autowired
120 120
     private TpEquipmentMapper tpEquipmentMapper;
121 121
 
122
+    @Autowired
123
+    private TpEquipmentTreeMapper tpEquipmentTreeMapper;
124
+
122 125
     /**
123 126
      * 期
124 127
      */
@@ -328,7 +331,8 @@ public class TaUserServiceImpl implements ITaUserService {
328 331
             response.addError("号码已占用");
329 332
             return response;
330 333
         }
331
-        String data = HKOpenApi.HKpersonPhone(user.getHkUserId(), user.getHkPersonNo(), user.getUserName(), phone);
334
+        TpEquipmentTree tpEquipmentTree = tpEquipmentTreeMapper.selectByCommunityId(userElement.getCommunityId());
335
+        String data = HKOpenApi.HKpersonPhone(user.getHkUserId(), user.getHkPersonNo(), user.getUserName(), phone, tpEquipmentTree.getHttpServer());
332 336
         JSONObject jsonobject = JSONObject.parseObject(data);
333 337
         int errorCode = jsonobject.getInteger("errorCode");
334 338
         if (errorCode != 0) {
@@ -705,7 +709,7 @@ public class TaUserServiceImpl implements ITaUserService {
705 709
         addOrUpdateUserRole(type, response, user, false);
706 710
 
707 711
         // 推送海康
708
-        updateUser(response, user);
712
+       //  updateUser(response, user, );
709 713
 
710 714
         // 下发门禁权限
711 715
 //         HKOpenApi.downloadAuthorityByDeviceUuids();
@@ -736,7 +740,9 @@ public class TaUserServiceImpl implements ITaUserService {
736 740
      * @param response
737 741
      * @param user
738 742
      */
739
-    private void updateUser(ResponseBean response, TaUser user) {
743
+    private void updateUser(ResponseBean response, TaUser user, Integer communityId) {
744
+        TpEquipmentTree tpEquipmentTree = tpEquipmentTreeMapper.selectByCommunityId(communityId);
745
+
740 746
         Map<String, Object> parDept = Maps.newHashMap();
741 747
         parDept.put("pageNo", 1);
742 748
         parDept.put("pageSize", 100);
@@ -751,6 +757,7 @@ public class TaUserServiceImpl implements ITaUserService {
751 757
         parUser.put("personName", user.getUserName());
752 758
         parUser.put("phoneNo", user.getLoginName());
753 759
         parUser.put("deptUuid", deptUuid);
760
+        parUser.put("openapi_ip_port_http", tpEquipmentTree.getHttpServer());
754 761
         Map<String, Object> resultMap = JSONObject.parseObject(HKOpenApi.updateUser(parUser), HashMap.class);
755 762
         int errorCode = (int) resultMap.get("errorCode");
756 763
         if (errorCode == 0) {

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaVistorServiceImpl.java Vedi File

@@ -117,7 +117,7 @@ public class TaVistorServiceImpl implements TaVistorServiceI {
117 117
         TaUser taUser = taUserMapper.selectByPrimaryKey(userId);
118 118
         String result = HKOpenApi.temporaryRegister(visitor.getVisitorName(),visitor.getVisitorTel(),
119 119
                 Integer.valueOf(visitor.getVisitorNum()),visitor.getVisitorStartTime().getTime(),
120
-                visitor.getVisitorEndTime().getTime(),taUser.getHkUserId(), tpEquipmentTree.getOpUserUuid(), tpEquipmentTree.getAppkey(), tpEquipmentTree.getSecret());
120
+                visitor.getVisitorEndTime().getTime(),taUser.getHkUserId(), tpEquipmentTree.getOpUserUuid(), tpEquipmentTree.getAppkey(), tpEquipmentTree.getSecret(), tpEquipmentTree.getHttpServer());
121 121
 
122 122
         JSONObject resultJSON = JSONObject.parseObject(result);
123 123
         int errorCode = resultJSON.getInteger("errorCode");

+ 0
- 40
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/VisualIntercomServiceImpl.java Vedi File

@@ -1,40 +0,0 @@
1
-package com.community.huiju.service.impl;
2
-
3
-import com.alibaba.fastjson.JSONObject;
4
-import com.beust.jcommander.internal.Maps;
5
-import com.community.commom.mode.ResponseBean;
6
-import com.community.commom.session.UserElement;
7
-import com.community.commom.hk.HKOpenApi;
8
-import com.community.huiju.service.IVisualIntercomService;
9
-import org.springframework.stereotype.Service;
10
-
11
-import java.util.Map;
12
-
13
-/**
14
- * 可视对讲的业务实现
15
- * @author weiximei
16
- */
17
-@Service
18
-public class VisualIntercomServiceImpl implements IVisualIntercomService {
19
-
20
-
21
-    @Override
22
-    public ResponseBean syncControl(UserElement userElement) {
23
-        ResponseBean responseBean = new ResponseBean();
24
-
25
-        // TODO 这里应该根据 小区期楼栋号查询出这个楼栋下面的门口机, 然后发送开门
26
-
27
-        Map<String,Object> parMap = Maps.newHashMap();
28
-        // TODO 只有一个设备, 临时固定的编号
29
-        parMap.put("longNums", "10010100000");
30
-        String data = HKOpenApi.syncControl(parMap);
31
-        JSONObject jsonObject = JSONObject.parseObject(data);
32
-        int errorCode = jsonObject.getInteger("errorCode");
33
-        if (errorCode == 0) {
34
-            responseBean.addSuccess("操作成功!");
35
-            return responseBean;
36
-        }
37
-        responseBean.addError("操作失败!");
38
-        return responseBean;
39
-    }
40
-}

+ 13
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/WxPayServiceImpl.java Vedi File

@@ -28,6 +28,7 @@ import java.math.BigDecimal;
28 28
 import java.time.Instant;
29 29
 import java.time.LocalDateTime;
30 30
 import java.time.ZoneId;
31
+import java.time.ZoneOffset;
31 32
 import java.util.*;
32 33
 import java.util.concurrent.atomic.AtomicReference;
33 34
 import java.util.stream.Collectors;
@@ -362,6 +363,18 @@ public class WxPayServiceImpl implements WxPayServiceI {
362 363
 					taUserLicense = (TaUserLicense) licenseData;
363 364
 				}
364 365
 
366
+				// 校验车状态
367
+				if (taUserLicense.getLicenseType().intValue() != 1) {
368
+					throw new WisdomException("异常状态,不能缴月租费!");
369
+				}
370
+
371
+				// 校验是否,超出缴费有效期时间
372
+				LocalDateTime expireDateLocalDateTime = LocalDateTime.ofInstant(taUserLicense.getExpireDate().toInstant(), ZoneId.systemDefault());
373
+				expireDateLocalDateTime.plusDays(taUserLicense.getRenewTime());
374
+				if (System.currentTimeMillis() > expireDateLocalDateTime.toEpochSecond(ZoneOffset.of("+8"))) {
375
+					throw new WisdomException("已超出续费时间,请找物业处理!");
376
+				}
377
+
365 378
 				TaUserLicenseOrder taUserLicenseOrder = new TaUserLicenseOrder();
366 379
 				taUserLicenseOrder.setCommunityId(userElement.getCommunityId());
367 380
 				taUserLicenseOrder.setTaUserId(userElement.getId());

+ 29
- 8
CODE/smart-community/app-api/src/main/resources/mapper/TaUserLicenseMapper.xml Vedi File

@@ -14,10 +14,12 @@
14 14
     <result column="create_user" property="createUser" jdbcType="INTEGER" />
15 15
     <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
16 16
     <result column="update_user" property="updateUser" jdbcType="INTEGER" />
17
+    <result column="renew_time" property="renewTime" jdbcType="INTEGER" />
18
+    <result column="license_type" property="licenseType" jdbcType="INTEGER" />
17 19
   </resultMap>
18 20
   <sql id="Base_Column_List" >
19 21
     id, community_id, ta_user_id, license_plate, order_number, expire_date, unit_price,
20
-    parking_lot, create_date, create_user, update_date, update_user
22
+    parking_lot, create_date, create_user, update_date, update_user, renew_time, license_type
21 23
   </sql>
22 24
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
23 25
     select
@@ -33,15 +35,15 @@
33 35
     insert into ta_user_license (id, community_id, ta_user_id,
34 36
       license_plate, order_number, expire_date,
35 37
       unit_price, parking_lot, create_date,
36
-      create_user, update_date, update_user
37
-      )
38
+      create_user, update_date, update_user,
39
+      renew_time, license_type)
38 40
     values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{taUserId,jdbcType=INTEGER},
39 41
       #{licensePlate,jdbcType=VARCHAR}, #{orderNumber,jdbcType=VARCHAR}, #{expireDate,jdbcType=TIMESTAMP},
40 42
       #{unitPrice,jdbcType=VARCHAR}, #{parkingLot,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP},
41
-      #{createUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER}
42
-      )
43
+      #{createUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER},
44
+      #{renewTime,jdbcType=INTEGER}, #{licenseType,jdbcType=INTEGER})
43 45
   </insert>
44
-  <insert id="insertSelective" parameterType="com.community.huiju.model.TaUserLicense"  useGeneratedKeys="true" keyColumn="id" keyProperty="id" >
46
+  <insert id="insertSelective" parameterType="com.community.huiju.model.TaUserLicense" useGeneratedKeys="true" keyColumn="id" keyProperty="id" >
45 47
     insert into ta_user_license
46 48
     <trim prefix="(" suffix=")" suffixOverrides="," >
47 49
       <if test="id != null" >
@@ -80,6 +82,12 @@
80 82
       <if test="updateUser != null" >
81 83
         update_user,
82 84
       </if>
85
+      <if test="renewTime != null" >
86
+        renew_time,
87
+      </if>
88
+      <if test="licenseType != null" >
89
+        license_type,
90
+      </if>
83 91
     </trim>
84 92
     <trim prefix="values (" suffix=")" suffixOverrides="," >
85 93
       <if test="id != null" >
@@ -118,6 +126,12 @@
118 126
       <if test="updateUser != null" >
119 127
         #{updateUser,jdbcType=INTEGER},
120 128
       </if>
129
+      <if test="renewTime != null" >
130
+        #{renewTime,jdbcType=INTEGER},
131
+      </if>
132
+      <if test="licenseType != null" >
133
+        #{licenseType,jdbcType=INTEGER},
134
+      </if>
121 135
     </trim>
122 136
   </insert>
123 137
   <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TaUserLicense" >
@@ -156,6 +170,12 @@
156 170
       <if test="updateUser != null" >
157 171
         update_user = #{updateUser,jdbcType=INTEGER},
158 172
       </if>
173
+      <if test="renewTime != null" >
174
+        renew_time = #{renewTime,jdbcType=INTEGER},
175
+      </if>
176
+      <if test="licenseType != null" >
177
+        license_type = #{licenseType,jdbcType=INTEGER},
178
+      </if>
159 179
     </set>
160 180
     where id = #{id,jdbcType=INTEGER}
161 181
   </update>
@@ -171,8 +191,9 @@
171 191
       create_date = #{createDate,jdbcType=TIMESTAMP},
172 192
       create_user = #{createUser,jdbcType=INTEGER},
173 193
       update_date = #{updateDate,jdbcType=TIMESTAMP},
174
-      update_user = #{updateUser,jdbcType=INTEGER}
194
+      update_user = #{updateUser,jdbcType=INTEGER},
195
+      renew_time = #{renewTime,jdbcType=INTEGER},
196
+      license_type = #{licenseType,jdbcType=INTEGER}
175 197
     where id = #{id,jdbcType=INTEGER}
176 198
   </update>
177
-
178 199
 </mapper>

+ 34
- 0
CODE/smart-community/community-common/src/main/java/com/community/commom/fushi/FuShiRequestAPI.java Vedi File

@@ -189,5 +189,39 @@ public class FuShiRequestAPI {
189 189
     }
190 190
 
191 191
 
192
+    /**
193
+     * 获取月租车信息(通过车牌号)
194
+     * @return
195
+     */
196
+    public String parkGetMonthCardInfoByCarNo(String ParkingCode, String CarNo) {
197
+        Map<String, Object> map = Maps.newHashMap();
198
+        map.put("ParkingCode", ParkingCode);
199
+        map.put("CarNo", CarNo);
200
+        String json = JSONObject.toJSONString(map);
201
+        log.info("获取月租车信息(通过车牌号) 请求参数:{}", json);
202
+        SignBuild signBuild = requestSign(json);
203
+        String result = client.doJsonPost(FushiConstant.PARK_GETMONTHCARDINFOBYCARNO, json, signBuild.getSign(), signBuild.getTimestamp());
204
+        showException(result);
205
+        log.info("获取月租车信息(通过车牌号) 返回数据:{}", result);
206
+        return result;
207
+    }
208
+
209
+    /**
210
+     * 获取临时车信息(通过车牌号)
211
+     * @return
212
+     */
213
+    public String parkGetTempCarPaymentInfoByCarNo(String ParkingCode, String CarNo) {
214
+        Map<String, Object> map = Maps.newHashMap();
215
+        map.put("ParkingCode", ParkingCode);
216
+        map.put("CarNo", CarNo);
217
+        String json = JSONObject.toJSONString(map);
218
+        log.info("获取临时车信息(通过车牌号) 请求参数:{}", json);
219
+        SignBuild signBuild = requestSign(json);
220
+        String result = client.doJsonPost(FushiConstant.PARK_GETTEMPCARPAYMENTINFOBYCARNO, json, signBuild.getSign(), signBuild.getTimestamp());
221
+        showException(result);
222
+        log.info("获取临时车信息(通过车牌号) 返回数据:{}", result);
223
+        return result;
224
+    }
225
+
192 226
 
193 227
 }

+ 10
- 0
CODE/smart-community/community-common/src/main/java/com/community/commom/fushi/FushiConstant.java Vedi File

@@ -26,4 +26,14 @@ public class FushiConstant {
26 26
      */
27 27
     public static final String CALCULATIONCOST_APIGETOFFLINEFEE = "/CalculationCost/ApiGetOfflineFee";
28 28
 
29
+    /**
30
+     * 获取月租车信息(通过车牌号)
31
+     */
32
+    public static final String PARK_GETMONTHCARDINFOBYCARNO = "/Park/GetMonthCardInfoByCarNo";
33
+
34
+    /**
35
+     * 获取临时车信息(通过车牌号)
36
+     */
37
+    public static final String PARK_GETTEMPCARPAYMENTINFOBYCARNO = "/Park/GetTempCarPaymentInfoByCarNo";
38
+
29 39
 }

+ 38
- 39
CODE/smart-community/community-common/src/main/java/com/community/commom/hk/HKOpenApi.java Vedi File

@@ -26,7 +26,7 @@ public class HKOpenApi {
26 26
      */
27 27
     public static String getMonitoryPoint(Map<String,Object> map){
28 28
         Map<String,Object> parMap = Maps.newHashMap();
29
-        String url = HKConstant.OPENAPI_IP_PORT_HTTP + HKConstant.ITF_MONITORY_POINT;
29
+        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.ITF_MONITORY_POINT;
30 30
         //设置APPKEY
31 31
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
32 32
         //设置时间参数
@@ -58,7 +58,7 @@ public class HKOpenApi {
58 58
      */
59 59
     public static String getDeptName(Map<String,Object> map){
60 60
         Map<String,Object> parMap = Maps.newHashMap();
61
-        String url = HKConstant.OPENAPI_IP_PORT_HTTP + HKConstant.ITF_LIKE_DEPT_NAME;
61
+        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.ITF_LIKE_DEPT_NAME;
62 62
         //设置APPKEY
63 63
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
64 64
         //设置时间参数
@@ -91,7 +91,7 @@ public class HKOpenApi {
91 91
      */
92 92
     public static String addUser(Map<String,Object> map){
93 93
         Map<String,Object> parMap = Maps.newHashMap();
94
-        String url = HKConstant.OPENAPI_IP_PORT_HTTP + HKConstant.ITF_ADD_USER;
94
+        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.ITF_ADD_USER;
95 95
         //设置APPKEY获取中心信息
96 96
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
97 97
         //设置时间参数
@@ -125,7 +125,7 @@ public class HKOpenApi {
125 125
      */
126 126
     public static String openCard(Map<String,Object> map){
127 127
         Map<String,Object> parMap = Maps.newHashMap();
128
-        String url = HKConstant.OPENAPI_IP_PORT_HTTP + HKConstant.ITF_OPEN_CARD;
128
+        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.ITF_OPEN_CARD;
129 129
         //设置APPKEY
130 130
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
131 131
         //设置时间参数
@@ -157,7 +157,7 @@ public class HKOpenApi {
157 157
      */
158 158
     public static String getACDevicesByUnitUuids(Map<String, Object> map){
159 159
         Map<String,Object> parMap = Maps.newHashMap();
160
-        String url = HKConstant.OPENAPI_IP_PORT_HTTP + HKConstant.ITF_MONITORY_POINT;
160
+        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.ITF_MONITORY_POINT;
161 161
         //设置APPKEY
162 162
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
163 163
         //设置时间参数
@@ -188,7 +188,7 @@ public class HKOpenApi {
188 188
      */
189 189
     public static String getDoors(Map<String,Object> map){
190 190
         Map<String,Object> parMap = Maps.newHashMap();
191
-        String url = HKConstant.OPENAPI_IP_PORT_HTTP + HKConstant.GET_DOORS; // HKConstant.ITF_MONITORY_POINT;
191
+        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.GET_DOORS; // HKConstant.ITF_MONITORY_POINT;
192 192
         //设置APPKEY
193 193
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
194 194
         //设置时间参数
@@ -218,7 +218,7 @@ public class HKOpenApi {
218 218
      */
219 219
     public static String getUnitsByUuids(Map<String,Object> map){
220 220
         Map<String,Object> parMap = Maps.newHashMap();
221
-        String url = HKConstant.OPENAPI_IP_PORT_HTTP + HKConstant.ITF_MONITORY_POINT;
221
+        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.ITF_MONITORY_POINT;
222 222
         //设置APPKEY
223 223
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
224 224
         //设置时间参数
@@ -248,7 +248,7 @@ public class HKOpenApi {
248 248
      */
249 249
     public static String getRegionsByUnitUuid(Map<String,Object> map){
250 250
         Map<String,Object> parMap = Maps.newHashMap();
251
-        String url = HKConstant.OPENAPI_IP_PORT_HTTP + HKConstant.ITF_MONITORY_POINT;
251
+        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.ITF_MONITORY_POINT;
252 252
         //设置APPKEY
253 253
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
254 254
         //设置时间参数
@@ -279,7 +279,7 @@ public class HKOpenApi {
279 279
      */
280 280
     public static String getDoorsByRegionUuids(Map<String,Object> map){
281 281
         Map<String,Object> parMap = Maps.newHashMap();
282
-        String url = HKConstant.OPENAPI_IP_PORT_HTTP + HKConstant.DOORS_BY_REGION_UUIDS;
282
+        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.DOORS_BY_REGION_UUIDS;
283 283
         //设置APPKEY
284 284
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
285 285
         //设置时间参数
@@ -307,7 +307,7 @@ public class HKOpenApi {
307 307
      */
308 308
     public static String addAuthoritiesByPersonIds(Map<String, Object> map){
309 309
         Map<String,Object> parMap = Maps.newHashMap();
310
-        String url = HKConstant.OPENAPI_IP_PORT_HTTP + HKConstant.ADD_AUTHORITIES_BY_PERSONIDS;
310
+        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.ADD_AUTHORITIES_BY_PERSONIDS;
311 311
         //设置APPKEY
312 312
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
313 313
         //设置时间参数
@@ -339,7 +339,7 @@ public class HKOpenApi {
339 339
      */
340 340
     public static String downloadAuthorityByDeviceUuids(Map<String,Object> map){
341 341
         Map<String,Object> parMap = Maps.newHashMap();
342
-        String url = HKConstant.OPENAPI_IP_PORT_HTTP + HKConstant.DOWNLOAD_AUTHORITY_BY_DEVICEUUIDS;
342
+        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.DOWNLOAD_AUTHORITY_BY_DEVICEUUIDS;
343 343
         //设置APPKEY
344 344
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
345 345
         //设置时间参数
@@ -370,7 +370,7 @@ public class HKOpenApi {
370 370
      */
371 371
     public static String downloadAuthorityByPersonIds(Map<String,Object> map){
372 372
         Map<String,Object> parMap = Maps.newHashMap();
373
-        String url = HKConstant.OPENAPI_IP_PORT_HTTP + HKConstant.DOWNLOAD_AUTHORITY_BY_PERSONIDS;
373
+        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.DOWNLOAD_AUTHORITY_BY_PERSONIDS;
374 374
         //设置APPKEY
375 375
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
376 376
         //设置时间参数
@@ -407,7 +407,7 @@ public class HKOpenApi {
407 407
     public static String getPlans(Integer pageNo, Integer pageSize, Map<String, Object> map) {
408 408
 
409 409
         Map<String,Object> parMap = Maps.newHashMap();
410
-        String url = HKConstant.OPENAPI_IP_PORT_HTTP + HKConstant.GETPLANS;
410
+        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.GETPLANS;
411 411
         //设置APPKEY
412 412
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
413 413
         //设置时间参数
@@ -436,7 +436,7 @@ public class HKOpenApi {
436 436
      */
437 437
     public static String downloadFaceAndFingerInfos(Map<String, Object> map){
438 438
         Map<String,Object> parMap = Maps.newHashMap();
439
-        String url = HKConstant.OPENAPI_IP_PORT_HTTP + HKConstant.DOWNLOAD_FACE_AND_FINGERINFOS;
439
+        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.DOWNLOAD_FACE_AND_FINGERINFOS;
440 440
         //设置APPKEY
441 441
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
442 442
         //设置时间参数
@@ -468,8 +468,8 @@ public class HKOpenApi {
468 468
      * personName 名称
469 469
      * @return
470 470
      */
471
-    public static String HKpersonGroupId(MultipartFile faceImg,Integer personNo,String personName){
472
-        String url = HKConstant.OPENAPI_IP_PORT_HTTP + HKConstant.ITF_ADD_USER;
471
+    public static String HKpersonGroupId(MultipartFile faceImg,Integer personNo,String personName, String openapi_ip_port_http){
472
+        String url = openapi_ip_port_http == null ? HKConstant.OPENAPI_IP_PORT_HTTP : openapi_ip_port_http + HKConstant.ITF_ADD_USER;
473 473
         Map<String, Object> map = new HashMap<String, Object>();
474 474
         map.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
475 475
         map.put("time", System.currentTimeMillis());
@@ -498,7 +498,7 @@ public class HKOpenApi {
498 498
      *  * personName 卡号
499 499
      * @return
500 500
      */
501
-    public static String HKpersonGroupId(MultipartFile faceImg,Integer personId,Long personNo,String personName,String cardNo, String  appkey, String secret) {
501
+    public static String HKpersonGroupId(MultipartFile faceImg,Integer personId,Long personNo,String personName,String cardNo, String  appkey, String secret, String openapi_ip_port_http) {
502 502
         byte [] fileByte = new byte[0];
503 503
         try {
504 504
             if (null!=faceImg) {
@@ -510,7 +510,7 @@ public class HKOpenApi {
510 510
         byte[] imgs=PicUtils.compressPicForScale(fileByte,99L,"x");
511 511
 
512 512
         String img = PicUtils.getImgStr(imgs);
513
-        String url = HKConstant.OPENAPI_IP_PORT_HTTP + HKConstant.ITF_UPDATE_USER;
513
+        String url = openapi_ip_port_http == null  ? HKConstant.OPENAPI_IP_PORT_HTTP : openapi_ip_port_http + HKConstant.ITF_UPDATE_USER;
514 514
         Map<String, Object> map = new HashMap<String, Object>();
515 515
         map.put("appkey", appkey == null?HKConstant.APPKEY:appkey);
516 516
         map.put("time", System.currentTimeMillis());
@@ -544,7 +544,7 @@ public class HKOpenApi {
544 544
      * @return
545 545
      */
546 546
     public static String updateUser(Map<String,Object> map) {
547
-        String url = HKConstant.OPENAPI_IP_PORT_HTTP + HKConstant.ITF_UPDATE_USER;
547
+        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.ITF_UPDATE_USER;
548 548
         Map<String, Object> parMap = new HashMap<String, Object>();
549 549
         //设置APPKEY
550 550
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
@@ -581,9 +581,9 @@ public class HKOpenApi {
581 581
      * @param personId 被访人ID
582 582
      * @return
583 583
      */
584
-    public static String temporaryRegister(String visitorName, String phoneNo,Integer personNum,Long startTime,Long endTime,Integer personId, String opUserUuid, String appkey, String secret){
584
+    public static String temporaryRegister(String visitorName, String phoneNo,Integer personNum,Long startTime,Long endTime,Integer personId, String opUserUuid, String appkey, String secret, String openapi_ip_port_http){
585 585
         Map<String,Object> parMap = Maps.newHashMap();
586
-        String url = HKConstant.OPENAPI_IP_PORT_HTTP + HKConstant.TEMPORARY_REGISTER;
586
+        String url = openapi_ip_port_http == null ? HKConstant.OPENAPI_IP_PORT_HTTP : openapi_ip_port_http + HKConstant.TEMPORARY_REGISTER;
587 587
         //设置APPKEY
588 588
         parMap.put("appkey", appkey == null?HKConstant.APPKEY:appkey);
589 589
         //设置时间参数
@@ -623,9 +623,9 @@ public class HKOpenApi {
623 623
      * @param phoneNo 电话
624 624
      * @return
625 625
      */
626
-    public static String HKpersonPhone(Integer personId,Long personNo,String personName,String phoneNo) {
626
+    public static String HKpersonPhone(Integer personId,Long personNo,String personName,String phoneNo, String openapi_ip_port_http) {
627 627
 
628
-        String url = HKConstant.OPENAPI_IP_PORT_HTTP + HKConstant.ITF_UPDATE_USER;
628
+        String url = openapi_ip_port_http == null ? HKConstant.OPENAPI_IP_PORT_HTTP : openapi_ip_port_http + HKConstant.ITF_UPDATE_USER;
629 629
         Map<String, Object> map = new HashMap<String, Object>();
630 630
         map.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
631 631
         map.put("time", System.currentTimeMillis());
@@ -666,7 +666,7 @@ public class HKOpenApi {
666 666
      */
667 667
     public static String HKgetDoorDevicesByUnitUuids(Map<String, Object> map){
668 668
 
669
-        String url = HKConstant.OPENAPI_IP_PORT_HTTP + HKConstant.GETDOORDEVICESBYUNITUUIDS;
669
+        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.GETDOORDEVICESBYUNITUUIDS;
670 670
         Map<String, Object> parMap = new HashMap<>();
671 671
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
672 672
         parMap.put("time", System.currentTimeMillis());
@@ -703,7 +703,7 @@ public class HKOpenApi {
703 703
      * @return
704 704
      */
705 705
     public static String syncControl(Map<String, Object> map) {
706
-        String url = HKConstant.OPENAPI_IP_PORT_HTTP + HKConstant.SYNCCONTROL;
706
+        String url =  map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") +  HKConstant.SYNCCONTROL;
707 707
         Map<String, Object> parMap = new HashMap<>();
708 708
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
709 709
         parMap.put("time", System.currentTimeMillis());
@@ -733,8 +733,8 @@ public class HKOpenApi {
733 733
      * @param longNums
734 734
      * @return
735 735
      */
736
-    public static String visualIntercom(String opUserUuid, Integer opType,List<Integer> personIds,List<String> longNums, String appkey, String secret) {
737
-        String url = HKConstant.OPENAPI_IP_PORT_HTTP + HKConstant.DOWNLOADFACE;
736
+    public static String visualIntercom(String opUserUuid, Integer opType,List<Integer> personIds,List<String> longNums, String appkey, String secret, String openapi_ip_port_http) {
737
+        String url = openapi_ip_port_http == null ? HKConstant.OPENAPI_IP_PORT_HTTP : openapi_ip_port_http + HKConstant.DOWNLOADFACE;
738 738
         HashMap map = new HashMap<>();
739 739
         map.put("appkey", appkey == null?HKConstant.APPKEY:appkey);
740 740
         map.put("time", System.currentTimeMillis());
@@ -767,7 +767,7 @@ public class HKOpenApi {
767 767
      * @return
768 768
      */
769 769
     public static String addOutDoorAuth(Map<String, Object> map) {
770
-        String url = HKConstant.OPENAPI_IP_PORT_HTTP + HKConstant.ADDOUTDOORAUTH;
770
+        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.ADDOUTDOORAUTH;
771 771
 
772 772
         Map<String, Object> parMap = new HashMap<>();
773 773
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
@@ -804,7 +804,7 @@ public class HKOpenApi {
804 804
      * @return
805 805
      */
806 806
     public static String delOutDoorAuth(Map<String, Object> map) {
807
-        String url = HKConstant.OPENAPI_IP_PORT_HTTP + HKConstant.DELOUTDOORAUTH;
807
+        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.DELOUTDOORAUTH;
808 808
 
809 809
         Map<String, Object> parMap = new HashMap<>();
810 810
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
@@ -841,7 +841,7 @@ public class HKOpenApi {
841 841
      * @return
842 842
      */
843 843
     public static String downloadFinger(Map<String, Object> map) {
844
-        String url = HKConstant.OPENAPI_IP_PORT_HTTP + HKConstant.DOWNLOADFINGER;
844
+        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.DOWNLOADFINGER;
845 845
 
846 846
         Map<String, Object> parMap = new HashMap<>();
847 847
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
@@ -872,7 +872,7 @@ public class HKOpenApi {
872 872
      * @return
873 873
      */
874 874
     public static String getUsers(Map<String, Object> map){
875
-        String url = HKConstant.OPENAPI_IP_PORT_HTTP + HKConstant.GETUSERS;
875
+        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.GETUSERS;
876 876
         Map<String, Object> parMap = new HashMap<>();
877 877
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
878 878
         parMap.put("time", System.currentTimeMillis());
@@ -901,7 +901,7 @@ public class HKOpenApi {
901 901
      * @return
902 902
      */
903 903
     public static String getPersonInfosEx(Map<String, Object> map){
904
-        String url = HKConstant.OPENAPI_IP_PORT_HTTP + HKConstant.GETPERSONINFOSEX;
904
+        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.GETPERSONINFOSEX;
905 905
         Map<String, Object> parMap = new HashMap<>();
906 906
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
907 907
         parMap.put("time", System.currentTimeMillis());
@@ -928,9 +928,9 @@ public class HKOpenApi {
928 928
      *  获取默认用户UUID
929 929
      * @return
930 930
      */
931
-    public static String getDefaultUserUuid(String appkey, String secret){
931
+    public static String getDefaultUserUuid(String appkey, String secret, String openapi_ip_port_http){
932 932
         Map<String,Object> parMap = Maps.newHashMap();
933
-        String url = HKConstant.OPENAPI_IP_PORT_HTTP + HKConstant.ITF_ADDRESS_GET_DEFAULT_USER_UUID;
933
+        String url = openapi_ip_port_http == null ? HKConstant.OPENAPI_IP_PORT_HTTP : openapi_ip_port_http + HKConstant.ITF_ADDRESS_GET_DEFAULT_USER_UUID;
934 934
         //设置APPKEY
935 935
         parMap.put("appkey", appkey == null?HKConstant.APPKEY:appkey);
936 936
         //设置时间参数
@@ -979,7 +979,7 @@ public class HKOpenApi {
979 979
      *     删除当前人脸设备信息
980 980
      */
981 981
     public static String deleteUser(Map<String,Object> map) {
982
-        String url = HKConstant.OPENAPI_IP_PORT_HTTP + HKConstant.ITF_DELETE_USER;
982
+        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.ITF_DELETE_USER;
983 983
         Map<String, Object> parMap = new HashMap<String, Object>();
984 984
         //设置APPKEY
985 985
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
@@ -1008,7 +1008,7 @@ public class HKOpenApi {
1008 1008
      *     查询当前人脸设备信息
1009 1009
      */
1010 1010
     public static String selectUserFace(Map<String,Object> map) {
1011
-        String url = HKConstant.OPENAPI_IP_PORT_HTTP + HKConstant.ITF_SELECT_USER;
1011
+        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.ITF_SELECT_USER;
1012 1012
         Map<String, Object> parMap = new HashMap<String, Object>();
1013 1013
         //设置APPKEY
1014 1014
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
@@ -1037,7 +1037,7 @@ public class HKOpenApi {
1037 1037
      * @return
1038 1038
      */
1039 1039
     public static String selectUserSynchronization(Map<String,Object> map) {
1040
-        String url = HKConstant.OPENAPI_IP_PORT_HTTP + HKConstant.ITF_SELECT_USER_SDH;
1040
+        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.ITF_SELECT_USER_SDH;
1041 1041
         Map<String, Object> parMap = new HashMap<String, Object>();
1042 1042
         //设置APPKEY
1043 1043
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
@@ -1064,7 +1064,7 @@ public class HKOpenApi {
1064 1064
      * @return
1065 1065
      */
1066 1066
     public static String appointJurisdiction(Map<String,Object> map) {
1067
-        String url = HKConstant.OPENAPI_IP_PORT_HTTP + HKConstant.ITF_SELECT_APPOIN;
1067
+        String url = map.get("openapi_ip_port_http") == null ? HKConstant.OPENAPI_IP_PORT_HTTP : map.get("openapi_ip_port_http") + HKConstant.ITF_SELECT_APPOIN;
1068 1068
         Map<String, Object> parMap = new HashMap<String, Object>();
1069 1069
         //设置APPKEY
1070 1070
         parMap.put("appkey", map.get("appkey") == null?HKConstant.APPKEY:map.get("appkey"));
@@ -1093,5 +1093,4 @@ public class HKOpenApi {
1093 1093
         return data;
1094 1094
     }
1095 1095
 
1096
-
1097 1096
 }

+ 62
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/TaUserLicenseOrderController.java Vedi File

@@ -0,0 +1,62 @@
1
+package com.community.huiju.controller;
2
+
3
+
4
+import com.community.commom.mode.ResponseBean;
5
+import com.community.commom.session.UserElement;
6
+import com.community.huiju.common.base.BaseController;
7
+import com.community.huiju.service.ITaUserLicenseOrderService;
8
+import io.swagger.annotations.Api;
9
+import io.swagger.annotations.ApiImplicitParam;
10
+import io.swagger.annotations.ApiImplicitParams;
11
+import io.swagger.annotations.ApiOperation;
12
+import org.springframework.beans.factory.annotation.Autowired;
13
+import org.springframework.web.bind.annotation.RequestMapping;
14
+import org.springframework.web.bind.annotation.RequestMethod;
15
+import org.springframework.web.bind.annotation.RequestParam;
16
+import org.springframework.web.bind.annotation.RestController;
17
+
18
+import javax.servlet.http.HttpSession;
19
+
20
+/**
21
+ * <p>
22
+ * 月租车缴费订单表 前端控制器
23
+ * </p>
24
+ *
25
+ * @author jobob
26
+ * @since 2019-05-13
27
+ */
28
+@RestController
29
+@RequestMapping("/")
30
+@Api(value = "月租车缴费订单表", description = "月租车缴费订单表")
31
+public class TaUserLicenseOrderController extends BaseController {
32
+
33
+    @Autowired
34
+    private ITaUserLicenseOrderService iTaUserLicenseOrderService;
35
+
36
+    @RequestMapping(value = "/user/license/order", method = RequestMethod.GET)
37
+    @ApiOperation(value = "获取月租车缴费记录", notes = "获取月租车缴费记录")
38
+    @ApiImplicitParams({
39
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "header", name = "X-Auth-Token", value = "Token"),
40
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "licensePlate", value = "车牌号"),
41
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "orderNumber", value = "订单号"),
42
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "paymentName", value = "缴费人姓名"),
43
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "paymentTel", value = "缴费人手机号"),
44
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "pageNum", value = "第几页"),
45
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "pageSize", value = "一页多少条"),
46
+    })
47
+    public ResponseBean getAll(@RequestParam(value = "id",required = false) Integer id,
48
+                               @RequestParam(value = "licensePlate",required = false) String licensePlate,
49
+                               @RequestParam(value = "orderNumber",required = false) String orderNumber,
50
+                               @RequestParam(value = "paymentName",required = false) String paymentName,
51
+                               @RequestParam(value = "paymentTel",required = false) String paymentTel,
52
+                               @RequestParam(value = "pageNum",defaultValue = "1", required = false) Integer pageNum,
53
+                               @RequestParam(value = "pageSize" ,defaultValue = "10", required = false) Integer pageSize,
54
+                               HttpSession session) {
55
+
56
+        UserElement userElement = getUserElement(session);
57
+        ResponseBean responseBean = iTaUserLicenseOrderService.getAll(id, licensePlate, orderNumber, paymentName, paymentTel, pageNum, pageSize, userElement);
58
+        return responseBean;
59
+    }
60
+
61
+
62
+}

+ 20
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/TpRentalHouseController.java Vedi File

@@ -0,0 +1,20 @@
1
+package com.community.huiju.controller;
2
+
3
+
4
+import com.community.huiju.common.base.BaseController;
5
+import org.springframework.web.bind.annotation.RequestMapping;
6
+import org.springframework.web.bind.annotation.RestController;
7
+
8
+/**
9
+ * <p>
10
+ * 出租公寓表 前端控制器
11
+ * </p>
12
+ *
13
+ * @author jobob
14
+ * @since 2019-05-13
15
+ */
16
+@RestController
17
+@RequestMapping("/")
18
+public class TpRentalHouseController extends BaseController {
19
+
20
+}

+ 20
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/TpRentalHouseImgController.java Vedi File

@@ -0,0 +1,20 @@
1
+package com.community.huiju.controller;
2
+
3
+
4
+import com.community.huiju.common.base.BaseController;
5
+import org.springframework.web.bind.annotation.RequestMapping;
6
+import org.springframework.web.bind.annotation.RestController;
7
+
8
+/**
9
+ * <p>
10
+ * 出租房间图片 前端控制器
11
+ * </p>
12
+ *
13
+ * @author jobob
14
+ * @since 2019-05-13
15
+ */
16
+@RestController
17
+@RequestMapping("/")
18
+public class TpRentalHouseImgController extends BaseController {
19
+
20
+}

+ 110
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/TpShopController.java Vedi File

@@ -1,20 +1,30 @@
1 1
 package com.community.huiju.controller;
2 2
 
3 3
 
4
+import com.alibaba.fastjson.JSONArray;
5
+import com.alibaba.fastjson.JSONObject;
4 6
 import com.community.commom.mode.ResponseBean;
5 7
 import com.community.commom.session.UserElement;
6 8
 import com.community.huiju.common.base.BaseController;
9
+import com.community.huiju.model.TpShop;
10
+import com.community.huiju.model.TpShopType;
7 11
 import com.community.huiju.service.ITpShopService;
12
+import com.netflix.ribbon.proxy.annotation.Http;
8 13
 import io.swagger.annotations.ApiImplicitParam;
9 14
 import io.swagger.annotations.ApiImplicitParams;
10 15
 import io.swagger.annotations.ApiOperation;
11 16
 import org.springframework.beans.factory.annotation.Autowired;
17
+import org.springframework.web.bind.annotation.PathVariable;
18
+import org.springframework.web.bind.annotation.RequestBody;
12 19
 import org.springframework.web.bind.annotation.RequestMapping;
13 20
 import org.springframework.web.bind.annotation.RequestMethod;
14 21
 import org.springframework.web.bind.annotation.RequestParam;
15 22
 import org.springframework.web.bind.annotation.RestController;
16 23
 
17 24
 import javax.servlet.http.HttpSession;
25
+import java.time.LocalDateTime;
26
+import java.util.ArrayList;
27
+import java.util.List;
18 28
 
19 29
 /**
20 30
  * <p>
@@ -54,4 +64,104 @@ public class TpShopController extends BaseController {
54 64
 		responseBean = shopService.getShopList(id,shopName,shopTypeId,shopStatus,userElement,pageNum,pageSize);
55 65
 		return responseBean;
56 66
 	}
67
+	
68
+	@ApiOperation(value = "添加商铺", notes = "添加商铺")
69
+	@ApiImplicitParams({
70
+			@ApiImplicitParam(paramType = "body", dataType = "TpShop", name = "shop", value = "商铺"),
71
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
72
+	})
73
+	@RequestMapping(value = "/shop/add",method = RequestMethod.POST)
74
+	public ResponseBean saveShop(@RequestBody TpShop shop, HttpSession session){
75
+		ResponseBean responseBean = new ResponseBean();
76
+		UserElement userElement = getUserElement(session);
77
+		responseBean = shopService.saveShop(shop,userElement);
78
+		return responseBean;
79
+	}
80
+	
81
+	@ApiOperation(value = "获取商铺信息", notes = "获取商铺信息")
82
+	@ApiImplicitParams({
83
+			@ApiImplicitParam(paramType = "path", dataType = "Integer", name = "id", value = "商铺Id"),
84
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
85
+	})
86
+	@RequestMapping(value = "/shop/get/{id}",method = RequestMethod.GET)
87
+	public ResponseBean getShop(@PathVariable Integer id, HttpSession session){
88
+		ResponseBean responseBean = new ResponseBean();
89
+		UserElement userElement = getUserElement(session);
90
+		TpShop tpShop = shopService.getShopById(id);
91
+		responseBean.addSuccess(tpShop);
92
+		return responseBean;
93
+	}
94
+	
95
+	@ApiOperation(value = "更新商铺", notes = "更新商铺")
96
+	@ApiImplicitParams({
97
+			@ApiImplicitParam(paramType = "body", dataType = "TpShop", name = "shop", value = "商铺"),
98
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
99
+	})
100
+	@RequestMapping(value = "/shop/update",method = RequestMethod.POST)
101
+	public ResponseBean updateShop(@RequestBody TpShop shop, HttpSession session){
102
+		ResponseBean responseBean = new ResponseBean();
103
+		UserElement userElement = getUserElement(session);
104
+		responseBean = shopService.updateShop(shop,userElement);
105
+		return responseBean;
106
+	}
107
+	
108
+	@ApiOperation(value = "上架商铺", notes = "上架商铺")
109
+	@ApiImplicitParams({
110
+			@ApiImplicitParam(paramType = "body", dataType = "String", name = "jsonString", value = "商铺id集合"),
111
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
112
+	})
113
+	@RequestMapping(value = "/shop/shelf",method = RequestMethod.POST)
114
+	public ResponseBean shelfShop(@RequestBody String jsonString, HttpSession session){
115
+		ResponseBean responseBean = new ResponseBean();
116
+		UserElement userElement = getUserElement(session);
117
+		JSONObject jsonObject = JSONObject.parseObject(jsonString);
118
+		JSONArray ids = jsonObject.getJSONArray("idArray");
119
+		List<TpShop> tpShopList = new ArrayList<>();
120
+		for (Object id : ids){
121
+			TpShop tpShop = new TpShop();
122
+			tpShop.setId((Integer) id);
123
+			tpShop.setShopStatus("1");
124
+			tpShop.setUpdateUser(userElement.getId());
125
+			tpShop.setUpdateDate(LocalDateTime.now());
126
+			tpShopList.add(tpShop);
127
+		}
128
+		
129
+		boolean state = shopService.updateBatchById(tpShopList);
130
+		if (state){
131
+			responseBean.addSuccess("上架成功");
132
+		}else{
133
+			responseBean.addError("上架失败");
134
+		}
135
+		return responseBean;
136
+	}
137
+	
138
+	@ApiOperation(value = "下架商铺", notes = "下架商铺")
139
+	@ApiImplicitParams({
140
+			@ApiImplicitParam(paramType = "body", dataType = "String", name = "jsonString", value = "商铺id集合"),
141
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
142
+	})
143
+	@RequestMapping(value = "/shop/obtained",method = RequestMethod.POST)
144
+	public ResponseBean obtainedShop(@RequestBody String jsonString, HttpSession session){
145
+		ResponseBean responseBean = new ResponseBean();
146
+		UserElement userElement = getUserElement(session);
147
+		JSONObject jsonObject = JSONObject.parseObject(jsonString);
148
+		JSONArray ids = jsonObject.getJSONArray("idArray");
149
+		List<TpShop> tpShopList = new ArrayList<>();
150
+		for (Object id : ids){
151
+			TpShop tpShop = new TpShop();
152
+			tpShop.setId((Integer) id);
153
+			tpShop.setShopStatus("2");
154
+			tpShop.setUpdateUser(userElement.getId());
155
+			tpShop.setUpdateDate(LocalDateTime.now());
156
+			tpShopList.add(tpShop);
157
+		}
158
+		
159
+		boolean state = shopService.updateBatchById(tpShopList);
160
+		if (state){
161
+			responseBean.addSuccess("下架成功");
162
+		}else{
163
+			responseBean.addError("下架失败");
164
+		}
165
+		return responseBean;
166
+	}
57 167
 }

+ 20
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/TpShopImgController.java Vedi File

@@ -0,0 +1,20 @@
1
+package com.community.huiju.controller;
2
+
3
+
4
+import com.community.huiju.common.base.BaseController;
5
+import org.springframework.web.bind.annotation.RequestMapping;
6
+import org.springframework.web.bind.annotation.RestController;
7
+
8
+/**
9
+ * <p>
10
+ * 商铺图片 前端控制器
11
+ * </p>
12
+ *
13
+ * @author jobob
14
+ * @since 2019-05-10
15
+ */
16
+@RestController
17
+@RequestMapping("/")
18
+public class TpShopImgController extends BaseController {
19
+
20
+}

+ 16
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TaUserLicenseOrderMapper.java Vedi File

@@ -0,0 +1,16 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.community.huiju.model.TaUserLicenseOrder;
5
+
6
+/**
7
+ * <p>
8
+ * 月租车缴费订单表 Mapper 接口
9
+ * </p>
10
+ *
11
+ * @author jobob
12
+ * @since 2019-05-13
13
+ */
14
+public interface TaUserLicenseOrderMapper extends BaseMapper<TaUserLicenseOrder> {
15
+
16
+}

+ 16
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TpRentalHouseImgMapper.java Vedi File

@@ -0,0 +1,16 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.community.huiju.model.TpRentalHouseImg;
5
+
6
+/**
7
+ * <p>
8
+ * 出租房间图片 Mapper 接口
9
+ * </p>
10
+ *
11
+ * @author jobob
12
+ * @since 2019-05-13
13
+ */
14
+public interface TpRentalHouseImgMapper extends BaseMapper<TpRentalHouseImg> {
15
+
16
+}

+ 16
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TpRentalHouseMapper.java Vedi File

@@ -0,0 +1,16 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.community.huiju.model.TpRentalHouse;
5
+
6
+/**
7
+ * <p>
8
+ * 出租公寓表 Mapper 接口
9
+ * </p>
10
+ *
11
+ * @author jobob
12
+ * @since 2019-05-13
13
+ */
14
+public interface TpRentalHouseMapper extends BaseMapper<TpRentalHouse> {
15
+
16
+}

+ 19
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TpShopImgMapper.java Vedi File

@@ -0,0 +1,19 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.community.huiju.model.TpShopImg;
5
+
6
+import java.util.List;
7
+
8
+/**
9
+ * <p>
10
+ * 商铺图片 Mapper 接口
11
+ * </p>
12
+ *
13
+ * @author jobob
14
+ * @since 2019-05-10
15
+ */
16
+public interface TpShopImgMapper extends BaseMapper<TpShopImg> {
17
+	
18
+	int batchSave(List<TpShopImg> carouselList);
19
+}

+ 118
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TaUserLicenseOrder.java Vedi File

@@ -0,0 +1,118 @@
1
+package com.community.huiju.model;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableId;
5
+import com.baomidou.mybatisplus.annotation.TableName;
6
+import lombok.Data;
7
+import lombok.EqualsAndHashCode;
8
+import lombok.experimental.Accessors;
9
+
10
+import java.io.Serializable;
11
+import java.time.LocalDateTime;
12
+
13
+/**
14
+ * <p>
15
+ * 月租车缴费订单表
16
+ * </p>
17
+ *
18
+ * @author jobob
19
+ * @since 2019-05-13
20
+ */
21
+@Data
22
+@EqualsAndHashCode(callSuper = false)
23
+@Accessors(chain = true)
24
+@TableName("ta_user_license_order")
25
+public class TaUserLicenseOrder implements Serializable {
26
+
27
+    private static final long serialVersionUID = 1L;
28
+
29
+    @TableId(value = "id", type = IdType.AUTO)
30
+    private Integer id;
31
+
32
+    /**
33
+     * 小区ID
34
+     */
35
+    private Integer communityId;
36
+
37
+    /**
38
+     * 人员ID
39
+     */
40
+    private Integer taUserId;
41
+
42
+    /**
43
+     * 订单号
44
+     */
45
+    private String orderNumber;
46
+
47
+    /**
48
+     * 支付状态  0:未支付  1: 已支付 2: 正在支付中 3:已关闭
49
+     */
50
+    private String orderStatus;
51
+
52
+    /**
53
+     * 创建人
54
+     */
55
+    private Integer createUser;
56
+
57
+    /**
58
+     * 创建时间
59
+     */
60
+    private LocalDateTime createDate;
61
+
62
+    /**
63
+     * 更新人
64
+     */
65
+    private Integer updateUser;
66
+
67
+    /**
68
+     * 更新时间
69
+     */
70
+    private LocalDateTime updateDate;
71
+
72
+    /**
73
+     * 延期月份
74
+     */
75
+    private Integer extensionMonth;
76
+
77
+    /**
78
+     * 延期费用
79
+     */
80
+    private String extensionPrice;
81
+
82
+    /**
83
+     * 缴费手机号
84
+     */
85
+    private String paymentTel;
86
+
87
+    /**
88
+     * 缴费人姓名
89
+     */
90
+    private String paymentName;
91
+
92
+    /**
93
+     * 缴费方式 0是微信支付 2是支付宝 
94
+     */
95
+    private String paymentType;
96
+
97
+    /**
98
+     * 到期时间
99
+     */
100
+    private LocalDateTime expireDate;
101
+
102
+    /**
103
+     * 单价费用
104
+     */
105
+    private String unitPrice;
106
+
107
+    /**
108
+     * 停车场
109
+     */
110
+    private String parkingLot;
111
+
112
+    /**
113
+     * 车牌号
114
+     */
115
+    private String licensePlate;
116
+
117
+
118
+}

+ 178
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpRentalHouse.java Vedi File

@@ -0,0 +1,178 @@
1
+package com.community.huiju.model;
2
+
3
+import com.baomidou.mybatisplus.annotation.TableField;
4
+import lombok.Data;
5
+import lombok.EqualsAndHashCode;
6
+import lombok.experimental.Accessors;
7
+
8
+import java.io.Serializable;
9
+import java.time.LocalDateTime;
10
+
11
+/**
12
+ * <p>
13
+ * 出租公寓表
14
+ * </p>
15
+ *
16
+ * @author jobob
17
+ * @since 2019-05-13
18
+ */
19
+@Data
20
+@EqualsAndHashCode(callSuper = false)
21
+@Accessors(chain = true)
22
+public class TpRentalHouse implements Serializable {
23
+
24
+    private static final long serialVersionUID = 1L;
25
+
26
+    /**
27
+     * 房间名称
28
+     */
29
+    private String houseName;
30
+
31
+    /**
32
+     * 房屋租金
33
+     */
34
+    private String rentalPrice;
35
+
36
+    /**
37
+     * 面积
38
+     */
39
+    private String area;
40
+
41
+    /**
42
+     * 出租方式 1 是整租 2是合租
43
+     */
44
+    private String rentalType;
45
+
46
+    /**
47
+     * 户型 1 是一室居 2是二室居 3 是三室局 4 是四室居及以上
48
+     */
49
+    private String houseType;
50
+
51
+    /**
52
+     * 上架状态 1 是已上架 2是已下架
53
+     */
54
+    private String houseStatus;
55
+
56
+    /**
57
+     * 楼层
58
+     */
59
+    private String houseLevel;
60
+
61
+    /**
62
+     * 标签
63
+     */
64
+    private String houseLabel;
65
+
66
+    /**
67
+     * 权重
68
+     */
69
+    private Integer sort;
70
+
71
+    /**
72
+     * 联系电话
73
+     */
74
+    private String houseTel;
75
+
76
+    /**
77
+     * 小区地址
78
+     */
79
+    private String communityAddress;
80
+
81
+    /**
82
+     * 小区经度
83
+     */
84
+    private String communityLongitude;
85
+
86
+    /**
87
+     * 小区纬度
88
+     */
89
+    private String communityLatitude;
90
+
91
+    /**
92
+     * 房屋介绍
93
+     */
94
+    private String houseIntroduction;
95
+
96
+    /**
97
+     * 床   1 有
98
+     */
99
+    private String bed;
100
+
101
+    /**
102
+     * 衣柜 1 有
103
+     */
104
+    private String wardrobe;
105
+
106
+    /**
107
+     * 餐桌 1 有
108
+     */
109
+    private String diningTable;
110
+
111
+    /**
112
+     * 电脑桌 1 有
113
+     */
114
+    private String computerDesk;
115
+
116
+    /**
117
+     * 热水器 1 有
118
+     */
119
+    private String waterHeater;
120
+
121
+    /**
122
+     * 椅子 1 有
123
+     */
124
+    private String chair;
125
+
126
+    /**
127
+     *  洗衣机 1 有
128
+     */
129
+    private String washingMachine;
130
+
131
+    /**
132
+     * 空调 1 有
133
+     */
134
+    private String airConditioning;
135
+
136
+    /**
137
+     * 台灯 1 有
138
+     */
139
+    private String tableLamp;
140
+
141
+    /**
142
+     * WiFi 1 有
143
+     */
144
+    @TableField("WiFi")
145
+    private String WiFi;
146
+
147
+    /**
148
+     * 微波炉 1 有
149
+     */
150
+    private String microwaveOven;
151
+
152
+    /**
153
+     * 天然气 1 有
154
+     */
155
+    private String naturalGas;
156
+
157
+    /**
158
+     * 创建时间
159
+     */
160
+    private LocalDateTime createDate;
161
+
162
+    /**
163
+     * 创建人
164
+     */
165
+    private Integer createUser;
166
+
167
+    /**
168
+     * 更新时间
169
+     */
170
+    private LocalDateTime updateDate;
171
+
172
+    /**
173
+     * 更新人
174
+     */
175
+    private Integer updateUser;
176
+
177
+
178
+}

+ 51
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpRentalHouseImg.java Vedi File

@@ -0,0 +1,51 @@
1
+package com.community.huiju.model;
2
+
3
+import lombok.Data;
4
+import lombok.EqualsAndHashCode;
5
+import lombok.experimental.Accessors;
6
+
7
+import java.io.Serializable;
8
+import java.time.LocalDateTime;
9
+
10
+/**
11
+ * <p>
12
+ * 出租房间图片
13
+ * </p>
14
+ *
15
+ * @author jobob
16
+ * @since 2019-05-13
17
+ */
18
+@Data
19
+@EqualsAndHashCode(callSuper = false)
20
+@Accessors(chain = true)
21
+public class TpRentalHouseImg implements Serializable {
22
+
23
+    private static final long serialVersionUID = 1L;
24
+
25
+    /**
26
+     * 小区ID
27
+     */
28
+    private Integer communityId;
29
+
30
+    /**
31
+     * 出租房间ID
32
+     */
33
+    private Integer rentalHouseId;
34
+
35
+    /**
36
+     * 出租房间图片地址
37
+     */
38
+    private String imgUrl;
39
+
40
+    /**
41
+     * 出租房间图片类型 1是app列表图,2是轮播图
42
+     */
43
+    private String imgType;
44
+
45
+    /**
46
+     * 创建时间
47
+     */
48
+    private LocalDateTime createDate;
49
+
50
+
51
+}

+ 19
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpShop.java Vedi File

@@ -9,6 +9,7 @@ import lombok.experimental.Accessors;
9 9
 
10 10
 import java.io.Serializable;
11 11
 import java.time.LocalDateTime;
12
+import java.util.List;
12 13
 
13 14
 /**
14 15
  * <p>
@@ -125,4 +126,22 @@ public class TpShop implements Serializable {
125 126
      */
126 127
     @TableField(exist = false)
127 128
     private String userName;
129
+    
130
+    /**
131
+     * 首页图片地址
132
+     */
133
+    @TableField(exist = false)
134
+    private String appIndexImg;
135
+    
136
+    /**
137
+     * app列表展示图
138
+     */
139
+    @TableField(exist = false)
140
+    private String appListImg;
141
+    
142
+    /**
143
+     * app商铺轮播图
144
+     */
145
+    @TableField(exist = false)
146
+    private List<String> appCarouselImg;
128 147
 }

+ 51
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpShopImg.java Vedi File

@@ -0,0 +1,51 @@
1
+package com.community.huiju.model;
2
+
3
+import lombok.Data;
4
+import lombok.EqualsAndHashCode;
5
+import lombok.experimental.Accessors;
6
+
7
+import java.io.Serializable;
8
+import java.time.LocalDateTime;
9
+
10
+/**
11
+ * <p>
12
+ * 商铺图片
13
+ * </p>
14
+ *
15
+ * @author jobob
16
+ * @since 2019-05-10
17
+ */
18
+@Data
19
+@EqualsAndHashCode(callSuper = false)
20
+@Accessors(chain = true)
21
+public class TpShopImg implements Serializable {
22
+
23
+    private static final long serialVersionUID = 1L;
24
+
25
+    /**
26
+     * 小区ID
27
+     */
28
+    private Integer communityId;
29
+
30
+    /**
31
+     * 商铺ID
32
+     */
33
+    private Integer shopId;
34
+
35
+    /**
36
+     * 商铺图片地址
37
+     */
38
+    private String imgUrl;
39
+
40
+    /**
41
+     * 商铺图片类型 1是app首页图片每个商铺唯一,2是app列表图片,3是app商铺轮播图
42
+     */
43
+    private String imgType;
44
+
45
+    /**
46
+     * 创建时间
47
+     */
48
+    private LocalDateTime createDate;
49
+
50
+
51
+}

+ 29
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ITaUserLicenseOrderService.java Vedi File

@@ -0,0 +1,29 @@
1
+package com.community.huiju.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.community.commom.mode.ResponseBean;
5
+import com.community.commom.session.UserElement;
6
+import com.community.huiju.model.TaUserLicenseOrder;
7
+
8
+/**
9
+ * <p>
10
+ * 月租车缴费订单表 服务类
11
+ * </p>
12
+ *
13
+ * @author jobob
14
+ * @since 2019-05-13
15
+ */
16
+public interface ITaUserLicenseOrderService extends IService<TaUserLicenseOrder> {
17
+
18
+    /**
19
+     * 获取所有缴费记录
20
+     * @param id
21
+     * @param licensePlate
22
+     * @param orderNumber
23
+     * @param paymentName
24
+     * @param paymentTel
25
+     * @return
26
+     */
27
+    ResponseBean getAll(Integer id, String licensePlate, String orderNumber, String paymentName, String paymentTel, Integer pageNum, Integer pageSize, UserElement userElement);
28
+
29
+}

+ 16
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ITpRentalHouseImgService.java Vedi File

@@ -0,0 +1,16 @@
1
+package com.community.huiju.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.community.huiju.model.TpRentalHouseImg;
5
+
6
+/**
7
+ * <p>
8
+ * 出租房间图片 服务类
9
+ * </p>
10
+ *
11
+ * @author jobob
12
+ * @since 2019-05-13
13
+ */
14
+public interface ITpRentalHouseImgService extends IService<TpRentalHouseImg> {
15
+
16
+}

+ 16
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ITpRentalHouseService.java Vedi File

@@ -0,0 +1,16 @@
1
+package com.community.huiju.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.community.huiju.model.TpRentalHouse;
5
+
6
+/**
7
+ * <p>
8
+ * 出租公寓表 服务类
9
+ * </p>
10
+ *
11
+ * @author jobob
12
+ * @since 2019-05-13
13
+ */
14
+public interface ITpRentalHouseService extends IService<TpRentalHouse> {
15
+
16
+}

+ 16
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ITpShopImgService.java Vedi File

@@ -0,0 +1,16 @@
1
+package com.community.huiju.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.community.huiju.model.TpShopImg;
5
+
6
+/**
7
+ * <p>
8
+ * 商铺图片 服务类
9
+ * </p>
10
+ *
11
+ * @author jobob
12
+ * @since 2019-05-10
13
+ */
14
+public interface ITpShopImgService extends IService<TpShopImg> {
15
+
16
+}

+ 23
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ITpShopService.java Vedi File

@@ -27,4 +27,27 @@ public interface ITpShopService extends IService<TpShop> {
27 27
 	 * @return
28 28
 	 */
29 29
 	ResponseBean getShopList(Integer id, String shopName, Integer shopTypeId, String shopStatus, UserElement userElement, Integer pageNum, Integer pageSize);
30
+	
31
+	/**
32
+	 * 保存商铺
33
+	 * @param shop
34
+	 * @param userElement
35
+	 * @return
36
+	 */
37
+	ResponseBean saveShop(TpShop shop, UserElement userElement);
38
+	
39
+	/**
40
+	 * 获取商铺信息
41
+	 * @param id
42
+	 * @return
43
+	 */
44
+	TpShop getShopById(Integer id);
45
+	
46
+	/**
47
+	 * 更新商铺信息
48
+	 * @param shop
49
+	 * @param userElement
50
+	 * @return
51
+	 */
52
+	ResponseBean updateShop(TpShop shop, UserElement userElement);
30 53
 }

+ 44
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TaUserLicenseOrderServiceImpl.java Vedi File

@@ -0,0 +1,44 @@
1
+package com.community.huiju.service.impl;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
7
+import com.community.commom.mode.ResponseBean;
8
+import com.community.commom.session.UserElement;
9
+import com.community.huiju.model.TaUserLicenseOrder;
10
+import com.community.huiju.dao.TaUserLicenseOrderMapper;
11
+import com.community.huiju.service.ITaUserLicenseOrderService;
12
+import org.apache.commons.lang3.StringUtils;
13
+import org.springframework.stereotype.Service;
14
+
15
+/**
16
+ * <p>
17
+ * 月租车缴费订单表 服务实现类
18
+ * </p>
19
+ *
20
+ * @author jobob
21
+ * @since 2019-05-13
22
+ */
23
+@Service
24
+public class TaUserLicenseOrderServiceImpl extends ServiceImpl<TaUserLicenseOrderMapper, TaUserLicenseOrder> implements ITaUserLicenseOrderService {
25
+
26
+    @Override
27
+    public ResponseBean getAll(Integer id, String licensePlate, String orderNumber, String paymentName, String paymentTel, Integer pageNum, Integer pageSize, UserElement userElement) {
28
+        ResponseBean responseBean = new ResponseBean();
29
+        IPage<TaUserLicenseOrder> page = new Page<>();
30
+        page.setSize(pageSize);
31
+        page.setCurrent(pageNum);
32
+        QueryWrapper<TaUserLicenseOrder> queryWrapper = new QueryWrapper<>();
33
+        queryWrapper.eq(id != null ,"id", id);
34
+        queryWrapper.like(StringUtils.isNotBlank(licensePlate), "license_plate", licensePlate);
35
+        queryWrapper.like(StringUtils.isNotBlank(orderNumber), "order_number", orderNumber);
36
+        queryWrapper.like(StringUtils.isNotBlank(paymentName), "payment_name", paymentName);
37
+        queryWrapper.like(StringUtils.isNotBlank(paymentTel), "payment_tel", paymentTel);
38
+        queryWrapper.eq("community_id", userElement.getCommunityId());
39
+
40
+        IPage<TaUserLicenseOrder> orderIPage = this.page(page, queryWrapper);
41
+        responseBean.addSuccess(orderIPage);
42
+        return responseBean;
43
+    }
44
+}

+ 20
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpRentalHouseImgServiceImpl.java Vedi File

@@ -0,0 +1,20 @@
1
+package com.community.huiju.service.impl;
2
+
3
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4
+import com.community.huiju.dao.TpRentalHouseImgMapper;
5
+import com.community.huiju.model.TpRentalHouseImg;
6
+import com.community.huiju.service.ITpRentalHouseImgService;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 出租房间图片 服务实现类
12
+ * </p>
13
+ *
14
+ * @author jobob
15
+ * @since 2019-05-13
16
+ */
17
+@Service
18
+public class TpRentalHouseImgServiceImpl extends ServiceImpl<TpRentalHouseImgMapper, TpRentalHouseImg> implements ITpRentalHouseImgService {
19
+
20
+}

+ 20
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpRentalHouseServiceImpl.java Vedi File

@@ -0,0 +1,20 @@
1
+package com.community.huiju.service.impl;
2
+
3
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4
+import com.community.huiju.dao.TpRentalHouseMapper;
5
+import com.community.huiju.model.TpRentalHouse;
6
+import com.community.huiju.service.ITpRentalHouseService;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 出租公寓表 服务实现类
12
+ * </p>
13
+ *
14
+ * @author jobob
15
+ * @since 2019-05-13
16
+ */
17
+@Service
18
+public class TpRentalHouseServiceImpl extends ServiceImpl<TpRentalHouseMapper, TpRentalHouse> implements ITpRentalHouseService {
19
+
20
+}

+ 20
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpShopImgServiceImpl.java Vedi File

@@ -0,0 +1,20 @@
1
+package com.community.huiju.service.impl;
2
+
3
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4
+import com.community.huiju.dao.TpShopImgMapper;
5
+import com.community.huiju.model.TpShopImg;
6
+import com.community.huiju.service.ITpShopImgService;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 商铺图片 服务实现类
12
+ * </p>
13
+ *
14
+ * @author jobob
15
+ * @since 2019-05-10
16
+ */
17
+@Service
18
+public class TpShopImgServiceImpl extends ServiceImpl<TpShopImgMapper, TpShopImg> implements ITpShopImgService {
19
+
20
+}

+ 147
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpShopServiceImpl.java Vedi File

@@ -1,15 +1,21 @@
1 1
 package com.community.huiju.service.impl;
2 2
 
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
3 4
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
4 5
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
5 6
 import com.community.commom.mode.ResponseBean;
6 7
 import com.community.commom.session.UserElement;
8
+import com.community.huiju.dao.TpShopImgMapper;
7 9
 import com.community.huiju.dao.TpShopMapper;
8 10
 import com.community.huiju.model.TpShop;
11
+import com.community.huiju.model.TpShopImg;
9 12
 import com.community.huiju.service.ITpShopService;
10 13
 import org.springframework.beans.factory.annotation.Autowired;
11 14
 import org.springframework.stereotype.Service;
15
+import org.springframework.transaction.annotation.Transactional;
12 16
 
17
+import java.time.LocalDateTime;
18
+import java.util.ArrayList;
13 19
 import java.util.HashMap;
14 20
 import java.util.List;
15 21
 import java.util.Map;
@@ -23,11 +29,15 @@ import java.util.Map;
23 29
  * @since 2019-05-10
24 30
  */
25 31
 @Service
32
+@Transactional(rollbackFor = Exception.class)
26 33
 public class TpShopServiceImpl extends ServiceImpl<TpShopMapper, TpShop> implements ITpShopService {
27 34
 
28 35
 	@Autowired
29 36
 	private TpShopMapper shopMapper;
30 37
 	
38
+	@Autowired
39
+	private TpShopImgMapper shopImgMapper;
40
+	
31 41
 	/**
32 42
 	 * 根据条件查询商铺列表
33 43
 	 *
@@ -57,4 +67,141 @@ public class TpShopServiceImpl extends ServiceImpl<TpShopMapper, TpShop> impleme
57 67
 		responseBean.addSuccess(map);
58 68
 		return responseBean;
59 69
 	}
70
+	
71
+	/**
72
+	 * 保存商铺
73
+	 *
74
+	 * @param shop
75
+	 * @param userElement
76
+	 * @return
77
+	 */
78
+	@Override
79
+	public ResponseBean saveShop(TpShop shop, UserElement userElement) {
80
+		ResponseBean responseBean = new ResponseBean();
81
+		//添加商铺信息
82
+		Integer communityId = userElement.getCommunityId();
83
+		LocalDateTime localDateTime = LocalDateTime.now();
84
+		shop.setCommunityId(communityId);
85
+		shop.setCreateUser(userElement.getId());
86
+		shop.setUpdateDate(localDateTime);
87
+		shopMapper.insert(shop);
88
+		//添加商铺app首页图片信息
89
+		TpShopImg appIndexShopImg = new TpShopImg();
90
+		appIndexShopImg.setCommunityId(communityId);
91
+		appIndexShopImg.setCreateDate(localDateTime);
92
+		appIndexShopImg.setImgType("1");
93
+		appIndexShopImg.setShopId(shop.getId());
94
+		appIndexShopImg.setImgUrl(shop.getAppIndexImg());
95
+		shopImgMapper.insert(appIndexShopImg);
96
+		//添加商铺app列表图片信息
97
+		TpShopImg appListShopImg = new TpShopImg();
98
+		appListShopImg.setCommunityId(communityId);
99
+		appListShopImg.setCreateDate(localDateTime);
100
+		appListShopImg.setImgType("2");
101
+		appListShopImg.setShopId(shop.getId());
102
+		appListShopImg.setImgUrl(shop.getAppListImg());
103
+		shopImgMapper.insert(appListShopImg);
104
+		//批量添加app轮播图片
105
+		List<String> list = shop.getAppCarouselImg();
106
+		List<TpShopImg> carouselList = new ArrayList<>();
107
+		list.stream().forEach(e -> {
108
+			TpShopImg appCarouselImg = new TpShopImg();
109
+			appCarouselImg.setCommunityId(communityId);
110
+			appCarouselImg.setCreateDate(localDateTime);
111
+			appCarouselImg.setImgType("3");
112
+			appCarouselImg.setShopId(shop.getId());
113
+			appCarouselImg.setImgUrl(e);
114
+			carouselList.add(appCarouselImg);
115
+		});
116
+		shopImgMapper.batchSave(carouselList);
117
+		responseBean.addSuccess("添加成功");
118
+		return responseBean;
119
+	}
120
+	
121
+	/**
122
+	 * 获取商铺信息
123
+	 *
124
+	 * @param id
125
+	 * @return
126
+	 */
127
+	@Override
128
+	public TpShop getShopById(Integer id) {
129
+		TpShop tpShop = shopMapper.selectById(id);
130
+		//获取商铺app首页图片信息
131
+		QueryWrapper<TpShopImg> tpShopImgQueryWrapper = new QueryWrapper<>();
132
+		tpShopImgQueryWrapper.eq("community_id",tpShop.getCommunityId());
133
+		tpShopImgQueryWrapper.eq("shop_id",tpShop.getId());
134
+		tpShopImgQueryWrapper.eq("img_type","1");
135
+		TpShopImg tpShopImg = shopImgMapper.selectOne(tpShopImgQueryWrapper);
136
+		tpShop.setAppIndexImg(tpShopImg.getImgUrl());
137
+		//获取商铺APP列表图片信息
138
+		QueryWrapper<TpShopImg> tpShopImgListWrapper = new QueryWrapper<>();
139
+		tpShopImgListWrapper.eq("community_id",tpShop.getCommunityId());
140
+		tpShopImgListWrapper.eq("shop_id",tpShop.getId());
141
+		tpShopImgListWrapper.eq("img_type","2");
142
+		TpShopImg listShopImg = shopImgMapper.selectOne(tpShopImgListWrapper);
143
+		tpShop.setAppListImg(listShopImg.getImgUrl());
144
+		//获取商铺轮播图列表
145
+		QueryWrapper<TpShopImg> tpShopImgCarouselWrapper = new QueryWrapper<>();
146
+		tpShopImgCarouselWrapper.eq("community_id",tpShop.getCommunityId());
147
+		tpShopImgCarouselWrapper.eq("shop_id",tpShop.getId());
148
+		tpShopImgCarouselWrapper.eq("img_type","3");
149
+		List<TpShopImg> carouselList = shopImgMapper.selectList(tpShopImgCarouselWrapper);
150
+		List<String> carouselUrlList = new ArrayList<>();
151
+		carouselList.stream().forEach(e -> {
152
+			carouselUrlList.add(e.getImgUrl());
153
+		});
154
+		tpShop.setAppCarouselImg(carouselUrlList);
155
+		return tpShop;
156
+	}
157
+	
158
+	/**
159
+	 * 更新商铺信息
160
+	 *
161
+	 * @param shop
162
+	 * @param userElement
163
+	 * @return
164
+	 */
165
+	@Override
166
+	public ResponseBean updateShop(TpShop shop, UserElement userElement) {
167
+		ResponseBean responseBean = new ResponseBean();
168
+		shopMapper.updateById(shop);
169
+		//添加商铺app首页图片信息
170
+		TpShopImg appIndexShopImg = new TpShopImg();
171
+		appIndexShopImg.setImgUrl(shop.getAppIndexImg());
172
+		QueryWrapper<TpShopImg> tpShopImgQueryWrapper = new QueryWrapper<>();
173
+		tpShopImgQueryWrapper.eq("community_id",shop.getCommunityId());
174
+		tpShopImgQueryWrapper.eq("shop_id",shop.getId());
175
+		tpShopImgQueryWrapper.eq("img_type","1");
176
+		shopImgMapper.update(appIndexShopImg,tpShopImgQueryWrapper);
177
+		//添加商铺app列表图片信息
178
+		TpShopImg appListShopImg = new TpShopImg();
179
+		appListShopImg.setImgUrl(shop.getAppListImg());
180
+		QueryWrapper<TpShopImg> tpShopImgListWrapper = new QueryWrapper<>();
181
+		tpShopImgListWrapper.eq("community_id",shop.getCommunityId());
182
+		tpShopImgListWrapper.eq("shop_id",shop.getId());
183
+		tpShopImgListWrapper.eq("img_type","2");
184
+		shopImgMapper.update(appListShopImg,tpShopImgListWrapper);
185
+		//先删除在批量添加app轮播图片
186
+		QueryWrapper<TpShopImg> tpShopImgCarouselWrapper = new QueryWrapper<>();
187
+		tpShopImgCarouselWrapper.eq("community_id",shop.getCommunityId());
188
+		tpShopImgCarouselWrapper.eq("shop_id",shop.getId());
189
+		tpShopImgCarouselWrapper.eq("img_type","3");
190
+		shopImgMapper.delete(tpShopImgCarouselWrapper);
191
+		//重新添加
192
+		List<String> list = shop.getAppCarouselImg();
193
+		List<TpShopImg> carouselList = new ArrayList<>();
194
+		list.stream().forEach(e -> {
195
+			TpShopImg appCarouselImg = new TpShopImg();
196
+			appCarouselImg.setCommunityId(shop.getCommunityId());
197
+			appCarouselImg.setCreateDate(LocalDateTime.now());
198
+			appCarouselImg.setImgType("3");
199
+			appCarouselImg.setShopId(shop.getId());
200
+			appCarouselImg.setImgUrl(e);
201
+			carouselList.add(appCarouselImg);
202
+		});
203
+		shopImgMapper.batchSave(carouselList);
204
+		responseBean.addSuccess("修改成功");
205
+		return responseBean;
206
+	}
60 207
 }

+ 5
- 0
CODE/smart-community/property-api/src/main/resources/mapper/TaUserLicenseOrderMapper.xml Vedi File

@@ -0,0 +1,5 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.community.huiju.dao.TaUserLicenseOrderMapper">
4
+
5
+</mapper>

+ 5
- 0
CODE/smart-community/property-api/src/main/resources/mapper/TpRentalHouseImgMapper.xml Vedi File

@@ -0,0 +1,5 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.community.huiju.dao.TpRentalHouseImgMapper">
4
+
5
+</mapper>

+ 5
- 0
CODE/smart-community/property-api/src/main/resources/mapper/TpRentalHouseMapper.xml Vedi File

@@ -0,0 +1,5 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.community.huiju.dao.TpRentalHouseMapper">
4
+
5
+</mapper>

+ 13
- 0
CODE/smart-community/property-api/src/main/resources/mapper/TpShopImgMapper.xml Vedi File

@@ -0,0 +1,13 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.community.huiju.dao.TpShopImgMapper">
4
+
5
+    <insert id="batchSave" useGeneratedKeys="true" keyProperty="id" parameterType="java.util.ArrayList">
6
+        insert into tp_shop_img(community_id,shop_id,img_url,img_type,create_date)
7
+        VALUES
8
+        <foreach collection="list" item="item" index="index" separator=",">
9
+            (#{item.communityId},#{item.shopId},#{item.imgUrl},#{item.imgType},#{item.createDate})
10
+        </foreach>
11
+    </insert>
12
+
13
+</mapper>

+ 84
- 69
VUECODE/smart-operate-manage/src/components/Wangeditor/index.vue Vedi File

@@ -16,81 +16,25 @@ export default {
16 16
       editorObject: ''
17 17
     }
18 18
   },
19
+  watch: {
20
+    content(nw, old) {
21
+      window.console.log('---->', nw, old)
22
+      if (!old && nw) {
23
+        window.console.log('--1111-->', nw)
24
+        this.editorContent = nw
25
+        this.initEditor()
26
+      }
27
+    }
28
+  },
19 29
   computed: {
20 30
     ...mapGetters([
21 31
       'token'
22 32
     ])
23 33
   },
24 34
   mounted() {
25
-    this.editorObject = new E(this.$refs.editorElem) // 创建富文本实例
26
-    var editor = this.editorObject
27
-    editor.customConfig.onchange = (html) => {
28
-      this.editorContent = html
29
-      this.childWangeditorValue() // 把这个html通过catchData的方法传入父组件
30
-      // this.catchData(html) // 把这个html通过catchData的方法传入父组件
31
-    }
32
-    editor.customConfig.zIndex = 100
33
-    editor.customConfig.uploadImgServer = process.env.BASE_API + '/uploadimage'
34
-    editor.customConfig.uploadFileName = 'uploadFiles'
35
-    editor.customConfig.uploadImgHeaders = {
36
-      'Accept': '*/*',
37
-      'Authorization': 'Bearer ' + this.token // 头部token
38
-    }
39
-    editor.customConfig.menus = [ // 菜单配置
40
-      'head',
41
-      'list', // 列表
42
-      'justify', // 对齐方式
43
-      'bold',
44
-      'fontSize', // 字号
45
-      'italic',
46
-      'underline',
47
-      'image', // 插入图片
48
-      'foreColor', // 文字颜色
49
-      'undo', // 撤销
50
-      'redo' // 重复
51
-    ]
52
-    // 下面是最重要的的方法
53
-    editor.customConfig.uploadImgHooks = {
54
-      before: function(xhr, editor, files) {
55
-        // 图片上传之前触发
56
-        // xhr 是 XMLHttpRequst 对象,editor 是编辑器对象,files是选择的图片文件
57
-        // 如果返回的结果是 {prevent: true, msg: 'xxxx'} 则表示用户放弃上传
58
-        // return {
59
-        //     prevent: true,
60
-        //     msg: '放弃上传'
61
-        // }
62
-      },
63
-      success: function(xhr, editor, result) {
64
-        // 图片上传并返回结果,图片插入成功之后触发
65
-        // xhr 是 XMLHttpRequst 对象,editor 是编辑器对象,result 是服务器端返回的结果
66
-        this.imgUrl = Object.values(result.data).toString()
67
-      },
68
-      fail: function(xhr, editor, result) {
69
-        // 图片上传并返回结果,但图片插入错误时触发
70
-        // xhr 是 XMLHttpRequst 对象,editor 是编辑器对象,result 是服务器端返回的结果
71
-      },
72
-      error: function(xhr, editor) {
73
-        // 图片上传出错时触发
74
-        // xhr 是 XMLHttpRequst 对象,editor 是编辑器对象
75
-      },
76
-      timeout: function(xhr, editor) {
77
-        // 图片上传超时时触发
78
-        // xhr 是 XMLHttpRequst 对象,editor 是编辑器对象
79
-      },
80
-      // 如果服务器端返回的不是 {errno:0, data: [...]} 这种格式,可使用该配置
81
-      // (但是,服务器端返回的必须是一个 JSON 格式字符串!!!否则会报错)
82
-      customInsert: function(insertImg, result, editor) {
83
-        // 图片上传并返回结果,自定义插入图片的事件(而不是编辑器自动插入图片!!!)
84
-        // insertImg 是插入图片的函数,editor 是编辑器对象,result 是服务器端返回的结果
85
-        // 举例:假如上传图片成功后,服务器端返回的是 {url:'....'} 这种格式,即可这样插入图片:
86
-        const url = Object.values(result.data)// result.data就是服务器返回的图片名字和链接
87
-        JSON.stringify(url)// 在这里转成JSON格式
88
-        insertImg(url)
89
-        // result 必须是一个 JSON 格式字符串!!!否则报错
90
-      }
91
-    }
92
-    editor.create()
93
-    editor.txt.html(this.editorContent)
35
+    this.$nextTick(() => {
36
+      this.initEditor()
37
+    })
94 38
   },
95 39
   methods: {
96 40
     childWangeditorValue() {
@@ -99,6 +43,77 @@ export default {
99 43
     },
100 44
     setWangeditorValue(value) { // 父组件调用此方法传入参数
101 45
       this.editorObject.txt.html(value)
46
+    },
47
+    initEditor() {
48
+      this.editorObject = new E(this.$refs.editorElem) // 创建富文本实例
49
+      var editor = this.editorObject
50
+      editor.customConfig.onchange = (html) => {
51
+        this.editorContent = html
52
+        this.childWangeditorValue() // 把这个html通过catchData的方法传入父组件
53
+        // this.catchData(html) // 把这个html通过catchData的方法传入父组件
54
+      }
55
+      editor.customConfig.zIndex = 100
56
+      editor.customConfig.uploadImgServer = process.env.BASE_API + '/uploadimage'
57
+      editor.customConfig.uploadFileName = 'uploadFiles'
58
+      editor.customConfig.uploadImgHeaders = {
59
+        'Accept': '*/*',
60
+        'Authorization': 'Bearer ' + this.token // 头部token
61
+      }
62
+      editor.customConfig.menus = [ // 菜单配置
63
+        'head',
64
+        'list', // 列表
65
+        'justify', // 对齐方式
66
+        'bold',
67
+        'fontSize', // 字号
68
+        'italic',
69
+        'underline',
70
+        'image', // 插入图片
71
+        'foreColor', // 文字颜色
72
+        'undo', // 撤销
73
+        'redo' // 重复
74
+      ]
75
+      // 下面是最重要的的方法
76
+      editor.customConfig.uploadImgHooks = {
77
+        before: function(xhr, editor, files) {
78
+          // 图片上传之前触发
79
+          // xhr 是 XMLHttpRequst 对象,editor 是编辑器对象,files是选择的图片文件
80
+          // 如果返回的结果是 {prevent: true, msg: 'xxxx'} 则表示用户放弃上传
81
+          // return {
82
+          //     prevent: true,
83
+          //     msg: '放弃上传'
84
+          // }
85
+        },
86
+        success: function(xhr, editor, result) {
87
+          // 图片上传并返回结果,图片插入成功之后触发
88
+          // xhr 是 XMLHttpRequst 对象,editor 是编辑器对象,result 是服务器端返回的结果
89
+          this.imgUrl = Object.values(result.data).toString()
90
+        },
91
+        fail: function(xhr, editor, result) {
92
+          // 图片上传并返回结果,但图片插入错误时触发
93
+          // xhr 是 XMLHttpRequst 对象,editor 是编辑器对象,result 是服务器端返回的结果
94
+        },
95
+        error: function(xhr, editor) {
96
+          // 图片上传出错时触发
97
+          // xhr 是 XMLHttpRequst 对象,editor 是编辑器对象
98
+        },
99
+        timeout: function(xhr, editor) {
100
+          // 图片上传超时时触发
101
+          // xhr 是 XMLHttpRequst 对象,editor 是编辑器对象
102
+        },
103
+        // 如果服务器端返回的不是 {errno:0, data: [...]} 这种格式,可使用该配置
104
+        // (但是,服务器端返回的必须是一个 JSON 格式字符串!!!否则会报错)
105
+        customInsert: function(insertImg, result, editor) {
106
+          // 图片上传并返回结果,自定义插入图片的事件(而不是编辑器自动插入图片!!!)
107
+          // insertImg 是插入图片的函数,editor 是编辑器对象,result 是服务器端返回的结果
108
+          // 举例:假如上传图片成功后,服务器端返回的是 {url:'....'} 这种格式,即可这样插入图片:
109
+          const url = Object.values(result.data)// result.data就是服务器返回的图片名字和链接
110
+          JSON.stringify(url)// 在这里转成JSON格式
111
+          insertImg(url)
112
+          // result 必须是一个 JSON 格式字符串!!!否则报错
113
+        }
114
+      }
115
+      editor.create()
116
+      editor.txt.html(this.editorContent)
102 117
     }
103 118
   }
104 119
 }

+ 0
- 2
VUECODE/smart-property-manage/index.html Vedi File

@@ -4,8 +4,6 @@
4 4
     <meta charset="utf-8">
5 5
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
6 6
     <title>智慧社区物业平台</title>
7
-    <script src="//webapi.amap.com/maps?v=1.4.10&key=81f5560856a88eb5b3da440f18a97845&plugin=AMap.DistrictLayer"></script>
8
-    <script src="//webapi.amap.com/ui/1.0/main.js"></script>
9 7
   </head>
10 8
   <body>
11 9
     <div id="app"></div>

+ 18
- 0
VUECODE/smart-property-manage/src/api/license.js Vedi File

@@ -0,0 +1,18 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询月租车记录
4
+export function getLicenseAll(data) {
5
+  return request({
6
+    url: '/user/license/order',
7
+    method: 'get',
8
+    params: {
9
+      id: data.id,
10
+      licensePlate: data.licensePlate,
11
+      orderNumber: data.orderNumber,
12
+      paymentName: data.paymentName,
13
+      paymentTel: data.paymentTel,
14
+      pageNum: data.pageNum,
15
+      pageSize: data.pageSize
16
+    }
17
+  })
18
+}

+ 43
- 0
VUECODE/smart-property-manage/src/api/shopType.js Vedi File

@@ -26,6 +26,14 @@ export function addShopType(listQuery) {
26 26
   })
27 27
 }
28 28
 
29
+export function addShop(listQuery) {
30
+  return request({
31
+    url: '/shop/add',
32
+    method: 'post',
33
+    data: listQuery
34
+  })
35
+}
36
+
29 37
 export function getShopType(id) {
30 38
   return request({
31 39
     url: '/shop/get/type/' + id,
@@ -33,6 +41,13 @@ export function getShopType(id) {
33 41
   })
34 42
 }
35 43
 
44
+export function getShop(id) {
45
+  return request({
46
+    url: '/shop/get/' + id,
47
+    method: 'get'
48
+  })
49
+}
50
+
36 51
 export function updateShopType(listQuery) {
37 52
   return request({
38 53
     url: '/shop/update/type',
@@ -41,6 +56,14 @@ export function updateShopType(listQuery) {
41 56
   })
42 57
 }
43 58
 
59
+export function updateShop(listQuery) {
60
+  return request({
61
+    url: '/shop/update',
62
+    method: 'post',
63
+    data: listQuery
64
+  })
65
+}
66
+
44 67
 export function deleteShopType(ids) {
45 68
   return request({
46 69
     url: '/shop/delete/type',
@@ -51,6 +74,26 @@ export function deleteShopType(ids) {
51 74
   })
52 75
 }
53 76
 
77
+export function obtainedShop(ids) {
78
+  return request({
79
+    url: '/shop/obtained',
80
+    method: 'post',
81
+    data: {
82
+      idArray: ids
83
+    }
84
+  })
85
+}
86
+
87
+export function shelfShop(ids) {
88
+  return request({
89
+    url: '/shop/shelf',
90
+    method: 'post',
91
+    data: {
92
+      idArray: ids
93
+    }
94
+  })
95
+}
96
+
54 97
 export function fetchShopList(query) {
55 98
   return request({
56 99
     url: '/shops',

+ 85
- 69
VUECODE/smart-property-manage/src/components/Wangeditor/index.vue Vedi File

@@ -16,81 +16,25 @@ export default {
16 16
       editorObject: ''
17 17
     }
18 18
   },
19
+  watch: {
20
+    content(nw, old) {
21
+      window.console.log('---->', nw, old)
22
+      if (!old && nw) {
23
+        window.console.log('--1111-->', nw)
24
+        this.editorContent = nw
25
+        this.initEditor()
26
+      }
27
+    }
28
+  },
19 29
   computed: {
20 30
     ...mapGetters([
21 31
       'token'
22 32
     ])
23 33
   },
24 34
   mounted() {
25
-    this.editorObject = new E(this.$refs.editorElem) // 创建富文本实例
26
-    var editor = this.editorObject
27
-    editor.customConfig.onchange = (html) => {
28
-      this.editorContent = html
29
-      this.childWangeditorValue() // 把这个html通过catchData的方法传入父组件
30
-      // this.catchData(html) // 把这个html通过catchData的方法传入父组件
31
-    }
32
-    editor.customConfig.zIndex = 100
33
-    editor.customConfig.uploadImgServer = process.env.BASE_API + '/uploadimage'
34
-    editor.customConfig.uploadFileName = 'uploadFiles'
35
-    editor.customConfig.uploadImgHeaders = {
36
-      'Accept': '*/*',
37
-      'Authorization': 'Bearer ' + this.token // 头部token
38
-    }
39
-    editor.customConfig.menus = [ // 菜单配置
40
-      'head',
41
-      'list', // 列表
42
-      'justify', // 对齐方式
43
-      'bold',
44
-      'fontSize', // 字号
45
-      'italic',
46
-      'underline',
47
-      'image', // 插入图片
48
-      'foreColor', // 文字颜色
49
-      'undo', // 撤销
50
-      'redo' // 重复
51
-    ]
52
-    // 下面是最重要的的方法
53
-    editor.customConfig.uploadImgHooks = {
54
-      before: function(xhr, editor, files) {
55
-        // 图片上传之前触发
56
-        // xhr 是 XMLHttpRequst 对象,editor 是编辑器对象,files是选择的图片文件
57
-        // 如果返回的结果是 {prevent: true, msg: 'xxxx'} 则表示用户放弃上传
58
-        // return {
59
-        //     prevent: true,
60
-        //     msg: '放弃上传'
61
-        // }
62
-      },
63
-      success: function(xhr, editor, result) {
64
-        // 图片上传并返回结果,图片插入成功之后触发
65
-        // xhr 是 XMLHttpRequst 对象,editor 是编辑器对象,result 是服务器端返回的结果
66
-        this.imgUrl = Object.values(result.data).toString()
67
-      },
68
-      fail: function(xhr, editor, result) {
69
-        // 图片上传并返回结果,但图片插入错误时触发
70
-        // xhr 是 XMLHttpRequst 对象,editor 是编辑器对象,result 是服务器端返回的结果
71
-      },
72
-      error: function(xhr, editor) {
73
-        // 图片上传出错时触发
74
-        // xhr 是 XMLHttpRequst 对象,editor 是编辑器对象
75
-      },
76
-      timeout: function(xhr, editor) {
77
-        // 图片上传超时时触发
78
-        // xhr 是 XMLHttpRequst 对象,editor 是编辑器对象
79
-      },
80
-      // 如果服务器端返回的不是 {errno:0, data: [...]} 这种格式,可使用该配置
81
-      // (但是,服务器端返回的必须是一个 JSON 格式字符串!!!否则会报错)
82
-      customInsert: function(insertImg, result, editor) {
83
-        // 图片上传并返回结果,自定义插入图片的事件(而不是编辑器自动插入图片!!!)
84
-        // insertImg 是插入图片的函数,editor 是编辑器对象,result 是服务器端返回的结果
85
-        // 举例:假如上传图片成功后,服务器端返回的是 {url:'....'} 这种格式,即可这样插入图片:
86
-        const url = Object.values(result.data)// result.data就是服务器返回的图片名字和链接
87
-        JSON.stringify(url)// 在这里转成JSON格式
88
-        insertImg(url)
89
-        // result 必须是一个 JSON 格式字符串!!!否则报错
90
-      }
91
-    }
92
-    editor.create()
93
-    editor.txt.html(this.editorContent)
35
+    this.$nextTick(() => {
36
+      this.initEditor()
37
+    })
94 38
   },
95 39
   methods: {
96 40
     childWangeditorValue() {
@@ -99,6 +43,78 @@ export default {
99 43
     },
100 44
     setWangeditorValue(value) { // 父组件调用此方法传入参数
101 45
       this.editorObject.txt.html(value)
46
+    },
47
+    initEditor() {
48
+      this.editorObject = new E(this.$refs.editorElem) // 创建富文本实例
49
+      var editor = this.editorObject
50
+      editor.customConfig.onchange = (html) => {
51
+        this.editorContent = html
52
+        this.childWangeditorValue() // 把这个html通过catchData的方法传入父组件
53
+        // this.catchData(html) // 把这个html通过catchData的方法传入父组件
54
+      }
55
+      editor.customConfig.zIndex = 100
56
+      editor.customConfig.uploadImgServer = process.env.BASE_API + '/uploadimage'
57
+      editor.customConfig.uploadFileName = 'uploadFiles'
58
+      editor.customConfig.uploadImgHeaders = {
59
+        'Accept': '*/*',
60
+        'Authorization': 'Bearer ' + this.token // 头部token
61
+      }
62
+      editor.customConfig.menus = [ // 菜单配置
63
+        'head',
64
+        'list', // 列表
65
+        'justify', // 对齐方式
66
+        'bold',
67
+        'fontSize', // 字号
68
+        'italic',
69
+        'underline',
70
+        'image', // 插入图片
71
+        'foreColor', // 文字颜色
72
+        'undo', // 撤销
73
+        'redo' // 重复
74
+      ]
75
+      // 下面是最重要的的方法
76
+      editor.customConfig.uploadImgHooks = {
77
+        before: function(xhr, editor, files) {
78
+          // 图片上传之前触发
79
+          // xhr 是 XMLHttpRequst 对象,editor 是编辑器对象,files是选择的图片文件
80
+          // 如果返回的结果是 {prevent: true, msg: 'xxxx'} 则表示用户放弃上传
81
+          // return {
82
+          //     prevent: true,
83
+          //     msg: '放弃上传'
84
+          // }
85
+        },
86
+        success: function(xhr, editor, result) {
87
+          // 图片上传并返回结果,图片插入成功之后触发
88
+          // xhr 是 XMLHttpRequst 对象,editor 是编辑器对象,result 是服务器端返回的结果
89
+          this.imgUrl = Object.values(result.data).toString()
90
+        },
91
+        fail: function(xhr, editor, result) {
92
+          // 图片上传并返回结果,但图片插入错误时触发
93
+          // xhr 是 XMLHttpRequst 对象,editor 是编辑器对象,result 是服务器端返回的结果
94
+        },
95
+        error: function(xhr, editor) {
96
+          // 图片上传出错时触发
97
+          // xhr 是 XMLHttpRequst 对象,editor 是编辑器对象
98
+        },
99
+        timeout: function(xhr, editor) {
100
+          // 图片上传超时时触发
101
+          // xhr 是 XMLHttpRequst 对象,editor 是编辑器对象
102
+        },
103
+        // 如果服务器端返回的不是 {errno:0, data: [...]} 这种格式,可使用该配置
104
+        // (但是,服务器端返回的必须是一个 JSON 格式字符串!!!否则会报错)
105
+        customInsert: function(insertImg, result, editor) {
106
+          // 图片上传并返回结果,自定义插入图片的事件(而不是编辑器自动插入图片!!!)
107
+          // insertImg 是插入图片的函数,editor 是编辑器对象,result 是服务器端返回的结果
108
+          // 举例:假如上传图片成功后,服务器端返回的是 {url:'....'} 这种格式,即可这样插入图片:
109
+          const url = Object.values(result.data)// result.data就是服务器返回的图片名字和链接
110
+          JSON.stringify(url)// 在这里转成JSON格式
111
+          insertImg(url)
112
+          // result 必须是一个 JSON 格式字符串!!!否则报错
113
+        }
114
+      }
115
+      editor.create()
116
+      console.log('富文本接收到的值:', this.editorContent)
117
+      editor.txt.html(this.editorContent)
102 118
     }
103 119
   }
104 120
 }

+ 50
- 0
VUECODE/smart-property-manage/src/router/index.js Vedi File

@@ -335,6 +335,12 @@ export const constantRouterMap = [
335 335
         name: 'bill-statement-info-index',
336 336
         hidden: true,
337 337
         meta: { title: '订单详情', icon: 'table' }
338
+      },
339
+      {
340
+        path: '/bill/management/license',
341
+        component: () => import('@/views/bill/license/index'),
342
+        name: 'bill-license',
343
+        meta: { title: '月租车续费', icon: 'table' }
338 344
       }
339 345
     ]
340 346
   },
@@ -394,6 +400,50 @@ export const constantRouterMap = [
394 400
         component: () => import('@/views/shop/shopIndex'),
395 401
         name: 'shop-index',
396 402
         meta: { title: '商铺列表', icon: 'table' }
403
+      },
404
+      {
405
+        path: '/shop/add',
406
+        component: () => import('@/views/shop/shopAdd'),
407
+        name: 'shop-add',
408
+        hidden: true,
409
+        meta: { title: '添加商铺信息', icon: 'table' }
410
+      },
411
+      {
412
+        path: '/shop/edit',
413
+        component: () => import('@/views/shop/shopEdit'),
414
+        name: 'shop-edit',
415
+        hidden: true,
416
+        meta: { title: '修改商铺信息', icon: 'table' }
417
+      }
418
+    ]
419
+  },
420
+  {
421
+    path: '/rental',
422
+    component: Layout,
423
+    redirect: '/rental/index',
424
+    name: 'rental',
425
+    alwaysShow: true,
426
+    meta: { title: '长租公寓', icon: 'zip' },
427
+    children: [
428
+      {
429
+        path: '/rental/index',
430
+        component: () => import('@/views/rental/rentalIndex'),
431
+        name: 'rental-index',
432
+        meta: { title: '房间列表', icon: 'table' }
433
+      },
434
+      {
435
+        path: '/rental/add',
436
+        component: () => import('@/views/rental/rentalAdd'),
437
+        name: 'shop-add',
438
+        hidden: true,
439
+        meta: { title: '添加房间信息', icon: 'table' }
440
+      },
441
+      {
442
+        path: '/rental/edit',
443
+        component: () => import('@/views/rental/rentalEdit'),
444
+        name: 'rental-edit',
445
+        hidden: true,
446
+        meta: { title: '修改房间信息', icon: 'table' }
397 447
       }
398 448
     ]
399 449
   },

+ 3
- 2
VUECODE/smart-property-manage/src/store/index.js Vedi File

@@ -23,7 +23,7 @@ import buildingTree from './modules/buildingTree'
23 23
 import equipment from './modules/equipment'
24 24
 import shopType from './modules/shopType'
25 25
 import grogshop from './modules/grogshop'
26
-
26
+import license from './modules/license'
27 27
 Vue.use(Vuex)
28 28
 
29 29
 const store = new Vuex.Store({
@@ -49,7 +49,8 @@ const store = new Vuex.Store({
49 49
     buildingTree,
50 50
     equipment,
51 51
     shopType,
52
-    grogshop
52
+    grogshop,
53
+    license
53 54
   },
54 55
   getters
55 56
 })

+ 23
- 0
VUECODE/smart-property-manage/src/store/modules/license.js Vedi File

@@ -0,0 +1,23 @@
1
+import { getLicenseAll } from '@/api/license'
2
+
3
+const license = {
4
+  state: {
5
+
6
+  },
7
+  mutations: {
8
+
9
+  },
10
+  actions: {
11
+    GetLicenseAll({ commit }, data) {
12
+      return new Promise((resolve, reject) => { // 查询月租车记录
13
+        getLicenseAll(data).then(response => {
14
+          resolve(response)
15
+        }).catch(error => {
16
+          reject(error)
17
+        })
18
+      })
19
+    }
20
+  }
21
+}
22
+
23
+export default license

+ 46
- 1
VUECODE/smart-property-manage/src/store/modules/shopType.js Vedi File

@@ -1,4 +1,4 @@
1
-import { fetchShopTypeList, changeShopSetting, addShopType, getShopType, updateShopType, deleteShopType, fetchShopList, fetchShopTypeSelect } from '@/api/shopType'
1
+import { fetchShopTypeList, changeShopSetting, addShopType, getShopType, updateShopType, deleteShopType, fetchShopList, fetchShopTypeSelect, addShop, getShop, updateShop, shelfShop, obtainedShop } from '@/api/shopType'
2 2
 
3 3
 const transaction = {
4 4
   namespaced: true,
@@ -39,6 +39,15 @@ const transaction = {
39 39
         })
40 40
       })
41 41
     },
42
+    AddShop({ commit }, listQuery) {
43
+      return new Promise((resolve, reject) => {
44
+        addShop(listQuery).then(response => {
45
+          resolve(response)
46
+        }).catch(error => {
47
+          reject(error)
48
+        })
49
+      })
50
+    },
42 51
     GetShopType({ commit }, id) {
43 52
       return new Promise((resolve, reject) => {
44 53
         getShopType(id).then(response => {
@@ -48,6 +57,15 @@ const transaction = {
48 57
         })
49 58
       })
50 59
     },
60
+    GetShop({ commit }, id) {
61
+      return new Promise((resolve, reject) => {
62
+        getShop(id).then(response => {
63
+          resolve(response)
64
+        }).catch(error => {
65
+          reject(error)
66
+        })
67
+      })
68
+    },
51 69
     UpdateShopType({ commit }, listQuery) {
52 70
       return new Promise((resolve, reject) => {
53 71
         updateShopType(listQuery).then(response => {
@@ -57,6 +75,15 @@ const transaction = {
57 75
         })
58 76
       })
59 77
     },
78
+    UpdateShop({ commit }, listQuery) {
79
+      return new Promise((resolve, reject) => {
80
+        updateShop(listQuery).then(response => {
81
+          resolve(response)
82
+        }).catch(error => {
83
+          reject(error)
84
+        })
85
+      })
86
+    },
60 87
     DeleteShopType({ commit }, ids) {
61 88
       return new Promise((resolve, reject) => {
62 89
         deleteShopType(ids).then(response => {
@@ -66,6 +93,24 @@ const transaction = {
66 93
         })
67 94
       })
68 95
     },
96
+    ShelfShop({ commit }, ids) {
97
+      return new Promise((resolve, reject) => {
98
+        shelfShop(ids).then(response => {
99
+          resolve(response)
100
+        }).catch(error => {
101
+          reject(error)
102
+        })
103
+      })
104
+    },
105
+    ObtainedShop({ commit }, ids) {
106
+      return new Promise((resolve, reject) => {
107
+        obtainedShop(ids).then(response => {
108
+          resolve(response)
109
+        }).catch(error => {
110
+          reject(error)
111
+        })
112
+      })
113
+    },
69 114
     FetchShopList({ commit }, listQuery) {
70 115
       return new Promise((resolve, reject) => {
71 116
         fetchShopList(listQuery).then(response => {

+ 221
- 0
VUECODE/smart-property-manage/src/views/bill/license/index.vue Vedi File

@@ -0,0 +1,221 @@
1
+<template>
2
+  <div id="root">
3
+    <el-form :inline="true" :model="listQuery" class="form-inline">
4
+      <el-form-item label="编号">
5
+        <el-input v-model="listQuery.id" placeholder="编号"/>
6
+      </el-form-item>
7
+      <el-form-item label="车牌号">
8
+        <el-input v-model="listQuery.licensePlate" placeholder="车牌号"/>
9
+      </el-form-item>
10
+      <el-form-item label="缴费订单号">
11
+        <el-input v-model="listQuery.orderNumber" placeholder="缴费订单号"/>
12
+      </el-form-item>
13
+      <el-form-item label="缴费人姓名">
14
+        <el-input v-model="listQuery.paymentName" placeholder="缴费人姓名"/>
15
+      </el-form-item>
16
+      <el-form-item label="缴费人手机号">
17
+        <el-input v-model="listQuery.paymentTel" placeholder="缴费人手机号"/>
18
+      </el-form-item>
19
+      <el-form-item>
20
+        <el-button type="info" @click="clearQuery">清空</el-button>
21
+        <el-button type="primary" @click="query">查询</el-button>
22
+      </el-form-item>
23
+    </el-form>
24
+    <div>
25
+      <el-button type="primary" @click="exportLicense">导出数据</el-button>
26
+    </div>
27
+    <el-table
28
+      v-loading="loading"
29
+      :data="list"
30
+      border
31
+      style="width: 100%">
32
+      <el-table-column
33
+        prop="id"
34
+        label="编号"
35
+        align="center"
36
+        width="180"/>
37
+      <el-table-column
38
+        prop="licensePlate"
39
+        label="车牌号"
40
+        align="center"
41
+        width="180"/>
42
+      <el-table-column
43
+        prop="extensionMonth"
44
+        align="center"
45
+        label="续期时长(月)"/>
46
+      <el-table-column
47
+        prop="extensionPrice"
48
+        align="center"
49
+        label="续期费用(元)">
50
+        <template slot-scope="scope">{{ scope.row.extensionPrice / 100 }}</template>
51
+      </el-table-column>
52
+      <el-table-column
53
+        prop="orderNumber"
54
+        align="center"
55
+        label="缴费订单号"/>
56
+      <el-table-column
57
+        prop="paymentTel"
58
+        align="center"
59
+        label="缴费人手机号"/>
60
+      <el-table-column
61
+        prop="paymentName"
62
+        align="center"
63
+        label="缴费人姓名"/>
64
+      <el-table-column
65
+        prop="paymentType"
66
+        align="center"
67
+        label="缴费方式">
68
+        <template slot-scope="scope">{{ showPayType(scope.row.paymentType) }}</template>
69
+      </el-table-column>
70
+      <el-table-column
71
+        prop="expireDate"
72
+        align="center"
73
+        label="延期后到期日">
74
+        <template slot-scope="scope">{{ formatDate(scope.row.expireDate) }}</template>
75
+      </el-table-column>
76
+      <el-table-column
77
+        prop="orderStatus"
78
+        align="center"
79
+        label="订单状态">
80
+        <template slot-scope="scope">{{ showStatus(scope.row.orderStatus) }}</template>
81
+      </el-table-column>
82
+      <el-table-column
83
+        prop="updateDate"
84
+        align="center"
85
+        label="缴费完成时间">
86
+        <template slot-scope="scope">{{ formatDate(scope.row.updateDate) }}</template>
87
+      </el-table-column>
88
+    </el-table>
89
+    <div class="block-page">
90
+      <el-pagination
91
+        :current-page="listQuery.pageNum"
92
+        :page-sizes="[10, 20, 40, 80]"
93
+        :page-size="listQuery.pageSize"
94
+        :total="total"
95
+        layout="total, sizes, prev, pager, next, jumper"
96
+        @size-change="handleSizeChange"
97
+        @current-change="handleCurrentChange"/>
98
+    </div>
99
+  </div>
100
+</template>
101
+
102
+<script>
103
+export default {
104
+  name: 'License',
105
+  data() {
106
+    return {
107
+      listQuery: {
108
+        id: '',
109
+        licensePlate: '',
110
+        orderNumber: '',
111
+        paymentName: '',
112
+        paymentTel: '',
113
+        pageNum: 1,
114
+        pageSize: 10
115
+      },
116
+      list: [],
117
+      total: 0,
118
+      loading: false
119
+    }
120
+  },
121
+  mounted() {
122
+    this.getData()
123
+  },
124
+  methods: {
125
+    formatDate(val) {
126
+      if (val === null || val === '') {
127
+        return ''
128
+      }
129
+      var value = new Date(val)
130
+      var year = value.getFullYear()
131
+      var month = value.getMonth() + 1
132
+      var day = value.getDate()
133
+      // var hour = value.getHours()
134
+      // var minutes = value.getMinutes()
135
+      // var seconds = value.getSeconds()
136
+      // return year + '-' + month + '-' + day + ' ' + hour + ':' + minutes + ':' + seconds
137
+      return year + '-' + month + '-' + day
138
+    },
139
+    showPayType(obj) {
140
+      let str = ''
141
+      switch (obj) {
142
+        case '0':
143
+          str = '微信缴费'
144
+          break
145
+        case '1':
146
+          str = '线下缴费'
147
+          break
148
+        case '2':
149
+          str = '支付宝缴费'
150
+          break
151
+      }
152
+      return str
153
+    },
154
+    clearQuery() {
155
+      this.listQuery.id = ''
156
+      this.listQuery.licensePlate = ''
157
+      this.listQuery.orderNumber = ''
158
+      this.listQuery.paymentName = ''
159
+      this.listQuery.paymentTel = ''
160
+      this.listQuery.pageNum = 1
161
+      this.listQuery.pageSize = 10
162
+      this.getData()
163
+    },
164
+    query() {
165
+      this.listQuery.pageNum = 1
166
+      this.listQuery.pageSize = 10
167
+      this.getData()
168
+    },
169
+    getData() {
170
+      this.loading = true
171
+      this.$store.dispatch('GetLicenseAll', this.listQuery).then((res) => {
172
+        const resCode = res.code
173
+        if (resCode === '1') {
174
+          this.loading = false
175
+          this.$message.error(res.message)
176
+          return
177
+        }
178
+        const resData = res.data
179
+        this.list = resData.records
180
+        this.listQuery.pageNum = resData.current
181
+        this.listQuery.pageSize = resData.size
182
+        this.total = resData.total
183
+        this.loading = false
184
+      }).catch(() => {
185
+        console.log('error GetLicenseAll')
186
+        this.loading = false
187
+      })
188
+    },
189
+    showStatus(val) {
190
+      let str = ''
191
+      switch (val) {
192
+        case '0':
193
+          str = '未支付'
194
+          break
195
+        case '1':
196
+          str = '已支付'
197
+          break
198
+        case '2':
199
+          str = '正在支付中'
200
+          break
201
+        case '3':
202
+          str = '已关闭'
203
+          break
204
+      }
205
+      return str
206
+    }
207
+  }
208
+}
209
+</script>
210
+
211
+<style scoped>
212
+.form-inline {
213
+  margin-top: 20px;
214
+  margin-left: 20px;
215
+  margin-right: 20px;
216
+}
217
+.block-page {
218
+  display: flex;
219
+  justify-content: flex-end;
220
+}
221
+</style>

+ 315
- 0
VUECODE/smart-property-manage/src/views/rental/rentalAdd.vue Vedi File

@@ -0,0 +1,315 @@
1
+<template>
2
+  <div class="root">
3
+    <el-form ref="ruleForm" :model="listData" :rules="rules" label-width="150px" class="add-ruleForm">
4
+      <el-form-item label="商铺名称" prop="shopName">
5
+        <el-input v-model="listData.shopName"/>
6
+      </el-form-item>
7
+      <el-form-item label="商铺说明" prop="remark">
8
+        <el-input v-model="listData.remark"/>
9
+      </el-form-item>
10
+      <el-form-item label="app首页展示图" prop="appIndexImg">
11
+        <el-upload
12
+          class="avatar-uploader"
13
+          name="uploadFiles"
14
+          :action="uploadImgUrl"
15
+          :show-file-list="false"
16
+          :on-success="handleAppIndexSuccess"
17
+          :before-upload="beforeAvatarUpload">
18
+          <img v-if="listData.appIndexImg" :src="listData.appIndexImg" class="avatar">
19
+          <i v-else class="el-icon-plus avatar-uploader-icon"></i>
20
+        </el-upload>
21
+      </el-form-item>
22
+      <el-form-item label="app列表展示图" prop="appListImg">
23
+        <el-upload
24
+          class="avatar-uploader"
25
+          name="uploadFiles"
26
+          :action="uploadImgUrl"
27
+          :show-file-list="false"
28
+          :on-success="handleAppListSuccess"
29
+          :before-upload="beforeAvatarUpload">
30
+          <img v-if="listData.appListImg" :src="listData.appListImg" class="avatar">
31
+          <i v-else class="el-icon-plus avatar-uploader-icon"></i>
32
+        </el-upload>
33
+      </el-form-item>
34
+      <el-form-item label="app商铺轮播图" prop="appCarouselImg">
35
+        <el-upload
36
+          name="uploadFiles"
37
+          :limit="6"
38
+          :action="uploadImgUrl"
39
+          list-type="picture-card"
40
+          :on-preview="handlePictureCardPreview"
41
+          :on-remove="handleRemove"
42
+          :on-success="handleSuccessCarouselImg">
43
+          <i class="el-icon-plus"></i>
44
+        </el-upload>
45
+        <el-dialog :visible.sync="dialogVisible">
46
+          <img width="100%" :src="dialogImageUrl" alt="">
47
+        </el-dialog>
48
+      </el-form-item>
49
+      <el-form-item label="权重" prop="sort">
50
+        <el-input v-model="listData.sort"/>
51
+      </el-form-item>
52
+      <el-form-item label="商铺类型" prop="shopTypeId">
53
+        <el-select v-model="listData.shopTypeId" placeholder="商铺类型" clearable class="filter-item">
54
+          <el-option v-for="item in shopTypeList" :key="item.id" :value="item.id" :label="item.typeName"/>
55
+        </el-select>
56
+      </el-form-item>
57
+      <el-form-item label="上架状态" prop="shopStatus">
58
+        <el-select v-model="listData.shopStatus" placeholder="请选择">
59
+          <el-option label="已上架" value="1"/>
60
+          <el-option label="已下架" value="2"/>
61
+        </el-select>
62
+      </el-form-item>
63
+      <el-form-item label="联系电话" prop="shopTel">
64
+        <el-input v-model="listData.shopTel"/>
65
+      </el-form-item>
66
+      <el-form-item label="商铺地址" prop="shopAddress">
67
+        <el-input v-model="listData.shopAddress"/>
68
+      </el-form-item>
69
+      <el-form-item label="人均消费" prop="averagePrice">
70
+        <el-input v-model="listData.averagePrice"/>
71
+      </el-form-item>
72
+      <el-form-item label="高德坐标">
73
+        <el-input placeholder="经度" v-model="listData.shopLongitude" style="width: 150px;" />
74
+        <el-input placeholder="纬度" v-model="listData.shopLatitude" style="width: 150px;" />
75
+      </el-form-item>
76
+      <el-form-item label="">
77
+         <!-- 地图 -->
78
+        <div style="width:100%;height:300px;" class="amap-page-container">
79
+          <el-amap-search-box :search-option="searchOption" :on-search-result="onSearchResult" class="search-box"/>
80
+          <el-amap ref="map" :events="events" :center="mapCenter" :zoom="12" class="amap-demo" vid="amapDemo">
81
+            <el-amap-marker v-for="(item,index) in markers" :key="index" :position="item" />
82
+          </el-amap>
83
+        </div>
84
+      </el-form-item>
85
+      <el-form-item label="商铺介绍">
86
+          <!-- <el-input v-model="addForm.bannerContent" placeholder="内容详情"/> -->
87
+          <div id="father">
88
+            <wangeditor @wangeditorEvent="wangeditorValue"/>
89
+          </div>
90
+        </el-form-item>
91
+      <el-form-item>
92
+        <el-button type="primary" @click="submitForm('ruleForm')">立即创建</el-button>
93
+        <el-button @click="resetForm('ruleForm')">重置</el-button>
94
+      </el-form-item>
95
+    </el-form>
96
+  </div>
97
+</template>
98
+
99
+<script>
100
+import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
101
+import Wangeditor from '@/components/Wangeditor'
102
+
103
+export default {
104
+  components: { Pagination, Wangeditor },
105
+  data() {
106
+    return {
107
+      events: {
108
+        click: e => {
109
+          // _self.postData.Coordinate = e.lnglat.lat + ',' + e.lnglat.lng
110
+          this.listData.shopLongitude = e.lnglat.lng
111
+          this.listData.shopLatitude = e.lnglat.lat
112
+        }
113
+      },
114
+      listData: {
115
+        shopName: '',
116
+        remark: '',
117
+        appIndexImg: '',
118
+        appListImg: '',
119
+        appCarouselImg: [],
120
+        sort: '',
121
+        shopTypeId: '',
122
+        shopStatus: '',
123
+        shopTel: '',
124
+        shopAddress: '',
125
+        averagePrice: '',
126
+        shopLongitude: '',
127
+        shopLatitude: '',
128
+        shopIntroduction: ''
129
+      },
130
+      dialogImageUrl: '',
131
+      dialogVisible: false,
132
+      uploadImgUrl: process.env.BASE_API + '/uploadimage',
133
+      markers: [],
134
+      shopTypeList: [],
135
+      searchOption: {
136
+        city: '南京',
137
+        citylimit: false
138
+      },
139
+      mapCenter: [118.789509, 32.019989],
140
+      tableKey: 0,
141
+      rules: {
142
+        typeName: [
143
+          { required: true, message: '请输入商铺名称', trigger: 'blur' }
144
+        ],
145
+        remark: [
146
+          { required: true, message: '请输入商铺说明', trigger: 'blur' }
147
+        ],
148
+        shopTel: [
149
+          { required: true, message: '请输入联系电话', trigger: 'blur' }
150
+        ],
151
+        shopAddress: [
152
+          { required: true, message: '请输入商铺地址', trigger: 'blur' }
153
+        ],
154
+        appIndexImg: [
155
+          { required: true, message: 'app首页展示图', trigger: 'blur' }
156
+        ],
157
+        appListImg: [
158
+          { required: true, message: 'app列表展示图', trigger: 'blur' }
159
+        ],
160
+        appCarouselImg: [
161
+          { required: true, message: 'app商铺轮播图', trigger: 'blur' }
162
+        ],
163
+      }
164
+    }
165
+  },
166
+  mounted() {
167
+    this.getShopTypeList()
168
+  },
169
+  methods: {
170
+     addMarker() {
171
+      const lng = 121.5 + Math.round(Math.random() * 1000) / 10000
172
+      const lat = 31.197646 + Math.round(Math.random() * 500) / 10000
173
+      this.markers.push([lng, lat])
174
+    },
175
+    beforeAvatarUpload(file) {
176
+    },
177
+    handleAppIndexSuccess(res, file) {
178
+      this.listData.appIndexImg = res.data[0]
179
+    },
180
+    handleAppListSuccess(res, file) {
181
+      this.listData.appListImg = res.data[0]
182
+    },
183
+    handleRemove(file, fileList) {
184
+      this.listData.appCarouselImg = []
185
+      for (let i = 0; i < fileList.length; i++) {
186
+        this.listData.appCarouselImg.push(fileList[i].response.data[0])
187
+      }
188
+    },
189
+    handleSuccessCarouselImg(response, file, fileList) { // 活动配图上传成功时回调
190
+      const resImg = response.data[0]
191
+      this.listData.appCarouselImg.push(resImg)
192
+    },
193
+    handlePictureCardPreview(file) {
194
+      this.dialogImageUrl = file.url;
195
+      this.dialogVisible = true;
196
+    },
197
+    getShopTypeList() {
198
+      this.$store.dispatch('shopType/FetchShopTypeSelect', this.listData).then((res) => {
199
+        this.shopTypeList = res.data
200
+      }).catch(() => {
201
+        console.log('error ListAnnouncement')
202
+      })
203
+    },
204
+    onSearchResult(pois) {
205
+      // 搜索地图
206
+      let latSum = 0
207
+      let lngSum = 0
208
+      if (pois.length > 0) {
209
+        pois.forEach(poi => {
210
+          const { lng, lat } = poi
211
+          lngSum += lng
212
+          latSum += lat
213
+          this.markers.push([poi.lng, poi.lat])
214
+        })
215
+        const center = {
216
+          lng: lngSum / pois.length,
217
+          lat: latSum / pois.length
218
+        }
219
+        this.mapCenter = [center.lng, center.lat]
220
+      }
221
+    },
222
+    wangeditorValue(value) {
223
+      this.listData.shopIntroduction = value // 在这里接受子组件传过来的参数,赋值给data里的参数
224
+    },
225
+    submitForm(formName) { // 提交
226
+      this.$refs[formName].validate((valid) => {
227
+        if (valid) {
228
+          this.addShop()
229
+        } else {
230
+          console.log('error submit!!')
231
+          return false
232
+        }
233
+      })
234
+    },
235
+    resetForm(formName) { // 重置
236
+      // 重置为未注册
237
+      this.isRegistered = true
238
+      // 重置为非户主
239
+      this.roleDisabled = false
240
+
241
+      console.log(this.isRegistered)
242
+      this.$refs[formName].resetFields()
243
+    },
244
+    addShop() {
245
+      // 加载框
246
+      const loading = this.$loading({
247
+        lock: true,
248
+        text: 'Loading',
249
+        spinner: 'el-icon-loading',
250
+        background: 'rgba(0, 0, 0, 0.7)'
251
+      })
252
+      this.$store.dispatch('shopType/AddShop', this.listData).then((res) => {
253
+        if (res.code === '0') {
254
+          this.$message({
255
+            message: res.message,
256
+            type: 'success'
257
+          })
258
+          this.$router.push({ name: 'shop-index' })
259
+          loading.close()
260
+          return
261
+        }
262
+        this.$message.error(res.message)
263
+        loading.close()
264
+      }).catch(() => {
265
+        loading.close()
266
+        console.log('error AddBuilding')
267
+      })
268
+    }
269
+  }
270
+}
271
+</script>
272
+
273
+<style>
274
+.avatar-uploader .el-upload {
275
+    border: 1px dashed #d9d9d9;
276
+    border-radius: 6px;
277
+    cursor: pointer;
278
+    position: relative;
279
+    overflow: hidden;
280
+  }
281
+  .avatar-uploader .el-upload:hover {
282
+    border-color: #409EFF;
283
+  }
284
+  .avatar-uploader-icon {
285
+    font-size: 28px;
286
+    color: #8c939d;
287
+    width: 178px;
288
+    height: 178px;
289
+    line-height: 178px;
290
+    text-align: center;
291
+  }
292
+  .avatar {
293
+    width: 178px;
294
+    height: 178px;
295
+    display: block;
296
+  }
297
+  
298
+.add-ruleForm{
299
+  width: 800px;
300
+  margin-left: auto;
301
+  margin-right: auto;
302
+  margin-top: 50px;
303
+}
304
+</style>
305
+<style scoped>
306
+.search-box {
307
+  position: absolute;
308
+  top: 25px;
309
+  left: 20px;
310
+}
311
+
312
+.amap-page-container {
313
+  position: relative;
314
+}
315
+</style>

+ 330
- 0
VUECODE/smart-property-manage/src/views/rental/rentalEdit.vue Vedi File

@@ -0,0 +1,330 @@
1
+<template>
2
+  <div class="root">
3
+    <el-form ref="ruleForm" :model="listData" :rules="rules" label-width="150px" class="add-ruleForm">
4
+      <el-form-item label="商铺名称" prop="shopName">
5
+        <el-input v-model="listData.shopName"/>
6
+      </el-form-item>
7
+      <el-form-item label="商铺说明" prop="remark">
8
+        <el-input v-model="listData.remark"/>
9
+      </el-form-item>
10
+      <el-form-item label="app首页展示图" prop="appIndexImg">
11
+        <el-upload
12
+          class="avatar-uploader"
13
+          name="uploadFiles"
14
+          :action="uploadImgUrl"
15
+          :show-file-list="false"
16
+          :on-success="handleAppIndexSuccess"
17
+          :before-upload="beforeAvatarUpload">
18
+          <img v-if="listData.appIndexImg" :src="listData.appIndexImg" class="avatar">
19
+          <i v-else class="el-icon-plus avatar-uploader-icon"></i>
20
+        </el-upload>
21
+      </el-form-item>
22
+      <el-form-item label="app列表展示图" prop="appListImg">
23
+        <el-upload
24
+          class="avatar-uploader"
25
+          name="uploadFiles"
26
+          :action="uploadImgUrl"
27
+          :show-file-list="false"
28
+          :on-success="handleAppListSuccess"
29
+          :before-upload="beforeAvatarUpload">
30
+          <img v-if="listData.appListImg" :src="listData.appListImg" class="avatar">
31
+          <i v-else class="el-icon-plus avatar-uploader-icon"></i>
32
+        </el-upload>
33
+      </el-form-item>
34
+      <el-form-item label="app商铺轮播图" prop="appCarouselImg">
35
+        <el-upload
36
+          name="uploadFiles"
37
+          :limit="6"
38
+          :action="uploadImgUrl"
39
+          list-type="picture-card"
40
+          :file-list="displayAppCarouselImg"
41
+          :on-preview="handlePictureCardPreview"
42
+          :on-remove="handleRemove"
43
+          :on-success="handleSuccessCarouselImg">
44
+          <i class="el-icon-plus"></i>
45
+        </el-upload>
46
+        <el-dialog :visible.sync="dialogVisible">
47
+          <img width="100%" :src="dialogImageUrl" alt="">
48
+        </el-dialog>
49
+      </el-form-item>
50
+      <el-form-item label="权重" prop="sort">
51
+        <el-input v-model="listData.sort"/>
52
+      </el-form-item>
53
+      <el-form-item label="商铺类型" prop="shopTypeId">
54
+        <el-select v-model="listData.shopTypeId" placeholder="商铺类型" clearable class="filter-item">
55
+          <el-option v-for="item in shopTypeList" :key="item.id" :value="item.id" :label="item.typeName"/>
56
+        </el-select>
57
+      </el-form-item>
58
+      <el-form-item label="上架状态" prop="shopStatus">
59
+        <el-select v-model="listData.shopStatus" placeholder="请选择">
60
+          <el-option label="已上架" value="1"/>
61
+          <el-option label="已下架" value="2"/>
62
+        </el-select>
63
+      </el-form-item>
64
+      <el-form-item label="联系电话" prop="shopTel">
65
+        <el-input v-model="listData.shopTel"/>
66
+      </el-form-item>
67
+      <el-form-item label="商铺地址" prop="shopAddress">
68
+        <el-input v-model="listData.shopAddress"/>
69
+      </el-form-item>
70
+      <el-form-item label="人均消费" prop="averagePrice">
71
+        <el-input v-model="listData.averagePrice"/>
72
+      </el-form-item>
73
+      <el-form-item label="高德坐标">
74
+        <el-input placeholder="经度" v-model="listData.shopLongitude" style="width: 150px;" />
75
+        <el-input placeholder="纬度" v-model="listData.shopLatitude" style="width: 150px;" />
76
+      </el-form-item>
77
+      <el-form-item label="">
78
+         <!-- 地图 -->
79
+        <div style="width:100%;height:300px;" class="amap-page-container">
80
+          <el-amap-search-box :search-option="searchOption" :on-search-result="onSearchResult" class="search-box"/>
81
+          <el-amap ref="map" :events="events" :center="mapCenter" :zoom="12" class="amap-demo" vid="amapDemo">
82
+            <el-amap-marker v-for="(item,index) in markers" :key="index" :position="item" />
83
+          </el-amap>
84
+        </div>
85
+      </el-form-item>
86
+      <el-form-item label="商铺介绍">
87
+          <!-- <el-input v-model="addForm.bannerContent" placeholder="内容详情"/> -->
88
+          <div id="father">
89
+            <wangeditor :content="listData.shopIntroduction" @wangeditorEvent="wangeditorValue"/>
90
+          </div>
91
+        </el-form-item>
92
+      <el-form-item>
93
+        <el-button type="primary" @click="submitForm('ruleForm')">修改</el-button>
94
+      </el-form-item>
95
+    </el-form>
96
+  </div>
97
+</template>
98
+
99
+<script>
100
+import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
101
+import Wangeditor from '@/components/Wangeditor'
102
+
103
+export default {
104
+  components: { Pagination, Wangeditor },
105
+  data() {
106
+    return {
107
+      events: {
108
+        click: e => {
109
+          // _self.postData.Coordinate = e.lnglat.lat + ',' + e.lnglat.lng
110
+          this.listData.shopLongitude = e.lnglat.lng
111
+          this.listData.shopLatitude = e.lnglat.lat
112
+        }
113
+      },
114
+      listData: {
115
+        id: '',
116
+        shopName: '',
117
+        remark: '',
118
+        appIndexImg: '',
119
+        appListImg: '',
120
+        appCarouselImg: [],
121
+        sort: '',
122
+        shopTypeId: '',
123
+        shopStatus: '',
124
+        shopTel: '',
125
+        shopAddress: '',
126
+        averagePrice: '',
127
+        shopLongitude: '',
128
+        shopLatitude: '',
129
+        shopIntroduction: ''
130
+      },
131
+      displayAppCarouselImg: [],
132
+      dialogImageUrl: '',
133
+      dialogVisible: false,
134
+      uploadImgUrl: process.env.BASE_API + '/uploadimage',
135
+      markers: [],
136
+      shopTypeList: [],
137
+      searchOption: {
138
+        city: '南京',
139
+        citylimit: false
140
+      },
141
+      mapCenter: [118.789509, 32.019989],
142
+      tableKey: 0,
143
+      rules: {
144
+        typeName: [
145
+          { required: true, message: '请输入商铺名称', trigger: 'blur' }
146
+        ],
147
+        remark: [
148
+          { required: true, message: '请输入商铺说明', trigger: 'blur' }
149
+        ],
150
+        shopTel: [
151
+          { required: true, message: '请输入联系电话', trigger: 'blur' }
152
+        ],
153
+        shopAddress: [
154
+          { required: true, message: '请输入商铺地址', trigger: 'blur' }
155
+        ],
156
+        appIndexImg: [
157
+          { required: true, message: 'app首页展示图', trigger: 'blur' }
158
+        ],
159
+        appListImg: [
160
+          { required: true, message: 'app列表展示图', trigger: 'blur' }
161
+        ],
162
+        appCarouselImg: [
163
+          { required: true, message: 'app商铺轮播图', trigger: 'blur' }
164
+        ],
165
+      }
166
+    }
167
+  },
168
+  created() {
169
+    this.listData.id = this.$route.query.id
170
+    this.getById()
171
+    this.getShopTypeList()
172
+  },
173
+  methods: {
174
+     addMarker() {
175
+      const lng = 121.5 + Math.round(Math.random() * 1000) / 10000
176
+      const lat = 31.197646 + Math.round(Math.random() * 500) / 10000
177
+      this.markers.push([lng, lat])
178
+    },
179
+    getById() {
180
+      this.$store.dispatch('shopType/GetShop', this.listData.id).then((res) => {
181
+        const shopData = res.data
182
+        this.listData = shopData
183
+        alert(this.listData.shopIntroduction)
184
+        // 多张图片进行遍历
185
+        for (let i = 0; i < shopData.appCarouselImg.length; i++) {
186
+          this.displayAppCarouselImg.push({ url: shopData.appCarouselImg[i] })
187
+        }
188
+      })
189
+    },
190
+    beforeAvatarUpload(file) {
191
+    },
192
+    handleAppIndexSuccess(res, file) {
193
+      this.listData.appIndexImg = res.data[0]
194
+    },
195
+    handleAppListSuccess(res, file) {
196
+      this.listData.appListImg = res.data[0]
197
+    },
198
+    handleRemove(file, fileList) {
199
+      this.listData.appCarouselImg = []
200
+      for (let i = 0; i < fileList.length; i++) {
201
+        this.listData.appCarouselImg.push(fileList[i].response.data[0])
202
+      }
203
+    },
204
+    handleSuccessCarouselImg(response, file, fileList) { // 活动配图上传成功时回调
205
+      const resImg = response.data[0]
206
+      this.listData.appCarouselImg.push(resImg)
207
+    },
208
+    handlePictureCardPreview(file) {
209
+      this.dialogImageUrl = file.url;
210
+      this.dialogVisible = true;
211
+    },
212
+    getShopTypeList() {
213
+      this.$store.dispatch('shopType/FetchShopTypeSelect', this.listData).then((res) => {
214
+        this.shopTypeList = res.data
215
+      }).catch(() => {
216
+        console.log('error ListAnnouncement')
217
+      })
218
+    },
219
+    onSearchResult(pois) {
220
+      // 搜索地图
221
+      let latSum = 0
222
+      let lngSum = 0
223
+      if (pois.length > 0) {
224
+        pois.forEach(poi => {
225
+          const { lng, lat } = poi
226
+          lngSum += lng
227
+          latSum += lat
228
+          this.markers.push([poi.lng, poi.lat])
229
+        })
230
+        const center = {
231
+          lng: lngSum / pois.length,
232
+          lat: latSum / pois.length
233
+        }
234
+        this.mapCenter = [center.lng, center.lat]
235
+      }
236
+    },
237
+    wangeditorValue(value) {
238
+      this.listData.shopIntroduction = value // 在这里接受子组件传过来的参数,赋值给data里的参数
239
+    },
240
+    submitForm(formName) { // 提交
241
+      this.$refs[formName].validate((valid) => {
242
+        if (valid) {
243
+          this.updateShop()
244
+        } else {
245
+          console.log('error submit!!')
246
+          return false
247
+        }
248
+      })
249
+    },
250
+    resetForm(formName) { // 重置
251
+      // 重置为未注册
252
+      this.isRegistered = true
253
+      // 重置为非户主
254
+      this.roleDisabled = false
255
+
256
+      console.log(this.isRegistered)
257
+      this.$refs[formName].resetFields()
258
+    },
259
+    updateShop() {
260
+      // 加载框
261
+      const loading = this.$loading({
262
+        lock: true,
263
+        text: 'Loading',
264
+        spinner: 'el-icon-loading',
265
+        background: 'rgba(0, 0, 0, 0.7)'
266
+      })
267
+      this.$store.dispatch('shopType/UpdateShop', this.listData).then((res) => {
268
+        if (res.code === '0') {
269
+          this.$message({
270
+            message: res.message,
271
+            type: 'success'
272
+          })
273
+          this.$router.push({ name: 'shop-index' })
274
+          loading.close()
275
+          return
276
+        }
277
+        this.$message.error(res.message)
278
+        loading.close()
279
+      }).catch(() => {
280
+        loading.close()
281
+        console.log('error UpdateShop')
282
+      })
283
+    }
284
+  }
285
+}
286
+</script>
287
+
288
+<style>
289
+.avatar-uploader .el-upload {
290
+    border: 1px dashed #d9d9d9;
291
+    border-radius: 6px;
292
+    cursor: pointer;
293
+    position: relative;
294
+    overflow: hidden;
295
+  }
296
+  .avatar-uploader .el-upload:hover {
297
+    border-color: #409EFF;
298
+  }
299
+  .avatar-uploader-icon {
300
+    font-size: 28px;
301
+    color: #8c939d;
302
+    width: 178px;
303
+    height: 178px;
304
+    line-height: 178px;
305
+    text-align: center;
306
+  }
307
+  .avatar {
308
+    width: 178px;
309
+    height: 178px;
310
+    display: block;
311
+  }
312
+  
313
+.add-ruleForm{
314
+  width: 800px;
315
+  margin-left: auto;
316
+  margin-right: auto;
317
+  margin-top: 50px;
318
+}
319
+</style>
320
+<style scoped>
321
+.search-box {
322
+  position: absolute;
323
+  top: 25px;
324
+  left: 20px;
325
+}
326
+
327
+.amap-page-container {
328
+  position: relative;
329
+}
330
+</style>

+ 328
- 0
VUECODE/smart-property-manage/src/views/rental/rentalIndex.vue Vedi File

@@ -0,0 +1,328 @@
1
+
2
+<template>
3
+  <div class="root">
4
+    <el-form :inline="true" :model="listQuery" class="form-listQuery">
5
+      <el-form-item class="filter-item" label="房间编号">
6
+        <el-input v-model.trim="listQuery.id" onkeyup="this.value=this.value.replace(/\D/g,'')" placeholder="房间编号" />
7
+      </el-form-item>
8
+      <el-form-item class="filter-item" label="房间名称" >
9
+        <el-input v-model.trim="listQuery.shopName" placeholder="房间名称" />
10
+      </el-form-item>
11
+      <el-form-item class="filter-item" label="租金从" >
12
+        <el-input v-model.trim="listQuery.shopName" placeholder="租金从" />
13
+      </el-form-item>
14
+      <el-form-item class="filter-item" label="到" >
15
+        <el-input v-model.trim="listQuery.shopName" placeholder="到" />
16
+      </el-form-item>
17
+      <el-form-item class="filter-item" label="租赁方式" >
18
+        <el-select v-model="listQuery.shopStatus" placeholder="请选择">
19
+            <el-option label="整租" value="1"/>
20
+            <el-option label="合租" value="2"/>
21
+          </el-select>
22
+      </el-form-item>
23
+      <el-form-item class="filter-item" label="户型" >
24
+        <el-select v-model="listQuery.shopStatus" placeholder="请选择">
25
+            <el-option label="一室居" value="1"/>
26
+            <el-option label="二室居" value="2"/>
27
+            <el-option label="三室居" value="3"/>
28
+            <el-option label="四室居及以上" value="4"/>
29
+          </el-select>
30
+      </el-form-item>
31
+      <el-form-item class="filter-item" label="上架状态" >
32
+        <el-select v-model="listQuery.shopStatus" placeholder="请选择">
33
+            <el-option label="已上架" value="1"/>
34
+            <el-option label="已下架" value="2"/>
35
+          </el-select>
36
+      </el-form-item>
37
+      <el-form-item>
38
+        <el-button type="info" class="filter-item" @click="handleFilter">清空</el-button>
39
+        <el-button type="primary" @click="search">查询</el-button>
40
+      </el-form-item>
41
+    </el-form>
42
+    <div class="button">
43
+      <el-button type="primary" @click="add">添加</el-button>
44
+      <el-button type="warning" @click="edit">修改</el-button>
45
+      <el-button type="danger" @click="shelfShop">上架房间</el-button>
46
+      <el-button type="danger" @click="obtainedShop">下架房间</el-button>
47
+    </div>
48
+    <el-table
49
+      v-loading="listLoading"
50
+      ref="multipleTable"
51
+      :data="rentalList"
52
+      border
53
+      tooltip-effect="dark"
54
+      style="width: 100%; margin-top: 20px;"
55
+      @selection-change="handleSelectionChange">
56
+      <el-table-column
57
+        type="selection"
58
+        width="55"/>
59
+      <el-table-column prop="id" label="房间编号" align="center"/>
60
+      <el-table-column prop="shopName" label="房间名称" align="center" >
61
+        <template slot-scope="scope"><a><span style="color: #63B8FF" @click="clickTitle(scope.row.id)">{{ scope.row.shopName }}</span></a></template>
62
+      </el-table-column>
63
+      <el-table-column prop="sort" label="权重" align="center"/>
64
+      <el-table-column prop="typeName" label="租金" align="center"/>
65
+      <el-table-column prop="shopStatus" label="上架状态" align="center">\
66
+        <template slot-scope="scope">
67
+          <span v-if="scope.row.shopStatus === '1'">已上架</span>
68
+          <span v-if="scope.row.shopStatus === '2'">已下架</span>
69
+        </template>
70
+      </el-table-column>
71
+      <el-table-column prop="shopStatus" label="租赁方式" align="center">\
72
+        <template slot-scope="scope">
73
+          <span v-if="scope.row.shopStatus === '1'">整租</span>
74
+          <span v-if="scope.row.shopStatus === '2'">合租</span>
75
+        </template>
76
+      </el-table-column>
77
+      <el-table-column prop="shopStatus" label="户型" align="center">\
78
+        <template slot-scope="scope">
79
+          <span v-if="scope.row.shopStatus === '1'">一室居</span>
80
+          <span v-if="scope.row.shopStatus === '2'">二室居</span>
81
+          <span v-if="scope.row.shopStatus === '3'">三室居</span>
82
+          <span v-if="scope.row.shopStatus === '4'">四室居及以上</span>
83
+        </template>
84
+      </el-table-column>
85
+      <el-table-column prop="updateDate" label="编辑时间" align="center" ><template slot-scope="scope">{{ formatDate(scope.row.updateDate) }}</template></el-table-column>
86
+      <el-table-column prop="userName" label="编辑人" align="center"/>
87
+    </el-table>
88
+    <div class="block">
89
+      <el-pagination
90
+        :current-page.sync="listQuery.pageNum"
91
+        :page-sizes="[10, 20, 50, 100]"
92
+        :page-size.sync="listQuery.pageSize"
93
+        :total="total"
94
+        layout="total, sizes, prev, pager, next, jumper"
95
+        @size-change="handleSizeChange"
96
+        @current-change="handleCurrentChange"/>
97
+    </div>
98
+  </div>
99
+</template>
100
+
101
+<script>
102
+import { mapState, mapActions, mapMutations } from 'vuex'
103
+
104
+export default {
105
+  data() {
106
+    return {
107
+      listQuery: {
108
+        id: '',
109
+        shopName: '',
110
+        shopTypeId: '',
111
+        shopStatus: '',
112
+        pageNum: 1,
113
+        pageSize: 10
114
+      },
115
+      total: 0, // 数据总数
116
+      shopList: [],
117
+      shopTypeList: [],
118
+      deleteIds: [], // 选择的id集合
119
+      listLoading: true // 加载圈
120
+    }
121
+  },
122
+  mounted() {
123
+    // 获取数据
124
+    this.dataQuery()
125
+    this.getShopTypeList()
126
+  },
127
+  methods: {
128
+    ...mapActions('shopType', [
129
+      'FetchShopList',
130
+      'FetchShopTypeSelect'
131
+    ]),
132
+    handleSizeChange(val) {
133
+      console.log(`每页 ${val} 条`)
134
+      this.listQuery.pageSize = val
135
+      this.dataQuery()
136
+    },
137
+    handleCurrentChange(val) {
138
+      console.log(`当前页: ${val}`)
139
+      this.listQuery.pageNum = val
140
+      this.dataQuery()
141
+    },
142
+    padDate(value) {
143
+      value = value < 10 ? '0' + value : value
144
+      return value
145
+    },
146
+    getStatus(row) { // 获取状态
147
+      let statusName = ''
148
+
149
+      // 判断状态
150
+      switch (row.status) {
151
+        case '0':
152
+          statusName = '已作废'
153
+          break
154
+        case '1':
155
+          statusName = '已发布'
156
+          break
157
+        case '2':
158
+          statusName = '草稿'
159
+          break
160
+      }
161
+
162
+      // 如果修改时间和创建时间不一致, 就显示已修改
163
+      if (row.status === '1' && (row.updateDate > row.createDate)) {
164
+        statusName = '已修改'
165
+      }
166
+
167
+      return statusName
168
+    },
169
+    dataQuery() { // 查询数据
170
+      this.listLoading = true
171
+      this.$store.dispatch('shopType/FetchShopList', this.listQuery).then((res) => {
172
+        const resData = res.data
173
+        this.rentalList = resData.list
174
+        this.total = resData.total
175
+        this.listLoading = false
176
+      }).catch(() => {
177
+        this.listLoading = false
178
+        console.log('error ListAnnouncement')
179
+      })
180
+    },
181
+    getShopTypeList() {
182
+      this.$store.dispatch('shopType/FetchShopTypeSelect', this.listQuery).then((res) => {
183
+        this.shopTypeList = res.data
184
+      }).catch(() => {
185
+        console.log('error ListAnnouncement')
186
+      })
187
+    },
188
+    handleSelectionChange(data) {
189
+      // 设置为 空
190
+      this.deleteIds = []
191
+      for (let i = 0; i < data.length; i++) {
192
+        this.deleteIds.push(data[i].id)
193
+      }
194
+    },
195
+	  search() {
196
+      this.listQuery.pageNum = 1
197
+      this.dataQuery()
198
+    },
199
+    handleFilter() {
200
+      this.listQuery.pageNum = 1
201
+      this.listQuery.pageSize = 10
202
+      this.listQuery.id =''
203
+      this.listQuery.shopName=''
204
+      this.listQuery.shopTypeId=''
205
+      this.listQuery.shopStatus=''
206
+      this.dataQuery()
207
+    },
208
+    // 添加公告
209
+    add() {
210
+      this.$router.push({ name: 'shop-add' })
211
+    },
212
+    edit(){// 编辑公告
213
+      const ids = this.deleteIds
214
+      if (ids.length > 1) {
215
+        this.$message.error('只能选择一行数据进行修改!')
216
+        return
217
+      }
218
+      if (ids < 1) {
219
+        this.$message.error('请选择一行数据进行修改!')
220
+        return
221
+      }
222
+       let ide= this.deleteIds[0]
223
+       this.listQuery.id = ide
224
+       this.$router.push({ name: 'shop-edit', query: { id: ide }})
225
+      },
226
+    deleteAnnouncement(){
227
+       let ide= this.deleteIds[0]
228
+       this.listQuery.id = ide 
229
+      this.$store.dispatch('AnnouncementById', this.listQuery).then((res) => {
230
+        const resData = res.data
231
+        const announcement = resData.tpAnnouncement
232
+        const imgList = resData.studentList
233
+        this.listQuery.status= announcement.status
234
+        console.log("1",this.listQuery.status)
235
+        if(this.listQuery.status == 0){
236
+          this.$message.error('已作废不可以作废')
237
+          return
238
+        }
239
+        this.deleteId()     
240
+      })    
241
+    },
242
+    shelfShop() {
243
+      this.listLoading = true
244
+      const ids = this.deleteIds
245
+      if (ids < 1) {
246
+        this.$message.error('请至少选择一行数据上架!')
247
+        return
248
+      }
249
+      this.$store.dispatch('shopType/ShelfShop', ids).then((res) => {
250
+        this.listLoading = false
251
+        this.dataQuery()
252
+      }).catch(() => {
253
+        this.listLoading = false
254
+        console.log('error DeleteAnnouncement')
255
+      })
256
+    },
257
+    obtainedShop() {
258
+      this.listLoading = true
259
+      const ids = this.deleteIds
260
+      if (ids < 1) {
261
+        this.$message.error('请至少选择一行数据下架!')
262
+        return
263
+      }
264
+      this.$store.dispatch('shopType/ObtainedShop', ids).then((res) => {
265
+        this.listLoading = false
266
+        this.dataQuery()
267
+      }).catch(() => {
268
+        this.listLoading = false
269
+        console.log('error DeleteAnnouncement')
270
+      })
271
+    },
272
+    deleteId(){
273
+       const ids = this.deleteIds
274
+      this.listLoading = true
275
+      console.log(ids)
276
+      this.$store.dispatch('DeleteAnnouncement', ids).then((res) => {
277
+        this.listLoading = false
278
+        this.listQuery.announcementTitle = ''
279
+        this.dataQuery()
280
+      }).catch(() => {
281
+        this.listLoading = false
282
+        console.log('error DeleteAnnouncement')
283
+      })
284
+    },
285
+
286
+
287
+    clickTitle(id) {
288
+      this.$router.push({ name: 'shop-edit', query: { id: id }})
289
+    },
290
+    formatDate(val) {
291
+      if (val === null) {
292
+        return ''
293
+      }
294
+      var value = new Date(val)
295
+      var year = value.getFullYear()
296
+      var month = value.getMonth() + 1
297
+      var day = value.getDate()
298
+      return year + '-' + month + '-' + day
299
+    }
300
+  }
301
+}
302
+</script>
303
+
304
+<style scoped>
305
+.root{
306
+  display: flex;
307
+  flex-flow: column;
308
+}
309
+.form-listQuery{
310
+  margin-top: 20px;
311
+  margin-left: 30px;
312
+}
313
+.operation{
314
+  display: flex;
315
+  justify-content: space-between;
316
+  margin-left: 20px;
317
+  margin-right: 20px;
318
+}
319
+.block{
320
+  display: flex;
321
+  justify-content: flex-end;
322
+  margin-top: 10px;
323
+}
324
+.button {
325
+  margin-left: 20px;
326
+}
327
+</style>
328
+

+ 315
- 0
VUECODE/smart-property-manage/src/views/shop/shopAdd.vue Vedi File

@@ -0,0 +1,315 @@
1
+<template>
2
+  <div class="root">
3
+    <el-form ref="ruleForm" :model="listData" :rules="rules" label-width="150px" class="add-ruleForm">
4
+      <el-form-item label="商铺名称" prop="shopName">
5
+        <el-input v-model="listData.shopName"/>
6
+      </el-form-item>
7
+      <el-form-item label="商铺说明" prop="remark">
8
+        <el-input v-model="listData.remark"/>
9
+      </el-form-item>
10
+      <el-form-item label="app首页展示图" prop="appIndexImg">
11
+        <el-upload
12
+          class="avatar-uploader"
13
+          name="uploadFiles"
14
+          :action="uploadImgUrl"
15
+          :show-file-list="false"
16
+          :on-success="handleAppIndexSuccess"
17
+          :before-upload="beforeAvatarUpload">
18
+          <img v-if="listData.appIndexImg" :src="listData.appIndexImg" class="avatar">
19
+          <i v-else class="el-icon-plus avatar-uploader-icon"></i>
20
+        </el-upload>
21
+      </el-form-item>
22
+      <el-form-item label="app列表展示图" prop="appListImg">
23
+        <el-upload
24
+          class="avatar-uploader"
25
+          name="uploadFiles"
26
+          :action="uploadImgUrl"
27
+          :show-file-list="false"
28
+          :on-success="handleAppListSuccess"
29
+          :before-upload="beforeAvatarUpload">
30
+          <img v-if="listData.appListImg" :src="listData.appListImg" class="avatar">
31
+          <i v-else class="el-icon-plus avatar-uploader-icon"></i>
32
+        </el-upload>
33
+      </el-form-item>
34
+      <el-form-item label="app商铺轮播图" prop="appCarouselImg">
35
+        <el-upload
36
+          name="uploadFiles"
37
+          :limit="6"
38
+          :action="uploadImgUrl"
39
+          list-type="picture-card"
40
+          :on-preview="handlePictureCardPreview"
41
+          :on-remove="handleRemove"
42
+          :on-success="handleSuccessCarouselImg">
43
+          <i class="el-icon-plus"></i>
44
+        </el-upload>
45
+        <el-dialog :visible.sync="dialogVisible">
46
+          <img width="100%" :src="dialogImageUrl" alt="">
47
+        </el-dialog>
48
+      </el-form-item>
49
+      <el-form-item label="权重" prop="sort">
50
+        <el-input v-model="listData.sort"/>
51
+      </el-form-item>
52
+      <el-form-item label="商铺类型" prop="shopTypeId">
53
+        <el-select v-model="listData.shopTypeId" placeholder="商铺类型" clearable class="filter-item">
54
+          <el-option v-for="item in shopTypeList" :key="item.id" :value="item.id" :label="item.typeName"/>
55
+        </el-select>
56
+      </el-form-item>
57
+      <el-form-item label="上架状态" prop="shopStatus">
58
+        <el-select v-model="listData.shopStatus" placeholder="请选择">
59
+          <el-option label="已上架" value="1"/>
60
+          <el-option label="已下架" value="2"/>
61
+        </el-select>
62
+      </el-form-item>
63
+      <el-form-item label="联系电话" prop="shopTel">
64
+        <el-input v-model="listData.shopTel"/>
65
+      </el-form-item>
66
+      <el-form-item label="商铺地址" prop="shopAddress">
67
+        <el-input v-model="listData.shopAddress"/>
68
+      </el-form-item>
69
+      <el-form-item label="人均消费" prop="averagePrice">
70
+        <el-input v-model="listData.averagePrice"/>
71
+      </el-form-item>
72
+      <el-form-item label="高德坐标">
73
+        <el-input placeholder="经度" v-model="listData.shopLongitude" style="width: 150px;" />
74
+        <el-input placeholder="纬度" v-model="listData.shopLatitude" style="width: 150px;" />
75
+      </el-form-item>
76
+      <el-form-item label="">
77
+         <!-- 地图 -->
78
+        <div style="width:100%;height:300px;" class="amap-page-container">
79
+          <el-amap-search-box :search-option="searchOption" :on-search-result="onSearchResult" class="search-box"/>
80
+          <el-amap ref="map" :events="events" :center="mapCenter" :zoom="12" class="amap-demo" vid="amapDemo">
81
+            <el-amap-marker v-for="(item,index) in markers" :key="index" :position="item" />
82
+          </el-amap>
83
+        </div>
84
+      </el-form-item>
85
+      <el-form-item label="商铺介绍">
86
+          <!-- <el-input v-model="addForm.bannerContent" placeholder="内容详情"/> -->
87
+          <div id="father">
88
+            <wangeditor @wangeditorEvent="wangeditorValue"/>
89
+          </div>
90
+        </el-form-item>
91
+      <el-form-item>
92
+        <el-button type="primary" @click="submitForm('ruleForm')">立即创建</el-button>
93
+        <el-button @click="resetForm('ruleForm')">重置</el-button>
94
+      </el-form-item>
95
+    </el-form>
96
+  </div>
97
+</template>
98
+
99
+<script>
100
+import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
101
+import Wangeditor from '@/components/Wangeditor'
102
+
103
+export default {
104
+  components: { Pagination, Wangeditor },
105
+  data() {
106
+    return {
107
+      events: {
108
+        click: e => {
109
+          // _self.postData.Coordinate = e.lnglat.lat + ',' + e.lnglat.lng
110
+          this.listData.shopLongitude = e.lnglat.lng
111
+          this.listData.shopLatitude = e.lnglat.lat
112
+        }
113
+      },
114
+      listData: {
115
+        shopName: '',
116
+        remark: '',
117
+        appIndexImg: '',
118
+        appListImg: '',
119
+        appCarouselImg: [],
120
+        sort: '',
121
+        shopTypeId: '',
122
+        shopStatus: '',
123
+        shopTel: '',
124
+        shopAddress: '',
125
+        averagePrice: '',
126
+        shopLongitude: '',
127
+        shopLatitude: '',
128
+        shopIntroduction: ''
129
+      },
130
+      dialogImageUrl: '',
131
+      dialogVisible: false,
132
+      uploadImgUrl: process.env.BASE_API + '/uploadimage',
133
+      markers: [],
134
+      shopTypeList: [],
135
+      searchOption: {
136
+        city: '南京',
137
+        citylimit: false
138
+      },
139
+      mapCenter: [118.789509, 32.019989],
140
+      tableKey: 0,
141
+      rules: {
142
+        typeName: [
143
+          { required: true, message: '请输入商铺名称', trigger: 'blur' }
144
+        ],
145
+        remark: [
146
+          { required: true, message: '请输入商铺说明', trigger: 'blur' }
147
+        ],
148
+        shopTel: [
149
+          { required: true, message: '请输入联系电话', trigger: 'blur' }
150
+        ],
151
+        shopAddress: [
152
+          { required: true, message: '请输入商铺地址', trigger: 'blur' }
153
+        ],
154
+        appIndexImg: [
155
+          { required: true, message: 'app首页展示图', trigger: 'blur' }
156
+        ],
157
+        appListImg: [
158
+          { required: true, message: 'app列表展示图', trigger: 'blur' }
159
+        ],
160
+        appCarouselImg: [
161
+          { required: true, message: 'app商铺轮播图', trigger: 'blur' }
162
+        ],
163
+      }
164
+    }
165
+  },
166
+  mounted() {
167
+    this.getShopTypeList()
168
+  },
169
+  methods: {
170
+     addMarker() {
171
+      const lng = 121.5 + Math.round(Math.random() * 1000) / 10000
172
+      const lat = 31.197646 + Math.round(Math.random() * 500) / 10000
173
+      this.markers.push([lng, lat])
174
+    },
175
+    beforeAvatarUpload(file) {
176
+    },
177
+    handleAppIndexSuccess(res, file) {
178
+      this.listData.appIndexImg = res.data[0]
179
+    },
180
+    handleAppListSuccess(res, file) {
181
+      this.listData.appListImg = res.data[0]
182
+    },
183
+    handleRemove(file, fileList) {
184
+      this.listData.appCarouselImg = []
185
+      for (let i = 0; i < fileList.length; i++) {
186
+        this.listData.appCarouselImg.push(fileList[i].response.data[0])
187
+      }
188
+    },
189
+    handleSuccessCarouselImg(response, file, fileList) { // 活动配图上传成功时回调
190
+      const resImg = response.data[0]
191
+      this.listData.appCarouselImg.push(resImg)
192
+    },
193
+    handlePictureCardPreview(file) {
194
+      this.dialogImageUrl = file.url;
195
+      this.dialogVisible = true;
196
+    },
197
+    getShopTypeList() {
198
+      this.$store.dispatch('shopType/FetchShopTypeSelect', this.listData).then((res) => {
199
+        this.shopTypeList = res.data
200
+      }).catch(() => {
201
+        console.log('error ListAnnouncement')
202
+      })
203
+    },
204
+    onSearchResult(pois) {
205
+      // 搜索地图
206
+      let latSum = 0
207
+      let lngSum = 0
208
+      if (pois.length > 0) {
209
+        pois.forEach(poi => {
210
+          const { lng, lat } = poi
211
+          lngSum += lng
212
+          latSum += lat
213
+          this.markers.push([poi.lng, poi.lat])
214
+        })
215
+        const center = {
216
+          lng: lngSum / pois.length,
217
+          lat: latSum / pois.length
218
+        }
219
+        this.mapCenter = [center.lng, center.lat]
220
+      }
221
+    },
222
+    wangeditorValue(value) {
223
+      this.listData.shopIntroduction = value // 在这里接受子组件传过来的参数,赋值给data里的参数
224
+    },
225
+    submitForm(formName) { // 提交
226
+      this.$refs[formName].validate((valid) => {
227
+        if (valid) {
228
+          this.addShop()
229
+        } else {
230
+          console.log('error submit!!')
231
+          return false
232
+        }
233
+      })
234
+    },
235
+    resetForm(formName) { // 重置
236
+      // 重置为未注册
237
+      this.isRegistered = true
238
+      // 重置为非户主
239
+      this.roleDisabled = false
240
+
241
+      console.log(this.isRegistered)
242
+      this.$refs[formName].resetFields()
243
+    },
244
+    addShop() {
245
+      // 加载框
246
+      const loading = this.$loading({
247
+        lock: true,
248
+        text: 'Loading',
249
+        spinner: 'el-icon-loading',
250
+        background: 'rgba(0, 0, 0, 0.7)'
251
+      })
252
+      this.$store.dispatch('shopType/AddShop', this.listData).then((res) => {
253
+        if (res.code === '0') {
254
+          this.$message({
255
+            message: res.message,
256
+            type: 'success'
257
+          })
258
+          this.$router.push({ name: 'shop-index' })
259
+          loading.close()
260
+          return
261
+        }
262
+        this.$message.error(res.message)
263
+        loading.close()
264
+      }).catch(() => {
265
+        loading.close()
266
+        console.log('error AddBuilding')
267
+      })
268
+    }
269
+  }
270
+}
271
+</script>
272
+
273
+<style>
274
+.avatar-uploader .el-upload {
275
+    border: 1px dashed #d9d9d9;
276
+    border-radius: 6px;
277
+    cursor: pointer;
278
+    position: relative;
279
+    overflow: hidden;
280
+  }
281
+  .avatar-uploader .el-upload:hover {
282
+    border-color: #409EFF;
283
+  }
284
+  .avatar-uploader-icon {
285
+    font-size: 28px;
286
+    color: #8c939d;
287
+    width: 178px;
288
+    height: 178px;
289
+    line-height: 178px;
290
+    text-align: center;
291
+  }
292
+  .avatar {
293
+    width: 178px;
294
+    height: 178px;
295
+    display: block;
296
+  }
297
+  
298
+.add-ruleForm{
299
+  width: 800px;
300
+  margin-left: auto;
301
+  margin-right: auto;
302
+  margin-top: 50px;
303
+}
304
+</style>
305
+<style scoped>
306
+.search-box {
307
+  position: absolute;
308
+  top: 25px;
309
+  left: 20px;
310
+}
311
+
312
+.amap-page-container {
313
+  position: relative;
314
+}
315
+</style>

+ 332
- 0
VUECODE/smart-property-manage/src/views/shop/shopEdit.vue Vedi File

@@ -0,0 +1,332 @@
1
+<template>
2
+  <div class="root">
3
+    <el-form ref="ruleForm" :model="listData" :rules="rules" label-width="150px" class="add-ruleForm">
4
+      <el-form-item label="商铺名称" prop="shopName">
5
+        <el-input v-model="listData.shopName"/>
6
+      </el-form-item>
7
+      <el-form-item label="商铺说明" prop="remark">
8
+        <el-input v-model="listData.remark"/>
9
+      </el-form-item>
10
+      <el-form-item label="app首页展示图" prop="appIndexImg">
11
+        <el-upload
12
+          class="avatar-uploader"
13
+          name="uploadFiles"
14
+          :action="uploadImgUrl"
15
+          :show-file-list="false"
16
+          :on-success="handleAppIndexSuccess"
17
+          :before-upload="beforeAvatarUpload">
18
+          <img v-if="listData.appIndexImg" :src="listData.appIndexImg" class="avatar">
19
+          <i v-else class="el-icon-plus avatar-uploader-icon"></i>
20
+        </el-upload>
21
+      </el-form-item>
22
+      <el-form-item label="app列表展示图" prop="appListImg">
23
+        <el-upload
24
+          class="avatar-uploader"
25
+          name="uploadFiles"
26
+          :action="uploadImgUrl"
27
+          :show-file-list="false"
28
+          :on-success="handleAppListSuccess"
29
+          :before-upload="beforeAvatarUpload">
30
+          <img v-if="listData.appListImg" :src="listData.appListImg" class="avatar">
31
+          <i v-else class="el-icon-plus avatar-uploader-icon"></i>
32
+        </el-upload>
33
+      </el-form-item>
34
+      <el-form-item label="app商铺轮播图" prop="appCarouselImg">
35
+        <el-upload
36
+          name="uploadFiles"
37
+          :limit="6"
38
+          :action="uploadImgUrl"
39
+          list-type="picture-card"
40
+          :file-list="displayAppCarouselImg"
41
+          :on-preview="handlePictureCardPreview"
42
+          :on-remove="handleRemove"
43
+          :on-success="handleSuccessCarouselImg">
44
+          <i class="el-icon-plus"></i>
45
+        </el-upload>
46
+        <el-dialog :visible.sync="dialogVisible">
47
+          <img width="100%" :src="dialogImageUrl" alt="">
48
+        </el-dialog>
49
+      </el-form-item>
50
+      <el-form-item label="权重" prop="sort">
51
+        <el-input v-model="listData.sort"/>
52
+      </el-form-item>
53
+      <el-form-item label="商铺类型" prop="shopTypeId">
54
+        <el-select v-model="listData.shopTypeId" placeholder="商铺类型" clearable class="filter-item">
55
+          <el-option v-for="item in shopTypeList" :key="item.id" :value="item.id" :label="item.typeName"/>
56
+        </el-select>
57
+      </el-form-item>
58
+      <el-form-item label="上架状态" prop="shopStatus">
59
+        <el-select v-model="listData.shopStatus" placeholder="请选择">
60
+          <el-option label="已上架" value="1"/>
61
+          <el-option label="已下架" value="2"/>
62
+        </el-select>
63
+      </el-form-item>
64
+      <el-form-item label="联系电话" prop="shopTel">
65
+        <el-input v-model="listData.shopTel"/>
66
+      </el-form-item>
67
+      <el-form-item label="商铺地址" prop="shopAddress">
68
+        <el-input v-model="listData.shopAddress"/>
69
+      </el-form-item>
70
+      <el-form-item label="人均消费" prop="averagePrice">
71
+        <el-input v-model="listData.averagePrice"/>
72
+      </el-form-item>
73
+      <el-form-item label="高德坐标">
74
+        <el-input placeholder="经度" v-model="listData.shopLongitude" style="width: 150px;" />
75
+        <el-input placeholder="纬度" v-model="listData.shopLatitude" style="width: 150px;" />
76
+      </el-form-item>
77
+      <el-form-item label="">
78
+         <!-- 地图 -->
79
+        <div style="width:100%;height:300px;" class="amap-page-container">
80
+          <el-amap-search-box :search-option="searchOption" :on-search-result="onSearchResult" class="search-box"/>
81
+          <el-amap ref="map" :events="events" :center="mapCenter" :zoom="12" class="amap-demo" vid="amapDemo">
82
+            <el-amap-marker v-for="(item,index) in markers" :key="index" :position="item" />
83
+          </el-amap>
84
+        </div>
85
+      </el-form-item>
86
+      <el-form-item label="商铺介绍">
87
+          <!-- <el-input v-model="addForm.bannerContent" placeholder="内容详情"/>  listData.shopIntroduction-->
88
+          <div id="father">
89
+            <wangeditor :content="listData.shopIntroduction" @wangeditorEvent="wangeditorValue"/>
90
+          </div>
91
+        </el-form-item>
92
+      <el-form-item>
93
+        <el-button type="primary" @click="submitForm('ruleForm')">修改</el-button>
94
+      </el-form-item>
95
+    </el-form>
96
+  </div>
97
+</template>
98
+
99
+<script>
100
+import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
101
+import Wangeditor from '@/components/Wangeditor'
102
+
103
+export default {
104
+  components: { Pagination, Wangeditor },
105
+  data() {
106
+    return {
107
+      events: {
108
+        click: e => {
109
+          // _self.postData.Coordinate = e.lnglat.lat + ',' + e.lnglat.lng
110
+          this.listData.shopLongitude = e.lnglat.lng
111
+          this.listData.shopLatitude = e.lnglat.lat
112
+        }
113
+      },
114
+      listData: {
115
+        id: '',
116
+        shopName: '',
117
+        remark: '',
118
+        appIndexImg: '',
119
+        appListImg: '',
120
+        appCarouselImg: [],
121
+        sort: '',
122
+        shopTypeId: '',
123
+        shopStatus: '',
124
+        shopTel: '',
125
+        shopAddress: '',
126
+        averagePrice: '',
127
+        shopLongitude: '',
128
+        shopLatitude: '',
129
+        shopIntroduction: ''
130
+      },
131
+      ediContent: '',
132
+      displayAppCarouselImg: [],
133
+      dialogImageUrl: '',
134
+      dialogVisible: false,
135
+      uploadImgUrl: process.env.BASE_API + '/uploadimage',
136
+      markers: [],
137
+      shopTypeList: [],
138
+      searchOption: {
139
+        city: '南京',
140
+        citylimit: false
141
+      },
142
+      mapCenter: [118.789509, 32.019989],
143
+      tableKey: 0,
144
+      rules: {
145
+        typeName: [
146
+          { required: true, message: '请输入商铺名称', trigger: 'blur' }
147
+        ],
148
+        remark: [
149
+          { required: true, message: '请输入商铺说明', trigger: 'blur' }
150
+        ],
151
+        shopTel: [
152
+          { required: true, message: '请输入联系电话', trigger: 'blur' }
153
+        ],
154
+        shopAddress: [
155
+          { required: true, message: '请输入商铺地址', trigger: 'blur' }
156
+        ],
157
+        appIndexImg: [
158
+          { required: true, message: 'app首页展示图', trigger: 'blur' }
159
+        ],
160
+        appListImg: [
161
+          { required: true, message: 'app列表展示图', trigger: 'blur' }
162
+        ],
163
+        appCarouselImg: [
164
+          { required: true, message: 'app商铺轮播图', trigger: 'blur' }
165
+        ],
166
+      }
167
+    }
168
+  },
169
+  created() {
170
+    this.listData.id = this.$route.query.id
171
+    this.getById()
172
+    this.getShopTypeList()
173
+    // this.listData.shopIntroduction = "555555"
174
+  },
175
+  methods: {
176
+     addMarker() {
177
+      const lng = 121.5 + Math.round(Math.random() * 1000) / 10000
178
+      const lat = 31.197646 + Math.round(Math.random() * 500) / 10000
179
+      this.markers.push([lng, lat])
180
+    },
181
+    getById() {
182
+      this.$store.dispatch('shopType/GetShop', this.listData.id).then((res) => {
183
+        const shopData = res.data
184
+        this.listData = { ...shopData }
185
+        console.log(this.listData.shopIntroduction)
186
+        // 多张图片进行遍历
187
+        for (let i = 0; i < shopData.appCarouselImg.length; i++) {
188
+          this.displayAppCarouselImg.push({ url: shopData.appCarouselImg[i] })
189
+        }
190
+      })
191
+    },
192
+    beforeAvatarUpload(file) {
193
+    },
194
+    handleAppIndexSuccess(res, file) {
195
+      this.listData.appIndexImg = res.data[0]
196
+    },
197
+    handleAppListSuccess(res, file) {
198
+      this.listData.appListImg = res.data[0]
199
+    },
200
+    handleRemove(file, fileList) {
201
+      this.listData.appCarouselImg = []
202
+      for (let i = 0; i < fileList.length; i++) {
203
+        this.listData.appCarouselImg.push(fileList[i].response.data[0])
204
+      }
205
+    },
206
+    handleSuccessCarouselImg(response, file, fileList) { // 活动配图上传成功时回调
207
+      const resImg = response.data[0]
208
+      this.listData.appCarouselImg.push(resImg)
209
+    },
210
+    handlePictureCardPreview(file) {
211
+      this.dialogImageUrl = file.url;
212
+      this.dialogVisible = true;
213
+    },
214
+    getShopTypeList() {
215
+      this.$store.dispatch('shopType/FetchShopTypeSelect', this.listData).then((res) => {
216
+        this.shopTypeList = res.data
217
+      }).catch(() => {
218
+        console.log('error ListAnnouncement')
219
+      })
220
+    },
221
+    onSearchResult(pois) {
222
+      // 搜索地图
223
+      let latSum = 0
224
+      let lngSum = 0
225
+      if (pois.length > 0) {
226
+        pois.forEach(poi => {
227
+          const { lng, lat } = poi
228
+          lngSum += lng
229
+          latSum += lat
230
+          this.markers.push([poi.lng, poi.lat])
231
+        })
232
+        const center = {
233
+          lng: lngSum / pois.length,
234
+          lat: latSum / pois.length
235
+        }
236
+        this.mapCenter = [center.lng, center.lat]
237
+      }
238
+    },
239
+    wangeditorValue(value) {
240
+      this.listData.shopIntroduction = value // 在这里接受子组件传过来的参数,赋值给data里的参数
241
+    },
242
+    submitForm(formName) { // 提交
243
+      this.$refs[formName].validate((valid) => {
244
+        if (valid) {
245
+          this.updateShop()
246
+        } else {
247
+          console.log('error submit!!')
248
+          return false
249
+        }
250
+      })
251
+    },
252
+    resetForm(formName) { // 重置
253
+      // 重置为未注册
254
+      this.isRegistered = true
255
+      // 重置为非户主
256
+      this.roleDisabled = false
257
+
258
+      console.log(this.isRegistered)
259
+      this.$refs[formName].resetFields()
260
+    },
261
+    updateShop() {
262
+      // 加载框
263
+      const loading = this.$loading({
264
+        lock: true,
265
+        text: 'Loading',
266
+        spinner: 'el-icon-loading',
267
+        background: 'rgba(0, 0, 0, 0.7)'
268
+      })
269
+      this.$store.dispatch('shopType/UpdateShop', this.listData).then((res) => {
270
+        if (res.code === '0') {
271
+          this.$message({
272
+            message: res.message,
273
+            type: 'success'
274
+          })
275
+          this.$router.push({ name: 'shop-index' })
276
+          loading.close()
277
+          return
278
+        }
279
+        this.$message.error(res.message)
280
+        loading.close()
281
+      }).catch(() => {
282
+        loading.close()
283
+        console.log('error UpdateShop')
284
+      })
285
+    }
286
+  }
287
+}
288
+</script>
289
+
290
+<style>
291
+.avatar-uploader .el-upload {
292
+    border: 1px dashed #d9d9d9;
293
+    border-radius: 6px;
294
+    cursor: pointer;
295
+    position: relative;
296
+    overflow: hidden;
297
+  }
298
+  .avatar-uploader .el-upload:hover {
299
+    border-color: #409EFF;
300
+  }
301
+  .avatar-uploader-icon {
302
+    font-size: 28px;
303
+    color: #8c939d;
304
+    width: 178px;
305
+    height: 178px;
306
+    line-height: 178px;
307
+    text-align: center;
308
+  }
309
+  .avatar {
310
+    width: 178px;
311
+    height: 178px;
312
+    display: block;
313
+  }
314
+  
315
+.add-ruleForm{
316
+  width: 800px;
317
+  margin-left: auto;
318
+  margin-right: auto;
319
+  margin-top: 50px;
320
+}
321
+</style>
322
+<style scoped>
323
+.search-box {
324
+  position: absolute;
325
+  top: 25px;
326
+  left: 20px;
327
+}
328
+
329
+.amap-page-container {
330
+  position: relative;
331
+}
332
+</style>

+ 36
- 18
VUECODE/smart-property-manage/src/views/shop/shopIndex.vue Vedi File

@@ -27,7 +27,8 @@
27 27
     <div class="button">
28 28
       <el-button type="primary" @click="add">添加</el-button>
29 29
       <el-button type="warning" @click="edit">修改</el-button>
30
-      <el-button type="danger" @click="deleteAnnouncement">作废</el-button>
30
+      <el-button type="danger" @click="shelfShop">上架商铺</el-button>
31
+      <el-button type="danger" @click="obtainedShop">下架商铺</el-button>
31 32
     </div>
32 33
     <el-table
33 34
       v-loading="listLoading"
@@ -42,7 +43,7 @@
42 43
         width="55"/>
43 44
       <el-table-column prop="id" label="商铺编号" align="center"/>
44 45
       <el-table-column prop="shopName" label="商铺名称" align="center" >
45
-        <template slot-scope="scope"><a><span style="color: #63B8FF" @click="clickTitle(scope.row.shopName)">{{ scope.row.shopName }}</span></a></template>
46
+        <template slot-scope="scope"><a><span style="color: #63B8FF" @click="clickTitle(scope.row.id)">{{ scope.row.shopName }}</span></a></template>
46 47
       </el-table-column>
47 48
       <el-table-column prop="imgUrl" label="首页展示图" align="center">
48 49
         <template scope="scope">
@@ -182,7 +183,7 @@ export default {
182 183
     },
183 184
     // 添加公告
184 185
     add() {
185
-      this.$router.push({ name: 'announcement-add' })
186
+      this.$router.push({ name: 'shop-add' })
186 187
     },
187 188
     edit(){// 编辑公告
188 189
       const ids = this.deleteIds
@@ -196,19 +197,7 @@ export default {
196 197
       }
197 198
        let ide= this.deleteIds[0]
198 199
        this.listQuery.id = ide
199
-      this.$store.dispatch('AnnouncementById', this.listQuery).then((res) => {
200
-        const resData = res.data
201
-        const announcement = resData.tpAnnouncement
202
-        const imgList = resData.studentList
203
-        this.listQuery = announcement
204
-        this.listQuery.announcementTitle = ''
205
-        console.log("1",this.listQuery.status)
206
-        if(this.listQuery.status == 0){
207
-          this.$message.error('已作废不可以修改')
208
-          return
209
-        } 
210
-       this.$router.push({ name: 'announcement-edit', query: { id: ide }})
211
-      }) 
200
+       this.$router.push({ name: 'shop-edit', query: { id: ide }})
212 201
       },
213 202
     deleteAnnouncement(){
214 203
        let ide= this.deleteIds[0]
@@ -226,7 +215,36 @@ export default {
226 215
         this.deleteId()     
227 216
       })    
228 217
     },
229
-
218
+    shelfShop() {
219
+      this.listLoading = true
220
+      const ids = this.deleteIds
221
+      if (ids < 1) {
222
+        this.$message.error('请至少选择一行数据上架!')
223
+        return
224
+      }
225
+      this.$store.dispatch('shopType/ShelfShop', ids).then((res) => {
226
+        this.listLoading = false
227
+        this.dataQuery()
228
+      }).catch(() => {
229
+        this.listLoading = false
230
+        console.log('error DeleteAnnouncement')
231
+      })
232
+    },
233
+    obtainedShop() {
234
+      this.listLoading = true
235
+      const ids = this.deleteIds
236
+      if (ids < 1) {
237
+        this.$message.error('请至少选择一行数据下架!')
238
+        return
239
+      }
240
+      this.$store.dispatch('shopType/ObtainedShop', ids).then((res) => {
241
+        this.listLoading = false
242
+        this.dataQuery()
243
+      }).catch(() => {
244
+        this.listLoading = false
245
+        console.log('error DeleteAnnouncement')
246
+      })
247
+    },
230 248
     deleteId(){
231 249
        const ids = this.deleteIds
232 250
       this.listLoading = true
@@ -243,7 +261,7 @@ export default {
243 261
 
244 262
 
245 263
     clickTitle(id) {
246
-      this.$router.push({ name: 'contentParticulars-details', query: { id: id }})
264
+      this.$router.push({ name: 'shop-edit', query: { id: id }})
247 265
     },
248 266
     formatDate(val) {
249 267
       if (val === null) {

+ 213
- 177
文档/MYSQL/smartCommunity.pdb
File diff suppressed because it is too large
Vedi File


+ 213
- 177
文档/MYSQL/smartCommunity.pdm
File diff suppressed because it is too large
Vedi File