|
@@ -31,6 +31,8 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import java.util.*;
|
|
|
+import java.util.concurrent.CompletableFuture;
|
|
|
+import java.util.concurrent.ThreadPoolExecutor;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
@@ -61,6 +63,9 @@ public class AlbumYelpApproveServiceImpl extends SuperServiceImpl<AlbumYelpAppro
|
|
|
@Autowired
|
|
|
private MessageService messageService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ThreadPoolExecutor threadPoolExecutor;
|
|
|
+
|
|
|
@Override
|
|
|
public BaseDao<AlbumYelpApprove> getRepository() {
|
|
|
return albumYelpApproveMapper;
|
|
@@ -283,18 +288,18 @@ public class AlbumYelpApproveServiceImpl extends SuperServiceImpl<AlbumYelpAppro
|
|
|
* @param createBy,remark,flag
|
|
|
*/
|
|
|
private void sendMessage(String createBy, String albumName, String yelpContent, String remark) {
|
|
|
- List<OsUserDto> osUserDtoList = new ArrayList<>();
|
|
|
- //查询用户信息
|
|
|
- OsUserDto osUserDto = userService.queryOsUserDto(createBy);
|
|
|
- osUserDtoList.add(osUserDto);
|
|
|
- // 点评不通过
|
|
|
- messageService.sendInnerMsg("您提交的申请已被驳回!",
|
|
|
- "提交内容:" + albumName + ":" + yelpContent + "<br>" +
|
|
|
- "驳回原因:" + remark + "<br>" +
|
|
|
- "审核人:" + ContextUtil.getCurrentUser().getFullName() + "<br>" +
|
|
|
- "审批时间:" + DateUtil.format(new Date(), DatePattern.NORM_DATETIME_PATTERN), osUserDtoList);
|
|
|
-
|
|
|
-
|
|
|
+ CompletableFuture.runAsync(() -> {
|
|
|
+ List<OsUserDto> osUserDtoList = new ArrayList<>();
|
|
|
+ //查询用户信息
|
|
|
+ OsUserDto osUserDto = userService.queryOsUserDto(createBy);
|
|
|
+ osUserDtoList.add(osUserDto);
|
|
|
+ // 点评不通过
|
|
|
+ messageService.sendInnerMsg("您提交的申请已被驳回!",
|
|
|
+ "提交内容:" + albumName + ":" + yelpContent + "<br>" +
|
|
|
+ "驳回原因:" + remark + "<br>" +
|
|
|
+ "审核人:" + ContextUtil.getCurrentUser().getFullName() + "<br>" +
|
|
|
+ "审批时间:" + DateUtil.format(new Date(), DatePattern.NORM_DATETIME_PATTERN), osUserDtoList);
|
|
|
+ },threadPoolExecutor);
|
|
|
}
|
|
|
|
|
|
/**
|