Browse Source

修复bug

傅行帆 6 years ago
parent
commit
55916c5809

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

72
 		//获取菜单数据
72
 		//获取菜单数据
73
 		List<TaSysMenu> menuList = menuService.getMenuList(communityId);
73
 		List<TaSysMenu> menuList = menuService.getMenuList(communityId);
74
 		//获取首页banner数据
74
 		//获取首页banner数据
75
-		List<ToBanner> toBannerList = bannerService.viewAllBannerImg(1);
75
+		List<ToBanner> toBannerList = bannerService.viewAllBannerImgAndCommunityId(1,communityId);
76
 		//获取消息总数接口
76
 		//获取消息总数接口
77
 		Map<String,Object> totalMap = messageService.getMessageTotal(communityId, userElement.getUserVerifyId());
77
 		Map<String,Object> totalMap = messageService.getMessageTotal(communityId, userElement.getUserVerifyId());
78
 		//获取当前小区的酒店信息
78
 		//获取当前小区的酒店信息

+ 14
- 3
CODE/smart-community/operate-api/src/main/java/com/community/huiju/model/ToBanner.java View File

2
 
2
 
3
 import javax.validation.constraints.*;
3
 import javax.validation.constraints.*;
4
 import java.util.Date;
4
 import java.util.Date;
5
+import java.util.List;
5
 
6
 
6
 public class ToBanner {
7
 public class ToBanner {
7
     private Integer id;
8
     private Integer id;
8
 
9
 
9
     @NotBlank(message = "标题不能为空!")
10
     @NotBlank(message = "标题不能为空!")
10
     private String title;
11
     private String title;
11
-
12
-    @Min(value = 0,message = "请选择有效的投放社区!")
13
-    @NotNull(message = "投放社区不能为空!")
12
+    
14
     private Integer communityId;
13
     private Integer communityId;
15
 
14
 
16
     // @NotBlank(message = "跳转描述不能为空!")
15
     // @NotBlank(message = "跳转描述不能为空!")
48
     private Date updateDate;
47
     private Date updateDate;
49
 
48
 
50
     private String bannerContent;
49
     private String bannerContent;
50
+    
51
+    //@Min(value = 0,message = "请选择有效的投放社区!")
52
+    @NotNull(message = "投放社区不能为空!")
53
+    private List<Integer> communityIds;
51
 
54
 
52
     public Integer getId() {
55
     public Integer getId() {
53
         return id;
56
         return id;
184
     public void setBannerContent(String bannerContent) {
187
     public void setBannerContent(String bannerContent) {
185
         this.bannerContent = bannerContent == null ? null : bannerContent.trim();
188
         this.bannerContent = bannerContent == null ? null : bannerContent.trim();
186
     }
189
     }
190
+    
191
+    public List<Integer> getCommunityIds() {
192
+        return communityIds;
193
+    }
194
+    
195
+    public void setCommunityIds(List<Integer> communityIds) {
196
+        this.communityIds = communityIds;
197
+    }
187
 }
198
 }

+ 10
- 4
CODE/smart-community/operate-api/src/main/java/com/community/huiju/service/impl/ToBannerServiceImpl.java View File

107
         banner.setUpdateDate(new Date());
107
         banner.setUpdateDate(new Date());
108
         banner.setUpdateUser(toUser.getId());
108
         banner.setUpdateUser(toUser.getId());
109
 
109
 
110
-        int result = toBannerMapper.insertSelective(banner);
111
-        if (result > 0) {
112
-            response.addSuccess("添加成功!");
110
+        try {
111
+            for (Integer communityId : banner.getCommunityIds()){
112
+                banner.setCommunityId(communityId);
113
+                toBannerMapper.insertSelective(banner);
114
+            }
115
+        }catch (Exception e){
116
+            response.addError("添加失败:" + e.getMessage());
117
+            return response;
113
         }
118
         }
114
-
119
+    
120
+        response.addSuccess("添加成功!");
115
         return response;
121
         return response;
116
     }
122
     }
117
 
123
 

