|
@@ -1,9 +1,6 @@
|
|
|
package com.fs.his.controller;
|
|
|
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
-import java.util.Objects;
|
|
|
+import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
@@ -93,6 +90,9 @@ public class FsUserController extends BaseController
|
|
|
if (fsUser.getPhoneMk()!=null&&fsUser.getPhoneMk()!=""){
|
|
|
fsUser.setPhone(encryptPhone(fsUser.getPhoneMk()));
|
|
|
}
|
|
|
+ if(StringUtils.isNotEmpty(fsUser.getPhone())){
|
|
|
+ fsUser.setPhone(encryptPhone(fsUser.getPhone()));
|
|
|
+ }
|
|
|
List<FsUserVO> list = fsUserService.selectFsUserListVO(fsUser);
|
|
|
for (FsUserVO fsUserVO : list) {
|
|
|
if(fsUserVO.getPhone() != null&&fsUserVO.getPhone()!=""){
|
|
@@ -271,6 +271,29 @@ public class FsUserController extends BaseController
|
|
|
return ResponseResult.ok(r);
|
|
|
}
|
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('his:user:blacklist')")
|
|
|
+ @GetMapping("/blacklist")
|
|
|
+ @ApiOperation("黑名单")
|
|
|
+ public R blacklist(FsUserPageListParam param) {
|
|
|
+ PageInfo<FsUserPageListVO> fsUserPageListVOPageInfo = fsUserService.selectFsUserPageList(param);
|
|
|
+ for (FsUserPageListVO fsUserPageListVO : fsUserPageListVOPageInfo.getList()) {
|
|
|
+ fsUserPageListVO.setPhone(ParseUtils.parsePhone(fsUserPageListVO.getPhone()));
|
|
|
+ }
|
|
|
+ Map<String, Object> map = new HashMap<String, Object>();
|
|
|
+ map.put("rows", fsUserPageListVOPageInfo.getList());
|
|
|
+ map.put("total", fsUserPageListVOPageInfo.getTotal());
|
|
|
+ return R.ok(map);
|
|
|
+ }
|
|
|
+
|
|
|
+ @PreAuthorize("@ss.hasPermi('his:user:enabledBlackUsers')")
|
|
|
+ @PostMapping("/enabledBlackUsers")
|
|
|
+ @ApiOperation("批量启用会员")
|
|
|
+ public ResponseResult<Boolean> enabledBlackUsers(@RequestBody List<UserProjectDTO> ids) {
|
|
|
+ log.debug("批量启用会员 ids: {}", JSON.toJSONString(ids));
|
|
|
+ Boolean r = userCompanyUserService.batchUpdateUserProjectStatus(ids, 1);
|
|
|
+ return ResponseResult.ok(r);
|
|
|
+ }
|
|
|
+
|
|
|
@PreAuthorize("@ss.hasPermi('his:user:addPoints')")
|
|
|
@PostMapping("/addPoints")
|
|
|
@ApiOperation("添加积分")
|
|
@@ -284,26 +307,26 @@ public class FsUserController extends BaseController
|
|
|
return userIntegralLogsService.addIntegralTemplate(integralTemplateParam);
|
|
|
}
|
|
|
|
|
|
- @PutMapping("/encryptPhoneTemp")
|
|
|
- @ApiOperation("临时接口")
|
|
|
- public void encryptPhoneTemp(){
|
|
|
- FsUser fsUser = new FsUser();
|
|
|
- List<FsUser> list = fsUserService.selectFsUserList(fsUser);
|
|
|
- List<FsUser> fsUserList = list.stream().peek(v -> v.setPhone(encryptPhone(v.getPhone()))).collect(Collectors.toList());
|
|
|
-
|
|
|
- // 分批次处理,一次提交500条
|
|
|
- List<List<FsUser>> batches = Lists.partition(fsUserList, 500);
|
|
|
- batches.forEach(batch -> {
|
|
|
- SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH);
|
|
|
- try {
|
|
|
- FsUserMapper mapper = sqlSession.getMapper(FsUserMapper.class);
|
|
|
- batch.forEach(mapper::updateFsUser);
|
|
|
- sqlSession.commit();
|
|
|
- } finally {
|
|
|
- sqlSession.close();
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- }
|
|
|
+// @PutMapping("/encryptPhoneTemp")
|
|
|
+// @ApiOperation("临时接口")
|
|
|
+// public void encryptPhoneTemp(){
|
|
|
+// FsUser fsUser = new FsUser();
|
|
|
+// List<FsUser> list = fsUserService.selectFsUserList(fsUser);
|
|
|
+// List<FsUser> fsUserList = list.stream().peek(v -> v.setPhone(encryptPhone(v.getPhone()))).collect(Collectors.toList());
|
|
|
+//
|
|
|
+// // 分批次处理,一次提交500条
|
|
|
+// List<List<FsUser>> batches = Lists.partition(fsUserList, 500);
|
|
|
+// batches.forEach(batch -> {
|
|
|
+// SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH);
|
|
|
+// try {
|
|
|
+// FsUserMapper mapper = sqlSession.getMapper(FsUserMapper.class);
|
|
|
+// batch.forEach(mapper::updateFsUser);
|
|
|
+// sqlSession.commit();
|
|
|
+// } finally {
|
|
|
+// sqlSession.close();
|
|
|
+// }
|
|
|
+// });
|
|
|
+//
|
|
|
+// }
|
|
|
|
|
|
}
|