消息订阅发送任务修改绑定类型查询
This commit is contained in:
parent
328e4b676e
commit
f6460ab75c
@ -478,17 +478,15 @@ public class AccountController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/getAllBindPage", method = RequestMethod.GET)
|
@RequestMapping(value = "/getAllBindPage", method = RequestMethod.GET)
|
||||||
public List<AccountUserBindConnect> getAllBindPage(@RequestParam(name = "bind_type") Integer bind_type,
|
public List<AccountUserBindConnect> getAllBindPage(@RequestParam(name = "bindTmpl") String bindTmpl,
|
||||||
@RequestParam(name = "bindTmpl") String bindTmpl,
|
|
||||||
@RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
|
@RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
|
||||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
@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)
|
@RequestMapping(value = "/getAllBindCount", method = RequestMethod.GET)
|
||||||
public long getAllBindCount(@RequestParam(name = "bind_type") Integer bind_type,
|
public long getAllBindCount(@RequestParam(name = "bindTmpl") String bindTmpl) {
|
||||||
@RequestParam(name = "bindTmpl") String bindTmpl) {
|
return accountUserBindConnectService.getAllBindCount(bindTmpl);
|
||||||
return accountUserBindConnectService.getAllBindCount(bind_type,bindTmpl);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -89,9 +89,9 @@ public interface AccountUserBindConnectService extends IBaseService<AccountUserB
|
|||||||
*/
|
*/
|
||||||
AccountUserBindConnect initAccountUserBindConnect(String bindId, Integer bindType, Integer userId, Integer userType);
|
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);
|
void bindTmplId(JSONObject jsonObject);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -504,10 +504,10 @@ public class AccountUserBindConnectServiceImpl extends BaseServiceImpl<AccountUs
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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<AccountUserBindConnect> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.select("bind_id,bind_type,user_id,user_type");
|
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("user_type", CommonConstant.USER_TYPE_NORMAL)
|
||||||
.eq("bind_active", CommonConstant.Enable)
|
.eq("bind_active", CommonConstant.Enable)
|
||||||
.eq("bind_tmpl",bindTmpl)
|
.eq("bind_tmpl",bindTmpl)
|
||||||
@ -516,9 +516,9 @@ public class AccountUserBindConnectServiceImpl extends BaseServiceImpl<AccountUs
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getAllBindCount(Integer bind_type,String bindTmpl) {
|
public long getAllBindCount(String bindTmpl) {
|
||||||
QueryWrapper<AccountUserBindConnect> queryWrapper = new QueryWrapper<>();
|
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("user_type", CommonConstant.USER_TYPE_NORMAL)
|
||||||
.eq("bind_active", CommonConstant.Enable)
|
.eq("bind_active", CommonConstant.Enable)
|
||||||
.eq("bind_tmpl",bindTmpl)
|
.eq("bind_tmpl",bindTmpl)
|
||||||
|
|||||||
@ -297,11 +297,10 @@ public interface AccountService {
|
|||||||
|
|
||||||
|
|
||||||
@GetMapping(value = "/admin/account/accountController/getAllBindPage")
|
@GetMapping(value = "/admin/account/accountController/getAllBindPage")
|
||||||
List<AccountUserBindConnect> getAllBindPage(@RequestParam(name = "bind_type") Integer bind_type,
|
List<AccountUserBindConnect> getAllBindPage(@RequestParam(name = "bindTmpl") String bindTmpl,
|
||||||
@RequestParam(name = "bindTmpl") String bindTmpl,
|
|
||||||
@RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
|
@RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
|
||||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize);
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize);
|
||||||
|
|
||||||
@GetMapping(value = "/admin/account/accountController/getAllBindCount")
|
@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);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -735,7 +735,7 @@ public class ShopMessageTemplateServiceImpl extends BaseServiceImpl<ShopMessageT
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendToXcxAllUserMessage() {
|
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){
|
if(allBindCount==0){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -757,7 +757,7 @@ public class ShopMessageTemplateServiceImpl extends BaseServiceImpl<ShopMessageT
|
|||||||
ExecutorService executor = Executors.newFixedThreadPool(6);
|
ExecutorService executor = Executors.newFixedThreadPool(6);
|
||||||
List<Future<?>> futures = new ArrayList<>();
|
List<Future<?>> futures = new ArrayList<>();
|
||||||
for (int i=1;i<=pages;i++){
|
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;
|
int finalI = i;
|
||||||
futures.add(executor.submit(() -> {
|
futures.add(executor.submit(() -> {
|
||||||
finalList.forEach(accountUserBindConnect -> {
|
finalList.forEach(accountUserBindConnect -> {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user