🐛 Fixing a bug. #5197 全局异常信息 ex=Invalid return type for async method (only Future and void supported): class java.lang.Boolean

This commit is contained in:
lbw committed 2023-09-23 21:02:02 +08:00
1 parent a91508ac7b
commit cea1924c62
3 files changed
+4 -4

No files matched your search

@@ -91,7 +91,8 @@ public class WxAccountFansController {
@PostMapping("/sync/{appId}")
@PreAuthorize("@pms.hasPermission('mp_wxaccountfans_sync')")
public R sync(@PathVariable String appId) {
return R.ok(wxAccountFansService.syncAccountFans(appId));
wxAccountFansService.syncAccountFans(appId);
return R.ok();
}
/**
@@ -34,7 +34,7 @@ public interface WxAccountFansService extends IService<WxAccountFans> {
* @param appId
* @return
*/
Boolean syncAccountFans(String appId);
void syncAccountFans(String appId);
/**
* 分页查询粉丝
@@ -196,7 +196,7 @@ public class WxAccountFansServiceImpl extends ServiceImpl<WxAccountFansMapper, W
*/
@Async
@Override
public Boolean syncAccountFans(String appId) {
public void syncAccountFans(String appId) {
WxAccount wxAccount = wxAccountMapper
.selectOne(Wrappers.<WxAccount>query().lambda().eq(WxAccount::getAppid, appId));
@@ -209,7 +209,6 @@ public class WxAccountFansServiceImpl extends ServiceImpl<WxAccountFansMapper, W
(id) -> fetchUser(finalNextOpenId, wxAccount, wxMpUserService));
log.info("公众号 {} 粉丝同步完成", wxAccount.getName());
return Boolean.TRUE;
}
/**