dingxin 6 lat temu
rodzic
commit
da31a71db6

+ 4
- 4
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/BuildingOwnerInfoServiceImpl.java Wyświetl plik

@@ -157,7 +157,7 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
157 157
         boolean phoneBool = false;
158 158
 
159 159
         // 校验楼栋信息表
160
-        TpBuildingOwnerInfo selectBuild = getBuildingInfo(tpBuildingOwnerInfo, tpBuildingOwnerInfo.getCommunityId());
160
+        TpBuildingOwnerInfo selectBuild = getBuildingInfo(tpBuildingOwnerInfo, oldTpBuildingOwnerInfo.getCommunityId());
161 161
         // 如果数据查询到了, 并且手机号和传上来的手机号是一样的是, 代表就是原数据, 直接返回操作成功
162 162
         if (null != selectBuild && selectBuild.getOwnerTel().equals(tpBuildingOwnerInfo.getOwnerTel())) {
163 163
             tpBuildingOwnerInfoMapper.updateById(tpBuildingOwnerInfo);
@@ -170,10 +170,10 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
170 170
             // 校验楼栋信息表里面的业主手机号
171 171
             QueryWrapper<TpBuildingOwnerInfo> queryWrapperPhone = new QueryWrapper<>();
172 172
             queryWrapperPhone.eq("owner_tel", tpBuildingOwnerInfo.getOwnerTel());
173
-            TpBuildingOwnerInfo selectBuildPhone = getBuildingInfo(tpBuildingOwnerInfo, tpBuildingOwnerInfo.getCommunityId());
173
+            TpBuildingOwnerInfo selectBuildPhone = tpBuildingOwnerInfoMapper.selectOne(queryWrapperPhone);
174 174
 
175
-            // 如果 通过手机号查询出来的楼栋信息数据的 id 和 传上来的 楼栋,单元,楼层,单元,户号 查询出来的数据的id 匹配, 那么就表示这个手机号已经绑定了其他的楼栋信息
176
-            if (selectBuildPhone.getId().intValue() != selectBuild.getId().intValue()){
175
+            // 如果 通过手机号查询出来的楼栋信息数据的 id 和 传上来的 楼栋,单元,楼层,单元,户号 查询出来的数据的id 匹配, 那么就表示这个手机号已经绑定了其他的楼栋信息
176
+            if (null != selectBuildPhone && selectBuildPhone.getId().intValue() != selectBuild.getId().intValue()){
177 177
                 responseBean.addError("该手机号已存在!");
178 178
                 return responseBean;
179 179
             }

+ 3
- 1
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpActivityServiceImpl.java Wyświetl plik

@@ -1,5 +1,6 @@
1 1
 package com.community.huiju.service.impl;
2 2
 
3
+import com.alibaba.fastjson.JSONArray;
3 4
 import com.alibaba.fastjson.JSONObject;
4 5
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
5 6
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -102,7 +103,8 @@ public class TpActivityServiceImpl extends ServiceImpl<TpActivityMapper, TpActiv
102 103
         ResponseBean responseBean = new ResponseBean();
103 104
         JSONObject jsonObject = JSONObject.parseObject(parameter);
104 105
         // 活动配图
105
-        String [] contentImgArray = (String[]) jsonObject.get("contentImg");
106
+        JSONArray jsonArray = jsonObject.getJSONArray("contentImg");
107
+        String [] contentImgArray = jsonArray.toArray(new String[]{});
106 108
         TpActivity tpActivity = jsonObject.toJavaObject(TpActivity.class);
107 109
         tpActivity.setCommunityId(userElement.getCommunityId());
108 110
         tpActivity.setUpdateDate(LocalDateTime.now());

+ 5
- 0
CODE/smart-community/zuul/src/main/resources/bootstrap.yml Wyświetl plik

@@ -40,6 +40,11 @@ hystrix:
40 40
           thread:
41 41
             timeoutInMilliseconds: 180000
42 42
 
43
+ribbon:
44
+  ReadTimeout: 38000
45
+  ConnectTimeout: 38000
46
+  eureka.enabled: true
47
+
43 48
 
44 49
 ## Mybatis
45 50
 mybatis:

+ 11
- 11
VUECODE/smart-property-manage/src/components/chart/chart3.vue Wyświetl plik

@@ -38,17 +38,17 @@ export default {
38 38
     })
39 39
   },
40 40
   created() {
41
-    this.GetHardData().then(() => {
42
-      console.log(this.hardData)
43
-      this.hardData.forEach(item => {
44
-        if (item.message === '小区开门次数') {
45
-          this.arr[0].num = item.count + '次'
46
-        } else if (item.message === '单元门开门次数') {
47
-          this.arr[1].num = item.count + '次'
48
-        }
49
-      })
50
-      this.arr = JSON.parse(JSON.stringify(this.arr))
51
-    })
41
+    // this.GetHardData().then(() => {
42
+    //   console.log(this.hardData)
43
+    //   this.hardData.forEach(item => {
44
+    //     if (item.message === '小区开门次数') {
45
+    //       this.arr[0].num = item.count + '次'
46
+    //     } else if (item.message === '单元门开门次数') {
47
+    //       this.arr[1].num = item.count + '次'
48
+    //     }
49
+    //   })
50
+    //   this.arr = JSON.parse(JSON.stringify(this.arr))
51
+    // })
52 52
   },
53 53
   methods: {
54 54
     ...mapActions('trunkIndex', [

+ 3
- 3
VUECODE/smart-property-manage/src/components/chart/chart5.vue Wyświetl plik

@@ -13,9 +13,9 @@ export default {
13 13
     })
14 14
   },
15 15
   mounted() {
16
-    this.GetSignUser().then(() => {
17
-      this.rander()
18
-    })
16
+    // this.GetSignUser().then(() => {
17
+    //   this.rander()
18
+    // })
19 19
   },
20 20
   methods: {
21 21
     ...mapActions('trunkIndex', [

+ 42
- 22
VUECODE/smart-property-manage/src/utils/request.js Wyświetl plik

@@ -31,30 +31,50 @@ service.interceptors.response.use(
31 31
     /**
32 32
      * code为非0是抛错
33 33
      */
34
-    const res = response.data
35
-    if (res.code !== '0') {
36
-      Message({
37
-        message: res.message,
38
-        type: 'error',
39
-        duration: 5 * 1000
40
-      })
34
+    // const res = response.data
35
+    // if (res.code !== '0') {
36
+    //   Message({
37
+    //     message: res.message,
38
+    //     type: 'error',
39
+    //     duration: 5 * 1000
40
+    //   })
41
+    //   // 802:Token 身份凭证不存在; 50012:其他客户端登录了;  803:Token 过期了;
42
+    //   if (res.code === '802' || res.code === '50012' || res.code === '803') {
43
+    //     MessageBox.confirm(
44
+    //       '你已被登出,可以取消继续留在该页面,或者重新登录',
45
+    //       '确定登出',
46
+    //       {
47
+    //         confirmButtonText: '重新登录',
48
+    //         cancelButtonText: '取消',
49
+    //         type: 'warning'
50
+    //       }
51
+    //     ).then(() => {
52
+    //       store.dispatch('FedLogOut').then(() => {
53
+    //         location.reload() // 为了重新实例化vue-router对象 避免bug
54
+    //       })
55
+    //     })
56
+    //   }
57
+    //   return Promise.reject('error')
58
+    // } else {
59
+    //   return response.data
60
+    // }
41 61
 
42
-      // 802:Token 身份凭证不存在; 50012:其他客户端登录了;  803:Token 过期了;
43
-      if (res.code === '802' || res.code === '50012' || res.code === '803') {
44
-        MessageBox.confirm(
45
-          '你已被登出,可以取消继续留在该页面,或者重新登录',
46
-          '确定登出',
47
-          {
48
-            confirmButtonText: '重新登录',
49
-            cancelButtonText: '取消',
50
-            type: 'warning'
51
-          }
52
-        ).then(() => {
53
-          store.dispatch('FedLogOut').then(() => {
54
-            location.reload() // 为了重新实例化vue-router对象 避免bug
55
-          })
62
+    const res = response.data
63
+    // 802:Token 身份凭证不存在; 50012:其他客户端登录了;  803:Token 过期了;
64
+    if (res.code === '802' || res.code === '50012' || res.code === '803') {
65
+      MessageBox.confirm(
66
+        '你已被登出,可以取消继续留在该页面,或者重新登录',
67
+        '确定登出',
68
+        {
69
+          confirmButtonText: '重新登录',
70
+          cancelButtonText: '取消',
71
+          type: 'warning'
72
+        }
73
+      ).then(() => {
74
+        store.dispatch('FedLogOut').then(() => {
75
+          location.reload() // 为了重新实例化vue-router对象 避免bug
56 76
         })
57
-      }
77
+      })
58 78
       return Promise.reject('error')
59 79
     } else {
60 80
       return response.data

+ 1
- 1
VUECODE/smart-property-manage/src/views/building/edi/index.vue Wyświetl plik

@@ -23,7 +23,7 @@
23 23
         <el-input v-model="ruleForm.ownerTel" :disabled="isOwnerTel"/>
24 24
       </el-form-item>
25 25
       <el-form-item>
26
-        <el-button type="primary" @click="submitForm('ruleForm')">立即创建</el-button>
26
+        <el-button type="primary" @click="submitForm('ruleForm')">修改</el-button>
27 27
         <el-button @click="backIndex">返回</el-button>
28 28
       </el-form-item>
29 29
     </el-form>

+ 24
- 12
VUECODE/smart-property-manage/src/views/social/activity/add/index.vue Wyświetl plik

@@ -33,19 +33,29 @@
33 33
           <img :src="dialogImageUrl" width="100%" alt="">
34 34
         </el-dialog>
35 35
       </el-form-item>
36
-      <el-form-item label="报名人数上限" prop="signUpMax">
37
-        <el-input v-model="ruleForm.signUpMax" placeholder="填写0则不限制报名人数"/>
36
+      <el-form-item prop="signUpMax">
37
+        <div style="display: flex;">
38
+          <span style="width: 140px;">报名人数上限</span>
39
+          <el-input v-model="ruleForm.signUpMax" placeholder="填写0则不限制报名人数"/>
40
+        </div>
38 41
       </el-form-item>
39
-      <el-form-item label="报名截止时间" prop="registrationEndTime">
40
-        <el-date-picker
41
-          v-model="ruleForm.registrationEndTime"
42
-          type="date"
43
-          placeholder="选择日期"/>
42
+      <el-form-item prop="registrationEndTime">
43
+        <div style="display: flex;">
44
+          <span style="width: 120px;">报名截止时间</span>
45
+          <el-date-picker
46
+            v-model="ruleForm.registrationEndTime"
47
+            value-format="timestamp"
48
+            type="date"
49
+            placeholder="选择日期"/>
50
+        </div>
44 51
       </el-form-item>
45
-      <el-form-item label="权重值" prop="sort">
46
-        <el-input-number v-model="ruleForm.sort" :min="1" :max="10" label="权重值" @change="sortHandleChange"/>
52
+      <el-form-item prop="sort">
53
+        <div style="display: flex; justify-content: flex-start;">
54
+          <span style="width: 120px;">权重值</span>
55
+          <el-input-number v-model="ruleForm.sort" :min="1" :max="10" label="权重值" @change="sortHandleChange"/>
56
+        </div>
47 57
       </el-form-item>
48
-      <el-form-item>
58
+      <el-form-item style="display: flex; justify-content: center;">
49 59
         <el-button @click="resetForm('ruleForm')">存为草稿</el-button>
50 60
         <el-button type="primary" @click="submitForm('ruleForm')">发布</el-button>
51 61
       </el-form-item>
@@ -69,6 +79,8 @@ export default {
69 79
         status: '' // 状态 0 是已作废 1 是已发布   2 是草稿 3 是已修改
70 80
       },
71 81
       imageUrl: '', // 轮播图预览
82
+      dialogVisible: false, // 活动配图, 默认不显示 (以单张为单位)
83
+      dialogImageUrl: '', // 活动配图, 图片链接 (以单张为单位)
72 84
       rules: {
73 85
         activityTitle: [
74 86
           { required: true, message: '请输入活动名称', trigger: 'blur' },
@@ -116,16 +128,16 @@ export default {
116 128
               return
117 129
             }
118 130
             this.$message.error(res.message)
119
-            loading.close()
120 131
           }).catch(() => {
121 132
             console.log('error AddActivity')
122 133
           })
123 134
         } else {
124 135
           console.log('error submit!!')
125
-          loading.close()
126 136
           return false
127 137
         }
128 138
       })
139
+      // 关闭加载框
140
+      loading.close()
129 141
     },
130 142
     resetForm(formName) {
131 143
       this.$refs[formName].resetFields()

+ 1
- 0
VUECODE/smart-property-manage/src/views/social/activity/edi/index.vue Wyświetl plik

@@ -39,6 +39,7 @@
39 39
       <el-form-item label="报名截止时间" prop="registrationEndTime">
40 40
         <el-date-picker
41 41
           v-model="ruleForm.registrationEndTime"
42
+          value-format="yyyy-MM-dd"
42 43
           type="date"
43 44
           placeholder="选择日期"/>
44 45
       </el-form-item>