Commit 56237d72 by 裴大威

Merge branch 'feat-1001897' into 'master'

平台端查微信群

See merge request rays/pcloud-book!213
parents bbcdfd01 dde5cc57
...@@ -198,4 +198,13 @@ public interface GroupQrcodeBiz { ...@@ -198,4 +198,13 @@ public interface GroupQrcodeBiz {
* @date 2019/9/21 19:10 * @date 2019/9/21 19:10
*/ */
Map<Long, GroupQrcodeInfo4Advertising> getWechatGroupInfoMap(List<Long> qrcodeIds); Map<Long, GroupQrcodeInfo4Advertising> getWechatGroupInfoMap(List<Long> qrcodeIds);
/**
* 平台端查群列表
* @param currentPage
* @param numPerPage
* @param name
* @return
*/
PageBeanNew<GroupQrcodeBookVO> listQrcodeByPcloud(Integer currentPage, Integer numPerPage, String name);
} }
...@@ -119,6 +119,7 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz { ...@@ -119,6 +119,7 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
private AmqpTemplate amqpTemplate; private AmqpTemplate amqpTemplate;
/** /**
* 自动更新群人数线程是否开始执行 * 自动更新群人数线程是否开始执行
*/ */
...@@ -277,6 +278,7 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz { ...@@ -277,6 +278,7 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
return url; return url;
} }
@Override @Override
public String changeGroupQrCode(Long classifyId) { public String changeGroupQrCode(Long classifyId) {
return changeGroup(classifyId); return changeGroup(classifyId);
...@@ -831,4 +833,15 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz { ...@@ -831,4 +833,15 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
return groupQrcodeDao.getWechatGroupInfoMap(qrcodeIds); return groupQrcodeDao.getWechatGroupInfoMap(qrcodeIds);
} }
@Override
public PageBeanNew<GroupQrcodeBookVO> listQrcodeByPcloud(Integer currentPage, Integer numPerPage, String name) {
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("name", name);
PageBeanNew<GroupQrcodeBookVO> pageBeanNew = groupQrcodeDao.listPageNew(new PageParam(currentPage, numPerPage), paramMap, "listQrcodeByPcloud");
if (pageBeanNew == null || ListUtils.isEmpty(pageBeanNew.getRecordList())) {
return new PageBeanNew<>(currentPage, numPerPage, new ArrayList<>());
}
return pageBeanNew;
}
} }
...@@ -73,4 +73,15 @@ public interface GroupQrcodeFacade { ...@@ -73,4 +73,15 @@ public interface GroupQrcodeFacade {
ResponseDto<PageBeanNew> listQrcodeByAdviser( ResponseDto<PageBeanNew> listQrcodeByAdviser(
@RequestHeader("token") String token, @RequestParam(value = "currentPage", required = false) Integer currentPage, @RequestHeader("token") String token, @RequestParam(value = "currentPage", required = false) Integer currentPage,
@RequestParam(value = "numPerPage", required = false) Integer numPerPage,@RequestParam(value = "name", required = false) String name) throws PermissionException; @RequestParam(value = "numPerPage", required = false) Integer numPerPage,@RequestParam(value = "name", required = false) String name) throws PermissionException;
@ApiOperation(value = "平台端查群二维码", httpMethod = "GET")
@ApiImplicitParams({
@ApiImplicitParam(name = "name", value = "群名称", dataType = "string", paramType = "query"),
@ApiImplicitParam(name = "currentPage", value = "当前页", dataType = "int", paramType = "query"),
@ApiImplicitParam(name = "numPerPage", value = "每页条数", dataType = "int", paramType = "query")
})
@RequestMapping(value = "listQrcodeByPcloud", method = RequestMethod.GET)
ResponseDto<PageBeanNew> listQrcodeByPcloud(
@RequestHeader("token") String token, @RequestParam(value = "currentPage", required = false) Integer currentPage,
@RequestParam(value = "numPerPage", required = false) Integer numPerPage,@RequestParam(value = "name", required = false) String name) throws PermissionException;
} }
...@@ -124,6 +124,7 @@ public class GroupQrcodeFacadeImpl implements GroupQrcodeFacade { ...@@ -124,6 +124,7 @@ public class GroupQrcodeFacadeImpl implements GroupQrcodeFacade {
return new ResponseDto<>(pageBeanNew); return new ResponseDto<>(pageBeanNew);
} }
@GetMapping("addUser") @GetMapping("addUser")
ResponseDto<?> addUser(@RequestParam("weixinGroupId") String weixinGroupId, @RequestParam("userNumber") Integer userNumber) ResponseDto<?> addUser(@RequestParam("weixinGroupId") String weixinGroupId, @RequestParam("userNumber") Integer userNumber)
throws BizException{ throws BizException{
...@@ -138,4 +139,14 @@ public class GroupQrcodeFacadeImpl implements GroupQrcodeFacade { ...@@ -138,4 +139,14 @@ public class GroupQrcodeFacadeImpl implements GroupQrcodeFacade {
groupQrcodeBiz.updateUserNumber(weixinGroupId, wxUserId); groupQrcodeBiz.updateUserNumber(weixinGroupId, wxUserId);
return new ResponseDto<>(); return new ResponseDto<>();
} }
@RequestMapping(value = "listQrcodeByPcloud", method = RequestMethod.GET)
@Override
public ResponseDto<PageBeanNew> listQrcodeByPcloud(
@RequestHeader("token") String token, @RequestParam(value = "currentPage", required = false) Integer currentPage,
@RequestParam(value = "numPerPage", required = false) Integer numPerPage,@RequestParam(value = "name", required = false) String name) throws PermissionException {
SessionUtil.getToken4Redis(token);
PageBeanNew<GroupQrcodeBookVO> pageBeanNew = groupQrcodeBiz.listQrcodeByPcloud(currentPage, numPerPage, name);
return new ResponseDto<>(pageBeanNew);
}
} }
...@@ -743,6 +743,24 @@ ...@@ -743,6 +743,24 @@
</foreach> </foreach>
</select> </select>
<select id="listQrcodeByPcloud" parameterType="map" resultType="com.pcloud.book.group.vo.GroupQrcodeBookVO">
SELECT
t.id groupQrcodeId,
t.group_name groupName,
t.weixin_group_id wxGroupId
FROM
book_group_qrcode t
INNER JOIN book_group_classify t1 ON t.classify_id = t1.id
INNER JOIN book_group bg ON t1.book_id = bg.book_id
WHERE
t.is_delete = 0
AND t1.is_delete = 0
AND bg.is_delete = 0
<if test="name != null">
AND t.group_name LIKE CONCAT('%', #{name}, '%')
</if>
</select>
<select id="getIdsByBookGroupId" parameterType="long" resultType="long"> <select id="getIdsByBookGroupId" parameterType="long" resultType="long">
SELECT SELECT
q.id q.id
......
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