Commit 1481f1a9 by lili

更新用户数

parent 872b7814
......@@ -73,4 +73,11 @@ public interface GroupQrcodeBiz {
* @Date:2019/5/6 16:12
*/
GroupQrcodeBaseInfoVO getBaseById(Long groupQrcodeId);
/**
* @Author:lili
* @Desr:更新用户数
* @Date:2019/5/28 11:47
*/
void updateUserNumber(String weixinGroupId);
}
......@@ -220,6 +220,18 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
return groupQrcodeDao.getBaseById(groupQrcodeId);
}
@Override
public void updateUserNumber(String weixinGroupId) {
String robotIdByGroupId = wechatGroupConsr.getRobotIdByGroupId(weixinGroupId);
if(robotIdByGroupId != null){
Integer peopleCounts = WxGroupSDK.getPeopleCounts(weixinGroupId, robotIdByGroupId);
if (peopleCounts != null) {
//更新用户数
groupQrcodeDao.updateUserNumber(weixinGroupId, peopleCounts);
}
}
}
/**
* 重新分配一个群
*/
......
......@@ -58,10 +58,18 @@ public class GroupQrcodeFacadeImpl implements GroupQrcodeFacade {
GroupQrcodeBaseInfoVO groupQrcodeBaseInfoVO = groupQrcodeBiz.getBaseById(groupQrcodeId);
return new ResponseDto<>(groupQrcodeBaseInfoVO == null ? new GroupQrcodeBaseInfoVO() : groupQrcodeBaseInfoVO);
}
@GetMapping("addUser")
ResponseDto<?> addUser(@RequestParam("weixinGroupId") String weixinGroupId, @RequestParam("userNumber") Integer userNumber)
throws BizException{
groupQrcodeBiz.addOneUser(weixinGroupId, userNumber, null);
return new ResponseDto<>();
}
@GetMapping("updateUserNumber")
ResponseDto<?> updateUserNumber(@RequestParam("weixinGroupId") String weixinGroupId)
throws BizException{
groupQrcodeBiz.updateUserNumber(weixinGroupId);
return new ResponseDto<>();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment