Commit db7b0ec1 by 徐高华

test

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