Kaynağa Gözat

修改 是否访客车辆 接口参数

魏熙美 6 yıl önce
ebeveyn
işleme
ae9020f0c5

+ 4
- 3
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/VistorController.java Dosyayı Görüntüle

@@ -73,12 +73,13 @@ public class VistorController extends BaseController {
73 73
 
74 74
     @ApiOperation(value = "查询是否开启了访客邀请的车辆", notes = "查询是否开启了访客邀请的车辆")
75 75
     @ApiImplicitParams({
76
-            @ApiImplicitParam(dataTypeClass = Integer.class, paramType = "query", name = "communityId", value = "小区Id")
76
+            @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
77 77
     })
78 78
     @RequestMapping(value = "/invate_license/bool", method = RequestMethod.GET)
79
-    public ResponseBean invateBool(@RequestParam("communityId") Integer communityId) {
79
+    public ResponseBean invateBool(HttpSession session) {
80 80
         ResponseBean responseBean = new ResponseBean();
81
-        responseBean = vistorServiceI.invateBool(communityId);
81
+        UserElement userElement = getUserElement(session);
82
+        responseBean = vistorServiceI.invateBool(userElement);
82 83
         return responseBean;
83 84
     }
84 85
 

+ 2
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/TaVistorServiceI.java Dosyayı Görüntüle

@@ -31,8 +31,8 @@ public interface TaVistorServiceI {
31 31
 
32 32
     /**
33 33
      * 查询 邀请访客车辆 是否开启
34
-     * @param communityId
34
+     * @param userElement
35 35
      * @return
36 36
      */
37
-    ResponseBean invateBool(Integer communityId);
37
+    ResponseBean invateBool(UserElement userElement);
38 38
 }

+ 2
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaVistorServiceImpl.java Dosyayı Görüntüle

@@ -145,9 +145,9 @@ public class TaVistorServiceImpl implements TaVistorServiceI {
145 145
 
146 146
 
147 147
     @Override
148
-    public ResponseBean invateBool(Integer communityId) {
148
+    public ResponseBean invateBool(UserElement userElement) {
149 149
         ResponseBean responseBean = new ResponseBean();
150
-        TaVisitorLicenseSetting taVisitorLicenseSetting = taVisitorLicenseSettingMapper.selectByCommunityId(communityId);
150
+        TaVisitorLicenseSetting taVisitorLicenseSetting = taVisitorLicenseSettingMapper.selectByCommunityId(userElement.getCommunityId());
151 151
         // true 表示启用了访客邀请的车辆, false 表示未启用访客邀请的车辆
152 152
         responseBean.addSuccess(null != taVisitorLicenseSetting ? true : false);
153 153
         return responseBean;