瀏覽代碼

Merge branch 'master' of https://gitee.com/wuxw7/MicroCommunity

wuxw 6 年之前
父節點
當前提交
b7d9db9383

+ 0 - 72
Api/src/main/java/com/java110/api/listener/CheckUserHasPrivilegeListener.java

@@ -1,72 +0,0 @@
-package com.java110.api.listener;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.utils.constant.ServiceCodeConstant;
-import com.java110.utils.util.Assert;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-import com.java110.entity.center.AppService;
-import com.java110.event.service.api.ServiceDataFlowEvent;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.http.HttpMethod;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-
-/**
- * 检查用户是否有权限
- */
-@Java110Listener("checkUserHasPrivilegeListener")
-public class CheckUserHasPrivilegeListener extends AbstractServiceApiDataFlowListener{
-
-    private final static Logger logger = LoggerFactory.getLogger(CheckUserHasPrivilegeListener.class);
-
-    @Override
-    public String getServiceCode() {
-        return ServiceCodeConstant.SERVICE_CODE_CHECK_USER_HAS_PRIVILEGE;
-    }
-
-    @Override
-    public HttpMethod getHttpMethod() {
-        return HttpMethod.GET;
-    }
-
-    @Override
-    public void soService(ServiceDataFlowEvent event) {
-        DataFlowContext dataFlowContext = event.getDataFlowContext();
-        AppService service = event.getAppService();
-        JSONObject data = dataFlowContext.getReqJson();
-        logger.debug("请求信息:{}",JSONObject.toJSONString(dataFlowContext));
-        Assert.hasKeyAndValue(data,"userId","请求报文中未包含userId节点");
-        Assert.hasKeyAndValue(data,"pId","请求报文中未包含pId节点");
-        ResponseEntity<String> responseEntity = null;
-
-        //根据名称查询用户信息
-        responseEntity = super.callService(event);
-
-        if(responseEntity.getStatusCode() != HttpStatus.OK){
-            dataFlowContext.setResponseEntity(responseEntity);
-            return ;
-        }
-
-        JSONObject resultInfo = JSONObject.parseObject(responseEntity.getBody().toString());
-
-        JSONArray _privileges = resultInfo.getJSONArray("privileges");
-
-        if(_privileges.size() == 0 ){
-            responseEntity = new ResponseEntity<String>("没有权限操作",HttpStatus.UNAUTHORIZED);
-        }else{
-
-            responseEntity = new ResponseEntity<String>("成功",HttpStatus.OK);
-
-        }
-
-        dataFlowContext.setResponseEntity(responseEntity);
-    }
-
-    @Override
-    public int getOrder() {
-        return 0;
-    }
-}

+ 3 - 1
CommunityService/src/main/java/com/java110/community/smo/impl/AppInnerServiceSMOImpl.java

@@ -11,6 +11,8 @@ import com.java110.dto.UserDto;
 import com.java110.dto.app.AppDto;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
 
 import java.util.ArrayList;
@@ -32,7 +34,7 @@ public class AppInnerServiceSMOImpl extends BaseServiceSMO implements IAppInnerS
 
     @Autowired
     private IUserInnerServiceSMO userInnerServiceSMOImpl;
-
+    
     @Override
     public List<AppDto> queryApps(@RequestBody  AppDto appDto) {
 

+ 1 - 1
WebService/src/main/resources/components/advertPackage/add-advert/addAdvert.js

@@ -211,7 +211,7 @@
 
                     return;
                 }
