Commit 9bbc9f7f by 徐高华

更新通讯录

parent 51348fe9
......@@ -13,8 +13,6 @@ public interface StaffApiService {
List<StaffDTO> listByIds(List<String> staffIds);
List<StaffDTO> listByWxUserId(String wxUserId, String wxEnterpriseId);
StaffDTO selectByNationcodeAndPhoneNumber(String wxEnterpriseId, String nationcode, String phoneNumber);
List<StaffDepartmentRelatedDTO> listStaffDepartmentByStaffId(String staffId);
......@@ -81,8 +79,6 @@ public interface StaffApiService {
List<StaffDTO> listByPhoneNumber(String phoneNumber);
List<StaffDTO> listByUserIdsAndWxEnterpriseId(List<String> userIds, String wxEnterpriseId);
/**
* 获取成员头像
*
......@@ -107,14 +103,6 @@ public interface StaffApiService {
boolean activeStaff(String staffId);
/**
* 获取一个staff
*
* @param wxEnterpriseId
* @return
*/
StaffDTO getWxStaffOne(String wxEnterpriseId);
/**
* 是否隐私
*
* @param staffId 员工id
......@@ -273,16 +261,4 @@ public interface StaffApiService {
*/
List<String> getHaoBanStoreRolesByEnterpriseId(String enterpriseId, String wxEnterpriseId);
/**
* 更新userid by open_userid
*
* @param wxEnterpriseId wx企业标识
* @param wxOpenUseId wx开放使用id
* @param wxUserId wx用户id
* @return int
* @author mozhu
* @date 2022-07-18 19:06:27
*/
int updateWxUserIdsByWxOpenUserId(String wxEnterpriseId, String wxOpenUseId,String wxUserId);
}
......@@ -7,7 +7,6 @@ import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface StaffMapper {
int deleteByPrimaryKey(String staffId);
int insertSelective(TabHaobanStaff record);
......@@ -18,9 +17,13 @@ public interface StaffMapper {
TabHaobanStaff selectByNationcodeAndPhoneNumber(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("nationCode") String nationcode, @Param("phoneNumber") String phoneNumber);
List<TabHaobanStaff> listByIds(@Param("staffIds") List<String> staffIds);
TabHaobanStaff selectByUserIdAndEnterpriseId(@Param("userId") String userId, @Param("wxEnterpriseId") String wxEnterpriseId);
List<TabHaobanStaff> listByUserIdsAndWxEnterpriseId(@Param("userIds") List<String> userIds, @Param("wxEnterpriseId") String wxEnterpriseId);
List<TabHaobanStaff> listByWxUserId(@Param("wxUserId") String wxUserId,@Param("wxEnterpriseId") String wxEnterpriseId);
List<TabHaobanStaff> listLikeName(@Param("staffName") String staffName, @Param("wxEnterpriseId") String wxEnterpriseId);
Page<TabHaobanStaff> pageStaff(@Param("staffIds") List<String> staffIds,
......@@ -30,26 +33,10 @@ public interface StaffMapper {
@Param("wxEnterpriseId") String wxEnterpriseId,
@Param("relationFlag") Integer relationFlag);
/**
* 选择用户id和企业标识
*
* @param userId 用户id
* @param wxEnterpriseId wx企业标识
* @return {@link TabHaobanStaff }
* @author mozhu
* @date 2022-01-13 15:05:28
*/
TabHaobanStaff selectByUserIdAndEnterpriseId(@Param("userId") String userId,
@Param("wxEnterpriseId") String wxEnterpriseId);
List<TabHaobanStaff> listByPhoneNumber(@Param("phoneNumber") String phoneNumber);
List<TabHaobanStaff> listByUserIdsAndWxEnterpriseId(@Param("userIds") List<String> userIds, @Param("wxEnterpriseId") String wxEnterpriseId);
int cleanStaff(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("staffIds") List<String> staffIds);
TabHaobanStaff getWxStaffByOne(@Param("wxEnterpriseId") String wxEnterpriseId);
List<String> listUserStaffId(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("staffIds") List<String> staffIds);
List<TabHaobanStaff> listNoStatusStaffIds(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("staffIds") List<String> staffIds);
......@@ -62,11 +49,6 @@ public interface StaffMapper {
List<TabHaobanStaff> listByOpenUserIdsAndWxEnterpriseId(@Param("openUserIds") List<String> openUserIds,
@Param("wxEnterpriseId") String wxEnterpriseId);
/**
* 用户id wx企业id列表
*/
List<TabHaobanStaff> listUserIdByWxEnterpriseId(@Param("wxEnterpriseId") String wxEnterpriseId);
/**
* 更新开放用户id,用户id
......@@ -76,12 +58,6 @@ public interface StaffMapper {
@Param("wxOpenUseId") String wxOpenUseId);
/**
* 选择通过打开用户id和企业标识
*/
TabHaobanStaff selectByOpenUserIdAndEnterpriseId(@Param("wxOpenUseId") String wxOpenUseId,
@Param("wxEnterpriseId") String wxEnterpriseId);
/**
* 更新开放id员工id
*
* @param staffId 员工id
......@@ -127,33 +103,6 @@ public interface StaffMapper {
*/
List<TabHaobanStaff> listByWxEnterpriseId(@Param("wxEnterpriseId") String wxEnterpriseId);
/**
* 更新wx用户id通过员工id
*
* @param wxEnterpriseId wx企业标识
* @param newWxUserId 新wx用户id
* @param oldWxUserId 老wx用户id
* @return int
* @author mozhu
* @date 2022-06-30 15:53:13
*/
int updateUserIdByUserId(@Param("wxEnterpriseId") String wxEnterpriseId,
@Param("newWxUserId") String newWxUserId,
@Param("oldWxUserId") String oldWxUserId);
/**
* 更新userid by open_userid
*
* @param wxEnterpriseId wx企业标识
* @param wxOpenUseId wx开放使用id
* @param wxUserId wx用户id
* @return int
* @author mozhu
* @date 2022-07-18 19:09:16
*/
int updateWxUserIdsByWxOpenUserId(@Param("wxEnterpriseId") String wxEnterpriseId,
@Param("wxOpenUseId") String wxOpenUseId,
@Param("wxUserId") String wxUserId);
/**
* 更新添加num通过id
......
......@@ -49,8 +49,6 @@ public interface StaffService {
*/
int cleanStaff(String wxEnterpriseId, List<String> staffIds);
TabHaobanStaff getWxStaffByOne(String wxEnterpriseId);
/**
* 获取需要删除的staff列表
*
......@@ -113,18 +111,6 @@ public interface StaffService {
*/
com.gic.api.base.commons.Page<StaffDTO> getPageStaffIdsByWxEnterpriseId(String wxEnterpriseId, BasePageInfo basePageInfo);
/**
* 更新wx用户id通过员工id
*
* @param wxEnterpriseId wx企业标识
* @param newWxUserId 新wx用户id
* @param oldWxUserId 老wx用户id
* @return int
* @author mozhu
* @date 2022-06-30 15:54:34
*/
int updateUserIdByUserId(String wxEnterpriseId, String newWxUserId, String oldWxUserId);
/**
* 更新添加num通过id
......
......@@ -84,13 +84,13 @@ public class ExternalClerkRelatedServiceImpl implements ExternalClerkRelatedServ
}
TabHaobanExternalClerkRelated related = tabHaobanExternalClerkRelatedList.get(0);
String wxEnterpriseId = related.getWxEnterpriseId();
List<TabHaobanStaff> tabHaobanStaffs = staffMapper.listByWxUserId(wxUserId, wxEnterpriseId);
if (CollectionUtils.isEmpty(tabHaobanStaffs)) {
TabHaobanStaff tabHaobanStaff = staffMapper.selectByUserIdAndEnterpriseId(wxUserId, wxEnterpriseId);
if (null == tabHaobanStaff) {
logger.error("找不到员工:wxUserId:{}", wxUserId);
return;
}
String staffId = tabHaobanStaffs.get(0).getStaffId();
String staffId = tabHaobanStaff.getStaffId();
List<TabHaobanStaffClerkRelation> tabHaobanStaffClerkRelations = staffClerkRelationMapper.lisByStaffId(wxEnterpriseId, staffId,null);
if (CollectionUtils.isEmpty(tabHaobanStaffClerkRelations)) {
logger.error("找不到员工导购关联关系:staffId:{},wxEnterpriseId:{}", staffId, wxEnterpriseId);
......
......@@ -108,11 +108,6 @@ public class StaffServiceImpl implements StaffService {
}
@Override
public TabHaobanStaff getWxStaffByOne(String wxEnterpriseId) {
return mapper.getWxStaffByOne(wxEnterpriseId);
}
@Override
public List<String> listDelUserStaffId(String wxEnterpriseId, List<String> staffIds) {
return mapper.listUserStaffId(wxEnterpriseId, staffIds);
}
......@@ -145,11 +140,6 @@ public class StaffServiceImpl implements StaffService {
}
@Override
public int updateUserIdByUserId(String wxEnterpriseId, String newWxUserId, String oldWxUserId) {
return mapper.updateUserIdByUserId(wxEnterpriseId, newWxUserId, oldWxUserId);
}
@Override
public int updateAddNumById(String staffId) {
return mapper.updateAddNumById(staffId);
}
......
......@@ -2094,38 +2094,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
JSONObject jsonObject = JSON.parseObject(params);
String wxEnterpriseId = jsonObject.getString("wxEnterpriseId");
String corpid = jsonObject.getString("corpid");
String secret = jsonObject.getString("secret");
// 限流器
RRateLimiter rateLimiter = RedisUtil.getRedisClient().getRateLimiter("haoban:manage3:updateNewUseridCorpid:limit");
// 每1秒产生5个令牌
rateLimiter.trySetRate(RateType.OVERALL, 5, 1, RateIntervalUnit.SECONDS);
BasePageInfo basePageInfo = new BasePageInfo();
int pageNum = 1;
while (true) {
rateLimiter.acquire();
basePageInfo.setPageNum(pageNum);
basePageInfo.setPageSize(1000);
Page<StaffDTO> staffDTOPage = staffService.getPageStaffIdsByWxEnterpriseId(wxEnterpriseId, basePageInfo);
List<StaffDTO> staffDTOList = staffDTOPage.getResult();
if (CollectionUtil.isEmpty(staffDTOList)) {
break;
}
List<String> stringList = staffDTOList.stream().map(StaffDTO::getWxUserId).distinct().collect(Collectors.toList());
List<QywxNewUseridDTO> qywxNewUseridDTOList = qywxUserApiService.getSelfUseridToOpenuserid(corpid, secret, stringList);
if (CollectionUtils.isEmpty(qywxNewUseridDTOList)) {
log.error("调用企微无权限");
continue;
}
for (QywxNewUseridDTO qywxNewUseridDTO : qywxNewUseridDTOList) {
String userid = qywxNewUseridDTO.getUserid();
String openUserid = qywxNewUseridDTO.getOpen_userid();
log.info("转换新的userid,userid:{},openUserid:{}", userid, openUserid);
staffService.updateUserIdByUserId(wxEnterpriseId, openUserid, userid);
}
pageNum++;
}
//更新好友关系表
memberUnionRelatedService.updateUserIdByWxEnterpriseId(wxEnterpriseId);
//更新会员好友关系表
......
......@@ -623,16 +623,6 @@ public class StaffApiServiceImpl implements StaffApiService {
return staffDepartmentRelatedMapper.countByDepartmentIds(departmentIds);
}
@Override
public List<StaffDTO> listByUserIdsAndWxEnterpriseId(List<String> userIds, String wxEnterpriseId) {
List<StaffDTO> list = staffService.listByUserIdsAndWxEnterpriseId(userIds, wxEnterpriseId);
if (CollectionUtils.isEmpty(list)) {
return Collections.EMPTY_LIST;
}
this.addDepartInfo(list);
return list;
}
private String changeHeaderImageUrl(String headImgUrl) {
try {
logger.info("图片headImgUrl:{}", headImgUrl);
......@@ -688,13 +678,6 @@ public class StaffApiServiceImpl implements StaffApiService {
}
@Override
public List<StaffDTO> listByWxUserId(String wxUserId, String wxEnterpriseId) {
List<TabHaobanStaff> list = staffMapper.listByWxUserId(wxUserId, wxEnterpriseId);
return EntityUtil.changeEntityListByJSON(StaffDTO.class, list);
}
@Override
public List<String> listBindClerkUserId(String storeId) {
List<String> userIdList = new ArrayList<String>();
List<String> storeIds = new ArrayList<String>();
......@@ -742,12 +725,6 @@ public class StaffApiServiceImpl implements StaffApiService {
}
@Override
public StaffDTO getWxStaffOne(String wxEnterpriseId) {
TabHaobanStaff wxStaffByOne = staffService.getWxStaffByOne(wxEnterpriseId);
return EntityUtil.changeEntityByJSON(StaffDTO.class, wxStaffByOne);
}
@Override
public StaffPrivacyUseLogDTO getStaffPrivacyByStaffId(String staffId) {
return EntityUtil.changeEntity(StaffPrivacyUseLogDTO.class, staffPrivacyUseLogService.getByStaffId(staffId));
}
......@@ -760,13 +737,13 @@ public class StaffApiServiceImpl implements StaffApiService {
@Override
public Page<StaffDTO> listUserIdByWxEnterpriseId(String wxEnterpriseId, Integer pageNum, Integer pageSize) {
PageHelper.startPage(pageNum, pageSize);
List<TabHaobanStaff> tabHaobanStaffs = staffMapper.listUserIdByWxEnterpriseId(wxEnterpriseId);
List<TabHaobanStaff> tabHaobanStaffs = staffMapper.listByWxEnterpriseId(wxEnterpriseId);
return PageUtil.changePageHelperToCurrentPage(new PageInfo<>(tabHaobanStaffs), StaffDTO.class);
}
@Override
public List<StaffDTO> listAllStaffByWxEnterpriseId(String wxEnterpriseId) {
List<TabHaobanStaff> tabHaobanStaffs = staffMapper.listUserIdByWxEnterpriseId(wxEnterpriseId);
List<TabHaobanStaff> tabHaobanStaffs = staffMapper.listByWxEnterpriseId(wxEnterpriseId);
return EntityUtil.changeEntityListNew(StaffDTO.class, tabHaobanStaffs);
}
......@@ -952,11 +929,6 @@ public class StaffApiServiceImpl implements StaffApiService {
return storeRangeService.listStoreIdByWxEnterpriseId(wxEnterpriseId, enterpriseId);
}
@Override
public int updateWxUserIdsByWxOpenUserId(String wxEnterpriseId, String wxOpenUseId, String wxUserId) {
return staffMapper.updateWxUserIdsByWxOpenUserId(wxEnterpriseId,wxOpenUseId,wxUserId);
}
/**
* 门店筛选器id企业端获取gic门店id列表
*/
......
......@@ -38,11 +38,7 @@
from tab_haoban_staff
where staff_id = #{staffId,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete
from tab_haoban_staff
where staff_id = #{staffId,jdbcType=VARCHAR}
</delete>
<update id="delOtherStaffByWxUserId">
update tab_haoban_staff
......@@ -326,15 +322,6 @@
#{id,jdbcType=VARCHAR}
</foreach>
</select>
<select id="listByWxUserId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from tab_haoban_staff
where status_flag = 1 and wx_user_id = #{wxUserId,jdbcType=VARCHAR}
<if test="wxEnterpriseId != null and wxEnterpriseId != ''">
and wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
</if>
</select>
<select id="listLikeName" resultMap="BaseResultMap">
select
......@@ -361,10 +348,16 @@
from tab_haoban_staff
where status_flag = 1
and wx_enterprise_id = #{wxEnterpriseId}
and wx_user_id IN
and ( wx_user_id IN
<foreach collection="userIds" item="id" index="index" open="(" close=")" separator=",">
#{id,jdbcType=VARCHAR}
</foreach>
or
wx_open_user_id IN
<foreach collection="userIds" item="id" index="index" open="(" close=")" separator=",">
#{id,jdbcType=VARCHAR}
</foreach>
)
</select>
<update id="cleanStaff" parameterType="com.gic.haoban.manage.service.entity.TabHaobanStaff">
......@@ -379,16 +372,6 @@
</foreach>
</update>
<select id="getWxStaffByOne" resultMap="BaseResultMap" parameterType="java.lang.String">
select
<include refid="Base_Column_List"/>
from tab_haoban_staff
where status_flag = 1
and wx_enterprise_id = #{wxEnterpriseId}
and wx_user_id is not null and wx_user_id!=''
limit 1
</select>
<select id="listUserStaffId" resultType="string">
select staff_id FROM tab_haoban_staff
WHERE
......@@ -418,7 +401,7 @@
WHERE
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and super_manager_flag is null
and wx_user_id =#{wxUserId}
and (wx_user_id = #{wxUserId,jdbcType=VARCHAR} or wx_open_user_id = #{wxUserId,jdbcType=VARCHAR})
order by update_time desc,create_time desc limit 1
</select>
......@@ -436,15 +419,6 @@
</if>
</select>
<select id="listUserIdByWxEnterpriseId" resultMap="BaseResultMap">
select staff_id,
wx_user_id
from tab_haoban_staff
where status_flag = 1
and wx_user_id is not null
and wx_enterprise_id = #{wxEnterpriseId}
</select>
<update id="updateOpenUserIdsByUserId" parameterType="com.gic.haoban.manage.service.entity.TabHaobanStaff">
update tab_haoban_staff
set wx_open_user_id = #{wxOpenUseId},
......@@ -453,15 +427,6 @@
and wx_user_id = #{wxUserId}
</update>
<select id="selectByOpenUserIdAndEnterpriseId" resultMap="BaseResultMap" parameterType="java.lang.String">
select
<include refid="Base_Column_List"/>
from tab_haoban_staff
where wx_open_user_id = #{wxOpenUseId}
and wx_enterprise_id = #{wxEnterpriseId}
and status_flag = 1 limit 1
</select>
<update id="updateOpenIdByStaffId" parameterType="com.gic.haoban.manage.service.entity.TabHaobanStaff">
update tab_haoban_staff
set wx_open_id = #{openId},
......@@ -493,22 +458,6 @@
and status_flag = 1
</select>
<update id="updateUserIdByUserId" parameterType="java.lang.String">
update tab_haoban_staff
set wx_user_id = #{newWxUserId},
update_time = now()
where wx_enterprise_id = #{wxEnterpriseId}
and wx_user_id = #{oldWxUserId}
</update>
<update id="updateWxUserIdsByWxOpenUserId" parameterType="java.lang.String">
update tab_haoban_staff
set wx_user_id = #{wxUserId},
update_time = now()
where wx_enterprise_id = #{wxEnterpriseId}
and wx_open_user_id = #{wxOpenUseId}
</update>
<update id="updateAddNumById" parameterType="java.lang.String">
update tab_haoban_staff
......
package com.gic.haoban.manage.web.controller;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO;
import com.gic.haoban.common.utils.AuthWebRequestUtil;
import com.gic.haoban.common.utils.HaobanResponse;
import com.gic.haoban.manage.api.dto.DepartmentDTO;
import com.gic.haoban.manage.api.dto.StaffDTO;
import com.gic.haoban.manage.api.dto.WxApplicationDTO;
import com.gic.haoban.manage.api.dto.WxEnterpriseQwDTO;
import com.gic.haoban.manage.api.service.StaffApiService;
import com.gic.haoban.manage.api.service.WxApplicationApiService;
import com.gic.haoban.manage.api.service.WxEnterpriseApiService;
import com.gic.haoban.manage.web.errCode.HaoBanErrCode;
import com.gic.haoban.manage.web.vo.AdminRoleVO;
import com.gic.haoban.manage.web.vo.AdminVO;
import com.gic.wechat.api.service.qywx.QywxSuiteApiService;
@RestController
public class AdminController extends WebBaseController {
private static final Logger logger = LoggerFactory.getLogger(AdminController.class);
@Autowired
private QywxSuiteApiService qywxSuiteApiService;
@Autowired
private StaffApiService staffApiService;
@Autowired
private WxApplicationApiService wxApplicationApiService;
@Autowired
private WxEnterpriseApiService wxEnterpriseApiService ;
@RequestMapping("admin-list")
public HaobanResponse adminList() {
WebLoginDTO login = AuthWebRequestUtil.getLoginUser();
String wxEnterpriseId = login.getWxEnterpriseId();
WxApplicationDTO application = wxApplicationApiService.selectByWxEnterpriseIdAndApplicationType(wxEnterpriseId, 2);
String corpid = application.getCorpid();
logger.info("【管理员查询】corpid={},siteId={},agentId={}", corpid, application.getSiteId(), application.getAgentId());
String adminList = qywxSuiteApiService.getAdminList(corpid, application.getSiteId(), Integer.parseInt(application.getAgentId()));
logger.info("【管理员查询】userIds={}", JSON.toJSONString(adminList));
List<String> openUserIds = new ArrayList<>();
if (StringUtils.isNotBlank(adminList)) {
JSONArray jsonArr = JSON.parseArray(adminList);
for (Object object : jsonArr) {
JSONObject json = JSON.parseObject(JSON.toJSONString(object));
openUserIds.add(json.getString("userid"));
}
}
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseApiService.getQwInfo(wxEnterpriseId) ;
List<StaffDTO> list = new ArrayList<>();
List<AdminVO> resultList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(openUserIds)) {
if (qwDTO.needOpenUserId3th()) {
logger.info("OpenUserIds");
list = staffApiService.listByOpenUserIdsAndWxEnterpriseId(openUserIds, wxEnterpriseId);
} else {
logger.info("UserIds");
list = staffApiService.listByUserIdsAndWxEnterpriseId(openUserIds, wxEnterpriseId);
}
for (StaffDTO staffDTO : list) {
AdminVO vo = new AdminVO();
vo.setRoleId(staffDTO.getStaffId());
vo.setRoleName("管理员");
List<AdminRoleVO> roleList = new ArrayList<>();
List<DepartmentDTO> departmentList = staffDTO.getDepartmentList();
if (CollectionUtils.isNotEmpty(departmentList)) {
for (DepartmentDTO departmentDTO : departmentList) {
AdminRoleVO role = new AdminRoleVO();
role.setDepartmentName(departmentDTO.getDepartmentName());
role.setUserName(staffDTO.getStaffName());
role.setUserPhone(staffDTO.getPhoneNumber());
roleList.add(role);
}
vo.setRoleUser(roleList);
resultList.add(vo);
}
}
}
return resultResponse(HaoBanErrCode.ERR_1, resultList);
}
}
......@@ -255,23 +255,6 @@ public class ClerkController extends WebBaseController {
@IgnoreLogin
@RequestMapping("/get-operation-setting")
public HaobanResponse getOperatorSetting(String wxEnterpriseId, String enterpriseId) {
/* // 查询操作配置
OperationSettingDTO dto = operationSettingApiService.getByWxEnterpriseId(wxEnterpriseId);
if (Objects.isNull(dto)) {
OperationSettingVO vo = new OperationSettingVO();
vo.setWxEnterpriseId(wxEnterpriseId);
// 为空情况初始默认不生效
vo.setEffectFlag(0);
return resultResponse(HaoBanErrCode.ERR_1, vo);
}
OperationSettingVO vo = EntityUtil.changeEntity(OperationSettingVO.class, dto);
// 是否开启导购编辑,如果不开启,默认无效
WxEnterpriseRelationDetailDTO info = wxEnterpriseRelatedApiService.getEnterpriseBindInfo(wxEnterpriseId, enterpriseId);
if (Objects.nonNull(info) && info.getClerkEditFlag() == 1) {
vo.setEffectFlag(1);
} else {
vo.setEffectFlag(0);
}*/
OperationSettingVO vo = new OperationSettingVO();
vo.setClerkPhoneFlag(1);
return resultResponse(HaoBanErrCode.ERR_1, vo);
......
......@@ -145,13 +145,13 @@ public class WxEnterpriseInfoController extends WebBaseController {
if (null != loginUserDict && StringUtils.isNotEmpty(loginUserDict.getDictName()) && loginUserDict.getDictName().split(":").length==2) {
String dictValue = loginUserDict.getDictValue();
List<StaffDTO> staffDTOS = new ArrayList<>();
StaffDTO dto = staffApiService.selectByUserIdAndEnterpriseId(dictValue, loginUserDict.getDictName().split(":")[1]);
List<StaffDTO> phoneDtos = staffApiService.listByPhoneNumber(dictValue);
List<StaffDTO> userDtos = staffApiService.listByWxUserId(dictValue, loginUserDict.getDictName().split(":")[1]);
if (CollectionUtils.isNotEmpty(phoneDtos)) {
staffDTOS.addAll(phoneDtos);
}
if (CollectionUtils.isNotEmpty(userDtos)) {
staffDTOS.addAll(userDtos);
if (null != dto) {
staffDTOS.add(dto);
}
if (CollectionUtils.isNotEmpty(staffDTOS)) {
if (staffDTOS.size() > 1) {
......
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