+ 32
- 24
VUECODE/smart-operate-manage/src/views/banner/addBanner/index.vue View File

43
         </el-select>
43
         </el-select>
44
       </el-form-item>
44
       </el-form-item>
45
       <el-form-item :label-width="formLabelWidth" label="投放社区 *">
45
       <el-form-item :label-width="formLabelWidth" label="投放社区 *">
46
-        <el-select v-model="addForm.communityId" placeholder="请选择社区">
46
+        <el-select v-model="addForm.communityIds"
47
+            multiple
48
+            filterable
49
+            allow-create
50
+            default-first-option 
51
+            placeholder="请选择社区">
47
           <!-- <el-option label="请选择社区" value="-1"/> -->
52
           <!-- <el-option label="请选择社区" value="-1"/> -->
48
           <el-option v-for="item in communityList" :key="item.id" :value="item.id" :label="item.communityName"/>
53
           <el-option v-for="item in communityList" :key="item.id" :value="item.id" :label="item.communityName"/>
49
           <!-- <el-option label="区域一" value="shanghai"/> -->
54
           <!-- <el-option label="区域一" value="shanghai"/> -->
141
         bannerCover: '',
146
         bannerCover: '',
142
         bannerPosition: '',
147
         bannerPosition: '',
143
         communityId: '',
148
         communityId: '',
149
+        communityIds: [],
144
         effTime: '',
150
         effTime: '',
145
         expTime: '',
151
         expTime: '',
146
         bannerType: '1',
152
         bannerType: '1',
252
 }
258
 }
253
 </script>
259
 </script>
254
 
260
 
261
+<style>
262
+.avatar-uploader .el-upload {
263
+    border: 1px dashed #d9d9d9;
264
+    border-radius: 6px;
265
+    cursor: pointer;
266
+    position: relative;
267
+    overflow: hidden;
268
+  }
269
+  .avatar-uploader .el-upload:hover {
270
+    border-color: #409EFF;
271
+  }
272
+  .avatar-uploader-icon {
273
+    font-size: 28px;
274
+    color: #8c939d;
275
+    width: 178px;
276
+    height: 178px;
277
+    line-height: 178px;
278
+    text-align: center;
279
+  }
280
+  .avatar {
281
+    width: 178px;
282
+    height: 178px;
283
+    display: block;
284
+  }
285
+</style>
255
 <style scoped>
286
 <style scoped>