-                if (vc.component.addAdvertInfo.viewType == '99') {
+                if (vc.component.addAdvertInfo.viewType == '8888') {
                     vc.component.addAdvertInfo.vedioName = '';
                 } else {
                     vc.component.addAdvertInfo.photos = [];

+ 1 - 1
WebService/src/main/resources/components/advertPackage/edit-advert/editAdvert.js

@@ -258,7 +258,7 @@
                     return;
                 }
 
-                if (vc.component.editAdvertInfo.viewType == '99') {
+                if (vc.component.editAdvertInfo.viewType == '8888') {
                     vc.component.editAdvertInfo.vedioName = '';
                 } else {
                     vc.component.editAdvertInfo.photos = [];

+ 1 - 1
WebService/src/main/resources/components/applicationKeyPackage/add-applicationKeyView/addApplicationKey.html

@@ -10,7 +10,7 @@
             <div class="ibox-content">
                 <div class="row">
                     <div class="col-sm-5" style="text-align:center">
-                        <video id="photo" style="width: 100%;height: 100%;"></video>
+                        <video id="photo" style="width: 100%;"></video>
                         <canvas id="canvas" style="display:none;"></canvas>
                         <div style="margin-top:20px">
                             <button class="btn btn-primary" type="button" v-on:click="_takePhoto()"><span

+ 1 - 1
WebService/src/main/resources/components/applicationKeyPackage/edit-applicationKey/editApplicationKey.html

@@ -11,7 +11,7 @@
 
                 <div class="row">
                     <div class="col-sm-5" style="text-align:center">
-                        <video id="photo" style="width: 100%;height: 100%;"></video>
+                        <video id="photo" style="width: 100%;"></video>
                         <canvas id="canvas" style="display:none;"></canvas>
                         <div style="margin-top:20px">
                             <button class="btn btn-primary" type="button" v-on:click="_takeEditPhoto()"><span

+ 2 - 2
WebService/src/main/resources/components/ownerPackage/list-owner/listOwner.html

@@ -169,7 +169,7 @@
                                             <a href="#"
                                                v-on:click="_openDeleteOwnerRoom(owner)">删除房屋</a>
                                         </p>
-                                        <!-- <p style="margin:10px 0;">
+                                         <p style="margin:10px 0;">
                                              <a href="#"
                                                 v-on:click="_openHireParkingSpace(owner)">车位出租</a>
                                              <span>|</span>
@@ -188,7 +188,7 @@
                                                 v-on:click="_openOwnerRepair(owner)">业主报修</a>
                                              <span>|</span>
 
-                                         </p>-->
+                                         </p>
                                     </div>
                                 </div>
 

+ 1 - 1
WebService/src/main/resources/views/index.html

@@ -5,7 +5,7 @@
       xmlns:vc="http://www.thymeleaf.org">
 <head>
     <meta charset="UTF-8"/>
-    <title>HC小区管理系统|java110</title>
+    <title>小区管理系统|java110</title>
     <vc:create name="commonTop"></vc:create>
     <script src="/js/plugins/echart/echarts.min.js"></script>
     <script src="/js/plugins/echart/china.js"></script>

+ 1 - 0
docs/document/_sidebar.md

@@ -58,6 +58,7 @@
   * [钥匙申请](api/machine/applicationKey.md)
   * [投诉建议](api/complaint/saveComplaint.md)
   * [报修](api/repair/saveRepair.md)
+  * [查看报修](api/repair/queryRepair.md)
 
 * 服务端接口协议
 

+ 87 - 0
docs/document/api/repair/queryRepair.md

@@ -0,0 +1,87 @@
+
+
+**1\. 查询房屋**
+###### 接口功能
+> 用户APP小程序上查询报修
+
+###### URL
+> [http://api.java110.com:8008/api/ownerRepair.listOwnerRepairs](http://api.java110.com:8008/api/ownerRepair.listOwnerRepairs)
+
+###### 支持格式
+> JSON
+
+###### HTTP请求方式
+> GET
+
+###### 请求参数(header部分)
+|参数名称|约束|类型|长度|描述|取值说明|
+| :-: | :-: | :-: | :-: | :-: | :-:|
+|app_id|1|String|30|应用ID|Api服务分配                      |
+|transaction_id|1|String|30|请求流水号|不能重复 1000000000+YYYYMMDDhhmmss+6位序列 |
+|sign|1|String|-|签名|请参考签名说明|
+|req_time|1|String|-|请求时间|YYYYMMDDhhmmss|
+
+###### 请求参数
+|参数名称|约束|类型|长度|描述|取值说明|
+| :-: | :-: | :-: | :-: | :-: | :-: |
+|roomId|1|String|30|房屋ID|-|
+|communityId|1|String|30|小区ID|-|
+|page|1|int|-|分页页数|-|
+|row|1|int|-|每页展示数量|-|
+
+###### 返回协议
+
+当http返回状态不为200 时请求处理失败 body内容为失败的原因
+
+当http返回状态为200时请求处理成功,body内容为返回内容,
+
+成功
+
+
+###### 举例
+> 地址:[http://api.java110.com:8008/api/ownerRepair.listOwnerRepairs?communityId=7020181217000001&roomId=752019100758260005&page=1&row=10](http://api.java110.com:8008/api/ownerRepair.listOwnerRepairs?communityId=7020181217000001&roomId=752019100758260005&page=1&row=10)
+
+``` javascript
+请求头信息:
+Content-Type:application/json
+USER_ID:1234
+APP_ID:8000418002
+TRANSACTION_ID:10029082726
+REQ_TIME:20181113225612
+SIGN:aabdncdhdbd878sbdudn898
+
+请求报文:
+
+无
+
+返回报文:
+{
+	"ownerRepairs": [{
+		"appointmentTime": "2019-12-14 18:30:30",
+		"context": "服务太差",
+		"repairId": "822019121623590070",
+		"repairName": "吴学文",
+		"repairType": "10001",
+		"repairTypeName": "卧室报修",
+		"roomId": "752019100758260005",
+		"state": "1000",
+		"stateName": "未派单",
+		"tel": "17797173942"
+	}, {
+		"appointmentTime": "2019-12-14 18:30:30",
+		"context": "服务太差",
+		"repairId": "822019121683520071",
+		"repairName": "吴学文",
+		"repairType": "10001",
+		"repairTypeName": "卧室报修",
+		"roomId": "752019100758260005",
+		"state": "1000",
+		"stateName": "未派单",
+		"tel": "17797173942"
+	}],
+	"page": 0,
+	"records": 1,
+	"rows": 0,
+	"total": 2
+}
+```

+ 2 - 0
docs/document/api/repair/saveRepair.md

@@ -30,6 +30,7 @@
 |roomId|1|String|30|房屋ID|-|
 |appointmentTime|1|String|-|预约时间| 格式为 YYYY-MM-DD hh24:mi:ss|
 |context|1|String|200|报修内容|-|
+|communityId|1|String|30|小区ID|-|
 |photos|1|Array|-|相关照片,base64格式|-|
 
 ###### 返回协议
@@ -60,6 +61,7 @@ SIGN:aabdncdhdbd878sbdudn898
     "repairName":"吴学文",
     "tel":"17797173942",
     "context":"服务太差",
+    "communityId":"702019120393220007",
     "appointmentTime":"2019-12-14 18:30:30",
     "photos":['base64....'],
 }