消息订阅发送任务修改绑定类型查询

This commit is contained in:
liyj 2025-09-23 18:31:37 +08:00
parent b94da3f38a
commit f524928b5a
5 changed files with 14 additions and 17 deletions

View File

@ -478,17 +478,15 @@ public class AccountController {
}
@RequestMapping(value = "/getAllBindPage", method = RequestMethod.GET)
public List<AccountUserBindConnect> getAllBindPage(@RequestParam(name = "bind_type") Integer bind_type,
@RequestParam(name = "bindTmpl") String bindTmpl,
public List<AccountUserBindConnect> getAllBindPage(@RequestParam(name = "bindTmpl") String bindTmpl,
@RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
return accountUserBindConnectService.getAllBindPage(bind_type,bindTmpl,pageNum,pageSize);
return accountUserBindConnectService.getAllBindPage(bindTmpl,pageNum,pageSize);
}
@RequestMapping(value = "/getAllBindCount", method = RequestMethod.GET)
public long getAllBindCount(@RequestParam(name = "bind_type") Integer bind_type,
@RequestParam(name = "bindTmpl") String bindTmpl) {
return accountUserBindConnectService.getAllBindCount(bind_type,bindTmpl);
public long getAllBindCount(@RequestParam(name = "bindTmpl") String bindTmpl) {
return accountUserBindConnectService.getAllBindCount(bindTmpl);
}
}

View File

@ -89,9 +89,9 @@ public interface AccountUserBindConnectService extends IBaseService<AccountUserB
*/
AccountUserBindConnect initAccountUserBindConnect(String bindId, Integer bindType, Integer userId, Integer userType);
List<AccountUserBindConnect> getAllBindPage(Integer bind_type,String bindTmpl,Integer pageNum, Integer pageSize);
List<AccountUserBindConnect> getAllBindPage(String bindTmpl,Integer pageNum, Integer pageSize);
long getAllBindCount(Integer bind_type,String bindTmpl);
long getAllBindCount(String bindTmpl);
void bindTmplId(JSONObject jsonObject);
}

View File

@ -504,10 +504,10 @@ public class AccountUserBindConnectServiceImpl extends BaseServiceImpl<AccountUs
}
@Override
public List<AccountUserBindConnect> getAllBindPage(Integer bind_type,String bindTmpl,Integer pageNum, Integer pageSize) {
public List<AccountUserBindConnect> getAllBindPage(String bindTmpl,Integer pageNum, Integer pageSize) {
QueryWrapper<AccountUserBindConnect> queryWrapper = new QueryWrapper<>();
queryWrapper.select("bind_id,bind_type,user_id,user_type");
queryWrapper.eq("bind_type", bind_type)
queryWrapper.in("bind_type", Arrays.asList(BindCode.MOBILE,BindCode.WEIXIN_XCX))
.eq("user_type", CommonConstant.USER_TYPE_NORMAL)
.eq("bind_active", CommonConstant.Enable)
.eq("bind_tmpl",bindTmpl)
@ -516,9 +516,9 @@ public class AccountUserBindConnectServiceImpl extends BaseServiceImpl<AccountUs
}
@Override
public long getAllBindCount(Integer bind_type,String bindTmpl) {
public long getAllBindCount(String bindTmpl) {
QueryWrapper<AccountUserBindConnect> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("bind_type", bind_type)
queryWrapper.eq("bind_type", Arrays.asList(BindCode.MOBILE,BindCode.WEIXIN_XCX))
.eq("user_type", CommonConstant.USER_TYPE_NORMAL)
.eq("bind_active", CommonConstant.Enable)
.eq("bind_tmpl",bindTmpl)

View File

@ -297,11 +297,10 @@ public interface AccountService {
@GetMapping(value = "/admin/account/accountController/getAllBindPage")
List<AccountUserBindConnect> getAllBindPage(@RequestParam(name = "bind_type") Integer bind_type,
@RequestParam(name = "bindTmpl") String bindTmpl,
List<AccountUserBindConnect> getAllBindPage(@RequestParam(name = "bindTmpl") String bindTmpl,
@RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize);
@GetMapping(value = "/admin/account/accountController/getAllBindCount")
long getAllBindCount(@RequestParam(name = "bind_type") Integer bind_type,@RequestParam(name = "bindTmpl") String bindTmpl);
long getAllBindCount(@RequestParam(name = "bindTmpl") String bindTmpl);
}

View File

@ -735,7 +735,7 @@ public class ShopMessageTemplateServiceImpl extends BaseServiceImpl<ShopMessageT
@Override
public void sendToXcxAllUserMessage() {
long allBindCount = accountService.getAllBindCount(BindCode.MOBILE,CommonConstant.BIND_SUB_TMPL_SKILL);
long allBindCount = accountService.getAllBindCount(CommonConstant.BIND_SUB_TMPL_SKILL);
if(allBindCount==0){
return;
}
@ -757,7 +757,7 @@ public class ShopMessageTemplateServiceImpl extends BaseServiceImpl<ShopMessageT
ExecutorService executor = Executors.newFixedThreadPool(6);
List<Future<?>> futures = new ArrayList<>();
for (int i=1;i<=pages;i++){
List<AccountUserBindConnect> finalList=accountService.getAllBindPage(BindCode.MOBILE,CommonConstant.BIND_SUB_TMPL_SKILL,i,BATCH_SIZE);
List<AccountUserBindConnect> finalList=accountService.getAllBindPage(CommonConstant.BIND_SUB_TMPL_SKILL,i,BATCH_SIZE);
int finalI = i;
futures.add(executor.submit(() -> {
finalList.forEach(accountUserBindConnect -> {