Commit db7b0ec1 by 徐高华

test

parent b3b2d9a9
......@@ -145,6 +145,6 @@ public interface StaffMapper {
List<TabHaobanStaff> listAllByPage(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("startItem") int startItem , @Param("pageSize") int pageSize);
void updateOpenConcatFlag(@Param("staffIdList")Set<String> staffIdList);
void updateOpenConcatFlag(@Param("wxUserIdList")List<String> wxUserIdList , @Param("mixFlag")int mixFlag);
}
\ No newline at end of file
......@@ -143,5 +143,5 @@ public interface StaffService {
*/
int updateActiveStatusById(Integer activeStatus,String staffId);
void updateOpenConcatFlag(Set<String> staffIdList);
void updateOpenConcatFlag(List<String> wxUserIdList,int mixFlag);
}
......@@ -3,6 +3,7 @@ import java.util.Date;
import java.util.List;
import java.util.Set;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
......@@ -152,7 +153,10 @@ public class StaffServiceImpl implements StaffService {
}
@Override
public void updateOpenConcatFlag(Set<String> staffIdList) {
this.mapper.updateOpenConcatFlag(staffIdList);
public void updateOpenConcatFlag(List<String> wxUserIdList,int mixFlag) {
if(CollectionUtils.isEmpty(wxUserIdList)) {
return ;
}
this.mapper.updateOpenConcatFlag(wxUserIdList,mixFlag);
}
}
......@@ -75,15 +75,14 @@ public class GroupChatApiServiceImpl implements GroupChatApiService {
TabHaobanStaff staff = map.get(one.getStaffId());
Integer activiveFlag = staff.getActiveFlag();
Integer openConcatFlag = staff.getOpenConcatFlag();
String reamrk = null ;
Integer ownerAddFlag = 1 ;
String reamrk = null;
Integer ownerAddFlag = 1;
if (activiveFlag == 0) {
ownerAddFlag = 0 ;
reamrk = "群主未激活" ;
}
if (openConcatFlag == 0) {
ownerAddFlag = 0 ;
reamrk = "群主未配置客户联系功能" ;
ownerAddFlag = 0;
reamrk = "群主未激活";
} else if (openConcatFlag == 0) {
ownerAddFlag = 0;
reamrk = "群主未配置客户联系功能";
}
one.setOwnerRemark(reamrk);
one.setOwnerAddFlag(ownerAddFlag);
......@@ -108,7 +107,6 @@ public class GroupChatApiServiceImpl implements GroupChatApiService {
});
}
}
return ServiceResponse.success(resultPage);
}
......
......@@ -818,13 +818,12 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
//查询出所有正常的导购
//企微已经开启联系我
List<String> wxUserIdsList = qywxUserApiService.listCorpExternalUser(qwDTO.getThirdCorpid(), config.getWxSuiteid());
this.staffService.updateOpenConcatFlag(wxUserIdsList,qwDTO.needOpenUserId3th()?1:0) ;
List<StaffClerkRelationDTO> staffClerkRelationDTOS = staffClerkRelationService.listIdsByWxUserIds(wxUserIdsList, wxEnterpriseId, enterpriseId);
if (CollectionUtils.isEmpty(staffClerkRelationDTOS)) {
logger.error("无导购关联数据");
return;
}
Set<String> staffIdList = staffClerkRelationDTOS.stream().map(dto->dto.getStaffId()).collect(Collectors.toSet()) ;
this.staffService.updateOpenConcatFlag(staffIdList) ;
for (StaffClerkRelationDTO staffClerkRelationDTO : staffClerkRelationDTOS) {
//具有联系我功能的导购创建活码
staffClerkRelationService.updateOpenConcatFlagById(1, staffClerkRelationDTO.getStaffClerkRelationId());
......
......@@ -524,8 +524,14 @@
</select>
<update id="updateOpenConcatFlag">
update tab_haoban_staff set open_concat_flag = 1 where staff_id in
<foreach collection="staffIdList" index="index" item="id" close=")" open="(" separator=",">
update tab_haoban_staff set open_concat_flag = 1 where
<if test="mixFlag==0">
wx_user_id in
</if>
<if test="mixFlag==1">
open_concat_flag in
</if>
<foreach collection="wxUserIdList" index="index" item="id" close=")" open="(" separator=",">
#{id}
</foreach>
</update>
......
......@@ -91,6 +91,9 @@ public class HmLinkController {
@RequestMapping("add")
@GicLogRecord(value = "${#logValue}", category = GicLogRecordCategoryEnum.HUOMA, optType = GicLogRecordOptTypeEnum.HM_LINK_ADD, userFunc = LogRecordUserServiceImpl.class, optPage = "引流链接-新建链接")
public RestResponse<Object> save(@RequestBody HmLinkDTO dto) {
if(null == dto.getLinkType()) {
dto.setLinkType(10);
}
WebLoginDTO loginUser = AuthWebRequestUtil.getLoginUser();
RestResponse<Object> checkResp = this.saveCheck(dto) ;
if(!"0".equals(checkResp.getCode())) {
......
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