人脸转换
This commit is contained in:
@ -0,0 +1,10 @@
|
||||
package org.dromara.transferData.domain;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class UserFace {
|
||||
private Long id;
|
||||
private String pacePhoto;
|
||||
}
|
||||
@ -77,13 +77,13 @@ public interface TransferDataMapper {
|
||||
"</script>")
|
||||
List<UserFile> getUserFileList(List<Long> goIds);
|
||||
|
||||
|
||||
@DS("slave1")
|
||||
@Select("<script>" +
|
||||
"SELECT id,pace_photo FROM sub_construction_user " +
|
||||
"SELECT id,pace_photo FROM bus_construction_user " +
|
||||
"WHERE id IN " +
|
||||
"<foreach collection='goIds' item='userId' open='(' separator=',' close=')'>" +
|
||||
"#{userId}" +
|
||||
"</foreach>" +
|
||||
"</script>")
|
||||
Map<Long, String> getUserFace(List<Long> goIds);
|
||||
List<UserFace> getUserFace(List<Long> goIds);
|
||||
}
|
||||
|
||||
@ -26,10 +26,7 @@ import org.dromara.system.domain.vo.SysOssVo;
|
||||
import org.dromara.system.domain.vo.SysUserVo;
|
||||
import org.dromara.system.service.ISysOssService;
|
||||
import org.dromara.system.service.ISysUserService;
|
||||
import org.dromara.transferData.domain.ConstructionUserNew;
|
||||
import org.dromara.transferData.domain.OldFile;
|
||||
import org.dromara.transferData.domain.User;
|
||||
import org.dromara.transferData.domain.UserFile;
|
||||
import org.dromara.transferData.domain.*;
|
||||
import org.dromara.transferData.mapper.TransferDataMapper;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
@ -842,11 +839,13 @@ public class TransferDataService {
|
||||
}
|
||||
|
||||
// 获取人脸照片路径映射
|
||||
Map<Long, String> userFace = transferDataMapper.getUserFace(goIds);
|
||||
List<UserFace> userFace = transferDataMapper.getUserFace(goIds);
|
||||
Map<Long, String> facePicMap = userFace.stream()
|
||||
.collect(Collectors.toMap(UserFace::getId, UserFace::getPacePhoto));
|
||||
|
||||
List<SubConstructionUser> updateList = new ArrayList<>();
|
||||
for (SubConstructionUser user : usersWithoutFacePic) {
|
||||
String facePic = userFace.get(user.getGoId());
|
||||
String facePic = facePicMap.get(user.getGoId());
|
||||
if (facePic != null && !facePic.isEmpty()) {
|
||||
Long facePicId = handleSinglePhotoLimit(facePic);
|
||||
if (facePicId != null) {
|
||||
|
||||
Reference in New Issue
Block a user