|
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
7
|
7
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
8
|
8
|
import com.community.commom.constant.Constant;
|
9
|
9
|
import com.community.commom.mode.ResponseBean;
|
|
10
|
+import com.community.commom.session.UserElement;
|
10
|
11
|
import com.community.commom.utils.AccountValidatorUtil;
|
11
|
12
|
import com.community.commom.utils.BeanTools;
|
12
|
13
|
|
|
@@ -212,10 +213,11 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
|
212
|
213
|
* 上传excel里面的内容
|
213
|
214
|
*
|
214
|
215
|
* @param file
|
|
216
|
+ * @param userElement
|
215
|
217
|
* @return
|
216
|
218
|
*/
|
217
|
219
|
@Override
|
218
|
|
- public ResponseBean submitExcelData(MultipartFile file) {
|
|
220
|
+ public ResponseBean submitExcelData(MultipartFile file, UserElement userElement) {
|
219
|
221
|
ResponseBean responseBean = new ResponseBean();
|
220
|
222
|
responseBean = getExcelData(file);
|
221
|
223
|
if (!responseBean.getCode().equals(Constant.RESPONSE_SUCCESS)){
|
|
@@ -225,11 +227,11 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
|
225
|
227
|
Map<String,Object> map = (Map<String, Object>) responseBean.getData();
|
226
|
228
|
List<TpBuildingOwnerInfo> list = (List<TpBuildingOwnerInfo>) map.get("list");
|
227
|
229
|
list.stream().forEach(BuildingOwnerInfo -> {
|
228
|
|
- BuildingOwnerInfo.setCommunityId(3);
|
|
230
|
+ BuildingOwnerInfo.setCommunityId(userElement.getCommunityId());
|
229
|
231
|
BuildingOwnerInfo.setVerifyStatus(Constant.UN_VERIFY_STATUS);
|
230
|
|
- BuildingOwnerInfo.setCreateUser(1);
|
|
232
|
+ BuildingOwnerInfo.setCreateUser(userElement.getId());
|
231
|
233
|
BuildingOwnerInfo.setCreateDate(LocalDateTime.now());
|
232
|
|
- BuildingOwnerInfo.setUpdateUser(1);
|
|
234
|
+ BuildingOwnerInfo.setUpdateUser(userElement.getId());
|
233
|
235
|
BuildingOwnerInfo.setUpdateDate(LocalDateTime.now());
|
234
|
236
|
});
|
235
|
237
|
//批量插入
|