Commit 1b5bbdeb by xuwenqian

feat:新增查询所有与好办相关导购

parent d71be61e
...@@ -3,10 +3,11 @@ package com.gic.haoban.manage.api.dto; ...@@ -3,10 +3,11 @@ package com.gic.haoban.manage.api.dto;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
public class StaffClerkInfoDTO implements Serializable{ public class StaffClerkInfoDTO implements Serializable {
private static final long serialVersionUID = 1L;
private String staffClerkRelationId;
private String staffClerkRelationId;
private String staffId; private String staffId;
...@@ -48,8 +49,6 @@ public class StaffClerkInfoDTO implements Serializable{ ...@@ -48,8 +49,6 @@ public class StaffClerkInfoDTO implements Serializable{
this.mainStoreFlag = mainStoreFlag; this.mainStoreFlag = mainStoreFlag;
} }
private static final long serialVersionUID = 1L;
public String getEnterpriseName() { public String getEnterpriseName() {
return enterpriseName; return enterpriseName;
} }
......
...@@ -3,10 +3,11 @@ package com.gic.haoban.manage.api.dto; ...@@ -3,10 +3,11 @@ package com.gic.haoban.manage.api.dto;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
public class StaffClerkRelationDTO implements Serializable{ public class StaffClerkRelationDTO implements Serializable {
private static final long serialVersionUID = 1L;
private String staffClerkRelationId;
private String staffClerkRelationId;
private String staffId; private String staffId;
...@@ -28,7 +29,8 @@ public class StaffClerkRelationDTO implements Serializable{ ...@@ -28,7 +29,8 @@ public class StaffClerkRelationDTO implements Serializable{
private Date updateTime; private Date updateTime;
private static final long serialVersionUID = 1L; private String storeName;
private String staffName;
public String getStaffClerkRelationId() { public String getStaffClerkRelationId() {
return staffClerkRelationId; return staffClerkRelationId;
...@@ -118,4 +120,19 @@ public class StaffClerkRelationDTO implements Serializable{ ...@@ -118,4 +120,19 @@ public class StaffClerkRelationDTO implements Serializable{
this.updateTime = updateTime; this.updateTime = updateTime;
} }
public String getStoreName() {
return storeName;
}
public void setStoreName(String storeName) {
this.storeName = storeName;
}
public String getStaffName() {
return staffName;
}
public void setStaffName(String staffName) {
this.staffName = staffName;
}
} }
package com.gic.haoban.manage.api.service; package com.gic.haoban.manage.api.service;
import java.util.List;
import java.util.Set;
import com.gic.api.base.commons.Page; import com.gic.api.base.commons.Page;
import com.gic.haoban.base.api.common.BasePageInfo; import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.base.api.common.ServiceResponse; import com.gic.haoban.base.api.common.ServiceResponse;
...@@ -10,12 +7,16 @@ import com.gic.haoban.manage.api.dto.StaffClerkBindLogDetailDTO; ...@@ -10,12 +7,16 @@ import com.gic.haoban.manage.api.dto.StaffClerkBindLogDetailDTO;
import com.gic.haoban.manage.api.dto.StaffClerkInfoDTO; import com.gic.haoban.manage.api.dto.StaffClerkInfoDTO;
import com.gic.haoban.manage.api.dto.StaffClerkRelationDTO; import com.gic.haoban.manage.api.dto.StaffClerkRelationDTO;
import java.util.List;
import java.util.Set;
public interface StaffClerkRelationApiService { public interface StaffClerkRelationApiService {
/** /**
* 绑定日志 * 绑定日志
*
* @param params * @param params
*/ */
public void bindLogMq(String params); void bindLogMq(String params);
List<StaffClerkRelationDTO> listBindCode(String enterpriseId, Set<String> clerkCodeList); List<StaffClerkRelationDTO> listBindCode(String enterpriseId, Set<String> clerkCodeList);
...@@ -30,9 +31,10 @@ public interface StaffClerkRelationApiService { ...@@ -30,9 +31,10 @@ public interface StaffClerkRelationApiService {
/** /**
* 绑定 * 绑定
*
* @return * @return
*/ */
public ServiceResponse bindStaffClerk(StaffClerkRelationDTO staffClerkRelationDTO,String optStaffId,int chanelCode); ServiceResponse bindStaffClerk(StaffClerkRelationDTO staffClerkRelationDTO, String optStaffId, int chanelCode);
StaffClerkRelationDTO getByCodeAndEnterpriseId(String clerkCode, String enterpriseId); StaffClerkRelationDTO getByCodeAndEnterpriseId(String clerkCode, String enterpriseId);
...@@ -96,40 +98,49 @@ public interface StaffClerkRelationApiService { ...@@ -96,40 +98,49 @@ public interface StaffClerkRelationApiService {
/** /**
* 搜索查询列表 * 搜索查询列表
*
* @param wxEnterpriseId * @param wxEnterpriseId
* @param search * @param search
* @param enterpriseId * @param enterpriseId
* @param optType * @param optType
* @return * @return
*/ */
public Page<StaffClerkBindLogDetailDTO> pageStaffClerkBindLog(String wxEnterpriseId, String search, String enterpriseId, int optType, BasePageInfo pageInfo); Page<StaffClerkBindLogDetailDTO> pageStaffClerkBindLog(String wxEnterpriseId, String search, String enterpriseId, int optType, BasePageInfo pageInfo);
/** /**
* 追加到绑定日志 * 追加到绑定日志
*
* @param staffId * @param staffId
* @param optStaffId * @param optStaffId
* @param optType * @param optType
* @param channelCode * @param channelCode
* @param relationId * @param relationId
*/ */
public void pushToBindLog(String staffId,String optStaffId,int optType,int channelCode,String relationId); void pushToBindLog(String staffId, String optStaffId, int optType, int channelCode, String relationId);
/** /**
* 获取config * 获取config
*
* @param clerkId * @param clerkId
* @param memberId * @param memberId
* @return * @return
*/ */
ServiceResponse<String> getClerkMemberChatConfig(String clerkId); ServiceResponse<String> getClerkMemberChatConfig(String clerkId);
/** /**
* * @return 返回值类型: <pre>
* @Description 方法描述: * @author 作者: WQ <pre>
* @return 返回值类型: <pre> * @date 时间: 2020年12月24日 上午11:21:38 <pre>
* @author 作者: WQ <pre> * @param wxEnterpriseId: <pre>
* @date 时间: 2020年12月24日 上午11:21:38 <pre> * @param pageInfo: <pre>
* @param wxEnterpriseId: <pre> * @Description 方法描述:
* @param pageInfo: <pre> */
Page<StaffClerkRelationDTO> pageByWxEnterpriseId(String wxEnterpriseId, BasePageInfo pageInfo);
/**
* 查询状态正常导购
* @return
*/ */
public Page<StaffClerkRelationDTO> pageByWxEnterpriseId(String wxEnterpriseId, BasePageInfo pageInfo); List<StaffClerkRelationDTO> listAll();
} }
package com.gic.haoban.manage.service.dao.mapper; package com.gic.haoban.manage.service.dao.mapper;
import java.util.List;
import java.util.Set;
import org.apache.ibatis.annotations.Param;
import com.gic.haoban.manage.api.dto.StaffClerkRelationDTO; import com.gic.haoban.manage.api.dto.StaffClerkRelationDTO;
import com.gic.haoban.manage.service.entity.TabHaobanStaffClerkRelation; import com.gic.haoban.manage.service.entity.TabHaobanStaffClerkRelation;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Set;
public interface TabHaobanStaffClerkRelationMapper { public interface TabHaobanStaffClerkRelationMapper {
int deleteByPrimaryKey(String staffClerkRelationId); int deleteByPrimaryKey(String staffClerkRelationId);
...@@ -24,15 +23,17 @@ public interface TabHaobanStaffClerkRelationMapper { ...@@ -24,15 +23,17 @@ public interface TabHaobanStaffClerkRelationMapper {
List<TabHaobanStaffClerkRelation> listBindCode(@Param("enterpriseId")String enterpriseId, @Param("clerkCodeList")Set<String> clerkCodeList); List<TabHaobanStaffClerkRelation> listBindCode(@Param("enterpriseId")String enterpriseId, @Param("clerkCodeList")Set<String> clerkCodeList);
List<TabHaobanStaffClerkRelation> listBindCodeByStaffId(@Param("enterpriseIdList")List<String> enterpriseIdList, @Param("staffId")String staffId); List<TabHaobanStaffClerkRelation> listBindCodeByStaffId(@Param("enterpriseIdList")List<String> enterpriseIdList, @Param("staffId")String staffId);
TabHaobanStaffClerkRelation getOneByClerkId(@Param("clerkId")String clerkId); TabHaobanStaffClerkRelation getOneByClerkId(@Param("clerkId") String clerkId);
/** /**
* 改变状态 格局clerkId * 改变状态 格局clerkId
*
* @param clerkId * @param clerkId
* @param status * @param status
* @return * @return
*/ */
public int changeStatusByClerkId(@Param("clerkId") String clerkId,@Param("status") Integer status); int changeStatusByClerkId(@Param("clerkId") String clerkId, @Param("status") Integer status);
/** /**
* 更新信息 * 更新信息
...@@ -117,7 +118,18 @@ public interface TabHaobanStaffClerkRelationMapper { ...@@ -117,7 +118,18 @@ public interface TabHaobanStaffClerkRelationMapper {
/** /**
* 已使用的门店id列表 * 已使用的门店id列表
*
* @param enterpriseId * @param enterpriseId
*/ */
List<TabHaobanStaffClerkRelation> listBindStoreIdByEnterpriseId(String enterpriseId); List<TabHaobanStaffClerkRelation> listBindStoreIdByEnterpriseId(String enterpriseId);
/**
* 列出所有
*
* @return {@link List<TabHaobanStaffClerkRelation> }
* @author xuwenqian
* @date 2021-07-15 16:24:27
*/
List<StaffClerkRelationDTO> listAll();
} }
\ No newline at end of file
package com.gic.haoban.manage.service.service; package com.gic.haoban.manage.service.service;
import java.util.List;
import java.util.Set;
import com.gic.api.base.commons.Page; import com.gic.api.base.commons.Page;
import com.gic.haoban.base.api.common.BasePageInfo; import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.base.api.common.ServiceResponse;
import com.gic.haoban.manage.api.dto.StaffClerkRelationDTO; import com.gic.haoban.manage.api.dto.StaffClerkRelationDTO;
import com.gic.haoban.manage.service.entity.MemberClerkChatConfig; import com.gic.haoban.manage.service.entity.MemberClerkChatConfig;
import com.gic.haoban.manage.service.entity.TabHaobanStaffClerkRelation; import com.gic.haoban.manage.service.entity.TabHaobanStaffClerkRelation;
import org.apache.ibatis.annotations.Param; import java.util.List;
import java.util.Set;
public interface StaffClerkRelationService { public interface StaffClerkRelationService {
...@@ -20,10 +17,11 @@ public interface StaffClerkRelationService { ...@@ -20,10 +17,11 @@ public interface StaffClerkRelationService {
/** /**
* 删除绑定 * 删除绑定
*
* @param clerkId * @param clerkId
* @return * @return
*/ */
public boolean delBind(String clerkId,String optStaffId,int chanelCode); boolean delBind(String clerkId, String optStaffId, int chanelCode);
/** /**
* 删除绑定 * 删除绑定
...@@ -32,7 +30,7 @@ public interface StaffClerkRelationService { ...@@ -32,7 +30,7 @@ public interface StaffClerkRelationService {
* @param storeIds * @param storeIds
* @return * @return
*/ */
public boolean delBindByStoreIds(String wxEnterpriseId, Set<String> storeIds, String optStaffId, int chanelCode); boolean delBindByStoreIds(String wxEnterpriseId, Set<String> storeIds, String optStaffId, int chanelCode);
/** /**
* 删除绑定 * 删除绑定
...@@ -42,35 +40,37 @@ public interface StaffClerkRelationService { ...@@ -42,35 +40,37 @@ public interface StaffClerkRelationService {
* @param storeIds 解除除了这些门店之外的绑定的门店 * @param storeIds 解除除了这些门店之外的绑定的门店
* @return * @return
*/ */
public boolean delBindNotInStoreIds(String wxEnterpriseId, String enterpriseId, Set<String> storeIds, String optStaffId, int chanelCode); boolean delBindNotInStoreIds(String wxEnterpriseId, String enterpriseId, Set<String> storeIds, String optStaffId, int chanelCode);
/** /**
* 绑定 * 绑定
*
* @param dto * @param dto
* @return * @return
*/ */
public String bind(StaffClerkRelationDTO dto,String optStaffId,int chanelCode); String bind(StaffClerkRelationDTO dto, String optStaffId, int chanelCode);
/** /**
* 根据clerkId 更新数据 * 根据clerkId 更新数据
* @param dto * @param dto
* @return * @return
*/ */
public boolean updateByClerkId(StaffClerkRelationDTO dto); boolean updateByClerkId(StaffClerkRelationDTO dto);
/** /**
* 查询绑定根据clerkId * 查询绑定根据clerkId
*
* @param clerkId * @param clerkId
* @param wxEnterpriseId * @param wxEnterpriseId
* @return * @return
*/ */
public StaffClerkRelationDTO getBindByClerkId(String clerkId,String wxEnterpriseId); StaffClerkRelationDTO getBindByClerkId(String clerkId, String wxEnterpriseId);
StaffClerkRelationDTO getByCodeAndEnterpriseId(String clerkCode, String enterpriseId); StaffClerkRelationDTO getByCodeAndEnterpriseId(String clerkCode, String enterpriseId);
String insert(StaffClerkRelationDTO staffClerkRelation); String insert(StaffClerkRelationDTO staffClerkRelation);
public int cleanStaffClerk( String wxEnterpriseId, List<String> staffIds); int cleanStaffClerk(String wxEnterpriseId, List<String> staffIds);
StaffClerkRelationDTO getOneBindCodeNoStatus(String enterpriseId, String clerkCode); StaffClerkRelationDTO getOneBindCodeNoStatus(String enterpriseId, String clerkCode);
...@@ -86,15 +86,15 @@ public interface StaffClerkRelationService { ...@@ -86,15 +86,15 @@ public interface StaffClerkRelationService {
* 保存 * 保存
* @param memberClerkChatConfig * @param memberClerkChatConfig
*/ */
public void saveChatConfig(MemberClerkChatConfig memberClerkChatConfig); void saveChatConfig(MemberClerkChatConfig memberClerkChatConfig);
/** /**
*
* @param staffId * @param staffId
* @param memberId * @param memberId
* @return * @return
*/ */
public MemberClerkChatConfig getChatConfig(String staffId,String memberId); MemberClerkChatConfig getChatConfig(String staffId, String memberId);
/** /**
* 根据企业查询 * 根据企业查询
* @param wxEnterpriseId * @param wxEnterpriseId
...@@ -121,5 +121,14 @@ public interface StaffClerkRelationService { ...@@ -121,5 +121,14 @@ public interface StaffClerkRelationService {
*/ */
List<StaffClerkRelationDTO> listBindStoreIdByEnterpriseId(String enterpriseId); List<StaffClerkRelationDTO> listBindStoreIdByEnterpriseId(String enterpriseId);
/**
* 查询所有正常导购
*
* @return {@link List<StaffClerkRelationDTO> }
* @author xuwenqian
* @date 2021-07-15 16:26:17
*/
List<StaffClerkRelationDTO> listAll();
} }
package com.gic.haoban.manage.service.service.impl; package com.gic.haoban.manage.service.service.impl;
import java.util.*;
import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.gic.api.base.commons.Page;
import com.gic.commons.util.EntityUtil;
import com.gic.commons.util.ToolUtil; import com.gic.commons.util.ToolUtil;
import com.gic.haoban.base.api.common.BasePageInfo; import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.base.api.common.ServiceResponse; import com.gic.haoban.common.utils.PageUtil;
import com.gic.haoban.common.utils.StringUtil;
import com.gic.haoban.manage.api.dto.StaffClerkRelationDTO;
import com.gic.haoban.manage.api.enums.BindTypeEnum; import com.gic.haoban.manage.api.enums.BindTypeEnum;
import com.gic.haoban.manage.api.enums.ChannelCodeEnum; import com.gic.haoban.manage.api.enums.ChannelCodeEnum;
import com.gic.haoban.manage.service.dao.mapper.TabHaobanMemberClerkChatConfigMapper; import com.gic.haoban.manage.service.dao.mapper.TabHaobanMemberClerkChatConfigMapper;
import com.gic.haoban.manage.service.dao.mapper.TabHaobanStaffClerkRelationMapper;
import com.gic.haoban.manage.service.entity.MemberClerkChatConfig; import com.gic.haoban.manage.service.entity.MemberClerkChatConfig;
import com.gic.haoban.manage.service.entity.TabHaobanClerkMainStoreRelated;
import com.gic.haoban.manage.service.entity.TabHaobanStaffClerkBindLog;
import com.gic.haoban.manage.service.entity.TabHaobanStaffClerkRelation; import com.gic.haoban.manage.service.entity.TabHaobanStaffClerkRelation;
import com.gic.haoban.manage.service.service.ClerkMainStoreRelatedService; import com.gic.haoban.manage.service.service.*;
import com.gic.haoban.manage.service.service.ExternalClerkRelatedService;
import com.gic.haoban.manage.service.service.StaffClerkBindLogService;
import com.gic.haoban.manage.service.service.StaffService;
import com.gic.wechat.api.dto.qywx.QywxExternalcontactDTO;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import javafx.scene.control.Tab;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
...@@ -31,14 +24,8 @@ import org.slf4j.LoggerFactory; ...@@ -31,14 +24,8 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.gic.api.base.commons.Page; import java.util.*;
import com.gic.commons.util.EntityUtil; import java.util.stream.Collectors;
import com.gic.haoban.common.utils.PageUtil;
import com.gic.haoban.common.utils.StringUtil;
import com.gic.haoban.manage.api.dto.StaffClerkBindLogDetailDTO;
import com.gic.haoban.manage.api.dto.StaffClerkRelationDTO;
import com.gic.haoban.manage.service.dao.mapper.TabHaobanStaffClerkRelationMapper;
import com.gic.haoban.manage.service.service.StaffClerkRelationService;
@Service @Service
public class StaffClerkRelationServiceImpl implements StaffClerkRelationService { public class StaffClerkRelationServiceImpl implements StaffClerkRelationService {
...@@ -293,4 +280,9 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService ...@@ -293,4 +280,9 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
} }
return EntityUtil.changeEntityListNew(StaffClerkRelationDTO.class, clerkRelations); return EntityUtil.changeEntityListNew(StaffClerkRelationDTO.class, clerkRelations);
} }
@Override
public List<StaffClerkRelationDTO> listAll() {
return mapper.listAll();
}
} }
...@@ -38,422 +38,416 @@ import java.util.stream.Collectors; ...@@ -38,422 +38,416 @@ import java.util.stream.Collectors;
@Service @Service
public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiService { public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiService {
private static final Logger logger= LoggerFactory.getLogger(StaffClerkRelationApiServiceImpl.class); private static final Logger logger = LoggerFactory.getLogger(StaffClerkRelationApiServiceImpl.class);
@Autowired @Autowired
private StaffClerkRelationService staffClerkRelatinService; private StaffClerkRelationService staffClerkRelatinService;
@Autowired @Autowired
private EnterpriseService enterpriseService; private EnterpriseService enterpriseService;
@Autowired @Autowired
private ClerkService clerkService; private ClerkService clerkService;
@Autowired @Autowired
private StoreService storeService; private StoreService storeService;
@Autowired @Autowired
private TabHaobanStaffClerkRelationMapper tabHaobanStaffClerkRelationMapper; private TabHaobanStaffClerkRelationMapper tabHaobanStaffClerkRelationMapper;
@Autowired @Autowired
private AuditApiService auditApiService; private AuditApiService auditApiService;
@Autowired @Autowired
private ClerkMainStoreRelatedService clerkMainStoreRelatedService; private ClerkMainStoreRelatedService clerkMainStoreRelatedService;
@Autowired @Autowired
private StaffClerkBindLogService staffClerkBindLogService; private StaffClerkBindLogService staffClerkBindLogService;
@Autowired @Autowired
private WxEnterpriseRelatedService wxEnterpriseRelatedService; private WxEnterpriseRelatedService wxEnterpriseRelatedService;
@Autowired @Autowired
private ClerkNewService clerkNewService; private ClerkNewService clerkNewService;
@Autowired @Autowired
private StaffService staffService; private StaffService staffService;
@Autowired @Autowired
private ExternalClerkRelatedService externalClerkRelatedService; private ExternalClerkRelatedService externalClerkRelatedService;
@Autowired @Autowired
private QywxUserApiService qywxUserApiService; private QywxUserApiService qywxUserApiService;
@Autowired @Autowired
private SecretSettingService secretSettingService; private SecretSettingService secretSettingService;
@Autowired @Autowired
private WxEnterpriseService wxEnterpriseService; private WxEnterpriseService wxEnterpriseService;
@Override @Override
public void bindLogMq(String params) { public void bindLogMq(String params) {
logger.info("绑定日志mq:{}",params); logger.info("绑定日志mq:{}", params);
StaffClerkBindLogInfoDTO infoDTO = JSONObject.parseObject(params, StaffClerkBindLogInfoDTO.class); StaffClerkBindLogInfoDTO infoDTO = JSONObject.parseObject(params, StaffClerkBindLogInfoDTO.class);
if (null == infoDTO){ if (null == infoDTO) {
logger.info("数据不存在"); logger.info("数据不存在");
return; return;
} }
TabHaobanStaffClerkRelation clerkRelation = tabHaobanStaffClerkRelationMapper.selectByPrimaryKey(infoDTO.getRelationId()); TabHaobanStaffClerkRelation clerkRelation = tabHaobanStaffClerkRelationMapper.selectByPrimaryKey(infoDTO.getRelationId());
if (null == clerkRelation) { if (null == clerkRelation) {
logger.info("不存在绑定数据"); logger.info("不存在绑定数据");
return; return;
} }
ClerkDTO clerkDTO = clerkService.getClerkByClerkIdNoStatus(clerkRelation.getClerkId()); ClerkDTO clerkDTO = clerkService.getClerkByClerkIdNoStatus(clerkRelation.getClerkId());
String phoneNumber=""; String phoneNumber = "";
if (null != clerkDTO) { if (null != clerkDTO) {
phoneNumber=clerkDTO.getPhoneNumber(); phoneNumber = clerkDTO.getPhoneNumber();
} }
TabHaobanStaffClerkBindLog staffClerkRelation=new TabHaobanStaffClerkBindLog(); TabHaobanStaffClerkBindLog staffClerkRelation = new TabHaobanStaffClerkBindLog();
staffClerkRelation.setClerkId(clerkRelation.getClerkId()); staffClerkRelation.setClerkId(clerkRelation.getClerkId());
staffClerkRelation.setChannelCode(infoDTO.getChannelCode()); staffClerkRelation.setChannelCode(infoDTO.getChannelCode());
staffClerkRelation.setClerkCode(clerkRelation.getClerkCode()); staffClerkRelation.setClerkCode(clerkRelation.getClerkCode());
staffClerkRelation.setCreateTime(new Date()); staffClerkRelation.setCreateTime(new Date());
staffClerkRelation.setEnterpriseId(clerkRelation.getEnterpriseId()); staffClerkRelation.setEnterpriseId(clerkRelation.getEnterpriseId());
staffClerkRelation.setOptStaffId(infoDTO.getOptStaffId()); staffClerkRelation.setOptStaffId(infoDTO.getOptStaffId());
staffClerkRelation.setOptType(infoDTO.getOptType()); staffClerkRelation.setOptType(infoDTO.getOptType());
staffClerkRelation.setStatusFlag(1); staffClerkRelation.setStatusFlag(1);
staffClerkRelation.setStaffId(clerkRelation.getStaffId()); staffClerkRelation.setStaffId(clerkRelation.getStaffId());
staffClerkRelation.setWxEnterpriseId(clerkRelation.getWxEnterpriseId()); staffClerkRelation.setWxEnterpriseId(clerkRelation.getWxEnterpriseId());
staffClerkRelation.setRelationId(infoDTO.getRelationId()); staffClerkRelation.setRelationId(infoDTO.getRelationId());
staffClerkRelation.setClerkPhone(phoneNumber); staffClerkRelation.setClerkPhone(phoneNumber);
staffClerkRelation.setUpdateTime(new Date()); staffClerkRelation.setUpdateTime(new Date());
staffClerkBindLogService.insert(staffClerkRelation); staffClerkBindLogService.insert(staffClerkRelation);
} }
@Override @Override
public List<StaffClerkRelationDTO> listBindCode(String enterpriseId, Set<String> clerkCodeList) { public List<StaffClerkRelationDTO> listBindCode(String enterpriseId, Set<String> clerkCodeList) {
return staffClerkRelatinService.listBindCode(enterpriseId,clerkCodeList); return staffClerkRelatinService.listBindCode(enterpriseId, clerkCodeList);
} }
@Override
public List<StaffClerkRelationDTO> listBindCodeByStaffId(List<String> enterpriseIdList, String staffId) { @Override
return staffClerkRelatinService.listBindCodeByStaffId(enterpriseIdList,staffId); public List<StaffClerkRelationDTO> listBindCodeByStaffId(List<String> enterpriseIdList, String staffId) {
} return staffClerkRelatinService.listBindCodeByStaffId(enterpriseIdList, staffId);
}
@Override
public List<StaffClerkInfoDTO> listBindDetailByStaffId(String staffId) { @Override
List<StaffClerkRelationDTO> list = staffClerkRelatinService.listBindCodeByStaffId(null, staffId); public List<StaffClerkInfoDTO> listBindDetailByStaffId(String staffId) {
if (CollectionUtils.isEmpty(list)) { List<StaffClerkRelationDTO> list = staffClerkRelatinService.listBindCodeByStaffId(null, staffId);
return null; if (CollectionUtils.isEmpty(list)) {
} return null;
List<StaffClerkInfoDTO> infoDTOS = EntityUtil.changeEntityListByJSON(StaffClerkInfoDTO.class, list); }
Map<String,String> nameMap=new HashMap<>(); List<StaffClerkInfoDTO> infoDTOS = EntityUtil.changeEntityListByJSON(StaffClerkInfoDTO.class, list);
infoDTOS.forEach(infoDTO->{ Map<String, String> nameMap = new HashMap<>();
//企业 infoDTOS.forEach(infoDTO -> {
if (!nameMap.containsKey(infoDTO.getEnterpriseId())) { //企业
EnterpriseDTO enterpriseDTO = enterpriseService.getEnterpriseById(infoDTO.getEnterpriseId()); if (!nameMap.containsKey(infoDTO.getEnterpriseId())) {
if (null != enterpriseDTO) { EnterpriseDTO enterpriseDTO = enterpriseService.getEnterpriseById(infoDTO.getEnterpriseId());
nameMap.put(infoDTO.getEnterpriseId(),enterpriseDTO.getEnterpriseName()); if (null != enterpriseDTO) {
}else{ nameMap.put(infoDTO.getEnterpriseId(), enterpriseDTO.getEnterpriseName());
nameMap.put(infoDTO.getEnterpriseId(),"未知商户"); } else {
} nameMap.put(infoDTO.getEnterpriseId(), "未知商户");
} }
//门店店员名称 }
if (!nameMap.containsKey(infoDTO.getClerkId())) { //门店店员名称
ClerkDTO clerkDTO = clerkService.getClerkByClerkId(infoDTO.getClerkId()); if (!nameMap.containsKey(infoDTO.getClerkId())) {
if (null != clerkDTO) { ClerkDTO clerkDTO = clerkService.getClerkByClerkId(infoDTO.getClerkId());
nameMap.put(infoDTO.getClerkId(),clerkDTO.getClerkName()); if (null != clerkDTO) {
nameMap.put(infoDTO.getStoreId(),clerkDTO.getStoreName()); nameMap.put(infoDTO.getClerkId(), clerkDTO.getClerkName());
infoDTO.setClerkPhoneNumber(clerkDTO.getPhoneNumber()); nameMap.put(infoDTO.getStoreId(), clerkDTO.getStoreName());
}else{ infoDTO.setClerkPhoneNumber(clerkDTO.getPhoneNumber());
nameMap.put(infoDTO.getEnterpriseId(),"未知店员"); } else {
} nameMap.put(infoDTO.getEnterpriseId(), "未知店员");
} }
}
//门店店员名称
if (!nameMap.containsKey(infoDTO.getStoreId())) { //门店店员名称
StoreDTO storeDTO = storeService.getStore(infoDTO.getStoreId()); if (!nameMap.containsKey(infoDTO.getStoreId())) {
if (null != storeDTO) { StoreDTO storeDTO = storeService.getStore(infoDTO.getStoreId());
nameMap.put(infoDTO.getStoreId(),storeDTO.getStoreName()); if (null != storeDTO) {
}else{ nameMap.put(infoDTO.getStoreId(), storeDTO.getStoreName());
nameMap.put(infoDTO.getStoreId(),"未知门店"); } else {
} nameMap.put(infoDTO.getStoreId(), "未知门店");
} }
}
infoDTO.setClerkName(nameMap.get(infoDTO.getClerkId()));
infoDTO.setStoreName(nameMap.get(infoDTO.getStoreId())); infoDTO.setClerkName(nameMap.get(infoDTO.getClerkId()));
infoDTO.setEnterpriseName(nameMap.get(infoDTO.getEnterpriseId())); infoDTO.setStoreName(nameMap.get(infoDTO.getStoreId()));
}); infoDTO.setEnterpriseName(nameMap.get(infoDTO.getEnterpriseId()));
return infoDTOS; });
} return infoDTOS;
}
@Override
public ServiceResponse bindStaffClerk(StaffClerkRelationDTO staffClerkRelationDTO,String optStaffId,int chanelCode) { @Override
logger.info("绑定clerk:{}", JSONObject.toJSONString(staffClerkRelationDTO)); public ServiceResponse bindStaffClerk(StaffClerkRelationDTO staffClerkRelationDTO, String optStaffId, int chanelCode) {
ServiceResponse<Object> response = new ServiceResponse<>(); logger.info("绑定clerk:{}", JSONObject.toJSONString(staffClerkRelationDTO));
StaffClerkRelationDTO relationDTO = staffClerkRelatinService.getBindByClerkId(staffClerkRelationDTO.getClerkId(), staffClerkRelationDTO.getWxEnterpriseId()); ServiceResponse<Object> response = new ServiceResponse<>();
if (null!=relationDTO) { StaffClerkRelationDTO relationDTO = staffClerkRelatinService.getBindByClerkId(staffClerkRelationDTO.getClerkId(), staffClerkRelationDTO.getWxEnterpriseId());
response.setCode(2); if (null != relationDTO) {
response.setMessage("已经被绑定,不能绑定"); response.setCode(2);
return response; response.setMessage("已经被绑定,不能绑定");
} return response;
AuditDTO auditDTO = auditApiService.findByBindRelatedIdAndAuditType(staffClerkRelationDTO.getClerkId(), AuditType.CLERK_BIND.getCode()); }
if (null != auditDTO) { AuditDTO auditDTO = auditApiService.findByBindRelatedIdAndAuditType(staffClerkRelationDTO.getClerkId(), AuditType.CLERK_BIND.getCode());
response.setCode(4); if (null != auditDTO) {
response.setMessage("该导购已经被被申请绑定,请审核处理后再绑定"); response.setCode(4);
return response; response.setMessage("该导购已经被被申请绑定,请审核处理后再绑定");
} return response;
List<AuditDTO> list = auditApiService.listByStoreId(staffClerkRelationDTO.getStoreId()); }
if (CollectionUtils.isNotEmpty(list)) { List<AuditDTO> list = auditApiService.listByStoreId(staffClerkRelationDTO.getStoreId());
Set<String> staffIds = list.stream().map(AuditDTO::getCommitStaffId).collect(Collectors.toSet()); if (CollectionUtils.isNotEmpty(list)) {
if (staffIds.contains(staffClerkRelationDTO.getStaffId())) { Set<String> staffIds = list.stream().map(AuditDTO::getCommitStaffId).collect(Collectors.toSet());
response.setCode(5); if (staffIds.contains(staffClerkRelationDTO.getStaffId())) {
response.setMessage("该成员已经已经在该门店下申请了绑定,请审核处理后再绑定"); response.setCode(5);
return response; response.setMessage("该成员已经已经在该门店下申请了绑定,请审核处理后再绑定");
} return response;
} }
StaffClerkRelationDTO storeHasBind = staffClerkRelatinService.getOneBindByStoreId(staffClerkRelationDTO.getStaffId(), staffClerkRelationDTO.getStoreId()); }
if (storeHasBind!=null) { StaffClerkRelationDTO storeHasBind = staffClerkRelatinService.getOneBindByStoreId(staffClerkRelationDTO.getStaffId(), staffClerkRelationDTO.getStoreId());
response.setCode(3); if (storeHasBind != null) {
response.setMessage("该导购已在该门店下有其它成员绑定"); response.setCode(3);
return response; response.setMessage("该导购已在该门店下有其它成员绑定");
} return response;
}
String relationId = staffClerkRelatinService.bind(staffClerkRelationDTO,optStaffId,chanelCode);
response.setResult(relationId); String relationId = staffClerkRelatinService.bind(staffClerkRelationDTO, optStaffId, chanelCode);
return response; response.setResult(relationId);
} return response;
}
@Override
public StaffClerkRelationDTO getByCodeAndEnterpriseId(String clerkCode, String enterpriseId) { @Override
return staffClerkRelatinService.getByCodeAndEnterpriseId(clerkCode,enterpriseId); public StaffClerkRelationDTO getByCodeAndEnterpriseId(String clerkCode, String enterpriseId) {
} return staffClerkRelatinService.getByCodeAndEnterpriseId(clerkCode, enterpriseId);
}
@Override
public String delByStoreIdAndCode(String storeId, String clerkCode) { @Override
TabHaobanStaffClerkRelation staffClerkRelation = tabHaobanStaffClerkRelationMapper.getByCodeAndStoreId(clerkCode, storeId); public String delByStoreIdAndCode(String storeId, String clerkCode) {
tabHaobanStaffClerkRelationMapper.delByStoreIdAndCode(storeId,clerkCode); TabHaobanStaffClerkRelation staffClerkRelation = tabHaobanStaffClerkRelationMapper.getByCodeAndStoreId(clerkCode, storeId);
delSetMainStore(staffClerkRelation); tabHaobanStaffClerkRelationMapper.delByStoreIdAndCode(storeId, clerkCode);
return null; delSetMainStore(staffClerkRelation);
} return null;
@Override }
public List<StaffClerkRelationDTO> listByClerkIds(List<String> clerkIds) {
if(clerkIds == null || clerkIds.isEmpty()){ @Override
return Collections.EMPTY_LIST; public List<StaffClerkRelationDTO> listByClerkIds(List<String> clerkIds) {
} if (clerkIds == null || clerkIds.isEmpty()) {
List<TabHaobanStaffClerkRelation> list = tabHaobanStaffClerkRelationMapper.listByClerkIds(clerkIds); return Collections.EMPTY_LIST;
if(CollectionUtil.isEmpty(list)){ }
return new ArrayList<StaffClerkRelationDTO>(); List<TabHaobanStaffClerkRelation> list = tabHaobanStaffClerkRelationMapper.listByClerkIds(clerkIds);
} if (CollectionUtil.isEmpty(list)) {
List<StaffClerkRelationDTO> result = EntityUtil.changeEntityListByJSON(StaffClerkRelationDTO.class, list); return new ArrayList<StaffClerkRelationDTO>();
return result; }
} List<StaffClerkRelationDTO> result = EntityUtil.changeEntityListByJSON(StaffClerkRelationDTO.class, list);
@Override return result;
public List<StaffClerkRelationDTO> listByStoreId(String storeId) { }
List<TabHaobanStaffClerkRelation> list = tabHaobanStaffClerkRelationMapper.listByStoreId(storeId);
if(CollectionUtil.isEmpty(list)){ @Override
return new ArrayList<StaffClerkRelationDTO>(); public List<StaffClerkRelationDTO> listByStoreId(String storeId) {
} List<TabHaobanStaffClerkRelation> list = tabHaobanStaffClerkRelationMapper.listByStoreId(storeId);
List<StaffClerkRelationDTO> result = EntityUtil.changeEntityListByJSON(StaffClerkRelationDTO.class, list); if (CollectionUtil.isEmpty(list)) {
return result; return new ArrayList<StaffClerkRelationDTO>();
} }
List<StaffClerkRelationDTO> result = EntityUtil.changeEntityListByJSON(StaffClerkRelationDTO.class, list);
@Override return result;
public boolean unbindByStaffAndClerkId(String staffId, String clerkId) { }
boolean b = staffClerkRelatinService.delBind(clerkId,staffId, ChannelCodeEnum.ADMIN_UNBIND.getCode());
return b; @Override
} public boolean unbindByStaffAndClerkId(String staffId, String clerkId) {
@Override return staffClerkRelatinService.delBind(clerkId, staffId, ChannelCodeEnum.ADMIN_UNBIND.getCode());
public StaffClerkRelationDTO getOneByClerkId(String clerkId) { }
TabHaobanStaffClerkRelation tab = tabHaobanStaffClerkRelationMapper.getOneByClerkId(clerkId);
StaffClerkRelationDTO result = EntityUtil.changeEntityByJSON(StaffClerkRelationDTO.class, tab); @Override
return result; public StaffClerkRelationDTO getOneByClerkId(String clerkId) {
} TabHaobanStaffClerkRelation tab = tabHaobanStaffClerkRelationMapper.getOneByClerkId(clerkId);
public StaffClerkRelationDTO getByClerkId(String clerkId) { StaffClerkRelationDTO result = EntityUtil.changeEntityByJSON(StaffClerkRelationDTO.class, tab);
StaffClerkRelationDTO staffRelation = staffClerkRelatinService.getByClerkId(clerkId); return result;
return staffRelation; }
}
@Override @Override
public StaffClerkRelationDTO getOneByStoreIdAndStaffId(String storeId, public StaffClerkRelationDTO getByClerkId(String clerkId) {
String staffId) { StaffClerkRelationDTO staffRelation = staffClerkRelatinService.getByClerkId(clerkId);
TabHaobanStaffClerkRelation tab = tabHaobanStaffClerkRelationMapper.getOneByStoreIdAndStaffId(storeId,staffId); return staffRelation;
if(tab == null){ }
return null;
} @Override
StaffClerkRelationDTO dto = EntityUtil.changeEntity(StaffClerkRelationDTO.class, tab); public StaffClerkRelationDTO getOneByStoreIdAndStaffId(String storeId,
return dto; String staffId) {
} TabHaobanStaffClerkRelation tab = tabHaobanStaffClerkRelationMapper.getOneByStoreIdAndStaffId(storeId, staffId);
@Override if (tab == null) {
public void delAndInsert(StaffClerkRelationDTO staffClerkRelation,String optStaffId,int chanelCode) { return null;
if(StringUtils.isNotBlank(staffClerkRelation.getStaffClerkRelationId())){ }
TabHaobanStaffClerkRelation oldStaffClerkRelation = tabHaobanStaffClerkRelationMapper.selectByPrimaryKey(staffClerkRelation.getStaffClerkRelationId()); return EntityUtil.changeEntity(StaffClerkRelationDTO.class, tab);
tabHaobanStaffClerkRelationMapper.delByPrimaryKey(staffClerkRelation.getStaffClerkRelationId()); }
staffClerkBindLogService.pushToMq(oldStaffClerkRelation.getStaffId(),optStaffId, BindTypeEnum.UNBIND.getVal(),chanelCode,staffClerkRelation.getStaffClerkRelationId());
clerkMainStoreRelatedService.delMainStore(oldStaffClerkRelation.getStaffId(), oldStaffClerkRelation.getStoreId(), oldStaffClerkRelation.getWxEnterpriseId()); @Override
} public void delAndInsert(StaffClerkRelationDTO staffClerkRelation, String optStaffId, int chanelCode) {
String relationId = staffClerkRelatinService.insert(staffClerkRelation); if (StringUtils.isNotBlank(staffClerkRelation.getStaffClerkRelationId())) {
staffClerkBindLogService.pushToMq(staffClerkRelation.getStaffId(),optStaffId, BindTypeEnum.BIND.getVal(),chanelCode,relationId); TabHaobanStaffClerkRelation oldStaffClerkRelation = tabHaobanStaffClerkRelationMapper.selectByPrimaryKey(staffClerkRelation.getStaffClerkRelationId());
//设置主门店 tabHaobanStaffClerkRelationMapper.delByPrimaryKey(staffClerkRelation.getStaffClerkRelationId());
clerkMainStoreRelatedService.getMainStoreByStaffId(staffClerkRelation.getStaffId(), staffClerkRelation.getWxEnterpriseId()); staffClerkBindLogService.pushToMq(oldStaffClerkRelation.getStaffId(), optStaffId, BindTypeEnum.UNBIND.getVal(), chanelCode, staffClerkRelation.getStaffClerkRelationId());
} clerkMainStoreRelatedService.delMainStore(oldStaffClerkRelation.getStaffId(), oldStaffClerkRelation.getStoreId(), oldStaffClerkRelation.getWxEnterpriseId());
@Override }
public void delByClerkId(String clerkId) { String relationId = staffClerkRelatinService.insert(staffClerkRelation);
TabHaobanStaffClerkRelation staffClerkRelation = tabHaobanStaffClerkRelationMapper.getOneByClerkId(clerkId); staffClerkBindLogService.pushToMq(staffClerkRelation.getStaffId(), optStaffId, BindTypeEnum.BIND.getVal(), chanelCode, relationId);
tabHaobanStaffClerkRelationMapper.delByClerkId(clerkId); //设置主门店
delSetMainStore(staffClerkRelation); clerkMainStoreRelatedService.getMainStoreByStaffId(staffClerkRelation.getStaffId(), staffClerkRelation.getWxEnterpriseId());
} }
@Override
public List<StaffClerkRelationDTO> listByEnterpriseIdAndWxUserId(String enterpriseId,String wxUserId) { @Override
List<TabHaobanStaffClerkRelation> list = tabHaobanStaffClerkRelationMapper.listByEnterpriseIdAndWxUserId(enterpriseId,wxUserId); public void delByClerkId(String clerkId) {
return EntityUtil.changeEntityListByJSON(StaffClerkRelationDTO.class, list); TabHaobanStaffClerkRelation staffClerkRelation = tabHaobanStaffClerkRelationMapper.getOneByClerkId(clerkId);
} tabHaobanStaffClerkRelationMapper.delByClerkId(clerkId);
delSetMainStore(staffClerkRelation);
@Override }
public Page<StaffClerkBindLogDetailDTO> pageStaffClerkBindLog(String wxEnterpriseId, String search, String enterpriseId, int optType, BasePageInfo pageInfo) {
@Override
List<TabHaobanWxEnterpriseRelated> wxEnterpriseRelateds = wxEnterpriseRelatedService.getByWxEnterpriseId(wxEnterpriseId); public List<StaffClerkRelationDTO> listByEnterpriseIdAndWxUserId(String enterpriseId, String wxUserId) {
if (CollectionUtils.isEmpty(wxEnterpriseRelateds)) { List<TabHaobanStaffClerkRelation> list = tabHaobanStaffClerkRelationMapper.listByEnterpriseIdAndWxUserId(enterpriseId, wxUserId);
logger.info("没有关联企业"); return EntityUtil.changeEntityListByJSON(StaffClerkRelationDTO.class, list);
return null; }
}
List<String> enterpriseList = wxEnterpriseRelateds.stream().map(TabHaobanWxEnterpriseRelated::getEnterpriseId) @Override
.filter(eid->{ public Page<StaffClerkBindLogDetailDTO> pageStaffClerkBindLog(String wxEnterpriseId, String search, String enterpriseId, int optType, BasePageInfo pageInfo) {
if (StringUtils.isBlank(enterpriseId)) { List<TabHaobanWxEnterpriseRelated> wxEnterpriseRelateds = wxEnterpriseRelatedService.getByWxEnterpriseId(wxEnterpriseId);
return true; if (CollectionUtils.isEmpty(wxEnterpriseRelateds)) {
}else if (enterpriseId.equals(eid)) { logger.info("没有关联企业");
return true; return null;
}else{ }
return false; List<String> enterpriseList = wxEnterpriseRelateds.stream().map(TabHaobanWxEnterpriseRelated::getEnterpriseId)
} .filter(eid -> {
}).collect(Collectors.toList()); if (StringUtils.isBlank(enterpriseId)) {
if (CollectionUtils.isEmpty(enterpriseList)) { return true;
logger.info("没有有效的企业"); } else {
return null; return enterpriseId.equals(eid);
} }
List<String> clerkIds=null; }).collect(Collectors.toList());
// if (StringUtils.isNotBlank(search)) { if (CollectionUtils.isEmpty(enterpriseList)) {
// List<ClerkDTO> clerk = clerkNewService.listClerkByEnterpriseIdAndSearch(enterpriseList, search); logger.info("没有有效的企业");
// if (CollectionUtils.isEmpty(clerk)) { return null;
// logger.info("没有搜索到相应信息"); }
// return new Page<StaffClerkBindLogDetailDTO>(); List<String> clerkIds = null;
// } Page<StaffClerkBindLogDetailDTO> retList = staffClerkBindLogService.pageBindLog(wxEnterpriseId, clerkIds, null, enterpriseList, optType, search, pageInfo);
// clerkIds = clerk.stream().map(ClerkDTO::getClerkId).collect(Collectors.toList()); if (CollectionUtils.isNotEmpty(retList.getResult())) {
// } retList.getResult().forEach(staffClerkBindLogDetailDTO -> {
Page<StaffClerkBindLogDetailDTO> retList = staffClerkBindLogService.pageBindLog(wxEnterpriseId, clerkIds, null, enterpriseList, optType,search, pageInfo); TabHaobanStaff haobanStaff = staffService.selectById(staffClerkBindLogDetailDTO.getStaffId());
if (CollectionUtils.isNotEmpty(retList.getResult())) { if (null != haobanStaff) {
retList.getResult().forEach(staffClerkBindLogDetailDTO -> { staffClerkBindLogDetailDTO.setStaffName(haobanStaff.getStaffName());
TabHaobanStaff haobanStaff = staffService.selectById(staffClerkBindLogDetailDTO.getStaffId()); staffClerkBindLogDetailDTO.setWxUserId(haobanStaff.getWxUserId());
if (null !=haobanStaff) { } else {
staffClerkBindLogDetailDTO.setStaffName(haobanStaff.getStaffName()); staffClerkBindLogDetailDTO.setStaffName("未知成员");
staffClerkBindLogDetailDTO.setWxUserId(haobanStaff.getWxUserId()); }
}else{ if ("-1".equals(staffClerkBindLogDetailDTO.getOptStaffId())) {
staffClerkBindLogDetailDTO.setStaffName("未知成员"); staffClerkBindLogDetailDTO.setOptStaffName("系统");
} } else {
if ("-1".equals(staffClerkBindLogDetailDTO.getOptStaffId())) { haobanStaff = staffService.selectById(staffClerkBindLogDetailDTO.getOptStaffId());
staffClerkBindLogDetailDTO.setOptStaffName("系统"); if (null != haobanStaff) {
}else { staffClerkBindLogDetailDTO.setOptStaffName(haobanStaff.getStaffName());
haobanStaff = staffService.selectById(staffClerkBindLogDetailDTO.getOptStaffId()); } else {
if (null != haobanStaff) { staffClerkBindLogDetailDTO.setOptStaffName("未知成员");
staffClerkBindLogDetailDTO.setOptStaffName(haobanStaff.getStaffName()); }
} else { }
staffClerkBindLogDetailDTO.setOptStaffName("未知成员");
} ClerkDTO clerkDTO = clerkService.getClerkByClerkIdNoStatus(staffClerkBindLogDetailDTO.getClerkId());
} if (null != clerkDTO) {
staffClerkBindLogDetailDTO.setClerkName(clerkDTO.getClerkName());
ClerkDTO clerkDTO = clerkService.getClerkByClerkIdNoStatus(staffClerkBindLogDetailDTO.getClerkId()); }
if (null != clerkDTO) { staffClerkBindLogDetailDTO.setClerkPhoneNumber(staffClerkBindLogDetailDTO.getClerkPhone());
staffClerkBindLogDetailDTO.setClerkName(clerkDTO.getClerkName()); });
} }
staffClerkBindLogDetailDTO.setClerkPhoneNumber(staffClerkBindLogDetailDTO.getClerkPhone()); return retList;
}); }
}
return retList; @Override
} public void pushToBindLog(String staffId, String optStaffId, int optType, int channelCode, String relationId) {
staffClerkBindLogService.pushToMq(staffId, optStaffId, optType, channelCode, relationId);
@Override }
public void pushToBindLog(String staffId, String optStaffId, int optType, int channelCode, String relationId) {
staffClerkBindLogService.pushToMq(staffId,optStaffId,optType,channelCode,relationId); private void setMainStore(StaffClerkRelationDTO staffClerkRelation) {
} if (staffClerkRelation == null) {
logger.info("staffClerkRelation为空");
private void setMainStore(StaffClerkRelationDTO staffClerkRelation){ return;
if(staffClerkRelation == null){ }
logger.info("staffClerkRelation为空"); String staffId = staffClerkRelation.getStaffId();
return; String wxEnterpriseId = staffClerkRelation.getWxEnterpriseId();
} List<StaffClerkRelationDTO> list = staffClerkRelatinService.lisByStaffId(wxEnterpriseId, staffId);
String staffId = staffClerkRelation.getStaffId(); if (list != null && list.size() == 1) {
String wxEnterpriseId = staffClerkRelation.getWxEnterpriseId(); clerkMainStoreRelatedService.setMainStore(staffId, staffClerkRelation.getStoreId(), wxEnterpriseId);
List<StaffClerkRelationDTO> list = staffClerkRelatinService.lisByStaffId(wxEnterpriseId, staffId); }
if(list != null && list.size() == 1){ }
clerkMainStoreRelatedService.setMainStore(staffId, staffClerkRelation.getStoreId(), wxEnterpriseId);
} private void delSetMainStore(TabHaobanStaffClerkRelation staffClerkRelation) {
} if (staffClerkRelation == null) {
logger.info("staffClerkRelation为空");
private void delSetMainStore(TabHaobanStaffClerkRelation staffClerkRelation){ return;
if(staffClerkRelation == null){ }
logger.info("staffClerkRelation为空"); String staffId = staffClerkRelation.getStaffId();
return; String wxEnterpriseId = staffClerkRelation.getWxEnterpriseId();
} externalClerkRelatedService.delByClerkIdAndStaffId(staffClerkRelation.getClerkId(), staffId);
String staffId = staffClerkRelation.getStaffId(); //删除主门店
String wxEnterpriseId = staffClerkRelation.getWxEnterpriseId(); clerkMainStoreRelatedService.delMainStore(staffId, staffClerkRelation.getStoreId(), wxEnterpriseId);
externalClerkRelatedService.delByClerkIdAndStaffId(staffClerkRelation.getClerkId(), staffId); }
//删除主门店
clerkMainStoreRelatedService.delMainStore(staffId, staffClerkRelation.getStoreId(), wxEnterpriseId); @Override
// TabHaobanClerkMainStoreRelated r = clerkMainStoreRelatedService.selectByWxEnterpriseIdAndStoreId(staffId, wxEnterpriseId); public ServiceResponse<String> getClerkMemberChatConfig(String clerkId) {
// r.setStatusFlag(0); ServiceResponse response = new ServiceResponse();
// clerkMainStoreRelatedService.update(r); StaffClerkRelationDTO relationDTO = staffClerkRelatinService.getByClerkId(clerkId);
// List<StaffClerkRelationDTO> list = staffClerkRelatinService.lisByStaffId(wxEnterpriseId, staffId); if (null == relationDTO) {
// if(list != null && list.size() >= 1){ logger.info("导购没有关联企业微信:{}", clerkId);
// clerkMainStoreRelatedService.setMainStore(staffId, list.get(list.size()-1).getStoreId(), wxEnterpriseId); response.setCode(2);
// } response.setMessage("导购没有关联企业微信");
} return response;
}
@Override
public ServiceResponse<String> getClerkMemberChatConfig(String clerkId) { MemberClerkChatConfig chatConfig = staffClerkRelatinService.getChatConfig(relationDTO.getStaffId(), "-1");
if (chatConfig != null) {
ServiceResponse response=new ServiceResponse(); response.setResult(chatConfig.getConfigId());
StaffClerkRelationDTO relationDTO = staffClerkRelatinService.getByClerkId(clerkId); return response;
if (null == relationDTO) { }
logger.info("导购没有关联企业微信:{}",clerkId);
response.setCode(2); QywxExternalcontactDTO send = new QywxExternalcontactDTO();
response.setMessage("导购没有关联企业微信"); send.setType(1);
return response; send.setScene(1);
} send.setRemark("导购:" + relationDTO.getClerkCode());
List<String> userIds = new ArrayList<>();
MemberClerkChatConfig chatConfig = staffClerkRelatinService.getChatConfig(relationDTO.getStaffId(), "-1"); userIds.add(relationDTO.getWxUserId());
if (chatConfig!=null) { send.setUser(userIds);
response.setResult(chatConfig.getConfigId());
return response;
} SecretSettingDTO secretSetting = secretSettingService.getSecretSetting(relationDTO.getWxEnterpriseId(), SecretTypeEnum.HAOBAN_HELP.getVal());
if (null == secretSetting || secretSetting.getCheckFlag() == 0) {
QywxExternalcontactDTO send = new QywxExternalcontactDTO(); logger.info("没有配置secret:{}", relationDTO.getWxEnterpriseId());
send.setType(1); response.setCode(3);
send.setScene(1); response.setMessage("企业微信配置异常");
send.setRemark("导购:" + relationDTO.getClerkCode()); return response;
List<String> userIds = new ArrayList<>(); }
userIds.add(relationDTO.getWxUserId()); WxEnterpriseDTO enterpriseDTO = wxEnterpriseService.selectById(relationDTO.getWxEnterpriseId());
send.setUser(userIds); String configId = qywxUserApiService.getExternalcontactByUserId(enterpriseDTO.getCorpid(), secretSetting.getSecretVal(), send);
logger.info("configId:{}", configId);
if (StringUtils.isBlank(configId)) {
SecretSettingDTO secretSetting = secretSettingService.getSecretSetting(relationDTO.getWxEnterpriseId(), SecretTypeEnum.HAOBAN_HELP.getVal()); logger.info("staff:{}", configId, JSONObject.toJSONString(relationDTO));
if (null == secretSetting||secretSetting.getCheckFlag()==0) { response.setCode(4);
logger.info("没有配置secret:{}",relationDTO.getWxEnterpriseId()); response.setMessage("创建config失败");
response.setCode(3); return response;
response.setMessage("企业微信配置异常"); }
return response; MemberClerkChatConfig clerkChatConfig = new MemberClerkChatConfig();
} clerkChatConfig.setConfigId(configId);
WxEnterpriseDTO enterpriseDTO = wxEnterpriseService.selectById(relationDTO.getWxEnterpriseId()); clerkChatConfig.setEnterpriseId(relationDTO.getEnterpriseId());
String configId = qywxUserApiService.getExternalcontactByUserId(enterpriseDTO.getCorpid(), secretSetting.getSecretVal(), send); clerkChatConfig.setMemberId("-1");
logger.info("configId:{}",configId); clerkChatConfig.setStaffId(relationDTO.getStaffId());
if (StringUtils.isBlank(configId)) { staffClerkRelatinService.saveChatConfig(clerkChatConfig);
logger.info("staff:{}", configId, JSONObject.toJSONString(relationDTO));
response.setCode(4); response.setResult(clerkChatConfig.getConfigId());
response.setMessage("创建config失败"); return response;
return response; }
}
MemberClerkChatConfig clerkChatConfig = new MemberClerkChatConfig(); @Override
clerkChatConfig.setConfigId(configId); public Page<StaffClerkRelationDTO> pageByWxEnterpriseId(String wxEnterpriseId, BasePageInfo pageInfo) {
clerkChatConfig.setEnterpriseId(relationDTO.getEnterpriseId()); return staffClerkRelatinService.pageByWxEnterpriseId(wxEnterpriseId, pageInfo);
clerkChatConfig.setMemberId("-1"); }
clerkChatConfig.setStaffId(relationDTO.getStaffId());
staffClerkRelatinService.saveChatConfig(clerkChatConfig); @Override
public List<StaffClerkRelationDTO> listAll() {
response.setResult(clerkChatConfig.getConfigId()); return staffClerkRelatinService.listAll();
return response; }
}
@Override
public Page<StaffClerkRelationDTO> pageByWxEnterpriseId(String wxEnterpriseId, BasePageInfo pageInfo) {
return staffClerkRelatinService.pageByWxEnterpriseId(wxEnterpriseId,pageInfo);
}
} }
...@@ -15,11 +15,11 @@ ...@@ -15,11 +15,11 @@
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP" /> <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
</resultMap> </resultMap>
<sql id="Base_Column_List" > <sql id="Base_Column_List" >
staff_clerk_relation_id, staff_id, wx_enterprise_id, wx_user_id, enterprise_id, store_id, staff_clerk_relation_id, staff_id, wx_enterprise_id, wx_user_id, enterprise_id, store_id,
clerk_id, clerk_code, status_flag, create_time, update_time clerk_id, clerk_code, status_flag, create_time, update_time
</sql> </sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" > <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_haoban_staff_clerk_relation from tab_haoban_staff_clerk_relation
where staff_clerk_relation_id = #{staffClerkRelationId,jdbcType=VARCHAR} where staff_clerk_relation_id = #{staffClerkRelationId,jdbcType=VARCHAR}
...@@ -29,14 +29,14 @@ ...@@ -29,14 +29,14 @@
where staff_clerk_relation_id = #{staffClerkRelationId,jdbcType=VARCHAR} where staff_clerk_relation_id = #{staffClerkRelationId,jdbcType=VARCHAR}
</delete> </delete>
<insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabHaobanStaffClerkRelation" > <insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabHaobanStaffClerkRelation" >
insert into tab_haoban_staff_clerk_relation (staff_clerk_relation_id, staff_id, wx_enterprise_id, insert into tab_haoban_staff_clerk_relation (staff_clerk_relation_id, staff_id, wx_enterprise_id,
wx_user_id, enterprise_id, store_id, wx_user_id, enterprise_id, store_id,
clerk_id, clerk_code, status_flag, clerk_id, clerk_code, status_flag,
create_time, update_time) create_time, update_time)
values (#{staffClerkRelationId,jdbcType=VARCHAR}, #{staffId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR}, values (#{staffClerkRelationId,jdbcType=VARCHAR}, #{staffId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR},
#{wxUserId,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=VARCHAR}, #{storeId,jdbcType=VARCHAR}, #{wxUserId,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=VARCHAR}, #{storeId,jdbcType=VARCHAR},
#{clerkId,jdbcType=VARCHAR}, #{clerkCode,jdbcType=VARCHAR}, #{statusFlag,jdbcType=INTEGER}, #{clerkId,jdbcType=VARCHAR}, #{clerkCode,jdbcType=VARCHAR}, #{statusFlag,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}) #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabHaobanStaffClerkRelation" > <insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabHaobanStaffClerkRelation" >
insert into tab_haoban_staff_clerk_relation insert into tab_haoban_staff_clerk_relation
...@@ -162,37 +162,37 @@ ...@@ -162,37 +162,37 @@
where staff_clerk_relation_id = #{staffClerkRelationId,jdbcType=VARCHAR} where staff_clerk_relation_id = #{staffClerkRelationId,jdbcType=VARCHAR}
</update> </update>
<select id="listBindCode" resultMap="BaseResultMap" parameterType="java.lang.String" > <select id="listBindCode" resultMap="BaseResultMap" parameterType="java.lang.String" >
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_haoban_staff_clerk_relation from tab_haoban_staff_clerk_relation
where enterprise_id = #{enterpriseId,jdbcType=VARCHAR} where enterprise_id = #{enterpriseId,jdbcType=VARCHAR}
and status_flag = 1 and status_flag = 1
and clerk_code in and clerk_code in
<foreach collection="clerkCodeList" item="id" index="index" open="(" close=")" separator=","> <foreach collection="clerkCodeList" item="id" index="index" open="(" close=")" separator=",">
#{id,jdbcType=VARCHAR} #{id,jdbcType=VARCHAR}
</foreach> </foreach>
</select> </select>
<select id="listBindCodeByStaffId" resultMap="BaseResultMap" parameterType="java.lang.String" > <select id="listBindCodeByStaffId" resultMap="BaseResultMap" parameterType="java.lang.String" >
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_haoban_staff_clerk_relation from tab_haoban_staff_clerk_relation
where staff_id = #{staffId,jdbcType=VARCHAR} where staff_id = #{staffId,jdbcType=VARCHAR}
and status_flag = 1 and status_flag = 1
<if test="enterpriseIdList!=null and enterpriseIdList.size &gt; 0"> <if test="enterpriseIdList!=null and enterpriseIdList.size &gt; 0">
and enterprise_id in and enterprise_id in
<foreach collection="enterpriseIdList" item="id" index="index" open="(" close=")" separator=","> <foreach collection="enterpriseIdList" item="id" index="index" open="(" close=")" separator=",">
#{id,jdbcType=VARCHAR} #{id,jdbcType=VARCHAR}
</foreach> </foreach>
</if> </if>
</select> </select>
<select id="getOneByClerkId" resultMap="BaseResultMap" parameterType="java.lang.String" > <select id="getOneByClerkId" resultMap="BaseResultMap" parameterType="java.lang.String" >
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_haoban_staff_clerk_relation from tab_haoban_staff_clerk_relation
where where
status_flag = 1 status_flag = 1
and clerk_id = #{clerkId} and clerk_id = #{clerkId}
</select> </select>
...@@ -220,34 +220,33 @@ ...@@ -220,34 +220,33 @@
from tab_haoban_staff_clerk_relation from tab_haoban_staff_clerk_relation
where clerk_id = #{clerkId,jdbcType=VARCHAR} and wx_enterprise_id=#{wxEnterpriseId} and status_flag=1 where clerk_id = #{clerkId,jdbcType=VARCHAR} and wx_enterprise_id=#{wxEnterpriseId} and status_flag=1
</select> </select>
<select id="getByCodeAndEnterpriseId" resultMap="BaseResultMap" parameterType="java.lang.String" > <select id="getByCodeAndEnterpriseId" resultMap="BaseResultMap" parameterType="java.lang.String" >
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_haoban_staff_clerk_relation from tab_haoban_staff_clerk_relation
where where
status_flag = 1 status_flag = 1
and enterprise_id = #{enterpriseId} and enterprise_id = #{enterpriseId}
and clerk_code = #{clerkCode} and clerk_code = #{clerkCode}
</select> </select>
<update id="delByStoreIdAndCode" > <update id="delByStoreIdAndCode" >
update tab_haoban_staff_clerk_relation update tab_haoban_staff_clerk_relation
set set status_flag = 0,
status_flag = 0, update_time = now()
update_time = now() where clerk_code = #{clerkCode,jdbcType=VARCHAR}
where clerk_code = #{clerkCode,jdbcType=VARCHAR} and store_id = #{storeId,jdbcType=VARCHAR}
and store_id = #{storeId,jdbcType=VARCHAR} and status_flag = 1
and status_flag =1 </update>
</update>
<select id="listByClerkIds" resultMap="BaseResultMap" parameterType="java.lang.String" > <select id="listByClerkIds" resultMap="BaseResultMap" parameterType="java.lang.String" >
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_haoban_staff_clerk_relation from tab_haoban_staff_clerk_relation
where status_flag=1 where status_flag=1
and clerk_id in and clerk_id in
<foreach collection="clerkIds" item="id" index="index" open="(" close=")" separator=","> <foreach collection="clerkIds" item="id" index="index" open="(" close=")" separator=",">
#{id,jdbcType=VARCHAR} #{id,jdbcType=VARCHAR}
</foreach> </foreach>
</select> </select>
...@@ -259,7 +258,7 @@ ...@@ -259,7 +258,7 @@
where status_flag=1 where status_flag=1
and store_id = #{storeId,jdbcType=VARCHAR} and store_id = #{storeId,jdbcType=VARCHAR}
</select> </select>
<select id="getOneByStoreIdAndStaffId" resultMap="BaseResultMap" parameterType="java.lang.String" > <select id="getOneByStoreIdAndStaffId" resultMap="BaseResultMap" parameterType="java.lang.String" >
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
...@@ -302,7 +301,7 @@ ...@@ -302,7 +301,7 @@
and status_flag=1 and status_flag=1
order by update_time desc limit 1 order by update_time desc limit 1
</select> </select>
<select id="getByClerkId" resultMap="BaseResultMap" parameterType="java.lang.String" > <select id="getByClerkId" resultMap="BaseResultMap" parameterType="java.lang.String" >
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
...@@ -310,8 +309,8 @@ ...@@ -310,8 +309,8 @@
where clerk_id = #{clerkId,jdbcType=VARCHAR} where clerk_id = #{clerkId,jdbcType=VARCHAR}
and status_flag=1 and status_flag=1
</select> </select>
<update id="delByPrimaryKey" > <update id="delByPrimaryKey" >
update tab_haoban_staff_clerk_relation update tab_haoban_staff_clerk_relation
set set
status_flag = 0, status_flag = 0,
...@@ -319,7 +318,7 @@ ...@@ -319,7 +318,7 @@
where staff_clerk_relation_id = #{staffClerkRelationId,jdbcType=VARCHAR} where staff_clerk_relation_id = #{staffClerkRelationId,jdbcType=VARCHAR}
and status_flag =1 and status_flag =1
</update> </update>
<update id="delByClerkId" > <update id="delByClerkId" >
update tab_haoban_staff_clerk_relation update tab_haoban_staff_clerk_relation
set set
...@@ -328,38 +327,38 @@ ...@@ -328,38 +327,38 @@
where clerk_id = #{clerkId,jdbcType=VARCHAR} where clerk_id = #{clerkId,jdbcType=VARCHAR}
and status_flag =1 and status_flag =1
</update> </update>
<select id="listByEnterpriseIdAndWxUserId" resultMap="BaseResultMap" parameterType="java.lang.String" > <select id="listByEnterpriseIdAndWxUserId" resultMap="BaseResultMap" parameterType="java.lang.String" >
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_haoban_staff_clerk_relation from tab_haoban_staff_clerk_relation
where where
enterprise_id = #{enterpriseId,jdbcType=VARCHAR} enterprise_id = #{enterpriseId,jdbcType=VARCHAR}
and wx_user_id = #{wxUserId} and wx_user_id = #{wxUserId}
</select> </select>
<select id="lisByStaffId" resultMap="BaseResultMap" parameterType="java.lang.String" > <select id="lisByStaffId" resultMap="BaseResultMap" parameterType="java.lang.String" >
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_haoban_staff_clerk_relation from tab_haoban_staff_clerk_relation
where where
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR} wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and staff_id = #{staffId} and staff_id = #{staffId}
and status_flag = 1 and status_flag = 1
order by create_time desc order by create_time desc
</select> </select>
<select id="getByCodeAndStoreId" resultMap="BaseResultMap" parameterType="java.lang.String" > <select id="getByCodeAndStoreId" resultMap="BaseResultMap" parameterType="java.lang.String" >
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_haoban_staff_clerk_relation from tab_haoban_staff_clerk_relation
where where
clerk_code = #{clerkCode} clerk_code = #{clerkCode}
and store_id = #{storeId} and store_id = #{storeId}
and status_flag = 1 and status_flag = 1
</select> </select>
<select id="listByWxEnterpriseId" resultMap="BaseResultMap"> <select id="listByWxEnterpriseId" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_haoban_staff_clerk_relation from tab_haoban_staff_clerk_relation
...@@ -367,7 +366,7 @@ ...@@ -367,7 +366,7 @@
and status_flag =1 and status_flag =1
group by wx_user_id group by wx_user_id
</select> </select>
<select id="pageByWxEnterpriseId" resultMap="BaseResultMap"> <select id="pageByWxEnterpriseId" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
...@@ -426,13 +425,24 @@ ...@@ -426,13 +425,24 @@
</update> </update>
<select id="listBindStoreIdByEnterpriseId" resultMap="BaseResultMap"> <select id="listBindStoreIdByEnterpriseId" resultMap="BaseResultMap">
select select store_id,
store_id, wx_enterprise_id
wx_enterprise_id
from tab_haoban_staff_clerk_relation from tab_haoban_staff_clerk_relation
where where enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR} and status_flag = 1
and status_flag =1
group by store_id group by store_id
</select> </select>
<select id="listAll" resultType="com.gic.haoban.manage.api.dto.StaffClerkRelationDTO">
SELECT a.store_id,
a.staff_id,
a.clerk_id,
b.staff_name,
c.store_name
FROM tab_haoban_staff_clerk_relation a
LEFT JOIN tab_haoban_staff b ON b.staff_id = a.staff_id
LEFT JOIN tab_gic_clerk c ON c.clerk_id = a.clerk_id
WHERE a.status_flag = 1
GROUP BY a.staff_id
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -303,19 +303,22 @@ public class StoreController extends WebBaseController{ ...@@ -303,19 +303,22 @@ public class StoreController extends WebBaseController{
//获取门店详情 //获取门店详情
public boolean isEnterpriseOver(String storeId) { public boolean isEnterpriseOver(String storeId) {
StoreDTO store = storeService.getStore(storeId); StoreDTO store = storeService.getStore(storeId);
if(store == null){ if (store == null) {
return true; return true;
} }
EnterpriseDTO enterprise = enterpriseService.getEnterpriseByEid(store.getEnterpriseId()); EnterpriseDTO enterprise = enterpriseService.getEnterpriseById(store.getEnterpriseId());
if (enterprise == null || enterprise.getStatus() != 1) { if (enterprise == null || enterprise.getStatus() != 1) {
return true; return true;
} }
if (enterprise.getExpireTime() == null) { if (enterprise.getExpireTime() == null) {
if (enterprise.getEnabledState() == null) { if (enterprise.getEnabledState() == null) {
return false; return false;
} else return enterprise.getEnabledState() != 1; } else {
} else return enterprise.getEnabledState() != 1;
}
} else {
return enterprise.getExpireTime().getTime() <= System.currentTimeMillis() || enterprise.getEnabledState() != 1; return enterprise.getExpireTime().getTime() <= System.currentTimeMillis() || enterprise.getEnabledState() != 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