Commit 5274e109 by 徐高华

Merge branch 'fixbug_0901' into 'master'

Fixbug 0901

See merge request !210
parents dec73004 fcb5c3c7
......@@ -78,7 +78,7 @@ public interface MemberUnionidRelatedApiService {
* @date 2022-01-13 10:50:44
*/
String sendMessage(String wxEnterpriseId, String staffId, List<String> extendUserList, String materialId);
/**
* 创建企业群发, 支出素材批量发送
*
......@@ -89,6 +89,9 @@ public interface MemberUnionidRelatedApiService {
* @return : 返回群发执行结果
*/
JSONResponse sendMessage(String wxEnterpriseId, String staffId, List<String> extendUserList, List<String> materialIdList);
JSONResponse sendMessage(String wxEnterpriseId, String staffId, List<String> extendUserList, List<String> materialIdList , String ecmPlanId);
/**
* 获取群发成员发送任务列表
......
......@@ -1127,7 +1127,29 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
Map<String, Object> returnMap = jp.getReturnMap();
return returnMap.get("msgid") == null ? "" : returnMap.get("msgid").toString();
}
@Override
public JSONResponse sendMessage(String wxEnterpriseId, String staffId, List<String> extendUserList,
List<String> materialIdList, String ecmPlanId) {
if(StringUtils.isNotBlank(ecmPlanId) && "ff80808182ef67cd0182f3152b2900cf".equals(ecmPlanId)) {
List<String> list = Arrays.asList("244fc3aa44dd492c90041d404f02b3a0",
"3c6d26dc791946a8aa8aaf06d9deb9a6",
"4dd7689a3a5e48439840fb187bfaf995",
"6a29b127c15648cc8da60fa4bf8b6b92",
"6ad57e1d64214bfbbb7662e748ed1b84",
"7e364ea272044763bdda5afef3961ae5",
"ce6ac0d3d8a54b74a4af59996597ed03",
"dded2a7d79ee4d759372741256f04cec",
"edc487470d0344198f7185d3e2e7362a") ;
if(list.contains(staffId)) {
JSONResponse jp = new JSONResponse();
jp.setErrorCode(-1);
jp.setErrorMessage("已触发过");
return jp;
}
}
return this.sendMessage(wxEnterpriseId, staffId, extendUserList, materialIdList);
}
/**
* 创建企业群发, 支出素材批量发送
*
......@@ -1166,6 +1188,13 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
qywxExternalMessageDTO.setChatType("single");
qywxExternalMessageDTO.setExternalUserid(extendUserList);
TabHaobanStaff tabHaobanStaff = staffService.selectById(staffId);
if(null == tabHaobanStaff) {
log.info("staff不存在,staffId={}",staffId);
JSONResponse jp = new JSONResponse();
jp.setErrorCode(-1);
jp.setErrorMessage("群发失败,成员查不到," + staffId);
return jp ;
}
if (qwDTO.needOpenUserId3th()) {
qywxExternalMessageDTO.setSenderUserId(tabHaobanStaff.getWxOpenUseId());
} else {
......
......@@ -376,15 +376,15 @@
scr.clerk_id as staffClerkId
from tab_haoban_external_clerk_related as ecr
left join
(select a.staff_id,
(select b.staff_id,
a.clerk_id
from tab_haoban_staff_clerk_relation a
left join tab_haoban_staff b on a.staff_id = b.staff_id
left join tab_haoban_staff b on a.staff_id = b.staff_id and b.status_flag = 1
where a.clerk_id in
<foreach collection="clerkIdList" item="item" separator="," open="(" close=")">
#{item}
</foreach>
and a.status_flag = 1
and a.status_flag = 1
group by a.staff_id, a.clerk_id) as scr on scr.staff_id = ecr.staff_id
where ecr.status_flag = 1
and ecr.enterprise_id = #{enterpriseId,jdbcType=VARCHAR}
......
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