256
 .app-container {
287
 .app-container {
257
   width: 50%;
288
   width: 50%;
260
 .dialog-footer {
291
 .dialog-footer {
261
   text-align: center;
292
   text-align: center;
262
 }
293
 }
263
-.avatar-uploader .el-upload {
264
-  border: 1px dashed #d9d9d9;
265
-  border-radius: 6px;
266
-  cursor: pointer;
267
-  position: relative;
268
-  overflow: hidden;
269
-}
270
-.avatar-uploader .el-upload:hover {
271
-  border-color: #409EFF;
272
-}
273
-.avatar-uploader-icon {
274
-  font-size: 28px;
275
-  color: #8c939d;
276
-  width: 178px;
277
-  height: 178px;
278
-  line-height: 178px;
279
-  text-align: center;
280
-}
281
-.avatar {
282
-  width: 178px;
283
-  height: 178px;
284
-  display: block;
285
-}
286
 </style>
294
 </style>
287
 
295
 

+ 1
- 1
VUECODE/smart-property-manage/src/components/chart/chart5.vue View File

97
       chart.guide().html({
97
       chart.guide().html({
98
         position: ["5%", "-35%"],
98
         position: ["5%", "-35%"],
99
         html:
99
         html:
100
-          '<div class="chart5-title"><p class="title">月租车总缴费统计</p></div>'
100
+          '<div class="chart5-title"><p class="title">线上月租车总缴费统计</p></div>'
101
       });
101
       });
102
         chart.guide().html({
102
         chart.guide().html({
103
         position: ["1%", "-22%"],
103
         position: ["1%", "-22%"],

+ 1
- 1
VUECODE/smart-property-manage/src/components/chart/chart6.vue View File

135
       chart.guide().html({
135
       chart.guide().html({
136
         position: ["5%", "-35%"],
136
         position: ["5%", "-35%"],
137
         html:
137
         html:
138
-          '<div class="chart4-title"><p class="title">临时车总缴费统计</p></div>'
138
+          '<div class="chart4-title"><p class="title">线上临时车总缴费统计</p></div>'
139
       });
139
       });
140
         chart.guide().html({
140
         chart.guide().html({
141
         position: ["1%", "-22%"],
141
         position: ["1%", "-22%"],

+ 6
- 6
VUECODE/smart-property-manage/src/views/index/index.vue View File

7
     </div>
7
     </div>
8
     <div class="middle">
8
     <div class="middle">
9
       <line-chart id="chat4" :data="data4" title="收费组总缴费统计" axis-x="日期" axis-y="金额(元)" />
9
       <line-chart id="chat4" :data="data4" title="收费组总缴费统计" axis-x="日期" axis-y="金额(元)" />
10
-      <line-chart id="chat5" :data="data5" title="月租车总缴费统计" axis-x="日期" axis-y="金额(元)" />
11
-      <line-chart id="chat6" :data="data6" title="临时车总缴费统计" axis-x="日期" axis-y="金额(元)" />
10
+      <line-chart id="chat5" :data="data5" title="线上月租车总缴费统计" axis-x="日期" axis-y="金额(元)" />
11
+      <line-chart id="chat6" :data="data6" title="线上临时车总缴费统计" axis-x="日期" axis-y="金额(元)" />
12
     </div>
12
     </div>
13
     <div class="right">
13
     <div class="right">
14
       <bar-chart id="chat7" :data="data7" title="注册用户总数" axis-x="" axis-y="数量(个)" />
14
       <bar-chart id="chat7" :data="data7" title="注册用户总数" axis-x="" axis-y="数量(个)" />
121
           item: dayjs(createDate).format('M.D'),
121
           item: dayjs(createDate).format('M.D'),
122
           value: priceTotal,
122
           value: priceTotal,
123
         })
123
         })
124
-      })
124
+      }).reverse()
125
     },
125
     },
126
     data5 () {
126
     data5 () {
127
       let billList = (this.IndexInfo || {}).taUserLicenseCountList || []
127
       let billList = (this.IndexInfo || {}).taUserLicenseCountList || []
131
           item: dayjs(createDate).format('M.D'),
131
           item: dayjs(createDate).format('M.D'),
132
           value: priceTotal,
132
           value: priceTotal,
133
         })
133
         })
134
-      })
134
+      }).reverse()
135
     },
135
     },
136
     data6 () {
136
     data6 () {
137
       let billList = (this.IndexInfo || {}).taTemporaryLicenseCountList || []
137
       let billList = (this.IndexInfo || {}).taTemporaryLicenseCountList || []
141
           item: dayjs(createDate).format('M.D'),
141
           item: dayjs(createDate).format('M.D'),
142
           value: priceTotal,
142
           value: priceTotal,
143
         })
143
         })
144
-      })
144
+      }).reverse()
145
     },
145
     },
146
     data7 () {
146
     data7 () {
147
       let { houseOwnerCount = 0, houseRelationCount = 0, houseTenantCount = 0 } = (this.IndexInfo || {}).registerUserMap || {}
147
       let { houseOwnerCount = 0, houseRelationCount = 0, houseTenantCount = 0 } = (this.IndexInfo || {}).registerUserMap || {}
169
           item: dayjs(createDate).format('M.D'),
169
           item: dayjs(createDate).format('M.D'),
170
           value: briskCount,
170
           value: briskCount,
171
         })
171
         })
172
-      })
172
+      }).reverse()
173
     },
173
     },
174
     data9 () {
174
     data9 () {
175
       let { activityCount = 0, announcementCount = 0, topicCount = 0 } = (this.IndexInfo || {}).publishContentMap || {}
175
       let { activityCount = 0, announcementCount = 0, topicCount = 0 } = (this.IndexInfo || {}).publishContentMap || {}