招商 init
This commit is contained in:
@@ -1,46 +0,0 @@
|
|||||||
package com.cool.store.dao;
|
|
||||||
|
|
||||||
import com.cool.store.entity.BeautyCameraSettingDO;
|
|
||||||
import com.cool.store.mapper.BeautyCameraSettingMapper;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @FileName: BeautyCameraSettingDAO
|
|
||||||
* @Description:
|
|
||||||
* @date 2023-09-11 14:46
|
|
||||||
*/
|
|
||||||
@Repository
|
|
||||||
public class BeautyCameraSettingDAO {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private BeautyCameraSettingMapper beautyCameraSettingMapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 插入或更新
|
|
||||||
* @param param
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Long insertOrUpdateBeautyCameraSetting(BeautyCameraSettingDO param){
|
|
||||||
if(StringUtils.isBlank(param.getUserId())){
|
|
||||||
return 0L;
|
|
||||||
}
|
|
||||||
return beautyCameraSettingMapper.insertOrUpdateBeautyCameraSetting(param);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取用户美颜配置
|
|
||||||
* @param userId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public BeautyCameraSettingDO getBeautyCameraSetting(String userId){
|
|
||||||
if(StringUtils.isBlank(userId)){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return beautyCameraSettingMapper.getBeautyCameraSetting(userId);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
package com.cool.store.dao;
|
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
|
||||||
import com.cool.store.dto.content.ContentAddDto;
|
|
||||||
import com.cool.store.dto.content.ContentQueryListDto;
|
|
||||||
import com.cool.store.dto.content.ContentUpdateDto;
|
|
||||||
import com.cool.store.entity.HyContentInfoDO;
|
|
||||||
import com.cool.store.mapper.HyContentInfoMapper;
|
|
||||||
import com.cool.store.vo.HyContentInfoVO;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Repository
|
|
||||||
@Deprecated
|
|
||||||
public class ContentDAO {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private HyContentInfoMapper contentInfoMapper;
|
|
||||||
|
|
||||||
public String addContentInfo(ContentAddDto dto) {
|
|
||||||
HyContentInfoDO hyContentInfoDO = new HyContentInfoDO();
|
|
||||||
BeanUtil.copyProperties(dto, hyContentInfoDO);
|
|
||||||
hyContentInfoDO.setUpdateUserId(dto.getCreateUserId());
|
|
||||||
return Integer.toString(contentInfoMapper.insertSelective(hyContentInfoDO));
|
|
||||||
}
|
|
||||||
|
|
||||||
public void deleteContent(String contentId) {
|
|
||||||
contentInfoMapper.deleteSelective(contentId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void updateContent(ContentUpdateDto dto) {
|
|
||||||
HyContentInfoDO hyContentInfoDO = new HyContentInfoDO();
|
|
||||||
BeanUtil.copyProperties(dto, hyContentInfoDO);
|
|
||||||
hyContentInfoDO.setId(Long.parseLong(dto.getContentId()));
|
|
||||||
contentInfoMapper.updateByPrimaryKeySelective(hyContentInfoDO);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<HyContentInfoVO> queryContentList(ContentQueryListDto dto) {
|
|
||||||
return contentInfoMapper.queryContentList(dto);
|
|
||||||
}
|
|
||||||
|
|
||||||
public HyContentInfoDO queryContentInfo(String contentId) {
|
|
||||||
return contentInfoMapper.queryContentInfo(contentId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,171 +0,0 @@
|
|||||||
package com.cool.store.dao;
|
|
||||||
|
|
||||||
import com.cool.store.constants.CommonConstants;
|
|
||||||
import com.cool.store.entity.EnterpriseUserDO;
|
|
||||||
import com.cool.store.enums.ErrorCodeEnum;
|
|
||||||
import com.cool.store.exception.ServiceException;
|
|
||||||
import com.cool.store.mapper.EnterpriseUserMapper;
|
|
||||||
import com.cool.store.utils.StringUtil;
|
|
||||||
import com.google.common.collect.Lists;
|
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.*;
|
|
||||||
import java.util.function.Function;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @date 2023-05-19 02:58
|
|
||||||
*/
|
|
||||||
@Repository
|
|
||||||
public class EnterpriseUserDAO {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private EnterpriseUserMapper enterpriseUserMapper;
|
|
||||||
|
|
||||||
|
|
||||||
public EnterpriseUserDO getUserInfoById(String userId){
|
|
||||||
if(StringUtils.isAnyBlank(userId)){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return enterpriseUserMapper.getUserInfoById(userId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<EnterpriseUserDO> getUserInfoByUserIds(List<String> userIdList){
|
|
||||||
if(CollectionUtils.isEmpty(userIdList)){
|
|
||||||
return Lists.newArrayList();
|
|
||||||
}
|
|
||||||
return enterpriseUserMapper.getUserInfoByUserIds(userIdList);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Map<String, String> getFeishuUserIdsByUserIds(List<String> userIdList){
|
|
||||||
if(CollectionUtils.isEmpty(userIdList)){
|
|
||||||
return new HashMap<>(0);
|
|
||||||
}
|
|
||||||
List<EnterpriseUserDO> feishuUserIdsByUserIds = enterpriseUserMapper.getFeishuUserIdsByUserIds(userIdList);
|
|
||||||
return feishuUserIdsByUserIds.stream().collect(Collectors.toMap(EnterpriseUserDO::getUserId, EnterpriseUserDO::getFeishuUserId));
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<String> getFeishuUserIdListByUserIds(List<String> userIdList){
|
|
||||||
if(CollectionUtils.isEmpty(userIdList)){
|
|
||||||
return new ArrayList<>(0);
|
|
||||||
}
|
|
||||||
List<EnterpriseUserDO> feishuUserIdsByUserIds = enterpriseUserMapper.getFeishuUserIdsByUserIds(userIdList);
|
|
||||||
return feishuUserIdsByUserIds.stream().map(EnterpriseUserDO::getFeishuUserId).collect(Collectors.toList());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void batchInsertOrUpdate(List<EnterpriseUserDO> insertOrUpdateList) {
|
|
||||||
if(CollectionUtils.isEmpty(insertOrUpdateList)){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
enterpriseUserMapper.batchInsertOrUpdate(insertOrUpdateList);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void updateByPrimaryKeySelective(EnterpriseUserDO enterpriseUserDO) {
|
|
||||||
if(enterpriseUserDO == null){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
enterpriseUserMapper.updateByPrimaryKeySelective(enterpriseUserDO);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void updateOnlineStatusByUserId(String userId,Integer onlineStatus) {
|
|
||||||
if (StringUtils.isEmpty(userId)||onlineStatus == null){
|
|
||||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
|
||||||
}
|
|
||||||
enterpriseUserMapper.updateOnlineStatusByUserId(userId,onlineStatus);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除用户
|
|
||||||
* @param excludeUserIds
|
|
||||||
*/
|
|
||||||
public void deleteUser(List<String> excludeUserIds){
|
|
||||||
if(CollectionUtils.isEmpty(excludeUserIds)){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
enterpriseUserMapper.deleteUser(excludeUserIds);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer deleteUserByUserId(String userId){
|
|
||||||
if(StringUtils.isBlank(userId)){
|
|
||||||
return CommonConstants.ZERO;
|
|
||||||
}
|
|
||||||
return enterpriseUserMapper.deleteUserByUserId(userId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<EnterpriseUserDO> searchUserByRegionIdsAndKeyword(List<String> regionIds, String keyword, List<String> leaderRegionIds){
|
|
||||||
if(CollectionUtils.isEmpty(regionIds)){
|
|
||||||
return Lists.newArrayList();
|
|
||||||
}
|
|
||||||
return enterpriseUserMapper.searchUserByRegionIdsAndKeyword(regionIds, keyword, leaderRegionIds);
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isExistDeptUser(String regionId){
|
|
||||||
if(StringUtils.isBlank(regionId)){
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return enterpriseUserMapper.getUserCountByRegionId(regionId) > CommonConstants.ZERO;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取部门负责人
|
|
||||||
* @param regionId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public List<EnterpriseUserDO> getUserListByDeptLeader(String regionId){
|
|
||||||
if(StringUtils.isBlank(regionId)){
|
|
||||||
return Lists.newArrayList();
|
|
||||||
}
|
|
||||||
return enterpriseUserMapper.getUserListByDeptLeader(regionId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<EnterpriseUserDO> getUserListByDeptLeaders(List<String> regionIds){
|
|
||||||
if(CollectionUtils.isEmpty(regionIds)){
|
|
||||||
return Lists.newArrayList();
|
|
||||||
}
|
|
||||||
return enterpriseUserMapper.getUserListByDeptLeaders(regionIds);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public List<EnterpriseUserDO> getUserListByRegionIds(List<String> regionIds){
|
|
||||||
if(CollectionUtils.isEmpty(regionIds)){
|
|
||||||
return Lists.newArrayList();
|
|
||||||
}
|
|
||||||
return enterpriseUserMapper.getUserListByRegionIds(regionIds);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Map<String, String> getUserNameAndMobile(List<String> userIds){
|
|
||||||
List<EnterpriseUserDO> userList = getUserInfoByUserIds(userIds);
|
|
||||||
return userList.stream().filter(o->!StringUtils.isAnyBlank(o.getMobile(), o.getName())).collect(Collectors.toMap(k -> k.getUserId(), v -> v.getName() + " " + v.getMobile()));
|
|
||||||
}
|
|
||||||
|
|
||||||
public Map<String, String> getUserNameMap(List<String> userIds){
|
|
||||||
List<EnterpriseUserDO> userList = getUserInfoByUserIds(userIds);
|
|
||||||
return userList.stream().filter(o->!StringUtils.isAnyBlank(o.getMobile(), o.getName())).collect(Collectors.toMap(k -> k.getUserId(), v -> v.getName()));
|
|
||||||
}
|
|
||||||
|
|
||||||
public Map<String, EnterpriseUserDO> getUserMap(List<String> userIds){
|
|
||||||
List<EnterpriseUserDO> userList = getUserInfoByUserIds(userIds);
|
|
||||||
return userList.stream().filter(o->!StringUtils.isAnyBlank(o.getMobile(), o.getName())).collect(Collectors.toMap(k -> k.getUserId(), Function.identity()));
|
|
||||||
}
|
|
||||||
|
|
||||||
public EnterpriseUserDO selectByMobile(String mobile) {
|
|
||||||
return enterpriseUserMapper.selectByMobile(mobile);
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUserName(String userId){
|
|
||||||
EnterpriseUserDO userInfo = getUserInfoById(userId);
|
|
||||||
return Optional.ofNullable(userInfo).map(EnterpriseUserDO::getName).orElse(StringUtils.EMPTY);
|
|
||||||
}
|
|
||||||
|
|
||||||
public EnterpriseUserDO selectByInvestmentManager(String investmentManager) {
|
|
||||||
if (StringUtil.isEmpty(investmentManager)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return enterpriseUserMapper.selectByInvestmentManager(investmentManager);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
package com.cool.store.dao;
|
|
||||||
|
|
||||||
import com.cool.store.constants.CommonConstants;
|
|
||||||
import com.cool.store.entity.EnterpriseUserRoleDO;
|
|
||||||
import com.cool.store.entity.SysRoleDO;
|
|
||||||
import com.cool.store.enums.DataSourceEnum;
|
|
||||||
import com.cool.store.mapper.EnterpriseUserRoleMapper;
|
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @date 2023-05-19 02:59
|
|
||||||
*/
|
|
||||||
@Repository
|
|
||||||
public class EnterpriseUserRoleDAO {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private EnterpriseUserRoleMapper enterpriseUserRoleMapper;
|
|
||||||
|
|
||||||
public Integer batchInsertOrUpdate(List<EnterpriseUserRoleDO> recordList){
|
|
||||||
if(CollectionUtils.isEmpty(recordList)){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return enterpriseUserRoleMapper.batchInsertOrUpdate(recordList);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer deleteRoleInUser(String roleId, DataSourceEnum dataSourceEnum, List<String> excludeUserIds){
|
|
||||||
if(StringUtils.isBlank(roleId) || Objects.isNull(dataSourceEnum) || CollectionUtils.isEmpty(excludeUserIds)){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return enterpriseUserRoleMapper.deleteRoleInUser(roleId, dataSourceEnum.getCode(), excludeUserIds);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer deleteUserInRole(String userId, DataSourceEnum dataSourceEnum, String excludeRoleId){
|
|
||||||
if(StringUtils.isAnyBlank(userId, excludeRoleId) || Objects.isNull(dataSourceEnum)){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return enterpriseUserRoleMapper.deleteUserInRole(userId, dataSourceEnum.getCode(), excludeRoleId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer deleteUserRole(String userId){
|
|
||||||
if(StringUtils.isBlank(userId)){
|
|
||||||
return CommonConstants.ZERO;
|
|
||||||
}
|
|
||||||
return enterpriseUserRoleMapper.deleteUserRole(userId);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
package com.cool.store.dao;
|
|
||||||
|
|
||||||
import com.cool.store.entity.HyAdvancedSettingDO;
|
|
||||||
import com.cool.store.mapper.HyAdvancedSettingMapper;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author suzhuhong
|
|
||||||
* @Date 2023/6/14 20:33
|
|
||||||
* @Version 1.0
|
|
||||||
*/
|
|
||||||
@Repository
|
|
||||||
public class HyAdvancedSettingDAO {
|
|
||||||
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
HyAdvancedSettingMapper hyAdvancedSettingMapper;
|
|
||||||
|
|
||||||
|
|
||||||
public int insertSelective(HyAdvancedSettingDO record){
|
|
||||||
return hyAdvancedSettingMapper.insertSelective(record);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int updateByPrimaryKeySelective( HyAdvancedSettingDO record){
|
|
||||||
return hyAdvancedSettingMapper.updateByPrimaryKeySelective(record);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public HyAdvancedSettingDO selectAdvanceSetting(){
|
|
||||||
return hyAdvancedSettingMapper.selectAdvanceSetting();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,147 +0,0 @@
|
|||||||
package com.cool.store.dao;
|
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
|
||||||
import com.cool.store.dto.exhibition.ExhibitionDTO;
|
|
||||||
import com.cool.store.dto.exhibition.ExhibitionStatisticsDTO;
|
|
||||||
import com.cool.store.entity.HyExhibitionDO;
|
|
||||||
import com.cool.store.mapper.HyExhibitionMapper;
|
|
||||||
import com.cool.store.utils.StringUtil;
|
|
||||||
import com.cool.store.vo.exhibition.PartnerExhibitionInfoVO;
|
|
||||||
import com.cool.store.vo.exhibition.PartnerExhibitionListVO;
|
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.*;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author suzhuhong
|
|
||||||
* @Date 2023/11/30 15:06
|
|
||||||
* @Version 1.0
|
|
||||||
*/
|
|
||||||
@Repository
|
|
||||||
public class HyExhibitionDAO {
|
|
||||||
@Resource
|
|
||||||
HyExhibitionMapper hyExhibitionMapper;
|
|
||||||
|
|
||||||
public int insertSelective(HyExhibitionDO record){
|
|
||||||
if (record.getId() == null){
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
return hyExhibitionMapper.insertSelective(record);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认查询方法,通过主键获取所有字段的值
|
|
||||||
* dateTime:2023-11-30 01:38
|
|
||||||
*/
|
|
||||||
public HyExhibitionDO selectByPrimaryKey(Integer id){
|
|
||||||
if (id == null){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return hyExhibitionMapper.selectByPrimaryKey(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
|
||||||
* dateTime:2023-11-30 01:38
|
|
||||||
*/
|
|
||||||
public int updateByPrimaryKeySelective(HyExhibitionDO record){
|
|
||||||
if (record.getId() == null){
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
return hyExhibitionMapper.updateByPrimaryKeySelective(record);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键物理删除
|
|
||||||
* dateTime:2023-11-30 01:38
|
|
||||||
*/
|
|
||||||
public int deleteByPrimaryKey(Integer id){
|
|
||||||
if (id == null){
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
return hyExhibitionMapper.deleteByPrimaryKey(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int batchInsert(List<HyExhibitionDO> records){
|
|
||||||
if (CollectionUtils.isEmpty(records)){
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
return hyExhibitionMapper.batchInsert(records);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int batchUpdate(List<HyExhibitionDO> records){
|
|
||||||
if (CollectionUtils.isEmpty(records)){
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
return hyExhibitionMapper.batchUpdate(records);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public List<HyExhibitionDO> getExhibitionListByUserId(String userId, String startDate, Integer closedType){
|
|
||||||
if (StringUtil.isEmpty(userId)){
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
return hyExhibitionMapper.getExhibitionListByUserId(userId,startDate,closedType);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public Map<Integer,ExhibitionStatisticsDTO> exhibitionStatisticsMap(List<Integer> list) {
|
|
||||||
if (CollectionUtils.isEmpty(list)) {
|
|
||||||
return new HashMap<>(4);
|
|
||||||
}
|
|
||||||
List<ExhibitionStatisticsDTO> result = hyExhibitionMapper.exhibitionStatistic(list);
|
|
||||||
return result.stream().collect(Collectors.toMap(ExhibitionStatisticsDTO::getExhibitionId, date -> date));
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<ExhibitionDTO> listByExhibitionGroupIds(List<Integer> exhibitionGroupIdList,Boolean filterCloseExhibition){
|
|
||||||
if (CollectionUtils.isEmpty(exhibitionGroupIdList)){
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
return hyExhibitionMapper.listByExhibitionGroupIds(exhibitionGroupIdList,filterCloseExhibition);
|
|
||||||
}
|
|
||||||
|
|
||||||
public ExhibitionDTO lineSignUp(Integer exhibitionGroupId, Long lineId){
|
|
||||||
return hyExhibitionMapper.lineSignUp(exhibitionGroupId,lineId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<HyExhibitionDO> listByExhibitionGroupId(Integer exhibitionGroupId,Boolean includeClose){
|
|
||||||
if (exhibitionGroupId==null){
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
return hyExhibitionMapper.listByExhibitionGroupId(exhibitionGroupId,includeClose);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<PartnerExhibitionListVO> getPartnerExhibitionList(Long partnerLineId) {
|
|
||||||
if (partnerLineId == null) {
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
return hyExhibitionMapper.getPartnerExhibitionList(partnerLineId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public PartnerExhibitionInfoVO getPartnerExhibitionInfo(Integer exhibitionGroupId, Long partnerLineId) {
|
|
||||||
if (exhibitionGroupId == null || partnerLineId == null) {
|
|
||||||
return new PartnerExhibitionInfoVO();
|
|
||||||
}
|
|
||||||
return hyExhibitionMapper.getPartnerExhibitionInfo(exhibitionGroupId, partnerLineId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<HyExhibitionDO> querySelective(HyExhibitionDO hyExhibitionDO) {
|
|
||||||
if (hyExhibitionDO == null) {
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
return hyExhibitionMapper.querySelective(hyExhibitionDO);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int batchCloseExhibition(List<Integer> hyExhibitionIds, Integer closedType, String closeDateTime) {
|
|
||||||
if (CollectionUtil.isEmpty(hyExhibitionIds) || closedType == null || closeDateTime == null) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return hyExhibitionMapper.batchCloseExhibition(hyExhibitionIds, closedType, closeDateTime);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
package com.cool.store.dao;
|
|
||||||
|
|
||||||
import com.cool.store.dto.exhibition.MyExhibitionGroupDTO;
|
|
||||||
import com.cool.store.entity.HyExhibitionGroupDO;
|
|
||||||
import com.cool.store.mapper.HyExhibitionGroupMapper;
|
|
||||||
import com.cool.store.utils.StringUtil;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author suzhuhong
|
|
||||||
* @Date 2023/11/30 15:11
|
|
||||||
* @Version 1.0
|
|
||||||
*/
|
|
||||||
@Repository
|
|
||||||
public class HyExhibitionGroupDAO {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
HyExhibitionGroupMapper hyExhibitionGroupMapper;
|
|
||||||
|
|
||||||
public int insertSelective(HyExhibitionGroupDO record){
|
|
||||||
if (record == null){
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
return hyExhibitionGroupMapper.insertSelective(record);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认查询方法,通过主键获取所有字段的值
|
|
||||||
* dateTime:2023-11-30 01:38
|
|
||||||
*/
|
|
||||||
public HyExhibitionGroupDO selectByPrimaryKey(Integer id){
|
|
||||||
if (id == null){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return hyExhibitionGroupMapper.selectByPrimaryKey(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
|
||||||
* dateTime:2023-11-30 01:38
|
|
||||||
*/
|
|
||||||
public int updateByPrimaryKeySelective(HyExhibitionGroupDO record){
|
|
||||||
if (record.getId() == null){
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
return hyExhibitionGroupMapper.updateByPrimaryKeySelective(record);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键物理删除
|
|
||||||
* dateTime:2023-11-30 01:38
|
|
||||||
*/
|
|
||||||
public int deleteByPrimaryKey(Integer id){
|
|
||||||
if (id == null){
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
return hyExhibitionGroupMapper.deleteByPrimaryKey(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<MyExhibitionGroupDTO> listByCreator(String userId){
|
|
||||||
if (StringUtil.isEmpty(userId)){
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
return hyExhibitionGroupMapper.listByCreator(userId);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public int batchCloseExhibitionGroup() {
|
|
||||||
return hyExhibitionGroupMapper.batchCloseExhibitionGroup();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,224 +0,0 @@
|
|||||||
package com.cool.store.dao;
|
|
||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
|
||||||
import com.cool.store.constants.CommonConstants;
|
|
||||||
import com.cool.store.dto.follow.FollowTaskNumDTO;
|
|
||||||
import com.cool.store.entity.HyFollowTaskDO;
|
|
||||||
import com.cool.store.enums.FollowTaskStatusEnum;
|
|
||||||
import com.cool.store.mapper.HyFollowTaskMapper;
|
|
||||||
import com.cool.store.utils.CoolDateUtils;
|
|
||||||
import com.github.pagehelper.Page;
|
|
||||||
import com.github.pagehelper.PageHelper;
|
|
||||||
import com.google.common.collect.Lists;
|
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @FileName: HyFollowTaskDAO
|
|
||||||
* @Description:
|
|
||||||
* @date 2023-08-10 10:35
|
|
||||||
*/
|
|
||||||
@Repository
|
|
||||||
public class HyFollowTaskDAO {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private HyFollowTaskMapper hyFollowTaskMapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取跟进任务想去
|
|
||||||
* @param followTaskId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public HyFollowTaskDO getFollowTask(Long followTaskId){
|
|
||||||
if(Objects.isNull(followTaskId)){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return hyFollowTaskMapper.getFollowTask(followTaskId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量获取根据任务
|
|
||||||
* @param followTaskIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public List<HyFollowTaskDO> getFollowTaskList(List<Long> followTaskIds){
|
|
||||||
if(CollectionUtils.isEmpty(followTaskIds)){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return hyFollowTaskMapper.getFollowTaskList(followTaskIds);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增跟进任务
|
|
||||||
* @param request
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Long addFollowTask(HyFollowTaskDO request){
|
|
||||||
if(StringUtils.isBlank(request.getFollowUserId()) || Objects.isNull(request.getPartnerLineId())){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
hyFollowTaskMapper.insertSelective(request);
|
|
||||||
return request.getId();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新跟进任务
|
|
||||||
* @param request
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Integer updateFollowTask(HyFollowTaskDO request){
|
|
||||||
if(Objects.isNull(request.getId())){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return hyFollowTaskMapper.updateByPrimaryKeySelective(request);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 完成更近任务
|
|
||||||
* @param followTaskId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Integer finishFollowTask(Long followTaskId, FollowTaskStatusEnum followTaskStatus){
|
|
||||||
HyFollowTaskDO update = new HyFollowTaskDO();
|
|
||||||
update.setId(followTaskId);
|
|
||||||
update.setTaskStatus(followTaskStatus.getCode());
|
|
||||||
update.setFinishTime(new Date());
|
|
||||||
return updateFollowTask(update);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 取消跟进任务
|
|
||||||
* @param followTaskId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Integer cancelFollowTask(Long followTaskId, FollowTaskStatusEnum followTaskStatus){
|
|
||||||
HyFollowTaskDO update = new HyFollowTaskDO();
|
|
||||||
update.setId(followTaskId);
|
|
||||||
update.setTaskStatus(followTaskStatus.getCode());
|
|
||||||
return updateFollowTask(update);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取线索的所有任务
|
|
||||||
* @param partnerLineId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public List<HyFollowTaskDO> getTaskListByLineId(Long partnerLineId){
|
|
||||||
if(Objects.isNull(partnerLineId)){
|
|
||||||
return Lists.newArrayList();
|
|
||||||
}
|
|
||||||
return hyFollowTaskMapper.getTaskListByLineId(partnerLineId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页获取任务
|
|
||||||
* @param followUserId
|
|
||||||
* @param taskStatus
|
|
||||||
* @param deadlineStartTime
|
|
||||||
* @param deadlineEndTime
|
|
||||||
* @param pageNum
|
|
||||||
* @param pageSize
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Page<HyFollowTaskDO> getTaskPage(String followUserId, Integer taskStatus, String deadlineStartTime, String deadlineEndTime, Integer pageNum, Integer pageSize){
|
|
||||||
if(StringUtils.isBlank(followUserId)){
|
|
||||||
return new Page<>();
|
|
||||||
}
|
|
||||||
PageHelper.startPage(pageNum, pageSize);
|
|
||||||
return hyFollowTaskMapper.getTaskPage(followUserId, taskStatus, deadlineStartTime, deadlineEndTime);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新未完成的任务跟进人
|
|
||||||
* @param partnerLineId
|
|
||||||
* @param userId
|
|
||||||
*/
|
|
||||||
public void updateUndoTaskFollowUserId(Long partnerLineId, String userId){
|
|
||||||
if(Objects.isNull(partnerLineId) || StringUtils.isBlank(userId)){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
hyFollowTaskMapper.updateUndoTaskFollowUserId(partnerLineId, userId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 作废待完成&已逾期的任务
|
|
||||||
* @param partnerLineId
|
|
||||||
*/
|
|
||||||
public void cancelUndoFollowTask(Long partnerLineId){
|
|
||||||
if(Objects.isNull(partnerLineId)){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
hyFollowTaskMapper.cancelUndoFollowTask(partnerLineId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取消息通知的跟进人
|
|
||||||
* @param date
|
|
||||||
* @param pageNum
|
|
||||||
* @param pageSize
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Page<String> getRemindFollowUserIds(Date date, Integer pageNum, Integer pageSize){
|
|
||||||
String startTime = DateUtil.format(date, CoolDateUtils.DATE_FORMAT_DAY) + CommonConstants.DAY_START_TIME_SUFFIX;
|
|
||||||
String endTime = DateUtil.format(date, CoolDateUtils.DATE_FORMAT_DAY) + CommonConstants.DAY_END_TIME_SUFFIX;
|
|
||||||
PageHelper.startPage(pageNum, pageSize);
|
|
||||||
return hyFollowTaskMapper.getRemindFollowUserIds(startTime, endTime);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取用户任务数量
|
|
||||||
* @param followUserIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public List<FollowTaskNumDTO> getUserTaskNum(List<String> followUserIds, Date date){
|
|
||||||
if(CollectionUtils.isEmpty(followUserIds) || Objects.isNull(date)){
|
|
||||||
return Lists.newArrayList();
|
|
||||||
}
|
|
||||||
String endTime = DateUtil.format(date, CoolDateUtils.DATE_FORMAT_DAY) + CommonConstants.DAY_END_TIME_SUFFIX;
|
|
||||||
return hyFollowTaskMapper.getUserTaskNum(followUserIds, endTime);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取待完成任务
|
|
||||||
* @param startTime
|
|
||||||
* @param endTime
|
|
||||||
* @param pageNum
|
|
||||||
* @param pageSize
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Page<HyFollowTaskDO> getUndoTaskPage(String startTime, String endTime, Integer pageNum, Integer pageSize){
|
|
||||||
PageHelper.startPage(pageNum, pageSize);
|
|
||||||
return hyFollowTaskMapper.getUndoTaskPage(startTime, endTime);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新未完成任务的状态到已逾期
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Integer updateUndoTaskStatusToOverdue(){
|
|
||||||
return hyFollowTaskMapper.updateUndoTaskStatusToOverdue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更改线索id
|
|
||||||
* @param oldLineId
|
|
||||||
* @param newLineId
|
|
||||||
*/
|
|
||||||
public Integer changeLineId(Long oldLineId, Long newLineId){
|
|
||||||
if(Objects.isNull(oldLineId) || Objects.isNull(newLineId)){
|
|
||||||
return CommonConstants.ZERO;
|
|
||||||
}
|
|
||||||
return hyFollowTaskMapper.changeLineId(oldLineId, newLineId);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,90 +0,0 @@
|
|||||||
package com.cool.store.dao;
|
|
||||||
|
|
||||||
import com.cool.store.entity.HyInspectionSettingDO;
|
|
||||||
import com.cool.store.mapper.HyInspectionSettingMapper;
|
|
||||||
import com.github.pagehelper.Page;
|
|
||||||
import com.github.pagehelper.PageHelper;
|
|
||||||
import com.google.common.collect.Lists;
|
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @FileName: HyInspectionSettingDAO
|
|
||||||
* @Description:
|
|
||||||
* @date 2023-07-18 16:29
|
|
||||||
*/
|
|
||||||
@Repository
|
|
||||||
public class HyInspectionSettingDAO {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private HyInspectionSettingMapper hyInspectionSettingMapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取分页
|
|
||||||
* @param pageNum
|
|
||||||
* @param pageSize
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Page<HyInspectionSettingDO> getInspectionSettingPage(Integer pageNum, Integer pageSize){
|
|
||||||
PageHelper.startPage(pageNum, pageSize);
|
|
||||||
Page<HyInspectionSettingDO> resultPage = hyInspectionSettingMapper.getInspectionSettingPage();
|
|
||||||
return resultPage;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取稽查详情
|
|
||||||
* @param inspectionSettingId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public HyInspectionSettingDO getInspectionSettingDetail(Long inspectionSettingId){
|
|
||||||
if(Objects.isNull(inspectionSettingId)){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return hyInspectionSettingMapper.getInspectionSettingDetail(inspectionSettingId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long addInspectionSetting(HyInspectionSettingDO param){
|
|
||||||
hyInspectionSettingMapper.insertSelective(param);
|
|
||||||
return param.getId();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer updateInspectionSetting(HyInspectionSettingDO param){
|
|
||||||
return hyInspectionSettingMapper.updateByPrimaryKeySelective(param);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<String> getInspectionUserIds(){
|
|
||||||
return hyInspectionSettingMapper.getInspectionUserIds();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取配置列表
|
|
||||||
* @param inspectionSettingIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public List<HyInspectionSettingDO> getHyInspectionSettingByIds(List<Long> inspectionSettingIds){
|
|
||||||
if(CollectionUtils.isEmpty(inspectionSettingIds)){
|
|
||||||
return Lists.newArrayList();
|
|
||||||
}
|
|
||||||
return hyInspectionSettingMapper.getHyInspectionSettingByIds(inspectionSettingIds);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取用户配置的区域 编辑的时候排除某个配置
|
|
||||||
* @param inspectionUserId
|
|
||||||
* @param excludeInspectionSettingId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public List<HyInspectionSettingDO> getHyInspectionSettingByUserId(String inspectionUserId, Long excludeInspectionSettingId){
|
|
||||||
if(StringUtils.isBlank(inspectionUserId)){
|
|
||||||
return Lists.newArrayList();
|
|
||||||
}
|
|
||||||
return hyInspectionSettingMapper.getHyInspectionSettingByUserId(inspectionUserId, excludeInspectionSettingId);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,100 +0,0 @@
|
|||||||
package com.cool.store.dao;
|
|
||||||
|
|
||||||
import com.cool.store.constants.CommonConstants;
|
|
||||||
import com.cool.store.entity.HyInspectionSettingMappingDO;
|
|
||||||
import com.cool.store.mapper.HyInspectionSettingMappingMapper;
|
|
||||||
import com.google.common.collect.Lists;
|
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @FileName: HyInspectionSettingMappingDAO
|
|
||||||
* @Description:
|
|
||||||
* @date 2023-07-18 16:29
|
|
||||||
*/
|
|
||||||
@Repository
|
|
||||||
public class HyInspectionSettingMappingDAO {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private HyInspectionSettingMappingMapper hyInspectionSettingMappingMapper;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取区域ids
|
|
||||||
* @param inspectionSettingId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public List<Long> getOpenAreaMappingIds(Long inspectionSettingId){
|
|
||||||
if(Objects.isNull(inspectionSettingId)){
|
|
||||||
return Lists.newArrayList();
|
|
||||||
}
|
|
||||||
return hyInspectionSettingMappingMapper.getOpenAreaMappingIds(inspectionSettingId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增映射关系
|
|
||||||
* @param inspectionSettingId
|
|
||||||
* @param openAreaMappingIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Integer addInspectionSettingMapping(Long inspectionSettingId, List<Long> openAreaMappingIds){
|
|
||||||
if(CollectionUtils.isEmpty(openAreaMappingIds) || Objects.isNull(inspectionSettingId)){
|
|
||||||
return CommonConstants.ZERO;
|
|
||||||
}
|
|
||||||
hyInspectionSettingMappingMapper.deleteInOpenAreaMappingIds(inspectionSettingId, openAreaMappingIds);
|
|
||||||
List<HyInspectionSettingMappingDO> insertList = new ArrayList<>();
|
|
||||||
for (Long openAreaMappingId : openAreaMappingIds) {
|
|
||||||
HyInspectionSettingMappingDO insert = new HyInspectionSettingMappingDO();
|
|
||||||
insert.setInspectionSettingId(inspectionSettingId);
|
|
||||||
insert.setOpenAreaMappingId(openAreaMappingId);
|
|
||||||
insert.setCreateTime(new Date());
|
|
||||||
insert.setDeleted(Boolean.FALSE);
|
|
||||||
insertList.add(insert);
|
|
||||||
}
|
|
||||||
return hyInspectionSettingMappingMapper.batchInsertSelective(insertList);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新映射关系
|
|
||||||
* @param inspectionSettingId
|
|
||||||
* @param openAreaMappingIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Integer updateInspectionSettingMapping(Long inspectionSettingId, List<Long> openAreaMappingIds){
|
|
||||||
hyInspectionSettingMappingMapper.deleteNotInOpenAreaMappingIds(inspectionSettingId, openAreaMappingIds);
|
|
||||||
return addInspectionSettingMapping(inspectionSettingId, openAreaMappingIds);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除映射关系
|
|
||||||
* @param inspectionSettingId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Integer deleteInspectionSettingMapping(Long inspectionSettingId){
|
|
||||||
if(Objects.isNull(inspectionSettingId)){
|
|
||||||
return CommonConstants.ZERO;
|
|
||||||
}
|
|
||||||
return hyInspectionSettingMappingMapper.deleteInspectionSettingMapping(inspectionSettingId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取冲突的映射关系
|
|
||||||
* @param inspectionSettingId
|
|
||||||
* @param openAreaMappingIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public List<HyInspectionSettingMappingDO> getConflictInspectionSetting(Long inspectionSettingId, List<Long> openAreaMappingIds){
|
|
||||||
if(CollectionUtils.isEmpty(openAreaMappingIds)){
|
|
||||||
return Lists.newArrayList();
|
|
||||||
}
|
|
||||||
return hyInspectionSettingMappingMapper.getConflictInspectionSetting(inspectionSettingId, openAreaMappingIds);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,84 +0,0 @@
|
|||||||
package com.cool.store.dao;
|
|
||||||
|
|
||||||
import com.cool.store.dto.partner.ZoneCheckDTO;
|
|
||||||
import com.cool.store.entity.HyIntendDevelopementMappingDO;
|
|
||||||
import com.cool.store.mapper.HyIntendDevelopementMappingMapper;
|
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author suzhuhong
|
|
||||||
* @Date 2023/6/14 14:42
|
|
||||||
* @Version 1.0
|
|
||||||
*/
|
|
||||||
@Repository
|
|
||||||
public class HyIntendDevMappingDAO {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
HyIntendDevelopementMappingMapper hyIntendDevelopementMappingMapper;
|
|
||||||
|
|
||||||
|
|
||||||
public int insertSelective(HyIntendDevelopementMappingDO record){
|
|
||||||
return hyIntendDevelopementMappingMapper.insertSelective(record);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int updateByPrimaryKeySelective(HyIntendDevelopementMappingDO record){
|
|
||||||
return hyIntendDevelopementMappingMapper.updateByPrimaryKeySelective(record);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int deleteByOpenAreaIds(List<Long> openAreaIds,String type){
|
|
||||||
if (CollectionUtils.isEmpty(openAreaIds)){
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return hyIntendDevelopementMappingMapper.deleteByOpenAreaIds(openAreaIds,type);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int deleteByMappingIds(List<Long> mappingIds,String type){
|
|
||||||
if (CollectionUtils.isEmpty(mappingIds)){
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return hyIntendDevelopementMappingMapper.deleteByMappingIds(mappingIds,type);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<ZoneCheckDTO> selectByMappingIdList(List<Long> idList){
|
|
||||||
if (CollectionUtils.isEmpty(idList)){
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
return hyIntendDevelopementMappingMapper.selectByMappingIdList(idList);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<ZoneCheckDTO> selectByOpenAreaMappingIdList(List<Long> idList,String type,Long currentId){
|
|
||||||
if (CollectionUtils.isEmpty(idList)){
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
return hyIntendDevelopementMappingMapper.selectByOpenAreaMappingIdList(idList,type,currentId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public HyIntendDevelopementMappingDO selectByOpenAreaMappingId(Long id,String type){
|
|
||||||
if (id==null){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return hyIntendDevelopementMappingMapper.selectByOpenAreaMappingId(id,type);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int batchInsert(List<HyIntendDevelopementMappingDO> recordList){
|
|
||||||
if (CollectionUtils.isEmpty(recordList)){
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return hyIntendDevelopementMappingMapper.batchInsert(recordList);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
package com.cool.store.dao;
|
|
||||||
|
|
||||||
import com.cool.store.entity.HyIntendDevZoneInfoDO;
|
|
||||||
import com.cool.store.entity.HyOpenAreaInfoDO;
|
|
||||||
import com.cool.store.mapper.HyIntendDevZoneInfoMapper;
|
|
||||||
import com.cool.store.mapper.HyOpenAreaInfoMapper;
|
|
||||||
import com.github.pagehelper.PageInfo;
|
|
||||||
import com.google.common.collect.Lists;
|
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author suzhuhong
|
|
||||||
* @Date 2023/6/14 14:40
|
|
||||||
* @Version 1.0
|
|
||||||
*/
|
|
||||||
@Repository
|
|
||||||
public class HyIntendDevZoneInfoDAO {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
HyIntendDevZoneInfoMapper hyIntendDevZoneInfoMapper;
|
|
||||||
|
|
||||||
public int insertSelective( HyIntendDevZoneInfoDO record){
|
|
||||||
return hyIntendDevZoneInfoMapper.insertSelective(record);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public int updateByPrimaryKeySelective(HyIntendDevZoneInfoDO record){
|
|
||||||
return hyIntendDevZoneInfoMapper.updateByPrimaryKeySelective(record);
|
|
||||||
}
|
|
||||||
|
|
||||||
public HyIntendDevZoneInfoDO selectById(Long id){
|
|
||||||
if (id==null){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return hyIntendDevZoneInfoMapper.selectById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<HyIntendDevZoneInfoDO> selectByIds(List<Long> ids){
|
|
||||||
if (CollectionUtils.isEmpty(ids)){
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
return hyIntendDevZoneInfoMapper.selectByIds(ids);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public List<HyIntendDevZoneInfoDO> getHyIntendDevZoneInfoList(String type){
|
|
||||||
if (StringUtils.isEmpty(type)){
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
return hyIntendDevZoneInfoMapper.getHyIntendDevZoneInfoList(type);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据组织架构获取配置信息
|
|
||||||
* @param regionIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public List<HyIntendDevZoneInfoDO> getZoneInfoByRegionIds(List<String> regionIds){
|
|
||||||
if(CollectionUtils.isEmpty(regionIds)){
|
|
||||||
return Lists.newArrayList();
|
|
||||||
}
|
|
||||||
return hyIntendDevZoneInfoMapper.getZoneInfoByRegionIds(regionIds);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
package com.cool.store.dao;
|
|
||||||
|
|
||||||
import com.cool.store.enums.WorkflowStatusEnum;
|
|
||||||
import com.cool.store.mapper.HyPartnerInterviewMapper;
|
|
||||||
import com.cool.store.mapper.HyPartnerLineInfoMapper;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
@Repository
|
|
||||||
public class HyInterviewDAO {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private HyPartnerInterviewMapper interviewMapper;
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private HyPartnerLineInfoMapper lineInfoMapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新面试状态必须使用该方法
|
|
||||||
* 需要同步更新面试状态和线索表中的子流程状态
|
|
||||||
*/
|
|
||||||
@Transactional
|
|
||||||
public void updateInterviewWorkflowStatus(String interviewPlanId, WorkflowStatusEnum status) {
|
|
||||||
//修改面试状态
|
|
||||||
interviewMapper.updateInterviewStatus(interviewPlanId, status.getCode());
|
|
||||||
//获取对应的lineId
|
|
||||||
String lineId = interviewMapper.getLineId(interviewPlanId);
|
|
||||||
//修改线索表子流程状态
|
|
||||||
lineInfoMapper.updateWorkflowStatus(lineId, status.getCode());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据线索id批量修改面试状态和线索表子流程状态
|
|
||||||
* @param lineIds
|
|
||||||
* @param status
|
|
||||||
*/
|
|
||||||
@Transactional
|
|
||||||
public void batchUpdateInterviewWorkflowStatus(List<Long> lineIds, Integer status){
|
|
||||||
//修改面试状态
|
|
||||||
interviewMapper.batchUpdateStatusByLineIds(lineIds, status);
|
|
||||||
//修改线索表子流程状态
|
|
||||||
lineInfoMapper.batchUpdateStatusByLineIds(lineIds, status);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public int updateLineId(String newPartnerId,Long newLineId,Long oldLineId){
|
|
||||||
if (newLineId==null || Objects.isNull(oldLineId)){
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return interviewMapper.updateLineId(newPartnerId,newLineId, oldLineId);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,164 +0,0 @@
|
|||||||
package com.cool.store.dao;
|
|
||||||
|
|
||||||
import cn.hutool.core.convert.Convert;
|
|
||||||
import com.cool.store.dto.partner.ApplyReservationProvinceDTO;
|
|
||||||
import com.cool.store.entity.HyOpenAreaInfoDO;
|
|
||||||
import com.cool.store.entity.HyPartnerBaseInfoDO;
|
|
||||||
import com.cool.store.mapper.HyOpenAreaInfoMapper;
|
|
||||||
import com.cool.store.utils.StringUtil;
|
|
||||||
import com.github.pagehelper.PageInfo;
|
|
||||||
import com.google.common.collect.Lists;
|
|
||||||
import com.google.common.collect.Maps;
|
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
|
||||||
import org.apache.commons.collections4.ListUtils;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author suzhuhong
|
|
||||||
* @Date 2023/6/6 14:32
|
|
||||||
* @Version 1.0
|
|
||||||
*/
|
|
||||||
@Repository
|
|
||||||
public class HyOpenAreaInfoDAO {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
HyOpenAreaInfoMapper hyOpenAreaInfoMapper;
|
|
||||||
|
|
||||||
public List<HyOpenAreaInfoDO> queryKeyOpenArea(){
|
|
||||||
return hyOpenAreaInfoMapper.queryKeyOpenArea();
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<HyOpenAreaInfoDO> queryByKeyword(String keyword,Boolean applyFlag,String areaStatus,Boolean filterData){
|
|
||||||
return hyOpenAreaInfoMapper.queryByKeyword(keyword,applyFlag,areaStatus,filterData);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<HyOpenAreaInfoDO> queryFirstLevel(){
|
|
||||||
return hyOpenAreaInfoMapper.queryFirstLevel();
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<HyOpenAreaInfoDO> queryByIdsExcludeFirstLevel(List<Long> ids){
|
|
||||||
if (CollectionUtils.isEmpty(ids)){
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
return hyOpenAreaInfoMapper.queryByIdsExcludeFirstLevel(ids);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<ApplyReservationProvinceDTO> getApplyReservationProvinceCount(){
|
|
||||||
return hyOpenAreaInfoMapper.getApplyReservationProvinceCount();
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<HyOpenAreaInfoDO> getChildrenList(String type ,Long parentId){
|
|
||||||
if (parentId==null){
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
return hyOpenAreaInfoMapper.getChildrenList(type,parentId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getChildrenCount(String type ,Long parentId){
|
|
||||||
if (parentId==null){
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return hyOpenAreaInfoMapper.getChildrenCount(type,parentId);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public int batchUpdateById(String backgroundBanner,String detailBanner,String areaStatus,String updateUserId,List<Long> ids){
|
|
||||||
if (StringUtils.isEmpty(areaStatus)){
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return hyOpenAreaInfoMapper.batchUpdateById(backgroundBanner,detailBanner,areaStatus,updateUserId,ids);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int batchUpdateByParentId(String backgroundBanner,String detailBanner,String areaStatus,String updateUserId,List<Long> ids){
|
|
||||||
if (StringUtils.isEmpty(areaStatus)){
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return hyOpenAreaInfoMapper.batchUpdateByParentId(backgroundBanner,detailBanner,areaStatus,updateUserId,ids);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public List<HyOpenAreaInfoDO> selectByIds(List<Long> ids){
|
|
||||||
if (CollectionUtils.isEmpty(ids)){
|
|
||||||
return Lists.newArrayList();
|
|
||||||
}
|
|
||||||
return hyOpenAreaInfoMapper.selectByIds(ids);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Map<Long, String> getNameMapByIds(List<Long> ids){
|
|
||||||
if (CollectionUtils.isEmpty(ids)){
|
|
||||||
return Maps.newHashMap();
|
|
||||||
}
|
|
||||||
List<HyOpenAreaInfoDO> hyOpenAreaInfoDOS = hyOpenAreaInfoMapper.selectByIds(ids);
|
|
||||||
return ListUtils.emptyIfNull(hyOpenAreaInfoDOS).stream().collect(Collectors.toMap(k->k.getId(), v->v.getAreaName(), (k1, k2)->k1));
|
|
||||||
}
|
|
||||||
|
|
||||||
public Map<String, String> selectNameMapByIds(List<Long> ids){
|
|
||||||
if (CollectionUtils.isEmpty(ids)){
|
|
||||||
return Maps.newHashMap();
|
|
||||||
}
|
|
||||||
List<HyOpenAreaInfoDO> hyOpenAreaInfoDOS = hyOpenAreaInfoMapper.selectByIds(ids);
|
|
||||||
return ListUtils.emptyIfNull(hyOpenAreaInfoDOS).stream().collect(Collectors.toMap(k->String.valueOf(k.getId()), v->v.getAreaPath().replace("/"," ")));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public HyOpenAreaInfoDO selectById(Long id){
|
|
||||||
if (id==null){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return hyOpenAreaInfoMapper.selectById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<HyOpenAreaInfoDO> getAllOpenArea(){
|
|
||||||
return hyOpenAreaInfoMapper.getAllOpenArea();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public List<HyOpenAreaInfoDO> selectAllCity(){
|
|
||||||
return hyOpenAreaInfoMapper.selectAllCity();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 过滤叶子节点
|
|
||||||
* @param openAreaIds
|
|
||||||
* @return 叶子节点id
|
|
||||||
*/
|
|
||||||
public List<Long> filterLeafNode(List<Long> openAreaIds){
|
|
||||||
if(CollectionUtils.isEmpty(openAreaIds)){
|
|
||||||
return Lists.newArrayList();
|
|
||||||
}
|
|
||||||
return hyOpenAreaInfoMapper.filterLeafNode(openAreaIds);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<HyOpenAreaInfoDO> getAllAreaCode(String id) {
|
|
||||||
if (StringUtils.isEmpty(id)){
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
//获取省下所有数据
|
|
||||||
List<HyOpenAreaInfoDO> provinceCodeList= hyOpenAreaInfoMapper.getProvinceAllCode(id);
|
|
||||||
if(CollectionUtils.isEmpty(provinceCodeList)){
|
|
||||||
//获取市区下所有数据
|
|
||||||
List<HyOpenAreaInfoDO> cityCodeList= hyOpenAreaInfoMapper.getSonArea(id);
|
|
||||||
if(CollectionUtils.isEmpty(cityCodeList)){
|
|
||||||
return new ArrayList<HyOpenAreaInfoDO>(){{ add(hyOpenAreaInfoMapper.selectById(Convert.toLong(id)));}};
|
|
||||||
}else {
|
|
||||||
return cityCodeList;
|
|
||||||
}
|
|
||||||
}else {
|
|
||||||
return provinceCodeList;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public HyOpenAreaInfoDO selectByAreaPath(String areaPath) {
|
|
||||||
if (StringUtil.isEmpty(areaPath)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return hyOpenAreaInfoMapper.selectByAreaPath(areaPath);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,93 +0,0 @@
|
|||||||
package com.cool.store.dao;
|
|
||||||
|
|
||||||
import com.cool.store.entity.HyPartnerBaseInfoDO;
|
|
||||||
import com.cool.store.mapper.HyPartnerBaseInfoMapper;
|
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author suzhuhong
|
|
||||||
* @Date 2023/6/13 20:25
|
|
||||||
* @Version 1.0
|
|
||||||
*/
|
|
||||||
@Repository
|
|
||||||
public class HyPartnerBaseInfoDAO {
|
|
||||||
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
HyPartnerBaseInfoMapper hyPartnerBaseInfoMapper;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public int insertSelective( HyPartnerBaseInfoDO record){
|
|
||||||
return hyPartnerBaseInfoMapper.insertSelective(record);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int batchInsert( List<HyPartnerBaseInfoDO> records){
|
|
||||||
if (CollectionUtils.isEmpty(records)){
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return hyPartnerBaseInfoMapper.batchInsert(records);
|
|
||||||
}
|
|
||||||
|
|
||||||
public HyPartnerBaseInfoDO selectById(@Param("id") Long id){
|
|
||||||
return hyPartnerBaseInfoMapper.selectById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
|
||||||
* dateTime:2023-05-29 03:51
|
|
||||||
*/
|
|
||||||
public int updateByPrimaryKeySelective(HyPartnerBaseInfoDO record){
|
|
||||||
return hyPartnerBaseInfoMapper.updateByPrimaryKeySelective(record);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int updateByPrimaryKey(HyPartnerBaseInfoDO record){
|
|
||||||
return hyPartnerBaseInfoMapper.updateByPrimaryKey(record);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public int updateByPartnerId(String userName,String mobile,String partnerId){
|
|
||||||
return hyPartnerBaseInfoMapper.updateByPartnerId(userName,mobile,partnerId);
|
|
||||||
}
|
|
||||||
public int cleanIdCardInfoByPartnerLineId(String idCard, String idCardPhotoFront,
|
|
||||||
String idCardPhotoBlack, Long partnerLineId){
|
|
||||||
return hyPartnerBaseInfoMapper.cleanIdCardInfoByPartnerLineId(idCard, idCardPhotoFront, idCardPhotoBlack, partnerLineId);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public HyPartnerBaseInfoDO getByPartnerIdAndLineId(String partnerId, Long partnerLineId){
|
|
||||||
if (StringUtils.isEmpty(partnerId) || partnerLineId == null){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return hyPartnerBaseInfoMapper.getByPartnerIdAndLineId(partnerId, partnerLineId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public HyPartnerBaseInfoDO getByPartnerLineId(Long partnerLineId){
|
|
||||||
if (partnerLineId == null){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return hyPartnerBaseInfoMapper.getByPartnerLineId(partnerLineId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<HyPartnerBaseInfoDO> getByPartnerLineIds(List<Long> partnerLineId){
|
|
||||||
if (CollectionUtils.isEmpty(partnerLineId)){
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
return hyPartnerBaseInfoMapper.getByPartnerLineIds(partnerLineId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public HyPartnerBaseInfoDO getByIdCard(String idCard){
|
|
||||||
if (StringUtils.isEmpty(idCard)){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return hyPartnerBaseInfoMapper.getByIdCard(idCard);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
package com.cool.store.dao;
|
|
||||||
|
|
||||||
import com.cool.store.entity.HyPartnerClerkDO;
|
|
||||||
import com.cool.store.mapper.HyPartnerClerkMapper;
|
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author suzhuhong
|
|
||||||
* @Date 2023/6/15 10:09
|
|
||||||
* @Version 1.0
|
|
||||||
*/
|
|
||||||
@Repository
|
|
||||||
public class HyPartnerClerkDAO {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
HyPartnerClerkMapper hyPartnerClerkMapper;
|
|
||||||
|
|
||||||
public int insertSelective( HyPartnerClerkDO record){
|
|
||||||
return hyPartnerClerkMapper.insertSelective(record);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int updateByPrimaryKeySelective(HyPartnerClerkDO record){
|
|
||||||
return hyPartnerClerkMapper.updateByPrimaryKeySelective(record);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<HyPartnerClerkDO> getHyPartnerClerkList(Long lineId){
|
|
||||||
return hyPartnerClerkMapper.getHyPartnerClerkList(lineId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int batchInsert(List<HyPartnerClerkDO> hyPartnerClerkDOList){
|
|
||||||
if (CollectionUtils.isEmpty(hyPartnerClerkDOList)){
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
return hyPartnerClerkMapper.batchInsert(hyPartnerClerkDOList);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void deleteByPartnerIdAndLineId(String partnerId, Long partnerLineId){
|
|
||||||
if (StringUtils.isEmpty(partnerId) || Objects.isNull(partnerLineId)){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
hyPartnerClerkMapper.deleteByPartnerIdAndLineId(partnerId, partnerLineId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<HyPartnerClerkDO> listByPartnerIdAndLineId(String partnerId, Long partnerLineId){
|
|
||||||
if (StringUtils.isEmpty(partnerId) || Objects.isNull(partnerLineId)){
|
|
||||||
return Collections.emptyList();
|
|
||||||
}
|
|
||||||
return hyPartnerClerkMapper.listByPartnerIdAndLineId(partnerId, partnerLineId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int updateLineId(String newPartnerId,Long newLineId,Long oldLineId){
|
|
||||||
if (newLineId==null || Objects.isNull(oldLineId)){
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return hyPartnerClerkMapper.updateLineId(newPartnerId,newLineId, oldLineId);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,188 +0,0 @@
|
|||||||
package com.cool.store.dao;
|
|
||||||
|
|
||||||
import com.cool.store.dto.exhibition.ExhibitionInterviewInfoDTO;
|
|
||||||
import com.cool.store.dto.exhibition.ExhibitionLineBaseDTO;
|
|
||||||
import com.cool.store.dto.exhibition.ExhibitionLineDTO;
|
|
||||||
import com.cool.store.dto.exhibition.PartnerSignUpDTO;
|
|
||||||
import com.cool.store.entity.HyPartnerExhibitionDO;
|
|
||||||
import com.cool.store.entity.HyPartnerExhibitionInterviewDO;
|
|
||||||
import com.cool.store.mapper.HyPartnerExhibitionMapper;
|
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author suzhuhong
|
|
||||||
* @Date 2023/11/30 15:13
|
|
||||||
* @Version 1.0
|
|
||||||
*/
|
|
||||||
@Repository
|
|
||||||
public class HyPartnerExhibitionDAO {
|
|
||||||
@Resource
|
|
||||||
HyPartnerExhibitionMapper hyPartnerExhibitionMapper;
|
|
||||||
|
|
||||||
public int insertSelective(HyPartnerExhibitionDO record){
|
|
||||||
if (record == null){
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
return hyPartnerExhibitionMapper.insertSelective(record);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认查询方法,通过主键获取所有字段的值
|
|
||||||
* dateTime:2023-11-30 01:38
|
|
||||||
*/
|
|
||||||
public HyPartnerExhibitionDO selectByPrimaryKey(Long id){
|
|
||||||
if (id == null){
|
|
||||||
return new HyPartnerExhibitionDO();
|
|
||||||
}
|
|
||||||
return hyPartnerExhibitionMapper.selectByPrimaryKey(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
public HyPartnerExhibitionDO querySelective(HyPartnerExhibitionDO record){
|
|
||||||
if (record == null){
|
|
||||||
return new HyPartnerExhibitionDO();
|
|
||||||
}
|
|
||||||
return hyPartnerExhibitionMapper.querySelective(record);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
|
||||||
* dateTime:2023-11-30 01:38
|
|
||||||
*/
|
|
||||||
public int updateByPrimaryKeySelective(HyPartnerExhibitionDO record){
|
|
||||||
if (record.getId() == null){
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
return hyPartnerExhibitionMapper.updateByPrimaryKeySelective(record);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键物理删除
|
|
||||||
* dateTime:2023-11-30 01:38
|
|
||||||
*/
|
|
||||||
public int deleteByPrimaryKey(Long id){
|
|
||||||
if (id == null){
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
return hyPartnerExhibitionMapper.deleteByPrimaryKey(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<ExhibitionLineDTO> getExhibitionLine(Integer exhibitionId){
|
|
||||||
if (exhibitionId == null){
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
return hyPartnerExhibitionMapper.getExhibitionLine(exhibitionId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<ExhibitionLineDTO> exhibitionLineList(Integer exhibitionId,Integer participationStatus, String partnerUserId,String userId,Integer id){
|
|
||||||
if (exhibitionId == null){
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
return hyPartnerExhibitionMapper.exhibitionLineList(exhibitionId,participationStatus, partnerUserId,userId,id);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void rejectExhibitionInterview(String partnerLineId) {
|
|
||||||
if (StringUtils.isEmpty(partnerLineId)){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
hyPartnerExhibitionMapper.rejectExhibitionInterview(partnerLineId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void deleteAllByLineId(Long partnerLineId) {
|
|
||||||
if (partnerLineId == null){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
hyPartnerExhibitionMapper.deleteAllByLineId(partnerLineId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<Long> queryIdListByInterviewPlanIds(List<Long> interviewPlanIds) {
|
|
||||||
if (ObjectUtils.isEmpty(interviewPlanIds)) {
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
return hyPartnerExhibitionMapper.queryListByInterviewPlanIds(interviewPlanIds);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<HyPartnerExhibitionDO> queryListByLineIds(List<Long> lindIds, Integer exhibitionPartnerStatusCode) {
|
|
||||||
if (ObjectUtils.isEmpty(lindIds) || exhibitionPartnerStatusCode == null) {
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
return hyPartnerExhibitionMapper.queryListByLineIds(lindIds, exhibitionPartnerStatusCode);
|
|
||||||
}
|
|
||||||
|
|
||||||
public HyPartnerExhibitionInterviewDO queryPartnerExhibitionInterviewInfo(Long interviewPlanId, Long partnerLineId) {
|
|
||||||
if (interviewPlanId == null || partnerLineId == null) {
|
|
||||||
return new HyPartnerExhibitionInterviewDO();
|
|
||||||
}
|
|
||||||
return hyPartnerExhibitionMapper.queryPartnerExhibitionInterviewInfo(interviewPlanId, partnerLineId);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public List<ExhibitionLineBaseDTO> exhibitionLineBaseInfo(String partnerName, Integer exhibitionId) {
|
|
||||||
if (exhibitionId == null) {
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
return hyPartnerExhibitionMapper.exhibitionLineBaseInfo(partnerName, exhibitionId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public HyPartnerExhibitionDO getPartnerExhibition(Integer exhibitionId, Long lindId){
|
|
||||||
return hyPartnerExhibitionMapper.getPartnerExhibition(exhibitionId,lindId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<PartnerSignUpDTO> partnerSignUpCount(List<Long> lineIds){
|
|
||||||
if (CollectionUtils.isEmpty(lineIds)){
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
return hyPartnerExhibitionMapper.partnerSignUpCount(lineIds);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<Long> getCloseExhibitionLineIds(List<Integer> exhibitionIds) {
|
|
||||||
if (CollectionUtils.isEmpty(exhibitionIds)){
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
return hyPartnerExhibitionMapper.getCloseExhibitionLineIds(exhibitionIds);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<ExhibitionLineDTO> getLineByExhibitionIds(List<Integer> exhibitionIds) {
|
|
||||||
if (CollectionUtils.isEmpty(exhibitionIds)){
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
return hyPartnerExhibitionMapper.getLineByExhibitionIds(exhibitionIds);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void updateStatusAfterSubmitIndustry(Long partnerLineId) {
|
|
||||||
if (partnerLineId == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
hyPartnerExhibitionMapper.updateStatusAfterSubmitIndustry(partnerLineId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void updateStatusAfterFinishInterview(String interviewPlanId) {
|
|
||||||
if (StringUtils.isEmpty(interviewPlanId)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
hyPartnerExhibitionMapper.updateStatusAfterFinishInterview(Long.parseLong(interviewPlanId));
|
|
||||||
}
|
|
||||||
|
|
||||||
public void updateStatusAfterSubmitQualification(String interviewPlanId) {
|
|
||||||
if (StringUtils.isEmpty(interviewPlanId)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
hyPartnerExhibitionMapper.updateStatusAfterSubmitQualification(Long.parseLong(interviewPlanId));
|
|
||||||
}
|
|
||||||
|
|
||||||
public ExhibitionInterviewInfoDTO getStartInterviewInfo(Long lineId) {
|
|
||||||
if (lineId == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return hyPartnerExhibitionMapper.getStartInterviewInfo(lineId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,94 +0,0 @@
|
|||||||
package com.cool.store.dao;
|
|
||||||
|
|
||||||
import com.cool.store.dto.partner.PartnerIntentApplyInfoDTO;
|
|
||||||
import com.cool.store.entity.HyPartnerIntentInfoDO;
|
|
||||||
import com.cool.store.mapper.HyPartnerIntentInfoMapper;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author suzhuhong
|
|
||||||
* @Date 2023/6/9 15:02
|
|
||||||
* @Version 1.0
|
|
||||||
*/
|
|
||||||
@Repository
|
|
||||||
public class HyPartnerIntentInfoDAO {
|
|
||||||
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
HyPartnerIntentInfoMapper hyPartnerIntentInfoMapper;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
HyPartnerExhibitionDAO hyPartnerExhibitionDAO;
|
|
||||||
|
|
||||||
@Transactional
|
|
||||||
public int insertSelective( HyPartnerIntentInfoDO record){
|
|
||||||
//增加修改线索会销状态
|
|
||||||
hyPartnerExhibitionDAO.updateStatusAfterSubmitIndustry(record.getPartnerLineId());
|
|
||||||
return hyPartnerIntentInfoMapper.insertSelective(record);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int updateByPrimaryKeySelective(HyPartnerIntentInfoDO record){
|
|
||||||
return hyPartnerIntentInfoMapper.updateByPrimaryKeySelective(record);
|
|
||||||
}
|
|
||||||
|
|
||||||
public HyPartnerIntentInfoDO selectByPrimaryKeySelective(Long id){
|
|
||||||
if (id==null){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return hyPartnerIntentInfoMapper.selectByPrimaryKeySelective(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public List<PartnerIntentApplyInfoDTO> selectPartnerIntentApplyInfoList(String userId, String workflowStage, String workflowStatus, String keyword, Integer callStatus,
|
|
||||||
List<Long> userPortraitIdList, String lastFollowStartTime, String lastFollowEndTime, List<Long> userChannelIdList){
|
|
||||||
if (StringUtils.isEmpty(userId)){
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
return hyPartnerIntentInfoMapper.selectPartnerIntentApplyInfoList(userId,workflowStage,workflowStatus,keyword,callStatus,userPortraitIdList,lastFollowStartTime,lastFollowEndTime,userChannelIdList);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public HyPartnerIntentInfoDO selectByLineId(Long lineId){
|
|
||||||
if (lineId==null){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return hyPartnerIntentInfoMapper.selectByLineId(lineId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public HyPartnerIntentInfoDO getByPartnerIdAndLineId(String partnerId, Long partnerLineId){
|
|
||||||
if (StringUtils.isEmpty(partnerId) || Objects.isNull(partnerLineId)){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return hyPartnerIntentInfoMapper.getByPartnerIdAndLineId(partnerId, partnerLineId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int updateLineId(String newPartnerId,Long newLineId,Long oldLineId){
|
|
||||||
if (newLineId==null || Objects.isNull(oldLineId)){
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return hyPartnerIntentInfoMapper.updateLineId(newPartnerId,newLineId, oldLineId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int updateByPartnerLineId(HyPartnerIntentInfoDO record){
|
|
||||||
if(Objects.isNull(record.getPartnerLineId())){
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return hyPartnerIntentInfoMapper.updateByPartnerLineId(record);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int updateAcquaintanceFlag(Long id ,Integer acquaintanceFlag,String acquaintanceName, Integer acquaintanceRelationshipType,String otherRelationshipType){
|
|
||||||
if (id==null){
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return hyPartnerIntentInfoMapper.updateAcquaintanceFlag(id,acquaintanceFlag,acquaintanceName,acquaintanceRelationshipType,otherRelationshipType);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,123 +0,0 @@
|
|||||||
package com.cool.store.dao;
|
|
||||||
|
|
||||||
import com.cool.store.dto.partner.AdvanceLineDTO;
|
|
||||||
import com.cool.store.dto.partner.PartnerInterviewInfoDTO;
|
|
||||||
import com.cool.store.dto.partner.SpecialDateRangeInterviewCountDTO;
|
|
||||||
import com.cool.store.entity.HyPartnerInterviewPlanDO;
|
|
||||||
import com.cool.store.mapper.HyPartnerInterviewPlanMapper;
|
|
||||||
import com.github.pagehelper.PageInfo;
|
|
||||||
import com.google.common.collect.Lists;
|
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.lang.reflect.Array;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author suzhuhong
|
|
||||||
* @Date 2023/6/8 14:54
|
|
||||||
* @Version 1.0
|
|
||||||
*/
|
|
||||||
@Repository
|
|
||||||
public class HyPartnerInterviewPlanDAO {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
HyPartnerInterviewPlanMapper hyPartnerInterviewPlanMapper;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询当前用户当天是否有面试
|
|
||||||
* @param userId
|
|
||||||
* @param currentDate
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public List<AdvanceLineDTO> getCurrentDateInterviewCount(String userId, String currentDate, String endDate){
|
|
||||||
if (StringUtils.isEmpty(userId)){
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
return hyPartnerInterviewPlanMapper.getCurrentDateInterviewCount(userId,currentDate,endDate);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询指定日期面试数量 与未来7天面试数量
|
|
||||||
* @param userId
|
|
||||||
* @param currentDate
|
|
||||||
* @param startTime
|
|
||||||
* @param endTime
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public SpecialDateRangeInterviewCountDTO getInterviewCount(String userId, String currentDate, String startTime, String endTime){
|
|
||||||
if (StringUtils.isEmpty(userId)){
|
|
||||||
return new SpecialDateRangeInterviewCountDTO();
|
|
||||||
}
|
|
||||||
return hyPartnerInterviewPlanMapper.getInterviewCount(userId,currentDate,startTime,endTime);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 当天还有几场面试
|
|
||||||
* @param userId
|
|
||||||
* @param currentDate
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public List<HyPartnerInterviewPlanDO> getInterviewPlanList(String userId, String currentTime,String currentDay){
|
|
||||||
if (StringUtils.isEmpty(userId)){
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
return hyPartnerInterviewPlanMapper.getInterviewPlanList(userId,currentTime,currentDay);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 工作台 招商经理 预约面试时间 合格资格面试 列表
|
|
||||||
* @param userId
|
|
||||||
* @param workflowStage
|
|
||||||
* @param workflowStatus
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public List<PartnerInterviewInfoDTO> getPartnerInterviewInfoList(String userId, String workflowStage,String workflowStatus,Boolean filter){
|
|
||||||
if (StringUtils.isEmpty(userId)){
|
|
||||||
return Lists.newArrayList();
|
|
||||||
}
|
|
||||||
return hyPartnerInterviewPlanMapper.getPartnerInterviewInfoList(userId,workflowStage,workflowStatus,filter);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long selectInterviewIdByLineId(Long lineId){
|
|
||||||
if (lineId==null){
|
|
||||||
return 0L;
|
|
||||||
}
|
|
||||||
return hyPartnerInterviewPlanMapper.selectInterviewIdByLineId(lineId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public HyPartnerInterviewPlanDO getInterviewPlanByLineId(Long lineId){
|
|
||||||
if (lineId==null){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return hyPartnerInterviewPlanMapper.getInterviewPlanByLineId(lineId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据线索表ID查询
|
|
||||||
* @param lindIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public List<HyPartnerInterviewPlanDO> getHyPartnerInterviewPlanByLineIds(List<Long> lindIds){
|
|
||||||
if (CollectionUtils.isEmpty(lindIds)){
|
|
||||||
return Lists.newArrayList();
|
|
||||||
}
|
|
||||||
return hyPartnerInterviewPlanMapper.getHyPartnerInterviewPlanByLineIds(lindIds);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public int updateLineId(String newPartnerId,Long newLineId,Long oldLineId){
|
|
||||||
if (newLineId==null || Objects.isNull(oldLineId)){
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return hyPartnerInterviewPlanMapper.updateLineId(newPartnerId,newLineId, oldLineId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,241 +0,0 @@
|
|||||||
package com.cool.store.dao;
|
|
||||||
|
|
||||||
import cn.hutool.core.map.MapUtil;
|
|
||||||
import com.cool.store.constants.CommonConstants;
|
|
||||||
import com.cool.store.dto.partner.*;
|
|
||||||
import com.cool.store.entity.HyPartnerLineInfoDO;
|
|
||||||
import com.cool.store.mapper.HyPartnerLineInfoMapper;
|
|
||||||
import com.cool.store.request.PrivateSeaLineListRequest;
|
|
||||||
import com.cool.store.vo.LinePageInfoVo;
|
|
||||||
import com.google.common.collect.Lists;
|
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
|
||||||
import org.apache.commons.collections4.ListUtils;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.*;
|
|
||||||
import java.util.function.Function;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author suzhuhong
|
|
||||||
* @Date 2023/6/8 15:10
|
|
||||||
* @Version 1.0
|
|
||||||
*/
|
|
||||||
@Repository
|
|
||||||
public class HyPartnerLineInfoDAO {
|
|
||||||
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
HyPartnerLineInfoMapper hyPartnerLineInfoMapper;
|
|
||||||
|
|
||||||
|
|
||||||
public int insertSelective(HyPartnerLineInfoDO hyPartnerLineInfoDO){
|
|
||||||
return hyPartnerLineInfoMapper.insertSelective(hyPartnerLineInfoDO);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int batchInsert(List<HyPartnerLineInfoDO> hyPartnerLineInfoDOS){
|
|
||||||
if (CollectionUtils.isEmpty(hyPartnerLineInfoDOS)){
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
return hyPartnerLineInfoMapper.batchInsert(hyPartnerLineInfoDOS);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public int batchDeleted(List<Long> lineIdList){
|
|
||||||
if (CollectionUtils.isEmpty(lineIdList)){
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
return hyPartnerLineInfoMapper.batchDeleted(lineIdList);
|
|
||||||
}
|
|
||||||
|
|
||||||
public HyPartnerLineInfoDO selectByPrimaryKeySelective(Long id){
|
|
||||||
if (id==null){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return hyPartnerLineInfoMapper.selectByPrimaryKeySelective(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int updateByPrimaryKeySelective(HyPartnerLineInfoDO hyPartnerLineInfoDO){
|
|
||||||
hyPartnerLineInfoDO.setUpdateTime(new Date());
|
|
||||||
return hyPartnerLineInfoMapper.updateByPrimaryKeySelective(hyPartnerLineInfoDO);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int updateByPrimaryKey(HyPartnerLineInfoDO record){
|
|
||||||
return hyPartnerLineInfoMapper.updateByPrimaryKey(record);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public List<AdvanceLineDTO> getAdventLineCount( String userId, String currentDate,String endDate){
|
|
||||||
if (StringUtils.isEmpty(userId)){
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
return hyPartnerLineInfoMapper.getAdventLineCount(userId,currentDate,endDate);
|
|
||||||
}
|
|
||||||
|
|
||||||
public StageCountDTO selectStagePendingCount(String userId){
|
|
||||||
if (StringUtils.isEmpty(userId)){
|
|
||||||
return new StageCountDTO(0,0);
|
|
||||||
}
|
|
||||||
return hyPartnerLineInfoMapper.selectStagePendingCount(userId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public StageCountDTO selectStageFollowCount(String userId){
|
|
||||||
if (StringUtils.isEmpty(userId)){
|
|
||||||
return new StageCountDTO(0,0,0);
|
|
||||||
}
|
|
||||||
return hyPartnerLineInfoMapper.selectStageFollowCount(userId);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public PartnerLineInfoAndBaseInfoDTO selectPartnerLineInfoAndBaseInfo(Long lineId){
|
|
||||||
if (lineId==null){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return hyPartnerLineInfoMapper.selectPartnerLineInfoAndBaseInfo(lineId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<HyPartnerLineInfoDO> lastMonthCloseLine(String userId, String lastMonthTodayDate){
|
|
||||||
if (userId==null){
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
return hyPartnerLineInfoMapper.lastMonthCloseLine(userId,lastMonthTodayDate);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int updateInvestmentManager(String userId, List<Long> lineIdList){
|
|
||||||
if (StringUtils.isEmpty(userId)||CollectionUtils.isEmpty(lineIdList)){
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
return hyPartnerLineInfoMapper.updateInvestmentManager(lineIdList,userId);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public List<HyPartnerLineInfoDO> getLineListByLineIds( List<Long> lineIdList){
|
|
||||||
if (CollectionUtils.isEmpty(lineIdList)){
|
|
||||||
return Lists.newArrayList();
|
|
||||||
}
|
|
||||||
return hyPartnerLineInfoMapper.getLineListByLineIds(lineIdList);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public List<PartnerBlackListDTO> getBlackList( String userNameKeyword,String phoneKeyword, String intentAreaName , Integer acceptAdjustType){
|
|
||||||
return hyPartnerLineInfoMapper.getBlackList(userNameKeyword,phoneKeyword,intentAreaName,acceptAdjustType);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public Boolean joinAndRemoveBlack( Long lineId, Integer status, String joinReason, String removeReason){
|
|
||||||
if (lineId==null){
|
|
||||||
return Boolean.FALSE;
|
|
||||||
}
|
|
||||||
return hyPartnerLineInfoMapper.joinAndRemoveBlack(lineId,status,joinReason,removeReason);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<PublicSeaLineDTO> getPublicSeaLineList( String userNameKeyword, String phoneKeyword, String intentAreaName, Integer acceptAdjustType, String updateStartTime, String updateEndTime, List<String> userIdList, String createStartTime, String createEndTime){
|
|
||||||
return hyPartnerLineInfoMapper.getPublicSeaLineList(userNameKeyword,phoneKeyword,intentAreaName,acceptAdjustType,updateStartTime,updateEndTime,userIdList, createStartTime, createEndTime);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<PrivateSeaLineDTO> getPrivateSeaLineList(PrivateSeaLineListRequest request){
|
|
||||||
return hyPartnerLineInfoMapper.getPrivateSeaLineList(request);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public List<HyPartnerLineInfoDO> getPartnerLastLine(List<String> partnerIdList){
|
|
||||||
if (CollectionUtils.isEmpty(partnerIdList)){
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
return hyPartnerLineInfoMapper.getPartnerLastLine(partnerIdList);
|
|
||||||
}
|
|
||||||
public HyPartnerLineInfoDO getByPartnerId(String partnerId){
|
|
||||||
if (StringUtils.isEmpty(partnerId)){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return hyPartnerLineInfoMapper.getByPartnerId(partnerId);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public List<LineCountDTO> getFollowCountList( List<String> partnerIdList){
|
|
||||||
if (CollectionUtils.isEmpty(partnerIdList)){
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
return hyPartnerLineInfoMapper.getFollowCountList(partnerIdList);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<HyPartnerLineInfoDO> getHyPartnerLineInfoListByIds( List<Long> lineIds){
|
|
||||||
if (CollectionUtils.isEmpty(lineIds)){
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
return hyPartnerLineInfoMapper.getHyPartnerLineInfoListByIds(lineIds);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询根据历史
|
|
||||||
* @param partnerId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public List<HyPartnerLineInfoDO> getLineFollowHistoryList(String partnerId){
|
|
||||||
if (partnerId==null){
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
return hyPartnerLineInfoMapper.getLineFollowHistoryList(partnerId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取线索加盟商简要信息
|
|
||||||
* @param partnerLineIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Map<Long, PartnerSimpleInfoDTO> getPartnerSimpleInfoByLineIds(List<Long> partnerLineIds){
|
|
||||||
if(CollectionUtils.isEmpty(partnerLineIds)){
|
|
||||||
return MapUtil.newHashMap();
|
|
||||||
}
|
|
||||||
List<PartnerSimpleInfoDTO> partnerList = hyPartnerLineInfoMapper.getPartnerSimpleInfoByLineIds(partnerLineIds);
|
|
||||||
return ListUtils.emptyIfNull(partnerList).stream().collect(Collectors.toMap(k->k.getPartnerLineId(), Function.identity(), (k1, k2)->k1));
|
|
||||||
}
|
|
||||||
|
|
||||||
public PartnerSimpleInfoDTO getPartnerSimpleInfoByLineId(Long partnerLineId){
|
|
||||||
if(Objects.isNull(partnerLineId)){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
List<PartnerSimpleInfoDTO> partnerList = hyPartnerLineInfoMapper.getPartnerSimpleInfoByLineIds(Arrays.asList(partnerLineId));
|
|
||||||
return CollectionUtils.isEmpty(partnerList) ? null : partnerList.get(CommonConstants.ZERO);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<HyPartnerLineInfoDO> getHyPartnerLineInfoList( List<Long> lineIds,String investmentManager){
|
|
||||||
if (CollectionUtils.isEmpty(lineIds)){
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
return hyPartnerLineInfoMapper.getHyPartnerLineInfoList(lineIds,investmentManager);
|
|
||||||
}
|
|
||||||
public List<LinePageInfoVo> getPublicSeaPageInfoNext(Long lineId, String userNameKeyword, String phoneKeyword, String intentAreaName, Integer acceptAdjustType, String updateStartTime, String updateEndTime, List<String> userIdList, String createStartTime, String createEndTime,String pageTurn,Integer limit1,Integer limit2){
|
|
||||||
return hyPartnerLineInfoMapper.getPublicSeaPageInfoNext(lineId,userNameKeyword,phoneKeyword,intentAreaName,acceptAdjustType,updateStartTime,updateEndTime,userIdList, createStartTime, createEndTime,pageTurn,limit1,limit2);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<LinePageInfoVo> getPrivateSeaPageInfoNext(PrivateSeaLineListRequest request){
|
|
||||||
return hyPartnerLineInfoMapper.getPrivateSeaPageInfoNext(request);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public List<LineInterviewDTO> lineInterviewList(List<Long> planIds){
|
|
||||||
if (CollectionUtils.isEmpty(planIds)){
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
return hyPartnerLineInfoMapper.lineInterviewList(planIds);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<LineInterviewDTO> lineInvestmentList(List<Long> lineIds){
|
|
||||||
if (CollectionUtils.isEmpty(lineIds)){
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
return hyPartnerLineInfoMapper.lineInvestmentList(lineIds);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int batchUpdate(List<HyPartnerLineInfoDO> records){
|
|
||||||
if (CollectionUtils.isEmpty(records)){
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
return hyPartnerLineInfoMapper.batchUpdate(records);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,87 +0,0 @@
|
|||||||
package com.cool.store.dao;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.cool.store.constants.CommonConstants;
|
|
||||||
import com.cool.store.dto.log.LineLogInfo;
|
|
||||||
import com.cool.store.entity.HyPartnerTaskInfoLogDO;
|
|
||||||
import com.cool.store.enums.OperateTypeEnum;
|
|
||||||
import com.cool.store.mapper.HyPartnerTaskInfoLogMapper;
|
|
||||||
import com.github.pagehelper.Page;
|
|
||||||
import com.github.pagehelper.PageHelper;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author wxp
|
|
||||||
* @Date 2023/6/25 19:41
|
|
||||||
* @Version 1.0
|
|
||||||
*/
|
|
||||||
@Repository
|
|
||||||
@Slf4j
|
|
||||||
public class HyPartnerTaskInfoLogDAO {
|
|
||||||
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
HyPartnerTaskInfoLogMapper hyPartnerTaskInfoLogMapper;
|
|
||||||
|
|
||||||
|
|
||||||
public int updateByPrimaryKeySelective(HyPartnerTaskInfoLogDO hyPartnerTaskInfoLogDO){
|
|
||||||
return hyPartnerTaskInfoLogMapper.updateByPrimaryKeySelective(hyPartnerTaskInfoLogDO);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int insertSelective( HyPartnerTaskInfoLogDO record){
|
|
||||||
return hyPartnerTaskInfoLogMapper.insertSelective(record);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增操作日志
|
|
||||||
* @param lineLogInfo
|
|
||||||
*/
|
|
||||||
public void addOperateLog(LineLogInfo lineLogInfo){
|
|
||||||
if(!LineLogInfo.checkParams(lineLogInfo)){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
HyPartnerTaskInfoLogDO logInfo = LineLogInfo.convertDO(lineLogInfo);
|
|
||||||
log.info("logInfo:{}", JSONObject.toJSON(lineLogInfo));
|
|
||||||
insertSelective(logInfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除日志
|
|
||||||
* @param lineId
|
|
||||||
* @param message
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public int deleteByLineId(Long lineId, String message){
|
|
||||||
if(Objects.isNull(lineId)){
|
|
||||||
return CommonConstants.ZERO;
|
|
||||||
}
|
|
||||||
return hyPartnerTaskInfoLogMapper.deleteByLineId(lineId, message);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int updateLineId(String newPartnerId,Long newLineId,Long oldLineId){
|
|
||||||
if (newLineId==null || Objects.isNull(oldLineId)){
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return hyPartnerTaskInfoLogMapper.updateLineId(newPartnerId,newLineId, oldLineId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Page<HyPartnerTaskInfoLogDO> getFollowTaskLogPage(Integer pageNum, Integer pageSize, Long partnerLineId){
|
|
||||||
if(Objects.isNull(partnerLineId)){
|
|
||||||
return new Page<>();
|
|
||||||
}
|
|
||||||
PageHelper.startPage(pageNum, pageSize);
|
|
||||||
List<String> operateTypes = new ArrayList<>();
|
|
||||||
operateTypes.add(OperateTypeEnum.ADD_FOLLOW_TASK.getCode());
|
|
||||||
operateTypes.add(OperateTypeEnum.ADD_FOLLOW_LOG.getCode());
|
|
||||||
operateTypes.add(OperateTypeEnum.ADD_TAGS.getCode());
|
|
||||||
operateTypes.add(OperateTypeEnum.CALL_UP.getCode());
|
|
||||||
return hyPartnerTaskInfoLogMapper.getLogPageByLineId(partnerLineId, operateTypes);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
package com.cool.store.dao;
|
|
||||||
|
|
||||||
import com.cool.store.entity.HyPartnerUserChannelDO;
|
|
||||||
import com.cool.store.mapper.HyPartnerUserChannelMapper;
|
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author suzhuhong
|
|
||||||
* @Date 2023/8/21 11:38
|
|
||||||
* @Version 1.0
|
|
||||||
*/
|
|
||||||
@Repository
|
|
||||||
public class HyPartnerUserChannelDAO {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
HyPartnerUserChannelMapper hyPartnerUserChannelMapper;
|
|
||||||
|
|
||||||
public Map<Integer, String> getChannelMapByIds(List<Integer> userChannelIds){
|
|
||||||
if (CollectionUtils.isEmpty(userChannelIds)){
|
|
||||||
return new HashMap<>(1);
|
|
||||||
}
|
|
||||||
List<HyPartnerUserChannelDO> userChannelList = hyPartnerUserChannelMapper.getUserChannelByIds(userChannelIds);
|
|
||||||
Map<Integer, String> channelMap = userChannelList.stream().filter(date->date.getChannelId()!=null).collect(Collectors.toMap(x->x.getChannelId().intValue(), HyPartnerUserChannelDO::getChannelName));
|
|
||||||
return channelMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,97 +0,0 @@
|
|||||||
package com.cool.store.dao;
|
|
||||||
|
|
||||||
import com.cool.store.dto.partner.MobileCheckDTO;
|
|
||||||
import com.cool.store.entity.HyPartnerUserInfoDO;
|
|
||||||
import com.cool.store.mapper.HyPartnerUserInfoMapper;
|
|
||||||
import com.google.common.collect.Lists;
|
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author suzhuhong
|
|
||||||
* @Date 2023/6/8 19:41
|
|
||||||
* @Version 1.0
|
|
||||||
*/
|
|
||||||
@Repository
|
|
||||||
public class HyPartnerUserInfoDAO {
|
|
||||||
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
HyPartnerUserInfoMapper hyPartnerUserInfoMapper;
|
|
||||||
|
|
||||||
|
|
||||||
public int updateByPrimaryKeySelective(HyPartnerUserInfoDO hyPartnerUserInfoDO){
|
|
||||||
return hyPartnerUserInfoMapper.updateByPrimaryKeySelective(hyPartnerUserInfoDO);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据PartnerId查询用户
|
|
||||||
* @param partnerId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public HyPartnerUserInfoDO selectByPartnerId(String partnerId){
|
|
||||||
if (StringUtils.isEmpty(partnerId)){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return hyPartnerUserInfoMapper.selectByPartnerId(partnerId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据mobile查询用户
|
|
||||||
* @param mobile
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public HyPartnerUserInfoDO selectByMobile(String mobile){
|
|
||||||
if (StringUtils.isEmpty(mobile)){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return hyPartnerUserInfoMapper.selectByMobile(mobile);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据PartnerIds批量查询用户
|
|
||||||
* @param partnerIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public List<HyPartnerUserInfoDO> selectByPartnerIds(List<String> partnerIds){
|
|
||||||
if (CollectionUtils.isEmpty(partnerIds)){
|
|
||||||
return Lists.newArrayList();
|
|
||||||
}
|
|
||||||
return hyPartnerUserInfoMapper.selectByPartnerIds(partnerIds);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int insertSelective( HyPartnerUserInfoDO record){
|
|
||||||
return hyPartnerUserInfoMapper.insertSelective(record);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int updateJoinKnowById(Integer isWritePartnerKnow, Long id){
|
|
||||||
if (id == null || isWritePartnerKnow == null){
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return hyPartnerUserInfoMapper.updateJoinKnowById(isWritePartnerKnow, id);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int updateByPartnerId(HyPartnerUserInfoDO record){
|
|
||||||
if(StringUtils.isBlank(record.getPartnerId())){
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return hyPartnerUserInfoMapper.updateByPartnerId(record);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public String selectLastCrmCreateTime() {
|
|
||||||
return hyPartnerUserInfoMapper.selectLastCrmCreateTime();
|
|
||||||
}
|
|
||||||
|
|
||||||
public MobileCheckDTO selectByCheckMobile(String mobile) {
|
|
||||||
if (StringUtils.isEmpty(mobile)){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return hyPartnerUserInfoMapper.selectByCheckMobile(mobile);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
package com.cool.store.dao;
|
|
||||||
|
|
||||||
import com.cool.store.entity.HyPartnerUserPlatformBindDO;
|
|
||||||
import com.cool.store.mapper.HyPartnerUserPlatformBindMapper;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author wxp
|
|
||||||
* @Date 2023/6/13 19:41
|
|
||||||
* @Version 1.0
|
|
||||||
*/
|
|
||||||
@Repository
|
|
||||||
public class HyPartnerUserPlatformBindDAO {
|
|
||||||
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
HyPartnerUserPlatformBindMapper hyPartnerUserPlatformBindMapper;
|
|
||||||
|
|
||||||
public int insertSelective( HyPartnerUserPlatformBindDO record){
|
|
||||||
return hyPartnerUserPlatformBindMapper.insertSelective(record);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int updateByPrimaryKeySelective(HyPartnerUserPlatformBindDO record){
|
|
||||||
return hyPartnerUserPlatformBindMapper.updateByPrimaryKeySelective(record);
|
|
||||||
}
|
|
||||||
|
|
||||||
public HyPartnerUserPlatformBindDO getByPlatformTypeAndUserId(String platformType, String platformUserId){
|
|
||||||
if(StringUtils.isAnyBlank(platformType, platformUserId)){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return hyPartnerUserPlatformBindMapper.getByPlatformTypeAndUserId(platformType, platformUserId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public HyPartnerUserPlatformBindDO getByPartnerId(String partnerId){
|
|
||||||
if (StringUtils.isEmpty(partnerId)){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return hyPartnerUserPlatformBindMapper.getByPartnerId(partnerId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
package com.cool.store.dao;
|
|
||||||
|
|
||||||
import com.cool.store.entity.HyPhoneLocationDO;
|
|
||||||
import com.cool.store.mapper.HyPhoneLocationMapper;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author suzhuhong
|
|
||||||
* @Date 2023/6/30 14:51
|
|
||||||
* @Version 1.0
|
|
||||||
*/
|
|
||||||
@Repository
|
|
||||||
public class HyPhoneLocationDAO {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
HyPhoneLocationMapper hyPhoneLocationMapper;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public int insertSelective(HyPhoneLocationDO record){
|
|
||||||
return hyPhoneLocationMapper.insertSelective(record);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public HyPhoneLocationDO selectByPhoneNumber(String phoneNumber){
|
|
||||||
return hyPhoneLocationMapper.selectByPhoneNumber(phoneNumber);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,123 +0,0 @@
|
|||||||
package com.cool.store.dao;
|
|
||||||
|
|
||||||
import com.cool.store.constants.CommonConstants;
|
|
||||||
import com.cool.store.entity.RegionDO;
|
|
||||||
import com.cool.store.mapper.RegionMapper;
|
|
||||||
import com.google.common.collect.Lists;
|
|
||||||
import com.google.common.collect.Maps;
|
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
|
||||||
import org.apache.commons.collections4.ListUtils;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @FileName: RegionDAO
|
|
||||||
* @Description:
|
|
||||||
* @date 2023-06-07 14:22
|
|
||||||
*/
|
|
||||||
@Repository
|
|
||||||
public class RegionDAO {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private RegionMapper regionMapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 插入或者更新组织架构
|
|
||||||
* @param insertOrUpdateList
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Integer batchInsertOrUpdate(List<RegionDO> insertOrUpdateList){
|
|
||||||
if(CollectionUtils.isEmpty(insertOrUpdateList)){
|
|
||||||
return CommonConstants.ZERO;
|
|
||||||
}
|
|
||||||
return regionMapper.batchInsertOrUpdate(insertOrUpdateList);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer deleteNotExistRegion(List<String> regionIds){
|
|
||||||
return regionMapper.deleteNotExistRegion(regionIds);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<RegionDO> getRegionByRegionIds(List<String> regionIds){
|
|
||||||
if(CollectionUtils.isEmpty(regionIds)){
|
|
||||||
return Lists.newArrayList();
|
|
||||||
}
|
|
||||||
return regionMapper.getRegionByRegionIds(regionIds);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<RegionDO> getRegionBaseInfoList(){
|
|
||||||
return regionMapper.getRegionBaseInfoList();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Map<String, String> getRegionMap(List<String> regionIds){
|
|
||||||
if(CollectionUtils.isEmpty(regionIds)){
|
|
||||||
return Maps.newHashMap();
|
|
||||||
}
|
|
||||||
List<RegionDO> regionList = regionMapper.getRegionNameByRegionIds(regionIds);
|
|
||||||
return ListUtils.emptyIfNull(regionList).stream().collect(Collectors.toMap(RegionDO::getRegionId, RegionDO::getName));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取区域
|
|
||||||
* @param regionId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public RegionDO getRegionInfoByRegionId(String regionId){
|
|
||||||
if(StringUtils.isBlank(regionId)){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return regionMapper.getRegionInfoByRegionId(regionId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 判断一个节点是否是叶子节点
|
|
||||||
* @param regionId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public boolean isLeafNode(String regionId){
|
|
||||||
Integer subCount = regionMapper.getSubNodeCountByRegionId(regionId);
|
|
||||||
return subCount <= CommonConstants.ZERO;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除区域
|
|
||||||
* @param regionId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Integer deleteRegionByRegionId(String regionId){
|
|
||||||
if(StringUtils.isBlank(regionId)){
|
|
||||||
return CommonConstants.ZERO;
|
|
||||||
}
|
|
||||||
return regionMapper.deleteRegionByRegionId(regionId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取所有的子节点
|
|
||||||
* @param leadDeptIds
|
|
||||||
*/
|
|
||||||
public List<String> getSubRegionIds(List<String> leadDeptIds) {
|
|
||||||
if(CollectionUtils.isEmpty(leadDeptIds)){
|
|
||||||
return Lists.newArrayList();
|
|
||||||
}
|
|
||||||
List<RegionDO> regionList = getRegionByRegionIds(leadDeptIds);
|
|
||||||
List<String> regionPathList = regionList.stream().map(RegionDO::getRegionPath).collect(Collectors.toList());
|
|
||||||
return regionMapper.getSubRegionIds(regionPathList);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取子部门
|
|
||||||
* @param regionId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public List<RegionDO> getSubRegion(String regionId){
|
|
||||||
if(StringUtils.isBlank(regionId)){
|
|
||||||
return Lists.newArrayList();
|
|
||||||
}
|
|
||||||
return regionMapper.getSubRegion(regionId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
package com.cool.store.dao;
|
|
||||||
|
|
||||||
import com.cool.store.entity.SuperAdminConfigDO;
|
|
||||||
import com.cool.store.mapper.SuperAdminConfigMapper;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author suzhuhong
|
|
||||||
* @Date 2023/11/9 14:26
|
|
||||||
* @Version 1.0
|
|
||||||
*/
|
|
||||||
@Repository
|
|
||||||
public class SuperAdminConfigDAO {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
SuperAdminConfigMapper superAdminConfigMapper;
|
|
||||||
|
|
||||||
public SuperAdminConfigDO selectByPrimaryKey(Long id){
|
|
||||||
if (id==null){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return superAdminConfigMapper.selectByPrimaryKey(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public SuperAdminConfigDO isSuperAdmin(String userId){
|
|
||||||
return superAdminConfigMapper.isSuperAdmin(userId);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
package com.cool.store.dao;
|
|
||||||
|
|
||||||
import com.cool.store.constants.CommonConstants;
|
|
||||||
import com.cool.store.entity.SysMenuDO;
|
|
||||||
import com.cool.store.mapper.SysMenuMapper;
|
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @FileName: SysMenuDAO
|
|
||||||
* @Description:
|
|
||||||
* @date 2023-06-08 16:41
|
|
||||||
*/
|
|
||||||
@Repository
|
|
||||||
public class SysMenuDAO {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private SysMenuMapper sysMenuMapper;
|
|
||||||
|
|
||||||
public List<SysMenuDO> selectMenuAll(List<Long> parentIds){
|
|
||||||
return sysMenuMapper.selectMenuAll(parentIds);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long addMenu(SysMenuDO param){
|
|
||||||
Integer sort = sysMenuMapper.selectMaxSort();
|
|
||||||
param.setSort(sort + 1);
|
|
||||||
sysMenuMapper.insertSelective(param);
|
|
||||||
return param.getId();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
* @param idList
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Integer batchDeleteMenu(List<Long> idList){
|
|
||||||
if(CollectionUtils.isEmpty(idList)){
|
|
||||||
return CommonConstants.ZERO;
|
|
||||||
}
|
|
||||||
return sysMenuMapper.batchDeleteMenu(idList);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer batchUpdateMenu(List<SysMenuDO> updateList) {
|
|
||||||
if(CollectionUtils.isEmpty(updateList)){
|
|
||||||
return CommonConstants.ZERO;
|
|
||||||
}
|
|
||||||
return sysMenuMapper.batchUpdateMenu(updateList);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
package com.cool.store.dao;
|
|
||||||
|
|
||||||
import com.cool.store.entity.SysRoleDO;
|
|
||||||
import com.cool.store.enums.DataSourceEnum;
|
|
||||||
import com.cool.store.mapper.SysRoleMapper;
|
|
||||||
import com.github.pagehelper.Page;
|
|
||||||
import com.github.pagehelper.PageHelper;
|
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @FileName: SysRoleDAO
|
|
||||||
* @Description:
|
|
||||||
* @date 2023-06-08 11:45
|
|
||||||
*/
|
|
||||||
@Repository
|
|
||||||
public class SysRoleDAO {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private SysRoleMapper sysRoleMapper;
|
|
||||||
|
|
||||||
public Integer batchInsertSelective(List<SysRoleDO> insertOrUpdateList){
|
|
||||||
if(CollectionUtils.isEmpty(insertOrUpdateList)){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return sysRoleMapper.batchInsertSelective(insertOrUpdateList);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer deleteRole(DataSourceEnum dataSourceEnum, List<String> roleIds){
|
|
||||||
if(Objects.isNull(dataSourceEnum) || CollectionUtils.isEmpty(roleIds)){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return sysRoleMapper.deleteRole(dataSourceEnum.getCode(), roleIds);
|
|
||||||
}
|
|
||||||
|
|
||||||
public SysRoleDO getHighestPriorityRoleByUserId(String userId) {
|
|
||||||
if(StringUtils.isBlank(userId)){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return sysRoleMapper.getHighestPriorityRoleByUserId(userId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public SysRoleDO getRoleByName(String roleName, DataSourceEnum dataSource){
|
|
||||||
if(StringUtils.isBlank(roleName) || Objects.isNull(dataSource)){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return sysRoleMapper.getRoleByName(roleName, dataSource.getCode());
|
|
||||||
}
|
|
||||||
|
|
||||||
public Page<SysRoleDO> getRolePage(Integer pageNum, Integer pageSize){
|
|
||||||
PageHelper.startPage(pageNum, pageSize);
|
|
||||||
return sysRoleMapper.getRolePage();
|
|
||||||
}
|
|
||||||
|
|
||||||
public SysRoleDO getRoleDetail(String roleId){
|
|
||||||
if(StringUtils.isBlank(roleId)){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return sysRoleMapper.getRoleDetail(roleId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
package com.cool.store.dao;
|
|
||||||
|
|
||||||
import com.cool.store.entity.SysRoleMenuDO;
|
|
||||||
import com.cool.store.mapper.SysRoleMenuMapper;
|
|
||||||
import com.google.common.collect.Lists;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @date 2023-05-19 03:01
|
|
||||||
*/
|
|
||||||
@Repository
|
|
||||||
public class SysRoleMenuDAO {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private SysRoleMenuMapper sysRoleMenuMapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取菜单
|
|
||||||
* @param roleId
|
|
||||||
* @param platform
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public List<SysRoleMenuDO> getRoleMenuByRoleId(String roleId){
|
|
||||||
if(Objects.isNull(roleId)){
|
|
||||||
return Lists.newArrayList();
|
|
||||||
}
|
|
||||||
return sysRoleMenuMapper.getRoleMenuByRoleId(roleId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer updateRoleAuth(String roleId, List<Long> menuIds){
|
|
||||||
//先删后增
|
|
||||||
sysRoleMenuMapper.deleteRoleAuth(roleId);
|
|
||||||
List<SysRoleMenuDO> insertList = new ArrayList<>();
|
|
||||||
for (Long menuId : menuIds) {
|
|
||||||
SysRoleMenuDO insert = new SysRoleMenuDO();
|
|
||||||
insert.setMenuId(menuId);
|
|
||||||
insert.setRoleId(roleId);
|
|
||||||
insertList.add(insert);
|
|
||||||
}
|
|
||||||
return sysRoleMenuMapper.batchInsert(insertList);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,107 +0,0 @@
|
|||||||
package com.cool.store.dao;
|
|
||||||
|
|
||||||
import com.cool.store.constants.CommonConstants;
|
|
||||||
import com.cool.store.entity.UserRegionMappingDO;
|
|
||||||
import com.cool.store.enums.DataSourceEnum;
|
|
||||||
import com.cool.store.mapper.UserRegionMappingMapper;
|
|
||||||
import com.google.common.collect.Lists;
|
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @FileName: UserRegionMappingDAO
|
|
||||||
* @Description:
|
|
||||||
* @date 2023-06-08 13:58
|
|
||||||
*/
|
|
||||||
@Repository
|
|
||||||
public class UserRegionMappingDAO {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private UserRegionMappingMapper userRegionMappingMapper;
|
|
||||||
|
|
||||||
public Integer batchInsertOrUpdateUserRegion(List<UserRegionMappingDO> insertOrUpdateList){
|
|
||||||
if(CollectionUtils.isEmpty(insertOrUpdateList)){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return userRegionMappingMapper.batchInsertOrUpdateUserRegion(insertOrUpdateList);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer deleteUserRegion(String regionId, DataSourceEnum dataSourceEnum, List<String> excludeUserIds){
|
|
||||||
if(StringUtils.isBlank(regionId) || Objects.isNull(dataSourceEnum)){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return userRegionMappingMapper.deleteUserRegion(regionId, dataSourceEnum.getCode(), excludeUserIds);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public Integer deleteUserRegionByUserId(String userId, DataSourceEnum dataSourceEnum, List<String> excludeRegionIds){
|
|
||||||
if(StringUtils.isBlank(userId) || Objects.isNull(dataSourceEnum)){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return userRegionMappingMapper.deleteUserRegionByExcludeRegionIds(userId, dataSourceEnum.getCode(), excludeRegionIds);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer deleteRegionUserByExcludeRegionIds(List<String> excludeRegionIds){
|
|
||||||
if(CollectionUtils.isEmpty(excludeRegionIds)){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return userRegionMappingMapper.deleteRegionUserByExcludeRegionIds(excludeRegionIds);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer deleteRegionUserByExcludeUserIds(List<String> excludeUserIds){
|
|
||||||
if(CollectionUtils.isEmpty(excludeUserIds)){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return userRegionMappingMapper.deleteRegionUserByExcludeUserIds(excludeUserIds);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer deleteUserRegionByUserId(String userId){
|
|
||||||
if(StringUtils.isBlank(userId)){
|
|
||||||
return CommonConstants.ZERO;
|
|
||||||
}
|
|
||||||
return userRegionMappingMapper.deleteUserRegionByUserId(userId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取一个区域下直挂的人
|
|
||||||
* @param regionId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public List<String> getUserListByRegionId(String regionId){
|
|
||||||
if(StringUtils.isBlank(regionId)){
|
|
||||||
return Lists.newArrayList();
|
|
||||||
}
|
|
||||||
return userRegionMappingMapper.getUserListByRegionId(regionId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取一个人所属的部门
|
|
||||||
* @param userId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public List<String> getRegionIdsByUserId(String userId){
|
|
||||||
if(StringUtils.isBlank(userId)){
|
|
||||||
return Lists.newArrayList();
|
|
||||||
}
|
|
||||||
return userRegionMappingMapper.getRegionIdsByUserId(userId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取用户列表
|
|
||||||
* @param regionIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public List<String> getUserListByRegionIds(List<String> regionIds){
|
|
||||||
if(CollectionUtils.isEmpty(regionIds)){
|
|
||||||
return Lists.newArrayList();
|
|
||||||
}
|
|
||||||
return userRegionMappingMapper.getUserListByRegionIds(regionIds);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.entity.BeautyCameraSettingDO;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
import tk.mybatis.mapper.common.Mapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @date 2023-09-11 02:20
|
|
||||||
*/
|
|
||||||
public interface BeautyCameraSettingMapper extends Mapper<BeautyCameraSettingDO> {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 插入或更新
|
|
||||||
* @param param
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Long insertOrUpdateBeautyCameraSetting(@Param("record") BeautyCameraSettingDO param);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取美颜配置
|
|
||||||
* @param userId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
BeautyCameraSettingDO getBeautyCameraSetting(@Param("userId") String userId);
|
|
||||||
}
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.entity.CallRecordDO;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @date 2023-08-11 01:03
|
|
||||||
*/
|
|
||||||
public interface CallRecordMapper {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认插入方法,只会给有值的字段赋值
|
|
||||||
* 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null
|
|
||||||
* dateTime:2023-08-11 01:03
|
|
||||||
*/
|
|
||||||
int insertSelective(CallRecordDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
|
||||||
* dateTime:2023-08-11 01:03
|
|
||||||
*/
|
|
||||||
int updateByPrimaryKeySelective(CallRecordDO record);
|
|
||||||
|
|
||||||
int updateByTransNoSelective(CallRecordDO record);
|
|
||||||
|
|
||||||
CallRecordDO selectByTransNo(String transNo);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量获取
|
|
||||||
* @param transNos
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<CallRecordDO> selectByTransNos(@Param("transNos") List<String> transNos);
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.entity.DingdingUserDO;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @date 2023-06-15 10:03
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface DingdingUserMapper {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认插入方法,只会给有值的字段赋值
|
|
||||||
* 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null
|
|
||||||
* dateTime:2023-06-15 10:03
|
|
||||||
*/
|
|
||||||
int insertSelective(DingdingUserDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
|
||||||
* dateTime:2023-06-15 10:03
|
|
||||||
*/
|
|
||||||
int updateByPrimaryKeySelective(DingdingUserDO record);
|
|
||||||
|
|
||||||
DingdingUserDO selectDingDingUserByMobile(String mobile);
|
|
||||||
}
|
|
||||||
@@ -1,115 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.entity.EnterpriseUserDO;
|
|
||||||
import org.apache.ibatis.annotations.MapKey;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @date 2023-06-06 02:29
|
|
||||||
*/
|
|
||||||
public interface EnterpriseUserMapper {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认插入方法,只会给有值的字段赋值
|
|
||||||
* 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null
|
|
||||||
* dateTime:2023-06-06 02:29
|
|
||||||
*/
|
|
||||||
int batchInsertOrUpdate(@Param("recordList") List<EnterpriseUserDO> recordList);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
|
||||||
* dateTime:2023-06-06 02:29
|
|
||||||
*/
|
|
||||||
int updateByPrimaryKeySelective(EnterpriseUserDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* updateByUserId
|
|
||||||
* @param userId
|
|
||||||
* @param onlineStatus
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
int updateOnlineStatusByUserId(@Param("userId") String userId, @Param("onlineStatus") Integer onlineStatus);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取用户信息
|
|
||||||
* @param userId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
EnterpriseUserDO getUserInfoById(@Param("userId") String userId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量获取用户信息
|
|
||||||
* @param userIdList
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<EnterpriseUserDO> getUserInfoByUserIds(@Param("userIdList") List<String> userIdList);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除用户
|
|
||||||
* @param excludeUserIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
int deleteUser(@Param("excludeUserIds") List<String> excludeUserIds);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除用户
|
|
||||||
* @param userId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Integer deleteUserByUserId(@Param("userId") String userId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据关键字搜索部门下的用户
|
|
||||||
* @param regionIds
|
|
||||||
* @param keyword
|
|
||||||
* @param leaderRegionIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<EnterpriseUserDO> searchUserByRegionIdsAndKeyword(@Param("regionIds") List<String> regionIds, @Param("keyword") String keyword, @Param("leaderRegionIds") List<String> leaderRegionIds);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取部门用户数
|
|
||||||
* @param regionId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Integer getUserCountByRegionId(@Param("regionId") String regionId);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取部门负责人用户列表
|
|
||||||
* @param regionId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<EnterpriseUserDO> getUserListByDeptLeader(String regionId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据开发经理获取用户列表
|
|
||||||
* @param regionIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<EnterpriseUserDO> getUserListByDeptLeaders(@Param("regionIds") List<String> regionIds);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取部门人员
|
|
||||||
* @param regionIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<EnterpriseUserDO> getUserListByRegionIds(@Param("regionIds") List<String> regionIds);
|
|
||||||
|
|
||||||
EnterpriseUserDO selectByMobile(@Param("mobile") String mobile);
|
|
||||||
|
|
||||||
EnterpriseUserDO selectByInvestmentManager(@Param("investmentManager") String investmentManager);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 使用 userId 查询 feishuUserId
|
|
||||||
* @param userIdList userId 列表
|
|
||||||
* @return userId: feishuUserId
|
|
||||||
*/
|
|
||||||
List<EnterpriseUserDO> getFeishuUserIdsByUserIds(@Param("userIdList") List<String> userIdList);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.entity.EnterpriseUserRoleDO;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @date 2023-06-08 10:54
|
|
||||||
*/
|
|
||||||
public interface EnterpriseUserRoleMapper {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认插入方法,只会给有值的字段赋值
|
|
||||||
* 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null
|
|
||||||
* dateTime:2023-06-08 10:54
|
|
||||||
*/
|
|
||||||
int batchInsertOrUpdate(@Param("recordList") List<EnterpriseUserRoleDO> recordList);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
|
||||||
* dateTime:2023-06-08 10:54
|
|
||||||
*/
|
|
||||||
int updateByPrimaryKeySelective(EnterpriseUserRoleDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除角色下的用户
|
|
||||||
* @param roleId
|
|
||||||
* @param type
|
|
||||||
* @param excludeUserIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
int deleteRoleInUser(@Param("roleId") String roleId, @Param("type") Integer type, @Param("excludeUserIds") List<String> excludeUserIds);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除用户下的角色
|
|
||||||
* @param userId
|
|
||||||
* @param type
|
|
||||||
* @param excludeRoleId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
int deleteUserInRole(@Param("userId") String userId, @Param("type") Integer type, @Param("excludeRoleId") String excludeRoleId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除用户所有角色
|
|
||||||
* @param userId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Integer deleteUserRole(@Param("userId") String userId);
|
|
||||||
}
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.entity.HyAdvancedSettingDO;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @date 2023-05-29 03:49
|
|
||||||
*/
|
|
||||||
public interface HyAdvancedSettingMapper {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认插入方法,只会给有值的字段赋值
|
|
||||||
* 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null
|
|
||||||
* dateTime:2023-05-29 03:49
|
|
||||||
*/
|
|
||||||
int insertSelective(@Param("record") HyAdvancedSettingDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
|
||||||
* dateTime:2023-05-29 03:49
|
|
||||||
*/
|
|
||||||
int updateByPrimaryKeySelective(@Param("record") HyAdvancedSettingDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询高级设置
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
HyAdvancedSettingDO selectAdvanceSetting();
|
|
||||||
}
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.dto.content.ContentQueryListDto;
|
|
||||||
import com.cool.store.entity.HyContentInfoDO;
|
|
||||||
import com.cool.store.vo.HyContentInfoVO;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @date 2023-05-29 03:50
|
|
||||||
*/
|
|
||||||
public interface HyContentInfoMapper {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认插入方法,只会给有值的字段赋值
|
|
||||||
* 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null
|
|
||||||
* dateTime:2023-05-29 03:50
|
|
||||||
*/
|
|
||||||
int insertSelective(@Param("record") HyContentInfoDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
|
||||||
* dateTime:2023-05-29 03:50
|
|
||||||
*/
|
|
||||||
int updateByPrimaryKeySelective(@Param("record") HyContentInfoDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除方法
|
|
||||||
* @param contentId
|
|
||||||
*/
|
|
||||||
void deleteSelective(@Param("contentId") String contentId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页查询动态列表
|
|
||||||
* 根据传入参数匹配
|
|
||||||
*/
|
|
||||||
List<HyContentInfoVO> queryContentList(ContentQueryListDto dto);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* C 端使用的动态查询
|
|
||||||
*/
|
|
||||||
List<HyContentInfoVO> queryContentListForC(ContentQueryListDto dto);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据contentId查询动态详情
|
|
||||||
*/
|
|
||||||
HyContentInfoDO queryContentInfo(@Param("contentId") String contentId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 标题是否重复
|
|
||||||
*/
|
|
||||||
Boolean whetherTitleDuplicated(@Param("contentTitle") String contentTitle);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询动态标题
|
|
||||||
*/
|
|
||||||
List<String> queryTitles();
|
|
||||||
}
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.dto.exhibition.MyExhibitionGroupDTO;
|
|
||||||
import com.cool.store.entity.HyExhibitionGroupDO;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @date 2023-11-30 11:55
|
|
||||||
*/
|
|
||||||
public interface HyExhibitionGroupMapper {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认插入方法,只会给有值的字段赋值
|
|
||||||
* 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null
|
|
||||||
* dateTime:2023-11-30 01:36
|
|
||||||
*/
|
|
||||||
int insertSelective( HyExhibitionGroupDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认查询方法,通过主键获取所有字段的值
|
|
||||||
* dateTime:2023-11-30 01:36
|
|
||||||
*/
|
|
||||||
HyExhibitionGroupDO selectByPrimaryKey(Integer id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
|
||||||
* dateTime:2023-11-30 01:36
|
|
||||||
*/
|
|
||||||
int updateByPrimaryKeySelective(HyExhibitionGroupDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键物理删除
|
|
||||||
* dateTime:2023-11-30 01:36
|
|
||||||
*/
|
|
||||||
int deleteByPrimaryKey(Integer id);
|
|
||||||
|
|
||||||
List<MyExhibitionGroupDTO> listByCreator(String userId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量关闭需要关闭的会销组
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
int batchCloseExhibitionGroup();
|
|
||||||
}
|
|
||||||
@@ -1,93 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.dto.exhibition.ExhibitionDTO;
|
|
||||||
import com.cool.store.dto.exhibition.ExhibitionStatisticsDTO;
|
|
||||||
import com.cool.store.entity.HyExhibitionDO;
|
|
||||||
import com.cool.store.vo.exhibition.PartnerExhibitionInfoVO;
|
|
||||||
import com.cool.store.vo.exhibition.PartnerExhibitionListVO;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @date 2023-11-30 11:47
|
|
||||||
*/
|
|
||||||
public interface HyExhibitionMapper {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认插入方法,只会给有值的字段赋值
|
|
||||||
* 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null
|
|
||||||
* dateTime:2023-11-30 01:38
|
|
||||||
*/
|
|
||||||
int insertSelective(HyExhibitionDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认查询方法,通过主键获取所有字段的值
|
|
||||||
* dateTime:2023-11-30 01:38
|
|
||||||
*/
|
|
||||||
HyExhibitionDO selectByPrimaryKey(Integer id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
|
||||||
* dateTime:2023-11-30 01:38
|
|
||||||
*/
|
|
||||||
int updateByPrimaryKeySelective(HyExhibitionDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键物理删除
|
|
||||||
* dateTime:2023-11-30 01:38
|
|
||||||
*/
|
|
||||||
int deleteByPrimaryKey(Integer id);
|
|
||||||
|
|
||||||
int batchInsert(@Param("records") List<HyExhibitionDO> records);
|
|
||||||
|
|
||||||
int batchUpdate(@Param("records") List<HyExhibitionDO> records);
|
|
||||||
|
|
||||||
List<HyExhibitionDO> getExhibitionListByUserId(@Param("userId") String userId,
|
|
||||||
@Param("startDate") String startDate,
|
|
||||||
@Param("closedType") Integer closedType);
|
|
||||||
|
|
||||||
|
|
||||||
List<ExhibitionStatisticsDTO> exhibitionStatistic(@Param("list") List<Integer> exhibitionIdList);
|
|
||||||
|
|
||||||
List<ExhibitionDTO> listByExhibitionGroupIds(@Param("list") List<Integer> exhibitionGroupIdList, @Param("filterCloseExhibition") Boolean filterCloseExhibition);
|
|
||||||
|
|
||||||
ExhibitionDTO lineSignUp(@Param("exhibitionGroupId") Integer exhibitionGroupId, @Param("lineId") Long lineId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询展会组下展会 (参数控制是否包含关闭的展会)
|
|
||||||
* @param exhibitionGroupId
|
|
||||||
* @param includeClose true-包含 false-不包含
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<HyExhibitionDO> listByExhibitionGroupId(@Param("exhibitionGroupId") Integer exhibitionGroupId, @Param("includeClose") Boolean includeClose);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取线索报名参加的会销列表
|
|
||||||
* @param partnerLineId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<PartnerExhibitionListVO> getPartnerExhibitionList(@Param("partnerLineId") Long partnerLineId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取线索报名的会销详情
|
|
||||||
*
|
|
||||||
* @param exhibitionGroupId
|
|
||||||
* @param partnerLineId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
PartnerExhibitionInfoVO getPartnerExhibitionInfo(@Param("exhibitionGroupId") Integer exhibitionGroupId, @Param("partnerLineId") Long partnerLineId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询符合条件的会销列表
|
|
||||||
* @param hyExhibitionDO
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<HyExhibitionDO> querySelective(HyExhibitionDO hyExhibitionDO);
|
|
||||||
|
|
||||||
int batchCloseExhibition(@Param("hyExhibitionIds") List<Integer> hyExhibitionIds, @Param("closedType") Integer closedType, @Param("closeDateTime") String closeDateTime);
|
|
||||||
}
|
|
||||||
@@ -1,111 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.dto.follow.FollowTaskNumDTO;
|
|
||||||
import com.cool.store.entity.HyFollowTaskDO;
|
|
||||||
import com.github.pagehelper.Page;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @date 2023-08-10 10:10
|
|
||||||
*/
|
|
||||||
public interface HyFollowTaskMapper {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认插入方法,只会给有值的字段赋值
|
|
||||||
* 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null
|
|
||||||
* dateTime:2023-08-10 10:10
|
|
||||||
*/
|
|
||||||
int insertSelective(@Param("record") HyFollowTaskDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
|
||||||
* dateTime:2023-08-10 10:10
|
|
||||||
*/
|
|
||||||
int updateByPrimaryKeySelective(@Param("record") HyFollowTaskDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据线索获取任务列表
|
|
||||||
* @param partnerLineId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<HyFollowTaskDO> getTaskListByLineId(@Param("partnerLineId")Long partnerLineId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取任务列表
|
|
||||||
* @param followUserId
|
|
||||||
* @param taskStatus
|
|
||||||
* @param deadlineStartTime
|
|
||||||
* @param deadlineEndTime
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Page<HyFollowTaskDO> getTaskPage(@Param("followUserId")String followUserId, @Param("taskStatus")Integer taskStatus, @Param("deadlineStartTime")String deadlineStartTime, @Param("deadlineEndTime")String deadlineEndTime);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取跟进任务详情
|
|
||||||
* @param followTaskId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
HyFollowTaskDO getFollowTask(@Param("followTaskId") Long followTaskId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新任务跟进人
|
|
||||||
* @param partnerLineId
|
|
||||||
* @param followUserId
|
|
||||||
*/
|
|
||||||
Integer updateUndoTaskFollowUserId(@Param("partnerLineId") Long partnerLineId, @Param("followUserId") String followUserId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 作废未完成的跟进任务
|
|
||||||
* @param partnerLineId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Integer cancelUndoFollowTask(@Param("partnerLineId") Long partnerLineId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取发送通知的跟进人
|
|
||||||
* @param startTime
|
|
||||||
* @param endTime
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Page<String> getRemindFollowUserIds(@Param("startTime")String startTime, @Param("endTime")String endTime);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取用户任务数量
|
|
||||||
* @param followUserIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<FollowTaskNumDTO> getUserTaskNum(@Param("followUserIds") List<String> followUserIds, @Param("endTime")String endTime);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取待完成任务
|
|
||||||
* @param startTime
|
|
||||||
* @param endTime
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Page<HyFollowTaskDO> getUndoTaskPage(@Param("startTime") String startTime, @Param("endTime") String endTime);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新未完成任务的状态
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Integer updateUndoTaskStatusToOverdue();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量获取跟进任务
|
|
||||||
* @param followTaskIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<HyFollowTaskDO> getFollowTaskList(@Param("followTaskIds") List<Long> followTaskIds);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更改线索id
|
|
||||||
* @param oldLineId
|
|
||||||
* @param newLineId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Integer changeLineId(@Param("oldLineId") Long oldLineId, @Param("newLineId") Long newLineId);
|
|
||||||
}
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.entity.HyInspectionDO;
|
|
||||||
import com.cool.store.request.GetInterviewInspectionListReq;
|
|
||||||
import com.cool.store.request.GetInterviewInspectionResultListReq;
|
|
||||||
import com.cool.store.vo.interview.InterviewInspectionHistoryInfo;
|
|
||||||
import com.cool.store.vo.interview.InterviewInspectionInfo;
|
|
||||||
import com.cool.store.vo.interview.InterviewInspectionResultVO;
|
|
||||||
import com.cool.store.vo.interview.InterviewInspectionVO;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface HyInspectionMapper {
|
|
||||||
int deleteByPrimaryKey(Long id);
|
|
||||||
|
|
||||||
int insert(HyInspectionDO record);
|
|
||||||
|
|
||||||
int insertSelective(HyInspectionDO record);
|
|
||||||
|
|
||||||
HyInspectionDO selectByPrimaryKey(Long id);
|
|
||||||
|
|
||||||
HyInspectionDO selectByInterviewPlanId(Long interviewPlanId);
|
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(HyInspectionDO record);
|
|
||||||
|
|
||||||
int updateByPrimaryKey(HyInspectionDO record);
|
|
||||||
|
|
||||||
List<InterviewInspectionVO> interviewInspectionGetList(GetInterviewInspectionListReq request);
|
|
||||||
|
|
||||||
|
|
||||||
List<InterviewInspectionVO> interviewInspectionGetProvinceList(GetInterviewInspectionListReq request);
|
|
||||||
|
|
||||||
InterviewInspectionInfo interviewInspectionGetDetail(@Param("id") Long id);
|
|
||||||
|
|
||||||
|
|
||||||
List<InterviewInspectionResultVO> interviewInspectionResultGetList(GetInterviewInspectionResultListReq request);
|
|
||||||
|
|
||||||
List<InterviewInspectionResultVO> interviewInspectionResultGetProvinceList(GetInterviewInspectionResultListReq setUserId);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.entity.HyInspectionSettingDO;
|
|
||||||
import com.github.pagehelper.Page;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @date 2023-07-18 04:27
|
|
||||||
*/
|
|
||||||
public interface HyInspectionSettingMapper {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认插入方法,只会给有值的字段赋值
|
|
||||||
* 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null
|
|
||||||
* dateTime:2023-07-18 04:27
|
|
||||||
*/
|
|
||||||
int insertSelective(HyInspectionSettingDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
|
||||||
* dateTime:2023-07-18 04:27
|
|
||||||
*/
|
|
||||||
int updateByPrimaryKeySelective(HyInspectionSettingDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取稽核区域设置分页
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Page<HyInspectionSettingDO> getInspectionSettingPage();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取稽核详情
|
|
||||||
* @param inspectionSettingId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
HyInspectionSettingDO getInspectionSettingDetail(@Param("inspectionSettingId") Long inspectionSettingId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取已经配置的稽核人
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<String> getInspectionUserIds();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据id批量获取
|
|
||||||
* @param inspectionSettingIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<HyInspectionSettingDO> getHyInspectionSettingByIds(@Param("inspectionSettingIds") List<Long> inspectionSettingIds);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param inspectionUserId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<HyInspectionSettingDO> getHyInspectionSettingByUserId(@Param("inspectionUserId") String inspectionUserId, @Param("excludeInspectionSettingId") Long excludeInspectionSettingId);
|
|
||||||
}
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.entity.HyInspectionSettingMappingDO;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @date 2023-07-18 04:28
|
|
||||||
*/
|
|
||||||
public interface HyInspectionSettingMappingMapper {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认插入方法,只会给有值的字段赋值
|
|
||||||
* 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null
|
|
||||||
* dateTime:2023-07-18 04:28
|
|
||||||
*/
|
|
||||||
int batchInsertSelective(@Param("insertList") List<HyInspectionSettingMappingDO> insertList);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
|
||||||
* dateTime:2023-07-18 04:28
|
|
||||||
*/
|
|
||||||
int updateByPrimaryKeySelective(HyInspectionSettingMappingDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取区域ids
|
|
||||||
* @param inspectionSettingId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<Long> getOpenAreaMappingIds(@Param("inspectionSettingId") Long inspectionSettingId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除不在的城市
|
|
||||||
* @param inspectionSettingId
|
|
||||||
* @param openAreaMappingIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Integer deleteNotInOpenAreaMappingIds(@Param("inspectionSettingId") Long inspectionSettingId, @Param("openAreaMappingIds") List<Long> openAreaMappingIds);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除
|
|
||||||
* @param inspectionSettingId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Integer deleteInspectionSettingMapping(@Param("inspectionSettingId") Long inspectionSettingId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param inspectionSettingId
|
|
||||||
* @param openAreaMappingIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<HyInspectionSettingMappingDO> getConflictInspectionSetting(@Param("inspectionSettingId") Long inspectionSettingId, @Param("openAreaMappingIds") List<Long> openAreaMappingIds);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除
|
|
||||||
* @param excludeInspectionSettingId
|
|
||||||
* @param openAreaMappingIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Integer deleteInOpenAreaMappingIds(@Param("excludeInspectionSettingId") Long excludeInspectionSettingId, @Param("openAreaMappingIds") List<Long> openAreaMappingIds);
|
|
||||||
}
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.entity.HyIntendDevZoneInfoDO;
|
|
||||||
import com.github.pagehelper.PageInfo;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @date 2023-05-29 03:50
|
|
||||||
*/
|
|
||||||
public interface HyIntendDevZoneInfoMapper {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认插入方法,只会给有值的字段赋值
|
|
||||||
* 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null
|
|
||||||
* dateTime:2023-05-29 03:50
|
|
||||||
*/
|
|
||||||
int insertSelective(@Param("record") HyIntendDevZoneInfoDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
|
||||||
* dateTime:2023-05-29 03:50
|
|
||||||
*/
|
|
||||||
int updateByPrimaryKeySelective(@Param("record") HyIntendDevZoneInfoDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据ID查询
|
|
||||||
* @param id
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
HyIntendDevZoneInfoDO selectById(@Param("id") Long id);
|
|
||||||
|
|
||||||
|
|
||||||
List<HyIntendDevZoneInfoDO> selectByIds(@Param("ids") List<Long> ids);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询战区列表
|
|
||||||
* @param type
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<HyIntendDevZoneInfoDO> getHyIntendDevZoneInfoList(String type);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据组织架构获取配置信息
|
|
||||||
* @param regionIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<HyIntendDevZoneInfoDO> getZoneInfoByRegionIds(@Param("regionIds") List<String> regionIds);
|
|
||||||
}
|
|
||||||
@@ -1,66 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.dto.partner.ZoneCheckDTO;
|
|
||||||
import com.cool.store.entity.HyIntendDevelopementMappingDO;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @date 2023-05-29 03:50
|
|
||||||
*/
|
|
||||||
public interface HyIntendDevelopementMappingMapper {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认插入方法,只会给有值的字段赋值
|
|
||||||
* 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null
|
|
||||||
* dateTime:2023-05-29 03:50
|
|
||||||
*/
|
|
||||||
int insertSelective(@Param("record") HyIntendDevelopementMappingDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
|
||||||
* dateTime:2023-05-29 03:50
|
|
||||||
*/
|
|
||||||
int updateByPrimaryKeySelective(@Param("record") HyIntendDevelopementMappingDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除数据
|
|
||||||
* @param idList
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
int deleteByOpenAreaIds(@Param("openAreaIdList") List<Long> idList, @Param("type") String type);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除战区对应的关联意向区域
|
|
||||||
* @param idList
|
|
||||||
* @param type
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
int deleteByMappingIds(@Param("mappingIds") List<Long> idList, @Param("type") String type);
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param recordList
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
int batchInsert(@Param("recordList") List<HyIntendDevelopementMappingDO> recordList);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询根据selectByMappingIdList集合
|
|
||||||
* @param mappingIdList
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<ZoneCheckDTO> selectByMappingIdList(@Param("mappingIdList") List<Long> mappingIdList);
|
|
||||||
|
|
||||||
List<ZoneCheckDTO> selectByOpenAreaMappingIdList(@Param("openAreaMappingIdList") List<Long> openAreaMappingIdList,
|
|
||||||
@Param("type") String type,
|
|
||||||
@Param("currentId") Long currentId);
|
|
||||||
|
|
||||||
|
|
||||||
HyIntendDevelopementMappingDO selectByOpenAreaMappingId(@Param("openAreaMappingId") Long openAreaMappingId,
|
|
||||||
@Param("type") String type);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.vo.interview.InterviewInspectionHistoryInfo;
|
|
||||||
import com.cool.store.entity.HyInterviewInspectionLogDO;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface HyInterviewInspectionLogMapper {
|
|
||||||
int deleteByPrimaryKey(Long id);
|
|
||||||
|
|
||||||
int insert(HyInterviewInspectionLogDO record);
|
|
||||||
|
|
||||||
int insertSelective(HyInterviewInspectionLogDO record);
|
|
||||||
|
|
||||||
HyInterviewInspectionLogDO selectByPrimaryKey(Long id);
|
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(HyInterviewInspectionLogDO record);
|
|
||||||
|
|
||||||
|
|
||||||
List<InterviewInspectionHistoryInfo> interviewInspectionGetHistoryDetail(@Param("inspectionId") Long id);
|
|
||||||
int updateByPrimaryKey(HyInterviewInspectionLogDO record);
|
|
||||||
}
|
|
||||||
@@ -1,128 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.dto.partner.ApplyReservationProvinceDTO;
|
|
||||||
import com.cool.store.entity.HyOpenAreaInfoDO;
|
|
||||||
import com.cool.store.entity.HyPartnerBaseInfoDO;
|
|
||||||
import com.github.pagehelper.PageInfo;
|
|
||||||
import io.swagger.models.auth.In;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @date 2023-05-29 03:51
|
|
||||||
*/
|
|
||||||
public interface HyOpenAreaInfoMapper {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认插入方法,只会给有值的字段赋值
|
|
||||||
* 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null
|
|
||||||
* dateTime:2023-05-29 03:51
|
|
||||||
*/
|
|
||||||
int insertSelective(@Param("record") HyOpenAreaInfoDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
|
||||||
* dateTime:2023-05-29 03:51
|
|
||||||
*/
|
|
||||||
int updateByPrimaryKeySelective(@Param("record") HyOpenAreaInfoDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询重点城市
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<HyOpenAreaInfoDO> queryKeyOpenArea();
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询所有
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<HyOpenAreaInfoDO> queryByKeyword(@Param("keyword") String keyword,
|
|
||||||
@Param("applyFlag") Boolean applyFlag,
|
|
||||||
@Param("areaStatus") String areaStatus,
|
|
||||||
@Param("filterData") Boolean filterData);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询所有一级城市 (所有省份+直辖市)
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<HyOpenAreaInfoDO> queryFirstLevel();
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询所有一级城市 (所有省份+直辖市)
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<HyOpenAreaInfoDO> queryByIdsExcludeFirstLevel(@Param("ids") List<Long> ids);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询省份可申请可预约数量
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<ApplyReservationProvinceDTO> getApplyReservationProvinceCount();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询子列表
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<HyOpenAreaInfoDO> getChildrenList(@Param("type") String type ,
|
|
||||||
@Param("parentId") Long parentId);
|
|
||||||
|
|
||||||
Integer getChildrenCount(@Param("type") String type ,
|
|
||||||
@Param("parentId") Long parentId);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新城市昨天
|
|
||||||
* @param backgroundBanner
|
|
||||||
* @param detailBanner
|
|
||||||
* @param areaStatus
|
|
||||||
* @param updateUserId
|
|
||||||
* @param ids
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
int batchUpdateById(@Param("backgroundBanner") String backgroundBanner,
|
|
||||||
@Param("detailBanner") String detailBanner,
|
|
||||||
@Param("areaStatus") String areaStatus,
|
|
||||||
@Param("updateUserId") String updateUserId,
|
|
||||||
@Param("ids") List<Long> ids);
|
|
||||||
|
|
||||||
int batchUpdateByParentId(@Param("backgroundBanner") String backgroundBanner,
|
|
||||||
@Param("detailBanner") String detailBanner,
|
|
||||||
@Param("areaStatus") String areaStatus,
|
|
||||||
@Param("updateUserId") String updateUserId,
|
|
||||||
@Param("parentIdList") List<Long> parentIdList);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据idList查询数据
|
|
||||||
* @param idList
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<HyOpenAreaInfoDO> selectByIds(@Param("idList") List<Long> idList);
|
|
||||||
|
|
||||||
HyOpenAreaInfoDO selectById(@Param("id") Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取所有的区域
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<HyOpenAreaInfoDO> getAllOpenArea();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 过滤叶子节点
|
|
||||||
* @param openAreaIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<Long> filterLeafNode(@Param("openAreaIds") List<Long> openAreaIds);
|
|
||||||
|
|
||||||
List<HyOpenAreaInfoDO> getSonArea(@Param("id") String id);
|
|
||||||
|
|
||||||
List<HyOpenAreaInfoDO> getProvinceAllCode(@Param("id") String id);
|
|
||||||
|
|
||||||
HyOpenAreaInfoDO selectByAreaPath(@Param("areaPath") String areaPath);
|
|
||||||
|
|
||||||
List<HyOpenAreaInfoDO> selectAllCity();
|
|
||||||
}
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
|
|
||||||
import com.cool.store.dto.outbound.OutboundListDTO;
|
|
||||||
import com.cool.store.entity.HyOutboundMobileDO;
|
|
||||||
import com.cool.store.vo.HyOutboundVo;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Fun Li
|
|
||||||
* @date 2023/08/09
|
|
||||||
*/
|
|
||||||
public interface HyOutboundMobileMapper {
|
|
||||||
int deleteByPrimaryKey(Long id);
|
|
||||||
|
|
||||||
int insert(HyOutboundMobileDO record);
|
|
||||||
|
|
||||||
int insertSelective(HyOutboundMobileDO record);
|
|
||||||
|
|
||||||
HyOutboundMobileDO selectByPrimaryKey(Long id);
|
|
||||||
|
|
||||||
List<HyOutboundMobileDO> selectByPrimarySelective(HyOutboundMobileDO hyOutboundMobileDO);
|
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(HyOutboundMobileDO record);
|
|
||||||
|
|
||||||
int updateByPrimaryKey(HyOutboundMobileDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取呼出手机号列表
|
|
||||||
*
|
|
||||||
* @param dto
|
|
||||||
* @param userId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<HyOutboundVo> getOutboundNumberList(@Param("dto") OutboundListDTO dto, @Param("userId") String userId);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,75 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.entity.HyPartnerBaseInfoDO;
|
|
||||||
import com.cool.store.entity.SyncEcCustomerLabelDO;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @date 2023-05-29 03:51
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface HyPartnerBaseInfoMapper {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认插入方法,只会给有值的字段赋值
|
|
||||||
* 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null
|
|
||||||
* dateTime:2023-05-29 03:51
|
|
||||||
*/
|
|
||||||
int insertSelective(@Param("record") HyPartnerBaseInfoDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 跟进ID查询
|
|
||||||
* @param id
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
HyPartnerBaseInfoDO selectById(@Param("id") Long id);
|
|
||||||
|
|
||||||
|
|
||||||
int batchInsert(@Param("records") List<HyPartnerBaseInfoDO> records);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
|
||||||
* dateTime:2023-05-29 03:51
|
|
||||||
*/
|
|
||||||
int updateByPrimaryKeySelective(@Param("record") HyPartnerBaseInfoDO record);
|
|
||||||
|
|
||||||
int updateByPrimaryKey(@Param("record") HyPartnerBaseInfoDO record);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据加盟商ID修改用户名称与手机号
|
|
||||||
* @param userName
|
|
||||||
* @param mobile
|
|
||||||
* @param partnerId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
int updateByPartnerId(@Param("userName") String userName,
|
|
||||||
@Param("mobile") String mobile,
|
|
||||||
@Param("partnerId") String partnerId);
|
|
||||||
|
|
||||||
HyPartnerBaseInfoDO getByPartnerIdAndLineId(@Param("partnerId") String partnerId, @Param("partnerLineId") Long partnerLineId);
|
|
||||||
|
|
||||||
HyPartnerBaseInfoDO getByPartnerLineId(@Param("partnerLineId") Long partnerLineId);
|
|
||||||
|
|
||||||
|
|
||||||
List<HyPartnerBaseInfoDO> getByPartnerLineIds(@Param("partnerLineId") List<Long> partnerLineIds);
|
|
||||||
|
|
||||||
HyPartnerBaseInfoDO getByIdCard(@Param("idCard") String idCard);
|
|
||||||
|
|
||||||
int cleanIdCardInfoByPartnerLineId(@Param("idCard") String idCard,
|
|
||||||
@Param("idCardPhotoFront") String idCardPhotoFront,
|
|
||||||
@Param("idCardPhotoBlack") String idCardPhotoBlack,
|
|
||||||
@Param("partnerLineId") Long partnerLineId);
|
|
||||||
|
|
||||||
int selectAllList();
|
|
||||||
|
|
||||||
List<SyncEcCustomerLabelDO> selectListByLimit(@Param("limit1") Integer limit1, @Param("limit2") Integer limit2);
|
|
||||||
|
|
||||||
void updateByMobile(HyPartnerBaseInfoDO record);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.entity.HyPartnerCertificationInfoDO;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @date 2023-05-29 03:51
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface HyPartnerCertificationInfoMapper {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认插入方法,只会给有值的字段赋值
|
|
||||||
* 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null
|
|
||||||
* dateTime:2023-05-29 03:51
|
|
||||||
*/
|
|
||||||
int insertSelective(@Param("record") HyPartnerCertificationInfoDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
|
||||||
* dateTime:2023-05-29 03:51
|
|
||||||
*/
|
|
||||||
int updateByPrimaryKeySelective(@Param("record") HyPartnerCertificationInfoDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据资质审核流程 id 获取面试会议 id
|
|
||||||
* @param qualifyVerifyId 资质审核流程 id
|
|
||||||
* @return 面试会议 id
|
|
||||||
*/
|
|
||||||
String getInterviewIdByQualifyVerifyId(@Param("qualifyVerifyId") String qualifyVerifyId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据资质审核流程 id 获取面试会议 id
|
|
||||||
* @param qualifyVerifyId 资质审核流程 id
|
|
||||||
* @return 面试会议计划 id
|
|
||||||
*/
|
|
||||||
String getInterviewPlanIdByQualifyVerifyId(String qualifyVerifyId);
|
|
||||||
|
|
||||||
HyPartnerCertificationInfoDO selectByPartnerLineId(@Param("partnerLineId") Long partnerLineId);
|
|
||||||
|
|
||||||
int updateLineId(@Param("newPartnerId") String newPartnerId, @Param("newLineId") Long newLineId, @Param("oldLineId") Long oldLineId);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.entity.HyPartnerClerkDO;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @date 2023-05-29 03:51
|
|
||||||
*/
|
|
||||||
public interface HyPartnerClerkMapper {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认插入方法,只会给有值的字段赋值
|
|
||||||
* 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null
|
|
||||||
* dateTime:2023-05-29 03:51
|
|
||||||
*/
|
|
||||||
int insertSelective(@Param("record") HyPartnerClerkDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
|
||||||
* dateTime:2023-05-29 03:51
|
|
||||||
*/
|
|
||||||
int updateByPrimaryKeySelective(@Param("record") HyPartnerClerkDO record);
|
|
||||||
|
|
||||||
List<HyPartnerClerkDO> getHyPartnerClerkList(@Param("lineId") Long lineId);
|
|
||||||
|
|
||||||
|
|
||||||
int batchInsert(@Param("recordList") List<HyPartnerClerkDO> recordList);
|
|
||||||
|
|
||||||
void deleteByPartnerIdAndLineId(@Param("partnerId") String partnerId, @Param("partnerLineId") Long partnerLineId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询店员信息
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<HyPartnerClerkDO> listByPartnerIdAndLineId(@Param("partnerId") String partnerId,
|
|
||||||
@Param("partnerLineId") Long partnerLineId);
|
|
||||||
|
|
||||||
int updateLineId(@Param("newPartnerId")String newPartnerId,@Param("newLineId") Long newLineId, @Param("oldLineId") Long oldLineId);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.entity.HyPartnerEcTrackLogDO;
|
|
||||||
import com.github.pagehelper.Page;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hxd
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface HyPartnerEcTrackLogMapper {
|
|
||||||
|
|
||||||
int deleteByPrimaryKey(Long id);
|
|
||||||
|
|
||||||
int insert(HyPartnerEcTrackLogDO record);
|
|
||||||
|
|
||||||
int insertSelective(HyPartnerEcTrackLogDO record);
|
|
||||||
|
|
||||||
HyPartnerEcTrackLogDO selectByPrimaryKey(Long id);
|
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(HyPartnerEcTrackLogDO record);
|
|
||||||
|
|
||||||
int updateByPrimaryKey(HyPartnerEcTrackLogDO record);
|
|
||||||
|
|
||||||
int batchInsertOrUpdate(@Param("recordList") HyPartnerEcTrackLogDO resultTrajectoryList);
|
|
||||||
|
|
||||||
Page<HyPartnerEcTrackLogDO> getEcLogPageByPartnerId(@Param("partnerId") String partnerId);
|
|
||||||
}
|
|
||||||
@@ -1,147 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.dto.exhibition.ExhibitionInterviewInfoDTO;
|
|
||||||
import com.cool.store.dto.exhibition.ExhibitionLineBaseDTO;
|
|
||||||
import com.cool.store.dto.exhibition.ExhibitionLineDTO;
|
|
||||||
import com.cool.store.dto.exhibition.PartnerSignUpDTO;
|
|
||||||
import com.cool.store.entity.HyPartnerExhibitionDO;
|
|
||||||
import com.cool.store.entity.HyPartnerExhibitionInterviewDO;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @date 2023-11-30 11:55
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface HyPartnerExhibitionMapper {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认插入方法,只会给有值的字段赋值
|
|
||||||
* 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null
|
|
||||||
* dateTime:2023-11-30 01:39
|
|
||||||
*/
|
|
||||||
int insertSelective(HyPartnerExhibitionDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认查询方法,通过主键获取所有字段的值
|
|
||||||
* dateTime:2023-11-30 01:39
|
|
||||||
*/
|
|
||||||
HyPartnerExhibitionDO selectByPrimaryKey(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
|
||||||
* dateTime:2023-11-30 01:39
|
|
||||||
*/
|
|
||||||
int updateByPrimaryKeySelective(HyPartnerExhibitionDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键物理删除
|
|
||||||
* dateTime:2023-11-30 01:39
|
|
||||||
*/
|
|
||||||
int deleteByPrimaryKey(Long id);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 展会参与线索信息
|
|
||||||
* @param exhibitionId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<ExhibitionLineDTO> getExhibitionLine(Integer exhibitionId);
|
|
||||||
|
|
||||||
HyPartnerExhibitionDO querySelective(HyPartnerExhibitionDO record);
|
|
||||||
|
|
||||||
List<ExhibitionLineDTO> exhibitionLineList(Integer exhibitionId,Integer participationStatus, String partnerUserId,String userId,Integer id );
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 将线索参加的会销面试状态设为不通过
|
|
||||||
* @param partnerLineId
|
|
||||||
*/
|
|
||||||
void rejectExhibitionInterview(@Param("partnerLineId") String partnerLineId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除线索所有的会销信息
|
|
||||||
* @param partnerLineId
|
|
||||||
*/
|
|
||||||
void deleteAllByLineId(Long partnerLineId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询在会销中进行的面试的面试计划id
|
|
||||||
* @param interviewPlanIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<Long> queryListByInterviewPlanIds(@Param("interviewPlanIds") List<Long> interviewPlanIds);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询处在会销面试状态中的线索ids
|
|
||||||
*
|
|
||||||
* @param lindIds
|
|
||||||
* @param exhibitionPartnerStatusCode
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<HyPartnerExhibitionDO> queryListByLineIds(@Param("lineIds") List<Long> lindIds, @Param("status") Integer exhibitionPartnerStatusCode);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询线索参加的会销面试相关信息
|
|
||||||
* @param interviewPlanId
|
|
||||||
* @param partnerLineId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
HyPartnerExhibitionInterviewDO queryPartnerExhibitionInterviewInfo(@Param("interviewPlanId") Long interviewPlanId, @Param("partnerLineId") Long partnerLineId);
|
|
||||||
|
|
||||||
|
|
||||||
List<ExhibitionLineBaseDTO> exhibitionLineBaseInfo(@Param("partnerName") String partnerName, @Param("id") Integer id);
|
|
||||||
|
|
||||||
HyPartnerExhibitionDO getPartnerExhibition(@Param("exhibitionId") Integer exhibitionId, @Param("lineId") Long lindId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 加盟商报名会销次数(不包括取消报名)
|
|
||||||
* @param lineId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<PartnerSignUpDTO> partnerSignUpCount(@Param("lineIds") List<Long> lineIds );
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取待修改会销中状态的线索 ids
|
|
||||||
* @param exhibitionIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<Long> getCloseExhibitionLineIds(@Param("exhibitionIds") List<Integer> exhibitionIds);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据展会 id 列表获取会销线索信息
|
|
||||||
* @param exhibitionIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<ExhibitionLineDTO> getLineByExhibitionIds(List<Integer> exhibitionIds);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 在线索提交意向申请后刷线线索报名会销的状态
|
|
||||||
* @param partnerLineId
|
|
||||||
*/
|
|
||||||
int updateStatusAfterSubmitIndustry(@Param("partnerLineId") Long partnerLineId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 结束面试后刷线线索报名会销的状态
|
|
||||||
* @param interviewPlanId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
int updateStatusAfterFinishInterview(@Param("interviewPlanId")Long interviewPlanId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 资质审批通过后更新线索报名会销状态
|
|
||||||
* @param interviewPlanId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
int updateStatusAfterSubmitQualification(@Param("interviewPlanId") Long interviewPlanId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取部分会销面试发起人信息
|
|
||||||
*/
|
|
||||||
ExhibitionInterviewInfoDTO getStartInterviewInfo(@Param("lineId") Long lineId);
|
|
||||||
}
|
|
||||||
@@ -1,80 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.dto.partner.PartnerIntentApplyInfoDTO;
|
|
||||||
import com.cool.store.entity.HyPartnerIntentInfoDO;
|
|
||||||
import com.github.pagehelper.PageInfo;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @date 2023-05-29 03:52
|
|
||||||
*/
|
|
||||||
public interface HyPartnerIntentInfoMapper {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认插入方法,只会给有值的字段赋值
|
|
||||||
* 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null
|
|
||||||
* dateTime:2023-05-29 03:52
|
|
||||||
*/
|
|
||||||
int insertSelective(@Param("record") HyPartnerIntentInfoDO record);
|
|
||||||
|
|
||||||
HyPartnerIntentInfoDO selectByPrimaryKeySelective(@Param("id") Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
|
||||||
* dateTime:2023-05-29 03:52
|
|
||||||
*/
|
|
||||||
int updateByPrimaryKeySelective(@Param("record") HyPartnerIntentInfoDO record);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 工作台 招商经理 意向申请阶段 待处理 待跟进 列表
|
|
||||||
* @param userId
|
|
||||||
* @param workflowStage
|
|
||||||
* @param workflowStatus
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<PartnerIntentApplyInfoDTO> selectPartnerIntentApplyInfoList(@Param("userId") String userId,
|
|
||||||
@Param("workflowStage") String workflowStage ,
|
|
||||||
@Param("workflowStatus") String workflowStatus,
|
|
||||||
@Param("keyword") String keyword,
|
|
||||||
@Param("callStatus") Integer callStatus,
|
|
||||||
@Param("userPortraitIdList") List<Long> userPortraitIdList,
|
|
||||||
@Param("lastFollowStartTime") String lastFollowStartTime,
|
|
||||||
@Param("lastFollowEndTime") String lastFollowEndTime,
|
|
||||||
@Param("userChannelIdList") List<Long> userChannelIdList);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据线索ID查询数据
|
|
||||||
* @param lineId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
HyPartnerIntentInfoDO selectByLineId(@Param("lineId") Long lineId);
|
|
||||||
|
|
||||||
HyPartnerIntentInfoDO getByPartnerIdAndLineId(@Param("partnerId") String partnerId, @Param("partnerLineId") Long partnerLineId);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* updateLineId
|
|
||||||
* @param newLineId
|
|
||||||
* @param oldLineId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
int updateLineId(@Param("newPartnerId")String newPartnerId,@Param("newLineId") Long newLineId, @Param("oldLineId") Long oldLineId);
|
|
||||||
|
|
||||||
|
|
||||||
int updateByPartnerLineId(@Param("record") HyPartnerIntentInfoDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新数据
|
|
||||||
* @param id
|
|
||||||
* @param acquaintanceFlag
|
|
||||||
* @param acquaintanceName
|
|
||||||
* @param acquaintanceRelationshipType
|
|
||||||
* @param otherRelationshipType
|
|
||||||
*/
|
|
||||||
int updateAcquaintanceFlag(Long id ,Integer acquaintanceFlag,String acquaintanceName, Integer acquaintanceRelationshipType,String otherRelationshipType);
|
|
||||||
}
|
|
||||||
@@ -1,116 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.entity.HyPartnerInterviewDO;
|
|
||||||
import com.cool.store.request.GetInterviewListReq;
|
|
||||||
import com.cool.store.vo.EnterInterviewVO;
|
|
||||||
import com.cool.store.vo.PartnerInterviewInfoVO;
|
|
||||||
import com.cool.store.vo.PartnerPassLetterDetailVO;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @date 2023-06-09 05:51
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface HyPartnerInterviewMapper {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认插入方法,只会给有值的字段赋值
|
|
||||||
* 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null
|
|
||||||
* dateTime:2023-06-09 05:51
|
|
||||||
*/
|
|
||||||
int insertSelective(@Param("record") HyPartnerInterviewDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
|
||||||
* dateTime:2023-06-09 05:51
|
|
||||||
*/
|
|
||||||
int updateByPrimaryKeySelective(HyPartnerInterviewDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据加盟商id查询面试信息
|
|
||||||
* @param partnerId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
PartnerInterviewInfoVO queryByPartnerId(@Param("partnerId") String partnerId);
|
|
||||||
PartnerInterviewInfoVO queryByPartnerLineId(@Param("partnerLineId") String partnerLineId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据会议 id 查询面试官 id
|
|
||||||
*/
|
|
||||||
EnterInterviewVO getInterviewerByInterviewPlanId(@Param("interviewPlanId") String interviewPlanId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取通知函详情
|
|
||||||
*/
|
|
||||||
PartnerPassLetterDetailVO getPassLetterDetail(@Param("interviewPlanId") String interviewPlanId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生成通过函 pdf 后修改
|
|
||||||
*/
|
|
||||||
int updatePassLetterInfo(@Param("passCode") String passCode, @Param("passPdfUrl") String passPdfUrl, @Param("passImageUrl") String passImageUrl, @Param("expiryDate") String expiryDate, @Param("interviewId") String interviewId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据面试 id 查询面试信息
|
|
||||||
*/
|
|
||||||
HyPartnerInterviewDO selectByPrimaryKeySelective(String interviewId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据面试 id 获取意向区域
|
|
||||||
* @param interviewId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
String getVerifyCityByInterviewId(@Param("interviewId") String interviewId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询面试基本信息列表
|
|
||||||
* @param request
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<HyPartnerInterviewDO> getInterviewBaseInfoList(@Param("record") GetInterviewListReq request);
|
|
||||||
|
|
||||||
List<HyPartnerInterviewDO> getInterviewBaseInfoListByLineIds(@Param("lineIds") List<Long> lineIds);
|
|
||||||
void batchUpdateInterviewStatus(@Param("interviewIds") List<Long> interviewIdList, @Param("status") Integer interviewStatus,@Param("deleted") Integer deleted);
|
|
||||||
|
|
||||||
void batchUpdateStatusByLineIds(@Param("lineIds") List<Long> lineIds, @Param("status") Integer interviewStatus);
|
|
||||||
|
|
||||||
HyPartnerInterviewDO getInterviewInfoByInterviewPlanId(@Param("interviewPlanId") String interviewPlanId);
|
|
||||||
|
|
||||||
|
|
||||||
HyPartnerInterviewDO getInterviewInfoByQualifyVerifyId(@Param("qualifyVerifyId") String qualifyVerifyId);
|
|
||||||
/**
|
|
||||||
* 修改面试状态
|
|
||||||
*/
|
|
||||||
void updateInterviewStatus(@Param("interviewPlanId") String interviewPlanId, @Param("status") String status);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取面试对应的线索id
|
|
||||||
*/
|
|
||||||
String getLineId(@Param("interviewPlanId") String interviewPlanId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取面试流程状态
|
|
||||||
* @param interviewPlanId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
String getStatus(String interviewPlanId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 在面试信息表中添加面试录制视频链接
|
|
||||||
* @param roomId
|
|
||||||
* @param videoUrl
|
|
||||||
*/
|
|
||||||
void addVideoUrl(@Param("roomId") String roomId, @Param("videoUrl") String videoUrl);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询是否已有该链接
|
|
||||||
*/
|
|
||||||
Boolean hasVideoUrls(@Param("videoUrl") String videoUrl);
|
|
||||||
|
|
||||||
int updateLineId(@Param("newPartnerId") String newPartnerId, @Param("newLineId") Long newLineId, @Param("oldLineId") Long oldLineId);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,200 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.dto.message.RemindInterviewMsgDTO;
|
|
||||||
import com.cool.store.dto.partner.AdvanceLineDTO;
|
|
||||||
import com.cool.store.dto.partner.PartnerInterviewInfoDTO;
|
|
||||||
import com.cool.store.dto.partner.SpecialDateRangeInterviewCountDTO;
|
|
||||||
import com.cool.store.entity.HyInterviewRemindDO;
|
|
||||||
import com.cool.store.entity.HyPartnerInterviewBookSituation;
|
|
||||||
import com.cool.store.entity.HyPartnerInterviewPlanDO;
|
|
||||||
import com.cool.store.request.GetInterviewListReq;
|
|
||||||
import com.cool.store.vo.EnterpriseUserBaseInfoVO;
|
|
||||||
import com.cool.store.vo.interview.InterviewVO;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @date 2023-05-29 03:52
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface HyPartnerInterviewPlanMapper {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认插入方法,只会给有值的字段赋值
|
|
||||||
* 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null
|
|
||||||
* dateTime:2023-05-29 03:52
|
|
||||||
*/
|
|
||||||
int insertSelective(@Param("record") HyPartnerInterviewPlanDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
|
||||||
* dateTime:2023-05-29 03:52
|
|
||||||
*/
|
|
||||||
int updateByPrimaryKeySelective(@Param("record") HyPartnerInterviewPlanDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询当天面试数量
|
|
||||||
* @param userId
|
|
||||||
* @param currentDate
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<AdvanceLineDTO> getCurrentDateInterviewCount(@Param("userId") String userId, @Param("currentDate") String currentDate, String endDate);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* todo 当天面试数据需要修改
|
|
||||||
* 查询指定日期面试数量 与未来7天面试数量
|
|
||||||
* @param userId
|
|
||||||
* @param currentDate
|
|
||||||
* @param startTime
|
|
||||||
* @param endTime
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
SpecialDateRangeInterviewCountDTO getInterviewCount(@Param("userId") String userId,
|
|
||||||
@Param("currentDate") String currentDate,
|
|
||||||
@Param("startTime") String startTime,
|
|
||||||
@Param("endTime") String endTime);
|
|
||||||
/**
|
|
||||||
* 查询面试列表
|
|
||||||
* @param userId
|
|
||||||
* @param currentDate
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<HyPartnerInterviewPlanDO> getInterviewPlanList(@Param("userId") String userId,
|
|
||||||
@Param("currentTime") String currentTime,
|
|
||||||
@Param("currentDay") String currentDay);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 工作台 招商经理 预约面试时间 合格资格面试 列表
|
|
||||||
* @param userId
|
|
||||||
* @param workflowStage
|
|
||||||
* @param workflowStatus
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<PartnerInterviewInfoDTO> getPartnerInterviewInfoList(@Param("userId") String userId,
|
|
||||||
@Param("workflowStage") String workflowStage ,
|
|
||||||
@Param("workflowStatus") String workflowStatus,
|
|
||||||
@Param("filter") Boolean filter);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询面试列表
|
|
||||||
*
|
|
||||||
* @param request
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<InterviewVO> getInterviewList(@Param("record") GetInterviewListReq request);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询面试详情
|
|
||||||
*
|
|
||||||
* @param interviewPlanId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
InterviewVO getInterviewInfo(String interviewPlanId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询用户基本信息
|
|
||||||
*/
|
|
||||||
EnterpriseUserBaseInfoVO getEnterpriseUserBaseInfo(@Param("userId") String userId);
|
|
||||||
|
|
||||||
Long selectInterviewIdByLineId(Long lineId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据条件字段查询面试安排信息
|
|
||||||
* @param record
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<HyPartnerInterviewPlanDO> selectBySelective(@Param("record") HyPartnerInterviewPlanDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据线索
|
|
||||||
* @param lindIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<HyPartnerInterviewPlanDO> getHyPartnerInterviewPlanByLineIds(List<Long> lindIds);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量软删面试计划
|
|
||||||
* @param interviewIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
void batchDeleteInterviewPlans(@Param("interviewPlanIds")List<Long> interviewIds);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通用更新房间状态方法
|
|
||||||
* @param record
|
|
||||||
* @param roomStatus
|
|
||||||
*/
|
|
||||||
void updateInterviewRoomStatus(@Param("record") HyPartnerInterviewPlanDO record,@Param("roomStatus")Integer roomStatus);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 仅适用于开启面试房间
|
|
||||||
* @param lineIds
|
|
||||||
*/
|
|
||||||
void openInterviewRoom(@Param("lineIds") List<Long> lineIds,@Param("roomStatus")Integer roomStatu);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 仅适用于关闭面试房间
|
|
||||||
* @param record
|
|
||||||
* @param roomStatus
|
|
||||||
*/
|
|
||||||
void closeInterviewRoom(@Param("record") HyPartnerInterviewPlanDO record,@Param("roomStatus")Integer roomStatus);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改面试实际开始时间
|
|
||||||
*/
|
|
||||||
void updateActualStartTime(@Param("id") Long id, @Param("now") String now);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取面试房间状态
|
|
||||||
* @param interviewPlanId
|
|
||||||
*/
|
|
||||||
Integer getRoomStatus(@Param("interviewPlanId") String interviewPlanId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取面试开始时间
|
|
||||||
*/
|
|
||||||
String getInterviewStartTime(String interviewPlanId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据面试计划id获取面试计划信息
|
|
||||||
* @param interviewPlanId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
HyPartnerInterviewPlanDO getInterviewPlanById(String interviewPlanId);
|
|
||||||
|
|
||||||
HyPartnerInterviewPlanDO getInterviewPlanByLineId(Long lineId);
|
|
||||||
|
|
||||||
List<RemindInterviewMsgDTO> selectRemindInterviewPlan(@Param("startTime") Date startTime,
|
|
||||||
@Param("endTime") Date endTime,
|
|
||||||
@Param("workflowStage") String workflowStage,
|
|
||||||
@Param("workflowStatus") String workflowStatus);
|
|
||||||
|
|
||||||
int updateLineId(@Param("newPartnerId") String newPartnerId, @Param("newLineId") Long newLineId, @Param("oldLineId") Long oldLineId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取明天开始面试的面试开始时间和 partnerId(17:00 前确定为明天面试的)
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<HyInterviewRemindDO> getTomorrowInterview();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取 30 分钟后开始的面试(预约30分钟之内的面试不发获取)
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<HyInterviewRemindDO> remindInterviewStartMinutes();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取招商经理各时段预约情况
|
|
||||||
* @param interviewerId 招商经理 id
|
|
||||||
* @param startTimeStr 开始时间点
|
|
||||||
* @param endTimeStr 结束时间点
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<HyPartnerInterviewBookSituation> getInterviewBookSituation(@Param("interviewerId") String interviewerId, @Param("startTime") String startTimeStr, @Param("endTime") String endTimeStr);
|
|
||||||
}
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.entity.HyPartnerLabelGroupDO;
|
|
||||||
import com.cool.store.vo.LabelGroupListVo;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Fun Li 2023/8/10 13:25
|
|
||||||
* @version 1.0
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface HyPartnerLabelGroupMapper {
|
|
||||||
|
|
||||||
int deleteByPrimaryKey(Long id);
|
|
||||||
|
|
||||||
int insert(HyPartnerLabelGroupDO record);
|
|
||||||
|
|
||||||
int insertSelective(HyPartnerLabelGroupDO record);
|
|
||||||
|
|
||||||
HyPartnerLabelGroupDO selectByPrimaryKey(Long id);
|
|
||||||
|
|
||||||
List<HyPartnerLabelGroupDO> selectSelective(HyPartnerLabelGroupDO record);
|
|
||||||
|
|
||||||
List<LabelGroupListVo> getLabelGroupList(HyPartnerLabelGroupDO record);
|
|
||||||
|
|
||||||
List<LabelGroupListVo> getLabelGroupListOrder(HyPartnerLabelGroupDO record);
|
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(HyPartnerLabelGroupDO record);
|
|
||||||
|
|
||||||
int updateByPrimaryKey(HyPartnerLabelGroupDO record);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.dto.label.LabelListDTO;
|
|
||||||
import com.cool.store.entity.HyPartnerLabelDO;
|
|
||||||
import com.cool.store.vo.LabelListVo;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Fun Li
|
|
||||||
* @date 2023-08-10
|
|
||||||
*/
|
|
||||||
public interface HyPartnerLabelMapper {
|
|
||||||
int deleteByPrimaryKey(Long id);
|
|
||||||
|
|
||||||
int insert(HyPartnerLabelDO record);
|
|
||||||
|
|
||||||
int insertSelective(HyPartnerLabelDO record);
|
|
||||||
|
|
||||||
HyPartnerLabelDO selectByPrimaryKey(Long id);
|
|
||||||
|
|
||||||
List<HyPartnerLabelDO> selectSelective(HyPartnerLabelDO labelDO);
|
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(HyPartnerLabelDO record);
|
|
||||||
|
|
||||||
int updateByPrimaryKey(HyPartnerLabelDO record);
|
|
||||||
|
|
||||||
List<LabelListVo> getLabelList(LabelListDTO dto);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 某个标签组内是否有未删除的标签
|
|
||||||
* @param labelGroupId 标签组 id
|
|
||||||
*/
|
|
||||||
Boolean whetherGroupInUse(@Param("labelGroupId") Long labelGroupId);
|
|
||||||
|
|
||||||
List<HyPartnerLabelDO> getLabelListByIds(@Param("labelIds") List<Long> labelIds);
|
|
||||||
}
|
|
||||||
@@ -1,284 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.dto.partner.*;
|
|
||||||
import com.cool.store.dto.partner.PartnerBlackListDTO;
|
|
||||||
import com.cool.store.dto.partner.PartnerLineInfoAndBaseInfoDTO;
|
|
||||||
import com.cool.store.dto.partner.StageCountDTO;
|
|
||||||
import com.cool.store.entity.HyPartnerLineInfoDO;
|
|
||||||
import com.cool.store.request.PrivateSeaLineListRequest;
|
|
||||||
import com.cool.store.vo.LinePageInfoVo;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @date 2023-05-29 03:52
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface HyPartnerLineInfoMapper {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认插入方法,只会给有值的字段赋值
|
|
||||||
* 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null
|
|
||||||
* dateTime:2023-05-29 03:52
|
|
||||||
*/
|
|
||||||
int insertSelective(@Param("record") HyPartnerLineInfoDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量新增线索
|
|
||||||
* @param recordList
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
int batchInsert(@Param("recordList") List<HyPartnerLineInfoDO> recordList);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量将线索置为删除状态
|
|
||||||
* @param lineIdList
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
int batchDeleted(@Param("lineIdList") List<Long> lineIdList);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据ID查询数据
|
|
||||||
* @param id
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
HyPartnerLineInfoDO selectByPrimaryKeySelective(Long id);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
|
||||||
* dateTime:2023-05-29 03:52
|
|
||||||
*/
|
|
||||||
int updateByPrimaryKeySelective(@Param("record") HyPartnerLineInfoDO record);
|
|
||||||
|
|
||||||
int updateByPrimaryKey(@Param("record") HyPartnerLineInfoDO record);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 当前用户指定时间 临期线索
|
|
||||||
* @param userId
|
|
||||||
* @param currentDate
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<AdvanceLineDTO> getAdventLineCount(@Param("userId") String userId, @Param("currentDate") String currentDate, @Param("endDate") String endDate);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 招商经理 对应各阶段待处理数据
|
|
||||||
* @param userId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
StageCountDTO selectStagePendingCount(@Param("userId") String userId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 招商经理 对应各个阶段 待跟进数据
|
|
||||||
* @param userId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
StageCountDTO selectStageFollowCount(@Param("userId") String userId);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询线索信息与加盟商基本信息
|
|
||||||
* @param lineId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
PartnerLineInfoAndBaseInfoDTO selectPartnerLineInfoAndBaseInfo(@Param("lineId") Long lineId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 最近30天结束的线索
|
|
||||||
* @param userId
|
|
||||||
* @param lastMonthTodayDate
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<HyPartnerLineInfoDO> lastMonthCloseLine(@Param("userId") String userId,
|
|
||||||
@Param("lastMonthTodayDate") String lastMonthTodayDate);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改招商经理
|
|
||||||
* @param lineIdList
|
|
||||||
* @param userId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
int updateInvestmentManager(@Param("lineIdList") List<Long> lineIdList, @Param("userId") String userId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据线索ID查询线索
|
|
||||||
* @param lineIdList
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<HyPartnerLineInfoDO> getLineListByLineIds(List<Long> lineIdList);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询黑名单列表
|
|
||||||
* @param userNameKeyword
|
|
||||||
* @param phoneKeyword
|
|
||||||
* @param intentArea
|
|
||||||
* @param acceptAdjustType
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<PartnerBlackListDTO> getBlackList(@Param("userNameKeyword") String userNameKeyword,
|
|
||||||
@Param("phoneKeyword") String phoneKeyword,
|
|
||||||
@Param("intentAreaName") String intentAreaName ,
|
|
||||||
@Param("acceptAdjustType") Integer acceptAdjustType);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 加入/移除 黑名单
|
|
||||||
* @param lineId
|
|
||||||
* @param status
|
|
||||||
* @param joinReason
|
|
||||||
* @param removeReason
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Boolean joinAndRemoveBlack(@Param("lineId") Long lineId,
|
|
||||||
@Param("status") Integer status,
|
|
||||||
@Param("joinReason") String joinReason,
|
|
||||||
@Param("removeReason") String removeReason);
|
|
||||||
|
|
||||||
HyPartnerLineInfoDO getByPartnerId(@Param("partnerId") String partnerId);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询公海线索
|
|
||||||
* @param userNameKeyword
|
|
||||||
* @param phoneKeyword
|
|
||||||
* @param intentArea
|
|
||||||
* @param acceptAdjustType
|
|
||||||
* @param updateStartTime
|
|
||||||
* @param updateEndTime
|
|
||||||
* @param userIdList
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<PublicSeaLineDTO> getPublicSeaLineList(@Param("userNameKeyword") String userNameKeyword,
|
|
||||||
@Param("phoneKeyword") String phoneKeyword,
|
|
||||||
@Param("intentAreaName") String intentAreaName,
|
|
||||||
@Param("acceptAdjustType") Integer acceptAdjustType,
|
|
||||||
@Param("updateStartTime") String updateStartTime,
|
|
||||||
@Param("updateEndTime") String updateEndTime,
|
|
||||||
@Param("userIdList") List<String> userIdList,
|
|
||||||
@Param("createStartTime") String createStartTime,
|
|
||||||
@Param("createEndTime") String createEndTime);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<PrivateSeaLineDTO> getPrivateSeaLineList(PrivateSeaLineListRequest request);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询对应的加盟商最近线索
|
|
||||||
* @param partnerIdList
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<HyPartnerLineInfoDO> getPartnerLastLine(@Param("partnerIdList") List<String> partnerIdList);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 加盟商跟进次数
|
|
||||||
* @param partnerIdList
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<LineCountDTO> getFollowCountList(@Param("partnerIdList") List<String> partnerIdList);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据线索ID查询线索数据
|
|
||||||
* @param lineIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<HyPartnerLineInfoDO> getHyPartnerLineInfoListByIds(@Param("lineIds") List<Long> lineIds);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 跟进历史 及删除状态为1的线索
|
|
||||||
* @param partnerId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<HyPartnerLineInfoDO> getLineFollowHistoryList(String partnerId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据面试计划 id 查询战区 id
|
|
||||||
*/
|
|
||||||
String getAffiliationZoneIdByInterviewPlanId(String interviewPlanId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改线索状态
|
|
||||||
*/
|
|
||||||
void updateWorkflowStatus(@Param("lineId") String lineId, @Param("status") String status);
|
|
||||||
|
|
||||||
List<HyPartnerLineInfoDO> getOverTimeReserveLineList(@Param("deadlineEnd") Date deadlineEnd,
|
|
||||||
@Param("workflowStage") String workflowStage,
|
|
||||||
@Param("workflowStatus") String workflowStatus);
|
|
||||||
|
|
||||||
List<HyPartnerLineInfoDO> getWaitForOpenInterviewLineList(@Param("startTime") Date startTime,
|
|
||||||
@Param("endTime") Date endTime);
|
|
||||||
|
|
||||||
void batchUpdateStatusByLineIds(@Param("lineIds") List<Long> lineIds, @Param("status")Integer status);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取线索简要信息
|
|
||||||
* @param partnerLineIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<PartnerSimpleInfoDTO> getPartnerSimpleInfoByLineIds(@Param("partnerLineIds") List<Long> partnerLineIds);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据线索ID与招商经理查询数据
|
|
||||||
* @param lineIds
|
|
||||||
* @param investmentManager
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<HyPartnerLineInfoDO> getHyPartnerLineInfoList(@Param("lineIds") List<Long> lineIds,String investmentManager);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取线索转让次数
|
|
||||||
* @param partnerLineId 线索 id
|
|
||||||
* @return 线索转让次数
|
|
||||||
*/
|
|
||||||
Integer getTransferTimes(@Param("lineId") Long partnerLineId);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<LinePageInfoVo> getPrivateSeaPageInfoNext(PrivateSeaLineListRequest request);
|
|
||||||
|
|
||||||
List<LinePageInfoVo> getPublicSeaPageInfoNext(@Param("lineId") Long lineId,@Param("userNameKeyword") String userNameKeyword,
|
|
||||||
@Param("phoneKeyword") String phoneKeyword,
|
|
||||||
@Param("intentAreaName") String intentAreaName,
|
|
||||||
@Param("acceptAdjustType") Integer acceptAdjustType,
|
|
||||||
@Param("updateStartTime") String updateStartTime,
|
|
||||||
@Param("updateEndTime") String updateEndTime,
|
|
||||||
@Param("userIdList") List<String> userIdList,
|
|
||||||
@Param("createStartTime") String createStartTime,
|
|
||||||
@Param("createEndTime") String createEndTime,
|
|
||||||
@Param("pageTurn") String pageTurn,
|
|
||||||
@Param("limit1") Integer limit1,
|
|
||||||
@Param("limit2") Integer limit2
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询线索面试管信息
|
|
||||||
* @param list
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<LineInterviewDTO> lineInterviewList(@Param("list") List<Long> list);
|
|
||||||
/**
|
|
||||||
* 查询线索招商经理信息
|
|
||||||
* @param list
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<LineInterviewDTO> lineInvestmentList(@Param("list") List<Long> list);
|
|
||||||
|
|
||||||
int batchUpdate(@Param("records") List<HyPartnerLineInfoDO> records);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.entity.HyPartnerTaskInfoLogDO;
|
|
||||||
import com.github.pagehelper.Page;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @date 2023-05-29 03:53
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface HyPartnerTaskInfoLogMapper {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认插入方法,只会给有值的字段赋值
|
|
||||||
* 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null
|
|
||||||
* dateTime:2023-05-29 03:53
|
|
||||||
*/
|
|
||||||
int insertSelective(@Param("record") HyPartnerTaskInfoLogDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
|
||||||
* dateTime:2023-05-29 03:53
|
|
||||||
*/
|
|
||||||
int updateByPrimaryKeySelective(@Param("record") HyPartnerTaskInfoLogDO record);
|
|
||||||
|
|
||||||
List<HyPartnerTaskInfoLogDO> selectByPartnerLineIdAndOperateType(@Param("partnerLineId") Long partnerLineId, @Param("operateType") String operateType);
|
|
||||||
|
|
||||||
|
|
||||||
int updateLineId(@Param("newPartnerId") String newPartnerId, @Param("newLineId") Long newLineId, @Param("oldLineId") Long oldLineId);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 跟进线索id以及操作类型分页获取日志
|
|
||||||
* @param partnerLineId
|
|
||||||
* @param operateTypes
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Page<HyPartnerTaskInfoLogDO> getLogPageByLineId(@Param("partnerLineId")Long partnerLineId, @Param("operateTypes")List<String> operateTypes);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除线索
|
|
||||||
* @param partnerLineId
|
|
||||||
* @param message
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
int deleteByLineId(@Param("partnerLineId") Long partnerLineId, @Param("message") String message);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取通用信息需要的最新一条线索操作日志
|
|
||||||
* @param partnerLineId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<HyPartnerTaskInfoLogDO> getLastTipsLog(@Param("lineId") Long partnerLineId);
|
|
||||||
}
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.entity.HyPartnerUserChannelDO;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface HyPartnerUserChannelMapper {
|
|
||||||
int deleteByPrimaryKey(Long id);
|
|
||||||
|
|
||||||
int insert(HyPartnerUserChannelDO record);
|
|
||||||
|
|
||||||
int insertSelective(HyPartnerUserChannelDO record);
|
|
||||||
|
|
||||||
HyPartnerUserChannelDO selectByPrimaryKey(Long id);
|
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(HyPartnerUserChannelDO record);
|
|
||||||
|
|
||||||
int updateByPrimaryKey(HyPartnerUserChannelDO record);
|
|
||||||
|
|
||||||
HyPartnerUserChannelDO selectByChannelId(@Param("channelId") Long id);
|
|
||||||
|
|
||||||
HyPartnerUserChannelDO selectByChannelName(@Param("channelName") String channelName);
|
|
||||||
|
|
||||||
List<HyPartnerUserChannelDO> getAllUserChannel();
|
|
||||||
|
|
||||||
List<HyPartnerUserChannelDO> getUserChannelByIds(List<Integer> userChannelIds);
|
|
||||||
|
|
||||||
HyPartnerUserChannelDO selectByChannel(@Param("channelId") Long channelId,@Param("channelName") String channelName);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.dto.partner.MobileCheckDTO;
|
|
||||||
import com.cool.store.entity.HyPartnerUserInfoDO;
|
|
||||||
import com.cool.store.entity.SyncEcCustomerDO;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @date 2023-05-29 03:53
|
|
||||||
*/
|
|
||||||
public interface HyPartnerUserInfoMapper {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认插入方法,只会给有值的字段赋值
|
|
||||||
* 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null
|
|
||||||
* dateTime:2023-05-29 03:53
|
|
||||||
*/
|
|
||||||
int insertSelective(@Param("record") HyPartnerUserInfoDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
|
||||||
* dateTime:2023-05-29 03:53
|
|
||||||
*/
|
|
||||||
int updateByPrimaryKeySelective(@Param("record") HyPartnerUserInfoDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据partnerID查询用户信息
|
|
||||||
* @param partnerId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
HyPartnerUserInfoDO selectByPartnerId(@Param("partnerId") String partnerId);
|
|
||||||
|
|
||||||
HyPartnerUserInfoDO selectByMobile(@Param("mobile") String mobile);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据partnerIDs批量查询用户信息
|
|
||||||
* @param partnerIdList
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<HyPartnerUserInfoDO> selectByPartnerIds(@Param("partnerIdList") List<String> partnerIdList);
|
|
||||||
|
|
||||||
int updateJoinKnowById(@Param("isWritePartnerKnow")Integer isWritePartnerKnow, @Param("id")Long id);
|
|
||||||
|
|
||||||
List<SyncEcCustomerDO> selectByHourDate(@Param("selectTime") String hourDayDate, @Param("now") String now,@Param("limit1")Integer limit1,@Param("limit2")Integer limit2);
|
|
||||||
|
|
||||||
int selectByHourDateCount(@Param("selectTime") String hourDayDate, @Param("now") String now);
|
|
||||||
|
|
||||||
int updateByPartnerId(@Param("record") HyPartnerUserInfoDO record);
|
|
||||||
|
|
||||||
String selectLastCrmCreateTime();
|
|
||||||
|
|
||||||
MobileCheckDTO selectByCheckMobile(@Param("mobile") String mobile);
|
|
||||||
}
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.entity.HyPartnerUserInfoDO;
|
|
||||||
import com.cool.store.entity.HyPartnerUserPlatformBindDO;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @date 2023-05-29 03:53
|
|
||||||
*/
|
|
||||||
public interface HyPartnerUserPlatformBindMapper {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认插入方法,只会给有值的字段赋值
|
|
||||||
* 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null
|
|
||||||
* dateTime:2023-05-29 03:53
|
|
||||||
*/
|
|
||||||
int insertSelective(@Param("record") HyPartnerUserPlatformBindDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
|
||||||
* dateTime:2023-05-29 03:53
|
|
||||||
*/
|
|
||||||
int updateByPrimaryKeySelective(@Param("record") HyPartnerUserPlatformBindDO record);
|
|
||||||
|
|
||||||
HyPartnerUserPlatformBindDO getByPlatformTypeAndUserId(@Param("platformType") String platformType, @Param("platformUserId") String platformUserId);
|
|
||||||
|
|
||||||
HyPartnerUserPlatformBindDO getByPartnerId(@Param("partnerId") String partnerId);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.entity.HyPhoneLocationDO;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @date 2023-06-30 02:47
|
|
||||||
*/
|
|
||||||
public interface HyPhoneLocationMapper {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认插入方法,只会给有值的字段赋值
|
|
||||||
* 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null
|
|
||||||
* dateTime:2023-06-30 02:47
|
|
||||||
*/
|
|
||||||
int insertSelective(@Param("record") HyPhoneLocationDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
|
||||||
* dateTime:2023-06-30 02:47
|
|
||||||
*/
|
|
||||||
int updateByPrimaryKeySelective(@Param("record") HyPhoneLocationDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询手机号
|
|
||||||
* @param phoneNumber
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
HyPhoneLocationDO selectByPhoneNumber(@Param("phoneNumber") String phoneNumber);
|
|
||||||
}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.entity.HyWorkflowStageDO;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @date 2023-05-29 03:53
|
|
||||||
*/
|
|
||||||
public interface HyWorkflowStageMapper {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认插入方法,只会给有值的字段赋值
|
|
||||||
* 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null
|
|
||||||
* dateTime:2023-05-29 03:53
|
|
||||||
*/
|
|
||||||
int insertSelective(@Param("record") HyWorkflowStageDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
|
||||||
* dateTime:2023-05-29 03:53
|
|
||||||
*/
|
|
||||||
int updateByPrimaryKeySelective(@Param("record") HyWorkflowStageDO record);
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.entity.MDMAreaDO;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface MdmAreaMapper {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取 MDM 省级地区数据
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<MDMAreaDO> getProvince();
|
|
||||||
|
|
||||||
List<MDMAreaDO> getSonArea(@Param("code") String code);
|
|
||||||
|
|
||||||
List<MDMAreaDO> getProvinceAllCode(@Param("code") String code);
|
|
||||||
|
|
||||||
List<MDMAreaDO> getArea(@Param("code") String code);
|
|
||||||
}
|
|
||||||
@@ -1,88 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.entity.RegionDO;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @date 2023-06-07 02:07
|
|
||||||
*/
|
|
||||||
public interface RegionMapper {
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
|
||||||
* dateTime:2023-06-07 02:07
|
|
||||||
*/
|
|
||||||
int updateByPrimaryKeySelective(RegionDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量新增或者更新
|
|
||||||
* @param insertOrUpdateList
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
int batchInsertOrUpdate(@Param("insertOrUpdateList") List<RegionDO> insertOrUpdateList);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除不存在的区域
|
|
||||||
* @param regionIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
int deleteNotExistRegion(@Param("regionIds")List<String> regionIds);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据regionIds获取region
|
|
||||||
* @param regionIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<RegionDO> getRegionByRegionIds(@Param("regionIds")List<String> regionIds);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据区域id获取名称
|
|
||||||
* @param regionIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<RegionDO> getRegionNameByRegionIds(@Param("regionIds")List<String> regionIds);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取区域基本信息
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<RegionDO> getRegionBaseInfoList();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取区域信息
|
|
||||||
* @param regionId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
RegionDO getRegionInfoByRegionId(@Param("regionId") String regionId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取区域的子节点个数
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Integer getSubNodeCountByRegionId(@Param("regionId") String regionId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除区域
|
|
||||||
* @param regionId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Integer deleteRegionByRegionId(@Param("regionId") String regionId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取子节点
|
|
||||||
* @param regionPathList
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<String> getSubRegionIds(@Param("regionPathList") List<String> regionPathList);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取子部门
|
|
||||||
* @param regionId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<RegionDO> getSubRegion(@Param("regionId") String regionId);
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.entity.SuperAdminConfigDO;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
import tk.mybatis.mapper.common.Mapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @date 2023-11-09 02:24
|
|
||||||
*/
|
|
||||||
public interface SuperAdminConfigMapper {
|
|
||||||
|
|
||||||
SuperAdminConfigDO selectByPrimaryKey(Long id);
|
|
||||||
|
|
||||||
SuperAdminConfigDO isSuperAdmin(@Param("userId") String userId);
|
|
||||||
}
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.entity.SysMenuDO;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @date 2023-06-08 04:38
|
|
||||||
*/
|
|
||||||
public interface SysMenuMapper {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认插入方法,只会给有值的字段赋值
|
|
||||||
* 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null
|
|
||||||
* dateTime:2023-06-08 04:38
|
|
||||||
*/
|
|
||||||
int insertSelective(SysMenuDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
|
||||||
* dateTime:2023-06-08 04:38
|
|
||||||
*/
|
|
||||||
int batchUpdateMenu(@Param("recordList") List<SysMenuDO> recordList);
|
|
||||||
|
|
||||||
List<SysMenuDO> selectMenuAll(@Param("list") List<Long> parentIds);
|
|
||||||
|
|
||||||
Integer selectMaxSort();
|
|
||||||
|
|
||||||
Integer batchDeleteMenu(@Param("list") List<Long> idList);
|
|
||||||
}
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.entity.SysRoleDO;
|
|
||||||
import com.github.pagehelper.Page;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @date 2023-06-08 10:54
|
|
||||||
*/
|
|
||||||
public interface SysRoleMapper {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认插入方法,只会给有值的字段赋值
|
|
||||||
* 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null
|
|
||||||
* dateTime:2023-06-08 10:54
|
|
||||||
*/
|
|
||||||
int batchInsertSelective(@Param("insertOrUpdateList") List<SysRoleDO> insertOrUpdateList);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
|
||||||
* dateTime:2023-06-08 10:54
|
|
||||||
*/
|
|
||||||
int updateByPrimaryKeySelective(SysRoleDO record);
|
|
||||||
|
|
||||||
Integer deleteRole(@Param("roleType")Integer roleType, @Param("roleIds") List<String> roleIds);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取用户权限
|
|
||||||
* @param userId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
SysRoleDO getHighestPriorityRoleByUserId(@Param("userId") String userId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取角色
|
|
||||||
* @param roleName
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
SysRoleDO getRoleByName(@Param("roleName") String roleName, @Param("roleType")Integer roleType);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 角色分页
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Page<SysRoleDO> getRolePage();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取角色详情
|
|
||||||
* @param roleId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
SysRoleDO getRoleDetail(@Param("roleId") String roleId);
|
|
||||||
}
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.entity.SysRoleMenuDO;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @date 2023-05-19 03:01
|
|
||||||
*/
|
|
||||||
public interface SysRoleMenuMapper {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认插入方法,只会给有值的字段赋值
|
|
||||||
* 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null
|
|
||||||
* dateTime:2023-05-19 03:01
|
|
||||||
*/
|
|
||||||
int batchInsert(@Param("recordList") List<SysRoleMenuDO> recordList);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
|
||||||
* dateTime:2023-05-19 03:01
|
|
||||||
*/
|
|
||||||
int updateByPrimaryKeySelective(@Param("record") SysRoleMenuDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据角色获取菜单
|
|
||||||
* @param roleId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<SysRoleMenuDO> getRoleMenuByRoleId(@Param("roleId")String roleId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除角色权限
|
|
||||||
* @param roleId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Integer deleteRoleAuth(@Param("roleId")String roleId);
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface TRTCVideoCallBackMapper {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 在面试信息表中添加面试录制视频链接
|
|
||||||
* @param roomId
|
|
||||||
* @param videoUrl
|
|
||||||
*/
|
|
||||||
void addVideoUrl(@Param("roomId") String roomId, @Param("videoUrl") String videoUrl);
|
|
||||||
}
|
|
||||||
@@ -1,87 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.entity.UserRegionMappingDO;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhangchenbiao
|
|
||||||
* @date 2023-06-07 02:07
|
|
||||||
*/
|
|
||||||
public interface UserRegionMappingMapper {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认插入方法,只会给有值的字段赋值
|
|
||||||
* 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null
|
|
||||||
* dateTime:2023-06-07 02:07
|
|
||||||
*/
|
|
||||||
int batchInsertOrUpdateUserRegion(@Param("insertOrUpdateList") List<UserRegionMappingDO> insertOrUpdateList);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
|
||||||
* dateTime:2023-06-07 02:07
|
|
||||||
*/
|
|
||||||
int updateByPrimaryKeySelective(UserRegionMappingDO record);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除用户区域
|
|
||||||
* @param regionId
|
|
||||||
* @param type
|
|
||||||
* @param excludeUserIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
int deleteUserRegion(@Param("regionId") String regionId, @Param("type")Integer type, @Param("excludeUserIds") List<String> excludeUserIds);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除用户不存在的部门
|
|
||||||
* @param userId
|
|
||||||
* @param type
|
|
||||||
* @param excludeRegionIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
int deleteUserRegionByExcludeRegionIds(@Param("userId") String userId, @Param("type")Integer type, @Param("excludeRegionIds") List<String> excludeRegionIds);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除没有的部门映射关系
|
|
||||||
* @param excludeRegionIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Integer deleteRegionUserByExcludeRegionIds(@Param("excludeRegionIds") List<String> excludeRegionIds);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除用户不在的区域
|
|
||||||
* @param excludeUserIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Integer deleteRegionUserByExcludeUserIds(@Param("excludeUserIds") List<String> excludeUserIds);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除用户所在的区域
|
|
||||||
* @param userId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Integer deleteUserRegionByUserId(@Param("userId") String userId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取一个区域下是直挂的人
|
|
||||||
* @param regionId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<String> getUserListByRegionId(@Param("regionId") String regionId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取人所在的区域
|
|
||||||
* @param userId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<String> getRegionIdsByUserId(@Param("userId") String userId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取用户列表
|
|
||||||
* @param regionIds
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<String> getUserListByRegionIds(@Param("regionIds") List<String> regionIds);
|
|
||||||
}
|
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.cool.store.mapper.BeautyCameraSettingMapper">
|
|
||||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.BeautyCameraSettingDO">
|
|
||||||
<id column="id" jdbcType="BIGINT" property="id"/>
|
|
||||||
<result column="user_id" jdbcType="VARCHAR" property="userId"/>
|
|
||||||
<result column="beauty" jdbcType="INTEGER" property="beauty"/>
|
|
||||||
<result column="brightness" jdbcType="INTEGER" property="brightness"/>
|
|
||||||
<result column="ruddy" jdbcType="INTEGER" property="ruddy"/>
|
|
||||||
<result column="deleted" jdbcType="BIT" property="deleted"/>
|
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
|
||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
|
||||||
</resultMap>
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
id, user_id, beauty, brightness, ruddy, deleted, create_time, update_time
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<insert id="insertOrUpdateBeautyCameraSetting" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
|
|
||||||
insert into beauty_camera_setting
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="record.userId != null">
|
|
||||||
user_id,
|
|
||||||
</if>
|
|
||||||
<if test="record.beauty != null">
|
|
||||||
beauty,
|
|
||||||
</if>
|
|
||||||
<if test="record.brightness != null">
|
|
||||||
brightness,
|
|
||||||
</if>
|
|
||||||
<if test="record.ruddy != null">
|
|
||||||
ruddy,
|
|
||||||
</if>
|
|
||||||
<if test="record.deleted != null">
|
|
||||||
deleted,
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
create_time,
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
update_time,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="record.userId != null">
|
|
||||||
#{record.userId},
|
|
||||||
</if>
|
|
||||||
<if test="record.beauty != null">
|
|
||||||
#{record.beauty},
|
|
||||||
</if>
|
|
||||||
<if test="record.brightness != null">
|
|
||||||
#{record.brightness},
|
|
||||||
</if>
|
|
||||||
<if test="record.ruddy != null">
|
|
||||||
#{record.ruddy},
|
|
||||||
</if>
|
|
||||||
<if test="record.deleted != null">
|
|
||||||
#{record.deleted},
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
#{record.createTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
#{record.updateTime},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
ON DUPLICATE KEY UPDATE beauty = values(beauty), brightness = values(brightness), ruddy = values(ruddy)
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
<select id="getBeautyCameraSetting" resultMap="BaseResultMap">
|
|
||||||
select <include refid="Base_Column_List"/> from beauty_camera_setting where user_id = #{userId} and deleted = 0
|
|
||||||
</select>
|
|
||||||
</mapper>
|
|
||||||
@@ -1,251 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.cool.store.mapper.CallRecordMapper">
|
|
||||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.CallRecordDO">
|
|
||||||
<id column="id" jdbcType="BIGINT" property="id" />
|
|
||||||
<result column="partner_line_id" jdbcType="BIGINT" property="partnerLineId" />
|
|
||||||
<result column="trans_no" jdbcType="VARCHAR" property="transNo" />
|
|
||||||
<result column="outgoing_mobile" jdbcType="VARCHAR" property="outgoingMobile" />
|
|
||||||
<result column="outgoing_user_id" jdbcType="VARCHAR" property="outgoingUserId" />
|
|
||||||
<result column="incoming_mobile" jdbcType="VARCHAR" property="incomingMobile" />
|
|
||||||
<result column="incoming_user_id" jdbcType="VARCHAR" property="incomingUserId" />
|
|
||||||
<result column="call_start_time" jdbcType="TIMESTAMP" property="callStartTime" />
|
|
||||||
<result column="call_end_time" jdbcType="TIMESTAMP" property="callEndTime" />
|
|
||||||
<result column="record_url" jdbcType="VARCHAR" property="recordUrl" />
|
|
||||||
<result column="call_status" jdbcType="TINYINT" property="callStatus" />
|
|
||||||
<result column="fail_reason" jdbcType="VARCHAR" property="failReason" />
|
|
||||||
<result column="creater" jdbcType="VARCHAR" property="creater" />
|
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
||||||
<result column="updater" jdbcType="VARCHAR" property="updater" />
|
|
||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
||||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
|
||||||
</resultMap>
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
id, partner_line_id, trans_no, outgoing_mobile, outgoing_user_id, incoming_mobile,
|
|
||||||
incoming_user_id, call_start_time, call_end_time, record_url, call_status, fail_reason,
|
|
||||||
creater, create_time, updater, update_time, remark
|
|
||||||
</sql>
|
|
||||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" useGeneratedKeys="true">
|
|
||||||
insert into call_record
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="partnerLineId != null">
|
|
||||||
partner_line_id,
|
|
||||||
</if>
|
|
||||||
<if test="transNo != null">
|
|
||||||
trans_no,
|
|
||||||
</if>
|
|
||||||
<if test="outgoingMobile != null">
|
|
||||||
outgoing_mobile,
|
|
||||||
</if>
|
|
||||||
<if test="outgoingUserId != null">
|
|
||||||
outgoing_user_id,
|
|
||||||
</if>
|
|
||||||
<if test="incomingMobile != null">
|
|
||||||
incoming_mobile,
|
|
||||||
</if>
|
|
||||||
<if test="incomingUserId != null">
|
|
||||||
incoming_user_id,
|
|
||||||
</if>
|
|
||||||
<if test="callStartTime != null">
|
|
||||||
call_start_time,
|
|
||||||
</if>
|
|
||||||
<if test="callEndTime != null">
|
|
||||||
call_end_time,
|
|
||||||
</if>
|
|
||||||
<if test="recordUrl != null">
|
|
||||||
record_url,
|
|
||||||
</if>
|
|
||||||
<if test="callStatus != null">
|
|
||||||
call_status,
|
|
||||||
</if>
|
|
||||||
<if test="failReason != null">
|
|
||||||
fail_reason,
|
|
||||||
</if>
|
|
||||||
<if test="creater != null">
|
|
||||||
creater,
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
create_time,
|
|
||||||
</if>
|
|
||||||
<if test="updater != null">
|
|
||||||
updater,
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
update_time,
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
remark,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="partnerLineId != null">
|
|
||||||
#{partnerLineId},
|
|
||||||
</if>
|
|
||||||
<if test="transNo != null">
|
|
||||||
#{transNo},
|
|
||||||
</if>
|
|
||||||
<if test="outgoingMobile != null">
|
|
||||||
#{outgoingMobile},
|
|
||||||
</if>
|
|
||||||
<if test="outgoingUserId != null">
|
|
||||||
#{outgoingUserId},
|
|
||||||
</if>
|
|
||||||
<if test="incomingMobile != null">
|
|
||||||
#{incomingMobile},
|
|
||||||
</if>
|
|
||||||
<if test="incomingUserId != null">
|
|
||||||
#{incomingUserId},
|
|
||||||
</if>
|
|
||||||
<if test="callStartTime != null">
|
|
||||||
#{callStartTime},
|
|
||||||
</if>
|
|
||||||
<if test="callEndTime != null">
|
|
||||||
#{callEndTime},
|
|
||||||
</if>
|
|
||||||
<if test="recordUrl != null">
|
|
||||||
#{recordUrl},
|
|
||||||
</if>
|
|
||||||
<if test="callStatus != null">
|
|
||||||
#{callStatus},
|
|
||||||
</if>
|
|
||||||
<if test="failReason != null">
|
|
||||||
#{failReason},
|
|
||||||
</if>
|
|
||||||
<if test="creater != null">
|
|
||||||
#{creater},
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
#{createTime},
|
|
||||||
</if>
|
|
||||||
<if test="updater != null">
|
|
||||||
#{updater},
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
#{updateTime},
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
#{remark},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
<update id="updateByPrimaryKeySelective">
|
|
||||||
update call_record
|
|
||||||
<set>
|
|
||||||
<if test="partnerLineId != null">
|
|
||||||
partner_line_id = #{partnerLineId},
|
|
||||||
</if>
|
|
||||||
<if test="transNo != null">
|
|
||||||
trans_no = #{transNo},
|
|
||||||
</if>
|
|
||||||
<if test="outgoingMobile != null">
|
|
||||||
outgoing_mobile = #{outgoingMobile},
|
|
||||||
</if>
|
|
||||||
<if test="outgoingUserId != null">
|
|
||||||
outgoing_user_id = #{outgoingUserId},
|
|
||||||
</if>
|
|
||||||
<if test="incomingMobile != null">
|
|
||||||
incoming_mobile = #{incomingMobile},
|
|
||||||
</if>
|
|
||||||
<if test="incomingUserId != null">
|
|
||||||
incoming_user_id = #{incomingUserId},
|
|
||||||
</if>
|
|
||||||
<if test="callStartTime != null">
|
|
||||||
call_start_time = #{callStartTime},
|
|
||||||
</if>
|
|
||||||
<if test="callEndTime != null">
|
|
||||||
call_end_time = #{callEndTime},
|
|
||||||
</if>
|
|
||||||
<if test="recordUrl != null">
|
|
||||||
record_url = #{recordUrl},
|
|
||||||
</if>
|
|
||||||
<if test="callStatus != null">
|
|
||||||
call_status = #{callStatus},
|
|
||||||
</if>
|
|
||||||
<if test="failReason != null">
|
|
||||||
fail_reason = #{failReason},
|
|
||||||
</if>
|
|
||||||
<if test="creater != null">
|
|
||||||
creater = #{creater},
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
create_time = #{createTime},
|
|
||||||
</if>
|
|
||||||
<if test="updater != null">
|
|
||||||
updater = #{updater},
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
update_time = #{updateTime},
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
remark = #{remark},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
<update id="updateByTransNoSelective">
|
|
||||||
update call_record
|
|
||||||
<set>
|
|
||||||
<if test="partnerLineId != null">
|
|
||||||
partner_line_id = #{partnerLineId},
|
|
||||||
</if>
|
|
||||||
<if test="outgoingMobile != null">
|
|
||||||
outgoing_mobile = #{outgoingMobile},
|
|
||||||
</if>
|
|
||||||
<if test="outgoingUserId != null">
|
|
||||||
outgoing_user_id = #{outgoingUserId},
|
|
||||||
</if>
|
|
||||||
<if test="incomingMobile != null">
|
|
||||||
incoming_mobile = #{incomingMobile},
|
|
||||||
</if>
|
|
||||||
<if test="incomingUserId != null">
|
|
||||||
incoming_user_id = #{incomingUserId},
|
|
||||||
</if>
|
|
||||||
<if test="callStartTime != null">
|
|
||||||
call_start_time = #{callStartTime},
|
|
||||||
</if>
|
|
||||||
<if test="callEndTime != null">
|
|
||||||
call_end_time = #{callEndTime},
|
|
||||||
</if>
|
|
||||||
<if test="recordUrl != null">
|
|
||||||
record_url = #{recordUrl},
|
|
||||||
</if>
|
|
||||||
<if test="callStatus != null">
|
|
||||||
call_status = #{callStatus},
|
|
||||||
</if>
|
|
||||||
<if test="failReason != null">
|
|
||||||
fail_reason = #{failReason},
|
|
||||||
</if>
|
|
||||||
<if test="creater != null">
|
|
||||||
creater = #{creater},
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
create_time = #{createTime},
|
|
||||||
</if>
|
|
||||||
<if test="updater != null">
|
|
||||||
updater = #{updater},
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
update_time = #{updateTime},
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
remark = #{remark},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where trans_no = #{transNo}
|
|
||||||
</update>
|
|
||||||
<select id="selectByTransNo" resultType="com.cool.store.entity.CallRecordDO">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List" />
|
|
||||||
from call_record
|
|
||||||
where trans_no = #{transNo}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectByTransNos" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List" />
|
|
||||||
from
|
|
||||||
call_record
|
|
||||||
where
|
|
||||||
trans_no in <foreach collection="transNos" open="(" close=")" separator="," item="transNo">#{transNo}</foreach>
|
|
||||||
</select>
|
|
||||||
</mapper>
|
|
||||||
@@ -1,309 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.cool.store.mapper.DingdingUserMapper">
|
|
||||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.DingdingUserDO">
|
|
||||||
<id column="id" jdbcType="INTEGER" property="id" />
|
|
||||||
<result column="userid" jdbcType="VARCHAR" property="userid" />
|
|
||||||
<result column="unionid" jdbcType="VARCHAR" property="unionid" />
|
|
||||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
|
||||||
<result column="is_boss" jdbcType="TINYINT" property="isBoss" />
|
|
||||||
<result column="hired_date" jdbcType="VARCHAR" property="hiredDate" />
|
|
||||||
<result column="is_senior" jdbcType="TINYINT" property="isSenior" />
|
|
||||||
<result column="tel" jdbcType="VARCHAR" property="tel" />
|
|
||||||
<result column="work_place" jdbcType="VARCHAR" property="workPlace" />
|
|
||||||
<result column="email" jdbcType="VARCHAR" property="email" />
|
|
||||||
<result column="active" jdbcType="TINYINT" property="active" />
|
|
||||||
<result column="avatar" jdbcType="VARCHAR" property="avatar" />
|
|
||||||
<result column="is_admin" jdbcType="TINYINT" property="isAdmin" />
|
|
||||||
<result column="is_hide" jdbcType="TINYINT" property="isHide" />
|
|
||||||
<result column="job_number" jdbcType="VARCHAR" property="jobNumber" />
|
|
||||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
|
||||||
<result column="state_code" jdbcType="VARCHAR" property="stateCode" />
|
|
||||||
<result column="real_authed" jdbcType="TINYINT" property="realAuthed" />
|
|
||||||
<result column="db_update_timestamp" jdbcType="TIMESTAMP" property="dbUpdateTimestamp" />
|
|
||||||
<result column="position" jdbcType="VARCHAR" property="position" />
|
|
||||||
<result column="mobile" jdbcType="VARCHAR" property="mobile" />
|
|
||||||
<result column="check_status" jdbcType="TINYINT" property="checkStatus" />
|
|
||||||
<result column="job_status" jdbcType="TINYINT" property="jobStatus" />
|
|
||||||
<result column="config_code_id" jdbcType="INTEGER" property="configCodeId" />
|
|
||||||
</resultMap>
|
|
||||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.cool.store.entity.DingdingUserDO">
|
|
||||||
<result column="is_leader_in_depts" jdbcType="LONGVARCHAR" property="isLeaderInDepts" />
|
|
||||||
<result column="department" jdbcType="LONGVARCHAR" property="department" />
|
|
||||||
<result column="extattr" jdbcType="LONGVARCHAR" property="extattr" />
|
|
||||||
<result column="roles" jdbcType="LONGVARCHAR" property="roles" />
|
|
||||||
</resultMap>
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
id, userid, unionid, remark, is_boss, hired_date, is_senior, tel, work_place, email,
|
|
||||||
active, avatar, is_admin, is_hide, job_number, name, state_code, real_authed, db_update_timestamp,
|
|
||||||
position, mobile, check_status, job_status, config_code_id
|
|
||||||
</sql>
|
|
||||||
<sql id="Blob_Column_List">
|
|
||||||
is_leader_in_depts, department, extattr, roles
|
|
||||||
</sql>
|
|
||||||
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
|
|
||||||
insert into dingding_user
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="userid != null">
|
|
||||||
userid,
|
|
||||||
</if>
|
|
||||||
<if test="unionid != null">
|
|
||||||
unionid,
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
remark,
|
|
||||||
</if>
|
|
||||||
<if test="isBoss != null">
|
|
||||||
is_boss,
|
|
||||||
</if>
|
|
||||||
<if test="hiredDate != null">
|
|
||||||
hired_date,
|
|
||||||
</if>
|
|
||||||
<if test="isSenior != null">
|
|
||||||
is_senior,
|
|
||||||
</if>
|
|
||||||
<if test="tel != null">
|
|
||||||
tel,
|
|
||||||
</if>
|
|
||||||
<if test="workPlace != null">
|
|
||||||
work_place,
|
|
||||||
</if>
|
|
||||||
<if test="email != null">
|
|
||||||
email,
|
|
||||||
</if>
|
|
||||||
<if test="active != null">
|
|
||||||
active,
|
|
||||||
</if>
|
|
||||||
<if test="avatar != null">
|
|
||||||
avatar,
|
|
||||||
</if>
|
|
||||||
<if test="isAdmin != null">
|
|
||||||
is_admin,
|
|
||||||
</if>
|
|
||||||
<if test="isHide != null">
|
|
||||||
is_hide,
|
|
||||||
</if>
|
|
||||||
<if test="jobNumber != null">
|
|
||||||
job_number,
|
|
||||||
</if>
|
|
||||||
<if test="name != null">
|
|
||||||
name,
|
|
||||||
</if>
|
|
||||||
<if test="stateCode != null">
|
|
||||||
state_code,
|
|
||||||
</if>
|
|
||||||
<if test="realAuthed != null">
|
|
||||||
real_authed,
|
|
||||||
</if>
|
|
||||||
<if test="dbUpdateTimestamp != null">
|
|
||||||
db_update_timestamp,
|
|
||||||
</if>
|
|
||||||
<if test="position != null">
|
|
||||||
position,
|
|
||||||
</if>
|
|
||||||
<if test="mobile != null">
|
|
||||||
mobile,
|
|
||||||
</if>
|
|
||||||
<if test="checkStatus != null">
|
|
||||||
check_status,
|
|
||||||
</if>
|
|
||||||
<if test="jobStatus != null">
|
|
||||||
job_status,
|
|
||||||
</if>
|
|
||||||
<if test="configCodeId != null">
|
|
||||||
config_code_id,
|
|
||||||
</if>
|
|
||||||
<if test="isLeaderInDepts != null">
|
|
||||||
is_leader_in_depts,
|
|
||||||
</if>
|
|
||||||
<if test="department != null">
|
|
||||||
department,
|
|
||||||
</if>
|
|
||||||
<if test="extattr != null">
|
|
||||||
extattr,
|
|
||||||
</if>
|
|
||||||
<if test="roles != null">
|
|
||||||
roles,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="userid != null">
|
|
||||||
#{userid},
|
|
||||||
</if>
|
|
||||||
<if test="unionid != null">
|
|
||||||
#{unionid},
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
#{remark},
|
|
||||||
</if>
|
|
||||||
<if test="isBoss != null">
|
|
||||||
#{isBoss},
|
|
||||||
</if>
|
|
||||||
<if test="hiredDate != null">
|
|
||||||
#{hiredDate},
|
|
||||||
</if>
|
|
||||||
<if test="isSenior != null">
|
|
||||||
#{isSenior},
|
|
||||||
</if>
|
|
||||||
<if test="tel != null">
|
|
||||||
#{tel},
|
|
||||||
</if>
|
|
||||||
<if test="workPlace != null">
|
|
||||||
#{workPlace},
|
|
||||||
</if>
|
|
||||||
<if test="email != null">
|
|
||||||
#{email},
|
|
||||||
</if>
|
|
||||||
<if test="active != null">
|
|
||||||
#{active},
|
|
||||||
</if>
|
|
||||||
<if test="avatar != null">
|
|
||||||
#{avatar},
|
|
||||||
</if>
|
|
||||||
<if test="isAdmin != null">
|
|
||||||
#{isAdmin},
|
|
||||||
</if>
|
|
||||||
<if test="isHide != null">
|
|
||||||
#{isHide},
|
|
||||||
</if>
|
|
||||||
<if test="jobNumber != null">
|
|
||||||
#{jobNumber},
|
|
||||||
</if>
|
|
||||||
<if test="name != null">
|
|
||||||
#{name},
|
|
||||||
</if>
|
|
||||||
<if test="stateCode != null">
|
|
||||||
#{stateCode},
|
|
||||||
</if>
|
|
||||||
<if test="realAuthed != null">
|
|
||||||
#{realAuthed},
|
|
||||||
</if>
|
|
||||||
<if test="dbUpdateTimestamp != null">
|
|
||||||
#{dbUpdateTimestamp},
|
|
||||||
</if>
|
|
||||||
<if test="position != null">
|
|
||||||
#{position},
|
|
||||||
</if>
|
|
||||||
<if test="mobile != null">
|
|
||||||
#{mobile},
|
|
||||||
</if>
|
|
||||||
<if test="checkStatus != null">
|
|
||||||
#{checkStatus},
|
|
||||||
</if>
|
|
||||||
<if test="jobStatus != null">
|
|
||||||
#{jobStatus},
|
|
||||||
</if>
|
|
||||||
<if test="configCodeId != null">
|
|
||||||
#{configCodeId},
|
|
||||||
</if>
|
|
||||||
<if test="isLeaderInDepts != null">
|
|
||||||
#{isLeaderInDepts},
|
|
||||||
</if>
|
|
||||||
<if test="department != null">
|
|
||||||
#{department},
|
|
||||||
</if>
|
|
||||||
<if test="extattr != null">
|
|
||||||
#{extattr},
|
|
||||||
</if>
|
|
||||||
<if test="roles != null">
|
|
||||||
#{roles},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
<update id="updateByPrimaryKeySelective">
|
|
||||||
update dingding_user
|
|
||||||
<set>
|
|
||||||
<if test="userid != null">
|
|
||||||
userid = #{userid},
|
|
||||||
</if>
|
|
||||||
<if test="unionid != null">
|
|
||||||
unionid = #{unionid},
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
remark = #{remark},
|
|
||||||
</if>
|
|
||||||
<if test="isBoss != null">
|
|
||||||
is_boss = #{isBoss},
|
|
||||||
</if>
|
|
||||||
<if test="hiredDate != null">
|
|
||||||
hired_date = #{hiredDate},
|
|
||||||
</if>
|
|
||||||
<if test="isSenior != null">
|
|
||||||
is_senior = #{isSenior},
|
|
||||||
</if>
|
|
||||||
<if test="tel != null">
|
|
||||||
tel = #{tel},
|
|
||||||
</if>
|
|
||||||
<if test="workPlace != null">
|
|
||||||
work_place = #{workPlace},
|
|
||||||
</if>
|
|
||||||
<if test="email != null">
|
|
||||||
email = #{email},
|
|
||||||
</if>
|
|
||||||
<if test="active != null">
|
|
||||||
active = #{active},
|
|
||||||
</if>
|
|
||||||
<if test="avatar != null">
|
|
||||||
avatar = #{avatar},
|
|
||||||
</if>
|
|
||||||
<if test="isAdmin != null">
|
|
||||||
is_admin = #{isAdmin},
|
|
||||||
</if>
|
|
||||||
<if test="isHide != null">
|
|
||||||
is_hide = #{isHide},
|
|
||||||
</if>
|
|
||||||
<if test="jobNumber != null">
|
|
||||||
job_number = #{jobNumber},
|
|
||||||
</if>
|
|
||||||
<if test="name != null">
|
|
||||||
name = #{name},
|
|
||||||
</if>
|
|
||||||
<if test="stateCode != null">
|
|
||||||
state_code = #{stateCode},
|
|
||||||
</if>
|
|
||||||
<if test="realAuthed != null">
|
|
||||||
real_authed = #{realAuthed},
|
|
||||||
</if>
|
|
||||||
<if test="dbUpdateTimestamp != null">
|
|
||||||
db_update_timestamp = #{dbUpdateTimestamp},
|
|
||||||
</if>
|
|
||||||
<if test="position != null">
|
|
||||||
position = #{position},
|
|
||||||
</if>
|
|
||||||
<if test="mobile != null">
|
|
||||||
mobile = #{mobile},
|
|
||||||
</if>
|
|
||||||
<if test="checkStatus != null">
|
|
||||||
check_status = #{checkStatus},
|
|
||||||
</if>
|
|
||||||
<if test="jobStatus != null">
|
|
||||||
job_status = #{jobStatus},
|
|
||||||
</if>
|
|
||||||
<if test="configCodeId != null">
|
|
||||||
config_code_id = #{configCodeId},
|
|
||||||
</if>
|
|
||||||
<if test="isLeaderInDepts != null">
|
|
||||||
is_leader_in_depts = #{isLeaderInDepts},
|
|
||||||
</if>
|
|
||||||
<if test="department != null">
|
|
||||||
department = #{department},
|
|
||||||
</if>
|
|
||||||
<if test="extattr != null">
|
|
||||||
extattr = #{extattr},
|
|
||||||
</if>
|
|
||||||
<if test="roles != null">
|
|
||||||
roles = #{roles},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
<select id="selectDingDingUserByMobile" resultType="com.cool.store.entity.DingdingUserDO">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"/>,
|
|
||||||
<include refid="Blob_Column_List"/>
|
|
||||||
from
|
|
||||||
dingding_user
|
|
||||||
where
|
|
||||||
mobile = #{mobile}
|
|
||||||
</select>
|
|
||||||
</mapper>
|
|
||||||
@@ -1,353 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.cool.store.mapper.EnterpriseUserMapper">
|
|
||||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.EnterpriseUserDO">
|
|
||||||
<id column="id" jdbcType="VARCHAR" property="id"/>
|
|
||||||
<result column="user_id" jdbcType="VARCHAR" property="userId"/>
|
|
||||||
<result column="name" jdbcType="VARCHAR" property="name"/>
|
|
||||||
<result column="remark" jdbcType="VARCHAR" property="remark"/>
|
|
||||||
<result column="mobile" jdbcType="VARCHAR" property="mobile"/>
|
|
||||||
<result column="email" jdbcType="VARCHAR" property="email"/>
|
|
||||||
<result column="org_email" jdbcType="VARCHAR" property="orgEmail"/>
|
|
||||||
<result column="main_admin" jdbcType="BIT" property="mainAdmin"/>
|
|
||||||
<result column="is_admin" jdbcType="BIT" property="isAdmin"/>
|
|
||||||
<result column="unionid" jdbcType="VARCHAR" property="unionid"/>
|
|
||||||
<result column="avatar" jdbcType="VARCHAR" property="avatar"/>
|
|
||||||
<result column="jobnumber" jdbcType="VARCHAR" property="jobnumber"/>
|
|
||||||
<result column="is_leader" jdbcType="BIT" property="isLeader"/>
|
|
||||||
<result column="leader_dept_ids" jdbcType="VARCHAR" property="leaderDeptIds"/>
|
|
||||||
<result column="face_url" jdbcType="VARCHAR" property="faceUrl"/>
|
|
||||||
<result column="user_status" jdbcType="TINYINT" property="userStatus"/>
|
|
||||||
<result column="deleted" jdbcType="BIT" property="deleted"/>
|
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
|
||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
|
||||||
<result column="online_status" jdbcType="BIT" property="onlineStatus"/>
|
|
||||||
<result column="feishu_user_id" jdbcType="VARCHAR" property="feishuUserId"/>
|
|
||||||
</resultMap>
|
|
||||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.cool.store.entity.EnterpriseUserDO">
|
|
||||||
<result column="user_region_ids" jdbcType="LONGVARCHAR" property="userRegionIds"/>
|
|
||||||
</resultMap>
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
id, user_id, name, remark, mobile, email, org_email, main_admin, is_admin, unionid,
|
|
||||||
avatar, jobnumber, is_leader, leader_dept_ids, face_url, user_status, deleted, create_time,
|
|
||||||
update_time,online_status, feishu_user_id
|
|
||||||
</sql>
|
|
||||||
<sql id="Blob_Column_List">
|
|
||||||
user_region_ids
|
|
||||||
</sql>
|
|
||||||
<insert id="batchInsertOrUpdate">
|
|
||||||
<foreach collection="recordList" item="record" separator=";">
|
|
||||||
insert into enterprise_user
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="record.userId != null">
|
|
||||||
user_id,
|
|
||||||
</if>
|
|
||||||
<if test="record.feishuUserId != null">
|
|
||||||
feishu_user_id,
|
|
||||||
</if>
|
|
||||||
<if test="record.name != null">
|
|
||||||
name,
|
|
||||||
</if>
|
|
||||||
<if test="record.remark != null">
|
|
||||||
remark,
|
|
||||||
</if>
|
|
||||||
<if test="record.mobile != null">
|
|
||||||
mobile,
|
|
||||||
</if>
|
|
||||||
<if test="record.email != null">
|
|
||||||
email,
|
|
||||||
</if>
|
|
||||||
<if test="record.orgEmail != null">
|
|
||||||
org_email,
|
|
||||||
</if>
|
|
||||||
<if test="record.mainAdmin != null">
|
|
||||||
main_admin,
|
|
||||||
</if>
|
|
||||||
<if test="record.isAdmin != null">
|
|
||||||
is_admin,
|
|
||||||
</if>
|
|
||||||
<if test="record.unionid != null">
|
|
||||||
unionid,
|
|
||||||
</if>
|
|
||||||
<if test="record.avatar != null">
|
|
||||||
avatar,
|
|
||||||
</if>
|
|
||||||
<if test="record.jobnumber != null">
|
|
||||||
jobnumber,
|
|
||||||
</if>
|
|
||||||
<if test="record.isLeader != null">
|
|
||||||
is_leader,
|
|
||||||
</if>
|
|
||||||
<if test="record.leaderDeptIds != null">
|
|
||||||
leader_dept_ids,
|
|
||||||
</if>
|
|
||||||
<if test="record.faceUrl != null">
|
|
||||||
face_url,
|
|
||||||
</if>
|
|
||||||
<if test="record.userStatus != null">
|
|
||||||
user_status,
|
|
||||||
</if>
|
|
||||||
<if test="record.deleted != null">
|
|
||||||
deleted,
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
create_time,
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
update_time,
|
|
||||||
</if>
|
|
||||||
<if test="record.userRegionIds != null">
|
|
||||||
user_region_ids,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="record.userId != null">
|
|
||||||
#{record.userId},
|
|
||||||
</if>
|
|
||||||
<if test="record.feishuUserId != null">
|
|
||||||
#{record.feishuUserId},
|
|
||||||
</if>
|
|
||||||
<if test="record.name != null">
|
|
||||||
#{record.name},
|
|
||||||
</if>
|
|
||||||
<if test="record.remark != null">
|
|
||||||
#{record.remark},
|
|
||||||
</if>
|
|
||||||
<if test="record.mobile != null">
|
|
||||||
#{record.mobile},
|
|
||||||
</if>
|
|
||||||
<if test="record.email != null">
|
|
||||||
#{record.email},
|
|
||||||
</if>
|
|
||||||
<if test="record.orgEmail != null">
|
|
||||||
#{record.orgEmail},
|
|
||||||
</if>
|
|
||||||
<if test="record.mainAdmin != null">
|
|
||||||
#{record.mainAdmin},
|
|
||||||
</if>
|
|
||||||
<if test="record.isAdmin != null">
|
|
||||||
#{record.isAdmin},
|
|
||||||
</if>
|
|
||||||
<if test="record.unionid != null">
|
|
||||||
#{record.unionid},
|
|
||||||
</if>
|
|
||||||
<if test="record.avatar != null">
|
|
||||||
#{record.avatar},
|
|
||||||
</if>
|
|
||||||
<if test="record.jobnumber != null">
|
|
||||||
#{record.jobnumber},
|
|
||||||
</if>
|
|
||||||
<if test="record.isLeader != null">
|
|
||||||
#{record.isLeader},
|
|
||||||
</if>
|
|
||||||
<if test="record.leaderDeptIds != null">
|
|
||||||
#{record.leaderDeptIds},
|
|
||||||
</if>
|
|
||||||
<if test="record.faceUrl != null">
|
|
||||||
#{record.faceUrl},
|
|
||||||
</if>
|
|
||||||
<if test="record.userStatus != null">
|
|
||||||
#{record.userStatus},
|
|
||||||
</if>
|
|
||||||
<if test="record.deleted != null">
|
|
||||||
#{record.deleted},
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
#{record.createTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
#{record.updateTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.userRegionIds != null">
|
|
||||||
#{record.userRegionIds},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
ON DUPLICATE KEY UPDATE user_id = values(user_id), name = values(name), remark = values(remark), mobile = values(mobile), email = values(email), org_email = values(org_email)
|
|
||||||
, main_admin = values(main_admin), is_admin = values(is_admin), unionid = values(unionid), avatar = values(avatar), jobnumber = values(jobnumber)
|
|
||||||
, face_url = values(face_url), user_status = values(user_status), user_region_ids = values(user_region_ids), deleted = values(deleted), feishu_user_id = values(feishu_user_id)
|
|
||||||
<if test="record.isLeader != null">
|
|
||||||
, is_leader = values(is_leader)
|
|
||||||
</if>
|
|
||||||
<if test="record.leaderDeptIds != null">
|
|
||||||
, leader_dept_ids = values(leader_dept_ids)
|
|
||||||
</if>
|
|
||||||
</foreach>
|
|
||||||
</insert>
|
|
||||||
<update id="updateByPrimaryKeySelective">
|
|
||||||
update enterprise_user
|
|
||||||
<set>
|
|
||||||
<if test="userId != null">
|
|
||||||
user_id = #{userId},
|
|
||||||
</if>
|
|
||||||
<if test="feishuUserId != null">
|
|
||||||
feishu_user_id = #{feishuUserId},
|
|
||||||
</if>
|
|
||||||
<if test="name != null">
|
|
||||||
name = #{name},
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
remark = #{remark},
|
|
||||||
</if>
|
|
||||||
<if test="mobile != null">
|
|
||||||
mobile = #{mobile},
|
|
||||||
</if>
|
|
||||||
<if test="email != null">
|
|
||||||
email = #{email},
|
|
||||||
</if>
|
|
||||||
<if test="orgEmail != null">
|
|
||||||
org_email = #{orgEmail},
|
|
||||||
</if>
|
|
||||||
<if test="mainAdmin != null">
|
|
||||||
main_admin = #{mainAdmin},
|
|
||||||
</if>
|
|
||||||
<if test="isAdmin != null">
|
|
||||||
is_admin = #{isAdmin},
|
|
||||||
</if>
|
|
||||||
<if test="unionid != null">
|
|
||||||
unionid = #{unionid},
|
|
||||||
</if>
|
|
||||||
<if test="avatar != null">
|
|
||||||
avatar = #{avatar},
|
|
||||||
</if>
|
|
||||||
<if test="jobnumber != null">
|
|
||||||
jobnumber = #{jobnumber},
|
|
||||||
</if>
|
|
||||||
<if test="isLeader != null">
|
|
||||||
is_leader = #{isLeader},
|
|
||||||
</if>
|
|
||||||
<if test="record.leaderDeptIds != null">
|
|
||||||
leader_dept_ids = #{record.leaderDeptIds},
|
|
||||||
</if>
|
|
||||||
<if test="faceUrl != null">
|
|
||||||
face_url = #{faceUrl},
|
|
||||||
</if>
|
|
||||||
<if test="userStatus != null">
|
|
||||||
user_status = #{userStatus},
|
|
||||||
</if>
|
|
||||||
<if test="deleted != null">
|
|
||||||
deleted = #{deleted},
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
create_time = #{createTime},
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
update_time = #{updateTime},
|
|
||||||
</if>
|
|
||||||
<if test="userRegionIds != null">
|
|
||||||
user_region_ids = #{userRegionIds},
|
|
||||||
</if>
|
|
||||||
<if test="onlineStatus != null">
|
|
||||||
online_status = #{onlineStatus},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<select id="getUserInfoById" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"/>,
|
|
||||||
<include refid="Blob_Column_List"/>
|
|
||||||
from
|
|
||||||
enterprise_user
|
|
||||||
where
|
|
||||||
user_id = #{userId}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<update id="updateOnlineStatusByUserId">
|
|
||||||
update enterprise_user set online_status = #{onlineStatus} where user_id = #{userId}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<select id="getUserInfoByUserIds" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"/>,
|
|
||||||
<include refid="Blob_Column_List"/>
|
|
||||||
from
|
|
||||||
enterprise_user
|
|
||||||
<where>
|
|
||||||
<if test="userIdList !=null and userIdList.size>0">
|
|
||||||
<foreach collection="userIdList" item="userId" open="and user_id in (" close=")" separator=",">
|
|
||||||
#{userId}
|
|
||||||
</foreach>
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<update id="deleteUser">
|
|
||||||
update enterprise_user set deleted = 1 where user_id not in <foreach collection="excludeUserIds" open="(" close=")" separator="," item="userId">#{userId}</foreach>
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<update id="deleteUserByUserId">
|
|
||||||
update enterprise_user set deleted = 1 where user_id = #{userId}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<select id="searchUserByRegionIdsAndKeyword" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
user_id, name, mobile
|
|
||||||
from
|
|
||||||
enterprise_user
|
|
||||||
<where>
|
|
||||||
deleted = 0
|
|
||||||
and <foreach collection="regionIds" item="regionId" separator=" or " open="(" close=")">user_region_ids like concat('%', #{regionId}, '%')</foreach>
|
|
||||||
<if test="keyword != null">
|
|
||||||
and (name like concat("%", #{keyword}, "%") or mobile like concat("%", #{keyword}, "%"))
|
|
||||||
</if>
|
|
||||||
<if test="leaderRegionIds != null and leaderRegionIds.size()>0">
|
|
||||||
and <foreach collection="leaderRegionIds" item="regionId" separator=" or " open="(" close=")">user_region_ids like concat('%', #{regionId}, '%')</foreach>
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="getUserCountByRegionId" resultType="integer">
|
|
||||||
select count(1) from enterprise_user where deleted = 0 and user_region_ids like concat("%", #{regionId}, "%")
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="getUserListByDeptLeader" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"/>,
|
|
||||||
<include refid="Blob_Column_List"/>
|
|
||||||
from
|
|
||||||
enterprise_user
|
|
||||||
where
|
|
||||||
leader_dept_ids like concat("%", #{regionId}, "%") and deleted = 0
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="getUserListByDeptLeaders" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
user_id, name, mobile
|
|
||||||
from
|
|
||||||
enterprise_user
|
|
||||||
where
|
|
||||||
deleted = 0 and <foreach collection="regionIds" separator="or" open="(" close=")" item="regionId"> leader_dept_ids like concat("%", #{regionId}, "%") </foreach>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="getUserListByRegionIds" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
user_id, name, mobile
|
|
||||||
from
|
|
||||||
enterprise_user
|
|
||||||
where
|
|
||||||
deleted = 0 and online_status = 1 and is_leader = 0 and <foreach collection="regionIds" separator="or" open="(" close=")" item="regionId"> user_region_ids like concat("%", #{regionId}, "%") </foreach>
|
|
||||||
ORDER BY
|
|
||||||
CASE WHEN jobnumber='' OR jobnumber IS NULL THEN 1 ELSE 0 END,
|
|
||||||
SUBSTR(jobnumber,1,1),
|
|
||||||
CAST(SUBSTR(jobnumber,2) AS UNSIGNED) ASC
|
|
||||||
</select>
|
|
||||||
<select id="selectByMobile" resultMap="BaseResultMap">
|
|
||||||
SELECT <include refid="Base_Column_List"/> FROM enterprise_user WHERE mobile =#{mobile} and deleted=0 LIMIT 1
|
|
||||||
</select>
|
|
||||||
<select id="selectByInvestmentManager" resultMap="BaseResultMap">
|
|
||||||
SELECT
|
|
||||||
<include refid="Base_Column_List"/>
|
|
||||||
FROM enterprise_user WHERE ( mobile = #{investmentManager} or `name` = #{investmentManager} ) and deleted=0 LIMIT 1
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="getFeishuUserIdsByUserIds" resultMap="BaseResultMap">
|
|
||||||
SELECT feishu_user_id , user_id
|
|
||||||
FROM enterprise_user
|
|
||||||
WHERE user_id IN (
|
|
||||||
<foreach collection="userIdList" item="userId" separator=",">
|
|
||||||
#{userId}
|
|
||||||
</foreach>
|
|
||||||
)
|
|
||||||
</select>
|
|
||||||
</mapper>
|
|
||||||
@@ -1,98 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.cool.store.mapper.EnterpriseUserRoleMapper">
|
|
||||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.EnterpriseUserRoleDO">
|
|
||||||
<id column="id" jdbcType="INTEGER" property="id"/>
|
|
||||||
<result column="role_id" jdbcType="VARCHAR" property="roleId"/>
|
|
||||||
<result column="user_id" jdbcType="VARCHAR" property="userId"/>
|
|
||||||
<result column="type" jdbcType="INTEGER" property="type"/>
|
|
||||||
<result column="deleted" jdbcType="BIT" property="deleted"/>
|
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
|
||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
|
||||||
</resultMap>
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
id, role_id, user_id, type, deleted, create_time, update_time
|
|
||||||
</sql>
|
|
||||||
<insert id="batchInsertOrUpdate">
|
|
||||||
<foreach collection="recordList" separator=";" item="record">
|
|
||||||
insert into enterprise_user_role
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="record.roleId != null">
|
|
||||||
role_id,
|
|
||||||
</if>
|
|
||||||
<if test="record.userId != null">
|
|
||||||
user_id,
|
|
||||||
</if>
|
|
||||||
<if test="record.type != null">
|
|
||||||
type,
|
|
||||||
</if>
|
|
||||||
<if test="record.deleted != null">
|
|
||||||
deleted,
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
create_time,
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
update_time,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="record.roleId != null">
|
|
||||||
#{record.roleId},
|
|
||||||
</if>
|
|
||||||
<if test="record.userId != null">
|
|
||||||
#{record.userId},
|
|
||||||
</if>
|
|
||||||
<if test="record.type != null">
|
|
||||||
#{record.type},
|
|
||||||
</if>
|
|
||||||
<if test="record.deleted != null">
|
|
||||||
#{record.deleted},
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
#{record.createTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
#{record.updateTime},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
ON DUPLICATE KEY UPDATE deleted = values(deleted)
|
|
||||||
</foreach>
|
|
||||||
</insert>
|
|
||||||
<update id="updateByPrimaryKeySelective">
|
|
||||||
update enterprise_user_role
|
|
||||||
<set>
|
|
||||||
<if test="roleId != null">
|
|
||||||
role_id = #{roleId},
|
|
||||||
</if>
|
|
||||||
<if test="userId != null">
|
|
||||||
user_id = #{userId},
|
|
||||||
</if>
|
|
||||||
<if test="type != null">
|
|
||||||
type = #{type},
|
|
||||||
</if>
|
|
||||||
<if test="deleted != null">
|
|
||||||
deleted = #{deleted},
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
create_time = #{createTime},
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
update_time = #{updateTime},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<update id="deleteRoleInUser">
|
|
||||||
update enterprise_user_role set deleted = 1 where role_id = #{roleId} and type = #{type} and user_id not in <foreach collection="excludeUserIds" item="userId" separator="," open="(" close=")">#{userId}</foreach>
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<update id="deleteUserInRole">
|
|
||||||
update enterprise_user_role set deleted = 1 where role_id != #{excludeRoleId} and user_id = #{userId} and type = #{type}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<update id="deleteUserRole">
|
|
||||||
update enterprise_user_role set deleted = 1 where user_id = #{userId}
|
|
||||||
</update>
|
|
||||||
</mapper>
|
|
||||||
@@ -1,90 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.cool.store.mapper.HyAdvancedSettingMapper">
|
|
||||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyAdvancedSettingDO">
|
|
||||||
<id column="id" jdbcType="BIGINT" property="id" />
|
|
||||||
<result column="partner_url" jdbcType="VARCHAR" property="partnerUrl" />
|
|
||||||
<result column="allocation_roles" jdbcType="VARCHAR" property="allocationRoles" />
|
|
||||||
<result column="tencent_video_account" jdbcType="VARCHAR" property="tencentVideoAccount" />
|
|
||||||
<result column="tencent_video_key" jdbcType="VARCHAR" property="tencentVideoKey" />
|
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
||||||
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
|
|
||||||
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" />
|
|
||||||
</resultMap>
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
id, partner_url, allocation_roles, tencent_video_account, tencent_video_key, create_time,
|
|
||||||
update_time, create_user_id, update_user_id
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<select id="selectAdvanceSetting" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"></include>
|
|
||||||
from hy_advanced_setting
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
|
|
||||||
insert into hy_advanced_setting
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="record.partnerUrl != null">
|
|
||||||
partner_url,
|
|
||||||
</if>
|
|
||||||
<if test="record.allocationRoles != null">
|
|
||||||
allocation_roles,
|
|
||||||
</if>
|
|
||||||
<if test="record.tencentVideoAccount != null">
|
|
||||||
tencent_video_account,
|
|
||||||
</if>
|
|
||||||
<if test="record.tencentVideoKey != null">
|
|
||||||
tencent_video_key,
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
create_time,
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
update_time,
|
|
||||||
</if>
|
|
||||||
<if test="record.createUserId != null">
|
|
||||||
create_user_id,
|
|
||||||
</if>
|
|
||||||
<if test="record.updateUserId != null">
|
|
||||||
update_user_id,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="record.partnerUrl != null">
|
|
||||||
#{record.partnerUrl},
|
|
||||||
</if>
|
|
||||||
<if test="record.allocationRoles != null">
|
|
||||||
#{record.allocationRoles},
|
|
||||||
</if>
|
|
||||||
<if test="record.tencentVideoAccount != null">
|
|
||||||
#{record.tencentVideoAccount},
|
|
||||||
</if>
|
|
||||||
<if test="record.tencentVideoKey != null">
|
|
||||||
#{record.tencentVideoKey},
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
#{record.createTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
#{record.updateTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.createUserId != null">
|
|
||||||
#{record.createUserId},
|
|
||||||
</if>
|
|
||||||
<if test="record.updateUserId != null">
|
|
||||||
#{record.updateUserId},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
<update id="updateByPrimaryKeySelective">
|
|
||||||
update hy_advanced_setting
|
|
||||||
set
|
|
||||||
partner_url = #{record.partnerUrl},
|
|
||||||
tencent_video_account = #{record.tencentVideoAccount},
|
|
||||||
tencent_video_key = #{record.tencentVideoKey},
|
|
||||||
update_user_id = #{record.updateUserId}
|
|
||||||
where id = #{record.id}
|
|
||||||
</update>
|
|
||||||
</mapper>
|
|
||||||
@@ -1,229 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.cool.store.mapper.HyContentInfoMapper">
|
|
||||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyContentInfoDO">
|
|
||||||
<id column="id" jdbcType="BIGINT" property="id" />
|
|
||||||
<result column="content_title" jdbcType="VARCHAR" property="contentTitle" />
|
|
||||||
<result column="subject" jdbcType="VARCHAR" property="subject" />
|
|
||||||
<result column="content_type" jdbcType="VARCHAR" property="contentType" />
|
|
||||||
<result column="cover" jdbcType="VARCHAR" property="cover" />
|
|
||||||
<result column="status" jdbcType="TINYINT" property="status" />
|
|
||||||
<result column="deleted" jdbcType="TINYINT" property="deleted" />
|
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
||||||
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
|
|
||||||
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" />
|
|
||||||
</resultMap>
|
|
||||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.cool.store.entity.HyContentInfoDO">
|
|
||||||
<result column="content" jdbcType="LONGVARCHAR" property="content" />
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<resultMap id="HyContentInfoVOList" type="com.cool.store.vo.HyContentInfoVO">
|
|
||||||
<association property="updateUserName" column="update_user_id" select="getUpdateUserName"></association>
|
|
||||||
<association property="updateUserPhone" column="update_user_id" select="getUpdateUserPhone"></association>
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
id, content_title, `subject`, content_type, cover, content, `status`, deleted, create_time, update_time,
|
|
||||||
create_user_id, update_user_id
|
|
||||||
</sql>
|
|
||||||
<sql id="Blob_Column_List">
|
|
||||||
content
|
|
||||||
</sql>
|
|
||||||
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
|
|
||||||
insert into hy_content_info
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="record.contentTitle != null">
|
|
||||||
content_title,
|
|
||||||
</if>
|
|
||||||
<if test="record.subject != null">
|
|
||||||
subject,
|
|
||||||
</if>
|
|
||||||
<if test="record.contentType != null">
|
|
||||||
content_type,
|
|
||||||
</if>
|
|
||||||
<if test="record.cover != null">
|
|
||||||
cover,
|
|
||||||
</if>
|
|
||||||
<if test="record.status != null">
|
|
||||||
status,
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
create_time,
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
update_time,
|
|
||||||
</if>
|
|
||||||
<if test="record.createUserId != null">
|
|
||||||
create_user_id,
|
|
||||||
</if>
|
|
||||||
<if test="record.updateUserId != null">
|
|
||||||
update_user_id,
|
|
||||||
</if>
|
|
||||||
<if test="record.content != null">
|
|
||||||
content,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="record.contentTitle != null">
|
|
||||||
#{record.contentTitle},
|
|
||||||
</if>
|
|
||||||
<if test="record.subject != null">
|
|
||||||
#{record.subject},
|
|
||||||
</if>
|
|
||||||
<if test="record.contentType != null">
|
|
||||||
#{record.contentType},
|
|
||||||
</if>
|
|
||||||
<if test="record.cover != null">
|
|
||||||
#{record.cover},
|
|
||||||
</if>
|
|
||||||
<if test="record.status != null">
|
|
||||||
#{record.status},
|
|
||||||
</if>
|
|
||||||
<if test="record.deleted != null">
|
|
||||||
#{record.deleted},
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
#{record.createTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
#{record.updateTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.createUserId != null">
|
|
||||||
#{record.createUserId},
|
|
||||||
</if>
|
|
||||||
<if test="record.updateUserId != null">
|
|
||||||
#{record.updateUserId},
|
|
||||||
</if>
|
|
||||||
<if test="record.content != null">
|
|
||||||
#{record.content},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
<update id="updateByPrimaryKeySelective">
|
|
||||||
update hy_content_info
|
|
||||||
<set>
|
|
||||||
<if test="record.contentTitle != null and record.contentTitle != ''">
|
|
||||||
content_title = #{record.contentTitle},
|
|
||||||
</if>
|
|
||||||
<if test="record.subject != null">
|
|
||||||
subject = #{record.subject},
|
|
||||||
</if>
|
|
||||||
<if test="record.contentType != null">
|
|
||||||
content_type = #{record.contentType},
|
|
||||||
</if>
|
|
||||||
<if test="record.cover != null and record.cover != ''">
|
|
||||||
cover = #{record.cover},
|
|
||||||
</if>
|
|
||||||
<if test="record.status != null and record.status != null">
|
|
||||||
status = #{record.status},
|
|
||||||
</if>
|
|
||||||
<if test="record.deleted != null and record.deleted != ''">
|
|
||||||
deleted = #{record.deleted},
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null and record.createTime != ''">
|
|
||||||
create_time = #{record.createTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null and record.updateTime != ''">
|
|
||||||
update_time = #{record.updateTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.createUserId != null and record.createUserId != ''">
|
|
||||||
create_user_id = #{record.createUserId},
|
|
||||||
</if>
|
|
||||||
<if test="record.updateUserId != null and record.updateUserId != ''">
|
|
||||||
update_user_id = #{record.updateUserId},
|
|
||||||
</if>
|
|
||||||
<if test="record.content != null and record.content != ''">
|
|
||||||
content = #{record.content},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where id = #{record.id}
|
|
||||||
</update>
|
|
||||||
<update id="deleteSelective">
|
|
||||||
update hy_content_info
|
|
||||||
<set>
|
|
||||||
deleted = 1
|
|
||||||
</set>
|
|
||||||
where id = #{contentId}
|
|
||||||
</update>
|
|
||||||
<select id="queryContentList" resultMap="HyContentInfoVOList">
|
|
||||||
select <include refid="Base_Column_List"></include>, update_user_id updateUserId
|
|
||||||
from hy_content_info
|
|
||||||
where deleted = 0
|
|
||||||
<if test="contentTitle != null and contentTitle != ''">
|
|
||||||
and content_title like concat('%', #{contentTitle}, '%')
|
|
||||||
</if>
|
|
||||||
<if test="subject != null">
|
|
||||||
and subject = #{subject}
|
|
||||||
</if>
|
|
||||||
<if test="contentType != null">
|
|
||||||
and content_type = #{contentType}
|
|
||||||
</if>
|
|
||||||
<if test="startTime != null and startTime != ''">
|
|
||||||
and update_time >= #{startTime}
|
|
||||||
</if>
|
|
||||||
<if test="endTime != null and endTime != ''">
|
|
||||||
and update_time <= #{endTime}
|
|
||||||
</if>
|
|
||||||
order by update_time desc
|
|
||||||
</select>
|
|
||||||
<select id="getUpdateUserName" resultType="string">
|
|
||||||
select name
|
|
||||||
from enterprise_user
|
|
||||||
where deleted = 0
|
|
||||||
and user_id = #{updateUserId}
|
|
||||||
</select>
|
|
||||||
<select id="getUpdateUserPhone" resultType="string">
|
|
||||||
select mobile
|
|
||||||
from enterprise_user
|
|
||||||
where deleted = 0
|
|
||||||
and user_id = #{updateUserId}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- C 端使用的动态查询 -->
|
|
||||||
<select id="queryContentListForC" resultType="com.cool.store.vo.HyContentInfoVO">
|
|
||||||
select <include refid="Base_Column_List"></include>
|
|
||||||
from hy_content_info
|
|
||||||
where deleted = 0
|
|
||||||
and status = 0
|
|
||||||
<if test="contentTitle != null and contentTitle != ''">
|
|
||||||
and content_title like concat('%', #{contentTitle}, '%')
|
|
||||||
</if>
|
|
||||||
<if test="subject != null">
|
|
||||||
and subject = #{subject}
|
|
||||||
</if>
|
|
||||||
<if test="contentType != null">
|
|
||||||
and content_type = #{contentType}
|
|
||||||
</if>
|
|
||||||
<if test="startTime != null and startTime != ''">
|
|
||||||
and update_time >= #{startTime}
|
|
||||||
</if>
|
|
||||||
<if test="endTime != null and endTime != ''">
|
|
||||||
and update_time <= #{endTime}
|
|
||||||
</if>
|
|
||||||
order by update_time desc
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 查询动态详情 -->
|
|
||||||
<select id="queryContentInfo" resultType="com.cool.store.entity.HyContentInfoDO">
|
|
||||||
select <include refid="Base_Column_List"></include>
|
|
||||||
from hy_content_info
|
|
||||||
where deleted = 0
|
|
||||||
and id = #{contentId}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 标题是否重复 -->
|
|
||||||
<select id="whetherTitleDuplicated" resultType="java.lang.Boolean">
|
|
||||||
SELECT COUNT(*)
|
|
||||||
FROM hy_content_info
|
|
||||||
WHERE deleted = 0
|
|
||||||
AND content_title = #{contentTitle}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 获取所有标题 -->
|
|
||||||
<select id="queryTitles" resultType="java.lang.String">
|
|
||||||
SELECT content_title
|
|
||||||
FROM hy_content_info
|
|
||||||
WHERE deleted = 0
|
|
||||||
</select>
|
|
||||||
</mapper>
|
|
||||||
@@ -1,172 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.cool.store.mapper.HyExhibitionGroupMapper">
|
|
||||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyExhibitionGroupDO">
|
|
||||||
<id column="id" jdbcType="INTEGER" property="id" />
|
|
||||||
<result column="exhibition_group_name" jdbcType="VARCHAR" property="exhibitionGroupName" />
|
|
||||||
<result column="closed" jdbcType="BIT" property="closed" />
|
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
||||||
<result column="creator" jdbcType="VARCHAR" property="creator" />
|
|
||||||
<result column="updater" jdbcType="VARCHAR" property="updater" />
|
|
||||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
|
||||||
</resultMap>
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
id, exhibition_group_name, closed, create_time, update_time, creator, updater, deleted
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List" />
|
|
||||||
from hy_exhibition_group
|
|
||||||
where id = #{id,jdbcType=INTEGER}
|
|
||||||
and deleted = 0
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="listByCreator" resultType="com.cool.store.dto.exhibition.MyExhibitionGroupDTO">
|
|
||||||
select
|
|
||||||
eg.id as id ,
|
|
||||||
eg.exhibition_group_name as exhibitionGroupName,
|
|
||||||
eg.closed as closed,
|
|
||||||
eg.creator as createId,
|
|
||||||
eu.name as createName,
|
|
||||||
eu.mobile as mobile
|
|
||||||
from hy_exhibition_group eg
|
|
||||||
left join enterprise_user eu on eg.creator = eu.user_id
|
|
||||||
where eg.deleted = 0
|
|
||||||
<if test="userId!=null and userId!=''">
|
|
||||||
and eg.creator = #{userId,jdbcType=VARCHAR}
|
|
||||||
</if>
|
|
||||||
order by eg.create_time desc
|
|
||||||
</select>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
||||||
delete from hy_exhibition_group
|
|
||||||
where id = #{id,jdbcType=INTEGER}
|
|
||||||
</delete>
|
|
||||||
<insert id="insertSelective" parameterType="com.cool.store.entity.HyExhibitionGroupDO" keyColumn="id" keyProperty="id" useGeneratedKeys="true">
|
|
||||||
insert into hy_exhibition_group
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="exhibitionGroupName != null">
|
|
||||||
exhibition_group_name,
|
|
||||||
</if>
|
|
||||||
<if test="closed != null">
|
|
||||||
closed,
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
create_time,
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
update_time,
|
|
||||||
</if>
|
|
||||||
<if test="creator != null">
|
|
||||||
creator,
|
|
||||||
</if>
|
|
||||||
<if test="updater != null">
|
|
||||||
updater,
|
|
||||||
</if>
|
|
||||||
<if test="deleted != null">
|
|
||||||
deleted,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="exhibitionGroupName != null">
|
|
||||||
#{exhibitionGroupName,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="closed != null">
|
|
||||||
#{closed,jdbcType=BIT},
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
#{createTime,jdbcType=TIMESTAMP},
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
#{updateTime,jdbcType=TIMESTAMP},
|
|
||||||
</if>
|
|
||||||
<if test="creator != null">
|
|
||||||
#{creator,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="updater != null">
|
|
||||||
#{updater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="deleted != null">
|
|
||||||
#{deleted,jdbcType=BIT},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.HyExhibitionGroupDO">
|
|
||||||
update hy_exhibition_group
|
|
||||||
<set>
|
|
||||||
<if test="exhibitionGroupName != null">
|
|
||||||
exhibition_group_name = #{exhibitionGroupName,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="closed != null">
|
|
||||||
closed = #{closed,jdbcType=BIT},
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
||||||
</if>
|
|
||||||
<if test="creator != null">
|
|
||||||
creator = #{creator,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="updater != null">
|
|
||||||
updater = #{updater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="deleted != null">
|
|
||||||
deleted = #{deleted,jdbcType=BIT},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where id = #{id,jdbcType=INTEGER}
|
|
||||||
</update>
|
|
||||||
<sql id="dynamicQuery">
|
|
||||||
<trim prefix="WHERE" prefixOverrides="AND | OR">
|
|
||||||
<if test="null != id">
|
|
||||||
and t.id = #{id,jdbcType=INTEGER}
|
|
||||||
</if>
|
|
||||||
<if test="null != exhibitionGroupName">
|
|
||||||
and t.exhibition_group_name = #{exhibitionGroupName,jdbcType=VARCHAR}
|
|
||||||
</if>
|
|
||||||
<if test="null != closed">
|
|
||||||
and t.closed = #{closed,jdbcType=BIT}
|
|
||||||
</if>
|
|
||||||
<if test="null != createTime">
|
|
||||||
and t.create_time = #{createTime,jdbcType=TIMESTAMP}
|
|
||||||
</if>
|
|
||||||
<if test="null != updateTime">
|
|
||||||
and t.update_time = #{updateTime,jdbcType=TIMESTAMP}
|
|
||||||
</if>
|
|
||||||
<if test="null != creator">
|
|
||||||
and t.creator = #{creator,jdbcType=VARCHAR}
|
|
||||||
</if>
|
|
||||||
<if test="null != updater">
|
|
||||||
and t.updater = #{updater,jdbcType=VARCHAR}
|
|
||||||
</if>
|
|
||||||
<if test="null != deleted">
|
|
||||||
and t.deleted = #{deleted,jdbcType=BIT}
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<update id="batchCloseExhibitionGroup">
|
|
||||||
UPDATE `hy_exhibition_group` t1
|
|
||||||
INNER JOIN (
|
|
||||||
-- 所有关联的会销都结束的会销组(不包含未关联会销的会销组)
|
|
||||||
SELECT eg.id
|
|
||||||
FROM `hy_exhibition_group` eg
|
|
||||||
LEFT JOIN `hy_exhibition` e ON eg.id = e.exhibition_group_id
|
|
||||||
WHERE eg.deleted = 0
|
|
||||||
AND e.deleted = 0
|
|
||||||
AND eg.closed = 0
|
|
||||||
GROUP BY eg.id
|
|
||||||
HAVING COUNT(e.id) = COUNT(CASE WHEN e.closed_type != 0 THEN 1 END)
|
|
||||||
) AS t2 ON t1.id = t2.id
|
|
||||||
SET closed = 1
|
|
||||||
WHERE t1.deleted = 0
|
|
||||||
AND t1.closed = 0
|
|
||||||
</update>
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
@@ -1,476 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.cool.store.mapper.HyExhibitionMapper">
|
|
||||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyExhibitionDO">
|
|
||||||
<id column="id" jdbcType="INTEGER" property="id" />
|
|
||||||
<result column="exhibition_group_id" jdbcType="INTEGER" property="exhibitionGroupId" />
|
|
||||||
<result column="exhibition_code" jdbcType="VARCHAR" property="exhibitionCode" />
|
|
||||||
<result column="exhibition_name" jdbcType="VARCHAR" property="exhibitionName" />
|
|
||||||
<result column="start_date" jdbcType="DATE" property="startDate" />
|
|
||||||
<result column="location" jdbcType="VARCHAR" property="location" />
|
|
||||||
<result column="closed_type" jdbcType="TINYINT" property="closedType" />
|
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
||||||
<result column="creator" jdbcType="VARCHAR" property="creator" />
|
|
||||||
<result column="updater" jdbcType="VARCHAR" property="updater" />
|
|
||||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
|
||||||
<result column="close_time" jdbcType="TIMESTAMP" property="closeTime" />
|
|
||||||
</resultMap>
|
|
||||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.cool.store.entity.HyExhibitionDO">
|
|
||||||
<result column="collaborators" jdbcType="LONGVARCHAR" property="collaborators" />
|
|
||||||
</resultMap>
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
id, exhibition_group_id, exhibition_code, exhibition_name, start_date, location,
|
|
||||||
closed_type, create_time, update_time, creator, updater, deleted, close_time
|
|
||||||
</sql>
|
|
||||||
<sql id="Blob_Column_List">
|
|
||||||
collaborators
|
|
||||||
</sql>
|
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List" />
|
|
||||||
,
|
|
||||||
<include refid="Blob_Column_List" />
|
|
||||||
from hy_exhibition
|
|
||||||
where id = #{id,jdbcType=INTEGER}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="querySelective" resultType="com.cool.store.entity.HyExhibitionDO">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List" />
|
|
||||||
,
|
|
||||||
<include refid="Blob_Column_List" />
|
|
||||||
from hy_exhibition
|
|
||||||
<where>
|
|
||||||
<if test="exhibitionGroupId != null">
|
|
||||||
and exhibition_group_id = #{exhibitionGroupId,jdbcType=INTEGER}
|
|
||||||
</if>
|
|
||||||
<if test="exhibitionCode != null">
|
|
||||||
and exhibition_code = #{exhibitionCode,jdbcType=VARCHAR}
|
|
||||||
</if>
|
|
||||||
<if test="exhibitionName != null">
|
|
||||||
and exhibition_name = #{exhibitionName,jdbcType=VARCHAR}
|
|
||||||
</if>
|
|
||||||
<if test="startDate != null">
|
|
||||||
and start_date = #{startDate,jdbcType=DATE}
|
|
||||||
</if>
|
|
||||||
<if test="startDateStr != null">
|
|
||||||
and start_date = #{startDateStr,jdbcType=DATE}
|
|
||||||
</if>
|
|
||||||
<if test="location != null">
|
|
||||||
and location = #{location,jdbcType=VARCHAR}
|
|
||||||
</if>
|
|
||||||
<if test="closedType != null">
|
|
||||||
and closed_type = #{closedType,jdbcType=TINYINT}
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
and create_time = #{createTime,jdbcType=TIMESTAMP}
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
and update_time = #{updateTime,jdbcType=TIMESTAMP}
|
|
||||||
</if>
|
|
||||||
<if test="creator != null">
|
|
||||||
and creator = #{creator,jdbcType=VARCHAR}
|
|
||||||
</if>
|
|
||||||
<if test="updater != null">
|
|
||||||
and updater = #{updater,jdbcType=VARCHAR}
|
|
||||||
</if>
|
|
||||||
<if test="deleted != null">
|
|
||||||
and deleted = #{deleted,jdbcType=BIT}
|
|
||||||
</if>
|
|
||||||
<if test="closeTime != null">
|
|
||||||
and close_time = #{closeTime,jdbcType=TIMESTAMP}
|
|
||||||
</if>
|
|
||||||
<if test="collaborators != null">
|
|
||||||
and collaborators = #{collaborators,jdbcType=LONGVARCHAR}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
||||||
delete from hy_exhibition
|
|
||||||
where id = #{id,jdbcType=INTEGER}
|
|
||||||
</delete>
|
|
||||||
<insert id="insertSelective" parameterType="com.cool.store.entity.HyExhibitionDO">
|
|
||||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
|
|
||||||
SELECT LAST_INSERT_ID()
|
|
||||||
</selectKey>
|
|
||||||
insert into hy_exhibition
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="exhibitionGroupId != null">
|
|
||||||
exhibition_group_id,
|
|
||||||
</if>
|
|
||||||
<if test="exhibitionCode != null">
|
|
||||||
exhibition_code,
|
|
||||||
</if>
|
|
||||||
<if test="exhibitionName != null">
|
|
||||||
exhibition_name,
|
|
||||||
</if>
|
|
||||||
<if test="startDate != null">
|
|
||||||
start_date,
|
|
||||||
</if>
|
|
||||||
<if test="location != null">
|
|
||||||
location,
|
|
||||||
</if>
|
|
||||||
<if test="closedType != null">
|
|
||||||
closed_type,
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
create_time,
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
update_time,
|
|
||||||
</if>
|
|
||||||
<if test="creator != null">
|
|
||||||
creator,
|
|
||||||
</if>
|
|
||||||
<if test="updater != null">
|
|
||||||
updater,
|
|
||||||
</if>
|
|
||||||
<if test="deleted != null">
|
|
||||||
deleted,
|
|
||||||
</if>
|
|
||||||
<if test="closeTime != null">
|
|
||||||
close_time,
|
|
||||||
</if>
|
|
||||||
<if test="collaborators != null">
|
|
||||||
collaborators,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="exhibitionGroupId != null">
|
|
||||||
#{exhibitionGroupId,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="exhibitionCode != null">
|
|
||||||
#{exhibitionCode,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="exhibitionName != null">
|
|
||||||
#{exhibitionName,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="startDate != null">
|
|
||||||
#{startDate,jdbcType=DATE},
|
|
||||||
</if>
|
|
||||||
<if test="location != null">
|
|
||||||
#{location,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="closedType != null">
|
|
||||||
#{closedType,jdbcType=TINYINT},
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
#{createTime,jdbcType=TIMESTAMP},
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
#{updateTime,jdbcType=TIMESTAMP},
|
|
||||||
</if>
|
|
||||||
<if test="creator != null">
|
|
||||||
#{creator,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="updater != null">
|
|
||||||
#{updater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="deleted != null">
|
|
||||||
#{deleted,jdbcType=BIT},
|
|
||||||
</if>
|
|
||||||
<if test="closeTime != null">
|
|
||||||
#{closeTime,jdbcType=TIMESTAMP},
|
|
||||||
</if>
|
|
||||||
<if test="collaborators != null">
|
|
||||||
#{collaborators,jdbcType=LONGVARCHAR},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
<insert id="batchInsert" keyColumn="id" keyProperty="records.id" useGeneratedKeys="true">
|
|
||||||
insert into hy_exhibition
|
|
||||||
(
|
|
||||||
exhibition_group_id,
|
|
||||||
exhibition_code,
|
|
||||||
exhibition_name,
|
|
||||||
start_date,
|
|
||||||
location,
|
|
||||||
collaborators,
|
|
||||||
creator
|
|
||||||
)
|
|
||||||
values
|
|
||||||
<foreach collection="records" item="record" separator=",">
|
|
||||||
(
|
|
||||||
#{record.exhibitionGroupId},
|
|
||||||
#{record.exhibitionCode},
|
|
||||||
#{record.exhibitionName},
|
|
||||||
#{record.startDate},
|
|
||||||
#{record.location},
|
|
||||||
#{record.collaborators},
|
|
||||||
#{record.creator}
|
|
||||||
)
|
|
||||||
</foreach>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</insert>
|
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.HyExhibitionDO">
|
|
||||||
update hy_exhibition
|
|
||||||
<set>
|
|
||||||
<if test="exhibitionGroupId != null">
|
|
||||||
exhibition_group_id = #{exhibitionGroupId,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="exhibitionCode != null">
|
|
||||||
exhibition_code = #{exhibitionCode,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="exhibitionName != null">
|
|
||||||
exhibition_name = #{exhibitionName,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="startDate != null">
|
|
||||||
start_date = #{startDate,jdbcType=DATE},
|
|
||||||
</if>
|
|
||||||
<if test="location != null">
|
|
||||||
location = #{location,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="closedType != null">
|
|
||||||
closed_type = #{closedType,jdbcType=TINYINT},
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
||||||
</if>
|
|
||||||
<if test="creator != null">
|
|
||||||
creator = #{creator,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="updater != null">
|
|
||||||
updater = #{updater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="deleted != null">
|
|
||||||
deleted = #{deleted,jdbcType=BIT},
|
|
||||||
</if>
|
|
||||||
<if test="closeTime != null">
|
|
||||||
close_time = #{closeTime,jdbcType=TIMESTAMP},
|
|
||||||
</if>
|
|
||||||
<if test="collaborators != null">
|
|
||||||
collaborators = #{collaborators,jdbcType=LONGVARCHAR},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where id = #{id,jdbcType=INTEGER}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
|
|
||||||
<update id="batchUpdate">
|
|
||||||
update hy_exhibition
|
|
||||||
set
|
|
||||||
exhibition_name = CASE id
|
|
||||||
<foreach collection="records" item="record">
|
|
||||||
WHEN #{record.id} THEN #{record.exhibitionName}
|
|
||||||
</foreach>
|
|
||||||
END,
|
|
||||||
location = CASE id
|
|
||||||
<foreach collection="records" item="record">
|
|
||||||
WHEN #{record.id} THEN #{record.location}
|
|
||||||
</foreach>
|
|
||||||
END,
|
|
||||||
updater = CASE id
|
|
||||||
<foreach collection="records" item="record">
|
|
||||||
WHEN #{record.id} THEN #{record.updater}
|
|
||||||
</foreach>
|
|
||||||
END,
|
|
||||||
collaborators = CASE id
|
|
||||||
<foreach collection="records" item="record">
|
|
||||||
WHEN #{record.id} THEN #{record.collaborators}
|
|
||||||
</foreach>
|
|
||||||
END
|
|
||||||
where id in
|
|
||||||
<foreach collection="records" item="record" open="(" separator="," close=")">
|
|
||||||
#{record.id}
|
|
||||||
</foreach>
|
|
||||||
</update>
|
|
||||||
|
|
||||||
|
|
||||||
<select id="getExhibitionListByUserId" resultMap="ResultMapWithBLOBs">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List" />
|
|
||||||
,
|
|
||||||
<include refid="Blob_Column_List" />
|
|
||||||
from hy_exhibition
|
|
||||||
<where>
|
|
||||||
<if test="startDate != null and startDate!='' ">
|
|
||||||
and start_date = #{startDate}
|
|
||||||
</if>
|
|
||||||
<if test="closedType != null and closedType==0 ">
|
|
||||||
and closed_type = #{closedType}
|
|
||||||
</if>
|
|
||||||
<if test="closedType != null and closedType==1 ">
|
|
||||||
and closed_type in (1,2)
|
|
||||||
</if>
|
|
||||||
<if test="userId != null and userId!='' ">
|
|
||||||
and (creator = #{userId} or collaborators like CONCAT('%,', #{userId} ,',%'))
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
<if test="closedType != null and closedType==0 ">
|
|
||||||
ORDER BY start_date,id desc
|
|
||||||
</if>
|
|
||||||
<if test="closedType != null and closedType==1 ">
|
|
||||||
ORDER BY start_date desc ,id desc
|
|
||||||
</if>
|
|
||||||
<if test="startDate != null and startDate!='' ">
|
|
||||||
ORDER BY closed_type asc,id desc
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="listByExhibitionGroupIds" resultType="com.cool.store.dto.exhibition.ExhibitionDTO">
|
|
||||||
select
|
|
||||||
id as id ,
|
|
||||||
exhibition_group_id as exhibitionGroupId,
|
|
||||||
start_date as startDate,
|
|
||||||
close_time as closeTime,
|
|
||||||
location as location,
|
|
||||||
closed_type as closedType,
|
|
||||||
creator as creator,
|
|
||||||
exhibition_name as exhibitionName,
|
|
||||||
collaborators as collaboratorStr
|
|
||||||
from hy_exhibition
|
|
||||||
<where>
|
|
||||||
<foreach collection="list" item="groupId" open="and exhibition_group_id in (" separator="," close=")">
|
|
||||||
#{groupId}
|
|
||||||
</foreach>
|
|
||||||
<if test="filterCloseExhibition">
|
|
||||||
and closed_type = 0
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
order by id asc
|
|
||||||
</select>
|
|
||||||
|
|
||||||
|
|
||||||
<select id="lineSignUp" resultType="com.cool.store.dto.exhibition.ExhibitionDTO">
|
|
||||||
select a.exhibition_name as exhibitionName from hy_exhibition a left join hy_partner_exhibition b on a.id = b.exhibition_id
|
|
||||||
<where>
|
|
||||||
and b.participation_status!=7 and a.closed_type = 0
|
|
||||||
<if test="exhibitionGroupId!=null">
|
|
||||||
and a.exhibition_group_id = #{exhibitionGroupId}
|
|
||||||
</if>
|
|
||||||
<if test="lineId!=null">
|
|
||||||
and b.partner_line_id = #{lineId}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="listByExhibitionGroupId" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"/>
|
|
||||||
from hy_exhibition
|
|
||||||
where exhibition_group_id = #{exhibitionGroupId}
|
|
||||||
<if test="includeClose==false">
|
|
||||||
and closed_type = 0
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
|
|
||||||
<select id="exhibitionStatistic" resultType="com.cool.store.dto.exhibition.ExhibitionStatisticsDTO">
|
|
||||||
select
|
|
||||||
exhibition_id as exhibitionId,
|
|
||||||
COALESCE(count(1),0) as signUpCount,
|
|
||||||
COALESCE(sum( CASE WHEN participation_status = 1 THEN 1 ELSE 0 END ),0) as checkInCount,
|
|
||||||
COALESCE(sum( CASE WHEN participation_status = 2 THEN 1 ELSE 0 END ),0) as formFillCount,
|
|
||||||
COALESCE(sum( CASE WHEN participation_status in (3,4,5,6) THEN 1 ELSE 0 END ),0) as interviewCount
|
|
||||||
from hy_partner_exhibition
|
|
||||||
<where>
|
|
||||||
<foreach collection="list" item="id" open="and exhibition_id in (" separator="," close=")">
|
|
||||||
#{id}
|
|
||||||
</foreach>
|
|
||||||
</where>
|
|
||||||
group by exhibition_id
|
|
||||||
</select>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<sql id="dynamicQuery">
|
|
||||||
<trim prefix="WHERE" prefixOverrides="AND | OR">
|
|
||||||
<if test="null != id">
|
|
||||||
and t.id = #{id,jdbcType=INTEGER}
|
|
||||||
</if>
|
|
||||||
<if test="null != exhibitionGroupId">
|
|
||||||
and t.exhibition_group_id = #{exhibitionGroupId,jdbcType=INTEGER}
|
|
||||||
</if>
|
|
||||||
<if test="null != exhibitionCode">
|
|
||||||
and t.exhibition_code = #{exhibitionCode,jdbcType=VARCHAR}
|
|
||||||
</if>
|
|
||||||
<if test="null != exhibitionName">
|
|
||||||
and t.exhibition_name = #{exhibitionName,jdbcType=VARCHAR}
|
|
||||||
</if>
|
|
||||||
<if test="null != startDate">
|
|
||||||
and t.start_date = #{startDate,jdbcType=DATE}
|
|
||||||
</if>
|
|
||||||
<if test="null != location">
|
|
||||||
and t.location = #{location,jdbcType=VARCHAR}
|
|
||||||
</if>
|
|
||||||
<if test="null != closedType">
|
|
||||||
and t.closed_type = #{closedType,jdbcType=TINYINT}
|
|
||||||
</if>
|
|
||||||
<if test="null != createTime">
|
|
||||||
and t.create_time = #{createTime,jdbcType=TIMESTAMP}
|
|
||||||
</if>
|
|
||||||
<if test="null != updateTime">
|
|
||||||
and t.update_time = #{updateTime,jdbcType=TIMESTAMP}
|
|
||||||
</if>
|
|
||||||
<if test="null != creator">
|
|
||||||
and t.creator = #{creator,jdbcType=VARCHAR}
|
|
||||||
</if>
|
|
||||||
<if test="null != updater">
|
|
||||||
and t.updater = #{updater,jdbcType=VARCHAR}
|
|
||||||
</if>
|
|
||||||
<if test="null != deleted">
|
|
||||||
and t.deleted = #{deleted,jdbcType=BIT}
|
|
||||||
</if>
|
|
||||||
<if test="null != closeTime">
|
|
||||||
and t.close_time = #{closeTime,jdbcType=TIMESTAMP}
|
|
||||||
</if>
|
|
||||||
<if test="null != collaborators">
|
|
||||||
and t.collaborators = #{collaborators,jdbcType=LONGVARCHAR}
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<select id="getPartnerExhibitionList" resultType="com.cool.store.vo.exhibition.PartnerExhibitionListVO">
|
|
||||||
SELECT
|
|
||||||
t2.exhibition_group_id AS exhibitionGroupId,
|
|
||||||
t2.id AS exhibitionId,
|
|
||||||
t2.exhibition_code AS exhibitionCode,
|
|
||||||
t2.exhibition_name AS exhibitionName,
|
|
||||||
t2.start_date AS exhibitionDate
|
|
||||||
FROM `hy_partner_exhibition` t1
|
|
||||||
INNER JOIN `hy_exhibition` t2 ON t1.exhibition_id = t2.id
|
|
||||||
WHERE t1.deleted = 0
|
|
||||||
AND t2.deleted = 0
|
|
||||||
AND t1.participation_status != 7
|
|
||||||
AND t2.closed_type = 0
|
|
||||||
AND t1.partner_line_id = #{partnerLineId}
|
|
||||||
ORDER BY t2.start_date ASC
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="getPartnerExhibitionInfo" resultType="com.cool.store.vo.exhibition.PartnerExhibitionInfoVO">
|
|
||||||
SELECT
|
|
||||||
t1.id AS exhibitionId,
|
|
||||||
t1.exhibition_code AS exhibitionCode,
|
|
||||||
t1.exhibition_name AS exhibitionName,
|
|
||||||
t1.start_date AS exhibitionDate,
|
|
||||||
t1.location AS exhibitionPosition
|
|
||||||
FROM `hy_exhibition` t1
|
|
||||||
INNER JOIN `hy_partner_exhibition` t2 ON t1.id = t2.exhibition_id
|
|
||||||
INNER JOIN `hy_exhibition_group` t3 ON t1.exhibition_group_id = t3.id
|
|
||||||
WHERE t1.deleted = 0
|
|
||||||
AND t1.closed_type = 0
|
|
||||||
AND t2.deleted = 0
|
|
||||||
AND t2.participation_status != 7
|
|
||||||
AND t2.partner_line_id = #{partnerLineId}
|
|
||||||
AND t3.id = #{exhibitionGroupId}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<update id="batchCloseExhibition">
|
|
||||||
update hy_exhibition
|
|
||||||
set closed_type = #{closedType}, close_time = #{closeDateTime}
|
|
||||||
where id in (
|
|
||||||
<foreach collection="hyExhibitionIds" item="hyExhibitionId" separator=",">
|
|
||||||
#{hyExhibitionId}
|
|
||||||
</foreach>
|
|
||||||
)
|
|
||||||
</update>
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
@@ -1,264 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.cool.store.mapper.HyFollowTaskMapper">
|
|
||||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyFollowTaskDO">
|
|
||||||
<id column="id" jdbcType="BIGINT" property="id"/>
|
|
||||||
<result column="partner_line_id" jdbcType="BIGINT" property="partnerLineId"/>
|
|
||||||
<result column="follow_user_id" jdbcType="VARCHAR" property="followUserId"/>
|
|
||||||
<result column="task_title" jdbcType="VARCHAR" property="taskTitle"/>
|
|
||||||
<result column="communication_type" jdbcType="TINYINT" property="communicationType"/>
|
|
||||||
<result column="deadline" jdbcType="TIMESTAMP" property="deadline"/>
|
|
||||||
<result column="communication_content" jdbcType="VARCHAR" property="communicationContent"/>
|
|
||||||
<result column="task_status" jdbcType="TINYINT" property="taskStatus"/>
|
|
||||||
<result column="finish_time" jdbcType="TIMESTAMP" property="finishTime"/>
|
|
||||||
<result column="deleted" jdbcType="BIT" property="deleted"/>
|
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
|
||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
|
||||||
</resultMap>
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
id, partner_line_id, follow_user_id, task_title, communication_type, deadline, communication_content,
|
|
||||||
task_status, finish_time, deleted, create_time, update_time
|
|
||||||
</sql>
|
|
||||||
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
|
|
||||||
insert into hy_follow_task
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="record.partnerLineId != null">
|
|
||||||
partner_line_id,
|
|
||||||
</if>
|
|
||||||
<if test="record.followUserId != null">
|
|
||||||
follow_user_id,
|
|
||||||
</if>
|
|
||||||
<if test="record.taskTitle != null">
|
|
||||||
task_title,
|
|
||||||
</if>
|
|
||||||
<if test="record.communicationType != null">
|
|
||||||
communication_type,
|
|
||||||
</if>
|
|
||||||
<if test="record.deadline != null">
|
|
||||||
deadline,
|
|
||||||
</if>
|
|
||||||
<if test="record.communicationContent != null">
|
|
||||||
communication_content,
|
|
||||||
</if>
|
|
||||||
<if test="record.taskStatus != null">
|
|
||||||
task_status,
|
|
||||||
</if>
|
|
||||||
<if test="record.finishTime != null">
|
|
||||||
finish_time,
|
|
||||||
</if>
|
|
||||||
<if test="record.deleted != null">
|
|
||||||
deleted,
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
create_time,
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
update_time,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="record.partnerLineId != null">
|
|
||||||
#{record.partnerLineId},
|
|
||||||
</if>
|
|
||||||
<if test="record.followUserId != null">
|
|
||||||
#{record.followUserId},
|
|
||||||
</if>
|
|
||||||
<if test="record.taskTitle != null">
|
|
||||||
#{record.taskTitle},
|
|
||||||
</if>
|
|
||||||
<if test="record.communicationType != null">
|
|
||||||
#{record.communicationType},
|
|
||||||
</if>
|
|
||||||
<if test="record.deadline != null">
|
|
||||||
#{record.deadline},
|
|
||||||
</if>
|
|
||||||
<if test="record.communicationContent != null">
|
|
||||||
#{record.communicationContent},
|
|
||||||
</if>
|
|
||||||
<if test="record.taskStatus != null">
|
|
||||||
#{record.taskStatus},
|
|
||||||
</if>
|
|
||||||
<if test="record.finishTime != null">
|
|
||||||
#{record.finishTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.deleted != null">
|
|
||||||
#{record.deleted},
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
#{record.createTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
#{record.updateTime},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
<update id="updateByPrimaryKeySelective">
|
|
||||||
update hy_follow_task
|
|
||||||
<set>
|
|
||||||
<if test="record.partnerLineId != null">
|
|
||||||
partner_line_id = #{record.partnerLineId},
|
|
||||||
</if>
|
|
||||||
<if test="record.followUserId != null">
|
|
||||||
follow_user_id = #{record.followUserId},
|
|
||||||
</if>
|
|
||||||
<if test="record.taskTitle != null">
|
|
||||||
task_title = #{record.taskTitle},
|
|
||||||
</if>
|
|
||||||
<if test="record.communicationType != null">
|
|
||||||
communication_type = #{record.communicationType},
|
|
||||||
</if>
|
|
||||||
<if test="record.deadline != null">
|
|
||||||
deadline = #{record.deadline},
|
|
||||||
</if>
|
|
||||||
<if test="record.communicationContent != null">
|
|
||||||
communication_content = #{record.communicationContent},
|
|
||||||
</if>
|
|
||||||
<if test="record.taskStatus != null">
|
|
||||||
task_status = #{record.taskStatus},
|
|
||||||
</if>
|
|
||||||
<if test="record.finishTime != null">
|
|
||||||
finish_time = #{record.finishTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.deleted != null">
|
|
||||||
deleted = #{record.deleted},
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
create_time = #{record.createTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
update_time = #{record.updateTime},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where id = #{record.id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<select id="getTaskListByLineId" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"/>
|
|
||||||
from
|
|
||||||
hy_follow_task
|
|
||||||
where
|
|
||||||
deleted = '0' and partner_line_id = #{partnerLineId}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="getTaskPage" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
a.id,
|
|
||||||
a.partner_line_id,
|
|
||||||
a.follow_user_id,
|
|
||||||
a.task_title,
|
|
||||||
a.communication_type,
|
|
||||||
a.deadline,
|
|
||||||
a.communication_content,
|
|
||||||
a.task_status,
|
|
||||||
a.finish_time,
|
|
||||||
a.deleted,
|
|
||||||
a.create_time,
|
|
||||||
a.update_time
|
|
||||||
from
|
|
||||||
hy_follow_task a
|
|
||||||
inner join hy_partner_line_info b on a.partner_line_id = b.id and b.deleted = '0' and b.line_status in ('1', '2')
|
|
||||||
where
|
|
||||||
a.deleted = '0' and a.follow_user_id = #{followUserId}
|
|
||||||
<if test="taskStatus != null">
|
|
||||||
and a.task_status = #{taskStatus}
|
|
||||||
</if>
|
|
||||||
<if test="deadlineStartTime != null">
|
|
||||||
and a.deadline >= #{deadlineStartTime}
|
|
||||||
</if>
|
|
||||||
<if test="deadlineEndTime != null">
|
|
||||||
<![CDATA[ and a.deadline <= #{deadlineEndTime}]]>
|
|
||||||
</if>
|
|
||||||
<if test="taskStatus == 0">
|
|
||||||
order by a.deadline asc, a.id desc
|
|
||||||
</if>
|
|
||||||
<if test="taskStatus == 2">
|
|
||||||
order by a.deadline desc, a.id desc
|
|
||||||
</if>
|
|
||||||
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="getFollowTask" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"/>
|
|
||||||
from
|
|
||||||
hy_follow_task
|
|
||||||
where
|
|
||||||
deleted = '0' and id = #{followTaskId}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<update id="updateUndoTaskFollowUserId">
|
|
||||||
update hy_follow_task set follow_user_id = #{followUserId} where partner_line_id = #{partnerLineId}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<update id="cancelUndoFollowTask">
|
|
||||||
update
|
|
||||||
hy_follow_task
|
|
||||||
set
|
|
||||||
task_status = if(deadline >= now(), 3, 5)
|
|
||||||
where
|
|
||||||
partner_line_id = #{partnerLineId} and task_status in ('0', '2')
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<select id="getRemindFollowUserIds" resultType="string">
|
|
||||||
select
|
|
||||||
a.follow_user_id
|
|
||||||
from
|
|
||||||
hy_follow_task a
|
|
||||||
inner join hy_partner_line_info b on a.partner_line_id = b.id and b.deleted = '0' and b.line_status in ('1', '2')
|
|
||||||
where
|
|
||||||
a.deleted = '0' and (a.task_status in ('2') or (a.task_status in ('0') and a.deadline >= #{startTime} and #{endTime} >= a.deadline))
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="getUserTaskNum" resultType="com.cool.store.dto.follow.FollowTaskNumDTO">
|
|
||||||
select
|
|
||||||
a.follow_user_id,
|
|
||||||
sum(if(a.task_status=2 or (a.task_status in ('0') and now() >= a.deadline), 1,0)) as overdueNum,
|
|
||||||
sum(if(a.task_status=0 and #{endTime} > a.deadline, 1, 0)) as todoNum
|
|
||||||
from
|
|
||||||
hy_follow_task a
|
|
||||||
inner join hy_partner_line_info b on a.partner_line_id = b.id and b.deleted = '0' and b.line_status in ('1', '2')
|
|
||||||
where
|
|
||||||
a.follow_user_id in <foreach collection="followUserIds" item="followUserId" separator="," open="(" close=")">#{followUserId}</foreach>
|
|
||||||
group by a.follow_user_id
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="getUndoTaskPage" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
a.id,
|
|
||||||
a.partner_line_id,
|
|
||||||
a.follow_user_id,
|
|
||||||
a.task_title,
|
|
||||||
a.communication_type,
|
|
||||||
a.deadline,
|
|
||||||
a.communication_content,
|
|
||||||
a.task_status,
|
|
||||||
a.finish_time,
|
|
||||||
a.deleted,
|
|
||||||
a.create_time,
|
|
||||||
a.update_time
|
|
||||||
from
|
|
||||||
hy_follow_task a
|
|
||||||
inner join hy_partner_line_info b on a.partner_line_id = b.id and b.deleted = '0' and b.line_status in ('1', '2')
|
|
||||||
where
|
|
||||||
a.deleted = '0' and a.task_status in ('0') and a.deadline > #{startTime} and #{endTime} > a.deadline
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<update id="updateUndoTaskStatusToOverdue">
|
|
||||||
<![CDATA[ update hy_follow_task set task_status = '2' where task_status = '0' and deadline <= now() ]]>
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<select id="getFollowTaskList" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"/>
|
|
||||||
from
|
|
||||||
hy_follow_task
|
|
||||||
where
|
|
||||||
deleted = '0' and id in <foreach collection="followTaskIds" item="followTaskId" separator="," open="(" close=")">#{followTaskId}</foreach>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<update id="changeLineId">
|
|
||||||
update hy_follow_task set partner_line_id = #{newLineId} where partner_line_id = #{oldLineId}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
@@ -1,446 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.cool.store.mapper.HyInspectionMapper">
|
|
||||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyInspectionDO">
|
|
||||||
<constructor>
|
|
||||||
<idArg column="id" javaType="java.lang.Long" />
|
|
||||||
<arg column="interview_plan_id" javaType="java.lang.Long" />
|
|
||||||
<arg column="operator_user_id" javaType="java.lang.String" />
|
|
||||||
<arg column="type" javaType="java.lang.Integer" />
|
|
||||||
<arg column="status" javaType="java.lang.Integer" />
|
|
||||||
<arg column="files" javaType="java.lang.String" />
|
|
||||||
<arg column="description" javaType="java.lang.String" />
|
|
||||||
<arg column="inspection_time" javaType="java.lang.String" />
|
|
||||||
<arg column="creator" javaType="java.lang.String" />
|
|
||||||
<arg column="updator" javaType="java.lang.String" />
|
|
||||||
<arg column="remark" javaType="java.lang.String" />
|
|
||||||
<arg column="deleted" javaType="java.lang.Boolean" />
|
|
||||||
<arg column="create_time" javaType="java.lang.String" />
|
|
||||||
<arg column="update_time" javaType="java.lang.String" />
|
|
||||||
</constructor>
|
|
||||||
</resultMap>
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
id, interview_plan_id, operator_user_id, type, status, files, description, inspection_time,
|
|
||||||
creator, updator, remark, deleted, create_time, update_time
|
|
||||||
</sql>
|
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List" />
|
|
||||||
from hy_inspection
|
|
||||||
where id = #{id}
|
|
||||||
and deleted = 0
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 使用 interviewPlanId 查询面试稽核信息 -->
|
|
||||||
<select id="selectByInterviewPlanId" resultType="com.cool.store.entity.HyInspectionDO">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List" />
|
|
||||||
from hy_inspection
|
|
||||||
where interview_plan_id = #{interviewPlanId}
|
|
||||||
and deleted = 0
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="interviewInspectionGetList" resultType="com.cool.store.vo.interview.InterviewInspectionVO">
|
|
||||||
SELECT
|
|
||||||
eu.`name` AS interviewerName,
|
|
||||||
eu.mobile AS interviewerMobile,
|
|
||||||
hpui.username AS intervieweeName,
|
|
||||||
hpui.mobile AS intervieweeMobile,
|
|
||||||
trim(BOTH '/' FROM trim(hoai.area_path)) AS wantShopAreaName,
|
|
||||||
hi.create_time AS interviewPassTime,
|
|
||||||
hi.`status` AS `status`,
|
|
||||||
euj.`name` AS auditorName,
|
|
||||||
euj.mobile AS auditorMobile,
|
|
||||||
hi.inspection_time AS inspectionTime,
|
|
||||||
hi.id AS id,
|
|
||||||
hi.interview_plan_id AS interviewPlanId
|
|
||||||
FROM
|
|
||||||
hy_inspection hi
|
|
||||||
LEFT JOIN enterprise_user euj ON hi.operator_user_id = euj.user_id
|
|
||||||
LEFT JOIN hy_partner_interview_plan hpip ON hi.interview_plan_id = hpip.id
|
|
||||||
AND hi.deleted = 0
|
|
||||||
AND hpip.deleted = 0
|
|
||||||
LEFT JOIN hy_partner_interview hpi ON hpi.interview_plan_id = hpip.id
|
|
||||||
AND hpi.deleted = 0
|
|
||||||
LEFT JOIN enterprise_user eu ON hpi.interviewer = eu.user_id
|
|
||||||
LEFT JOIN hy_partner_user_info hpui ON hpip.partner_id = hpui.partner_id
|
|
||||||
LEFT JOIN hy_inspection_setting_mapping hism ON hpui.want_shop_area = hism.open_area_mapping_id
|
|
||||||
AND hism.deleted = 0
|
|
||||||
LEFT JOIN hy_inspection_setting his ON hism.inspection_setting_id = his.id
|
|
||||||
AND his.deleted = 0
|
|
||||||
AND eu.deleted = 0
|
|
||||||
LEFT JOIN hy_open_area_info hoai ON hpui.want_shop_area = hoai.id
|
|
||||||
AND hoai.deleted = 0
|
|
||||||
<where>
|
|
||||||
<if test="userId !=null and userId !=''">
|
|
||||||
and ((his.inspection_user_id = #{userId} and hi.`status`=0 ) OR hi.operator_user_id = #{userId})
|
|
||||||
</if>
|
|
||||||
<if test="interviewerName !=null and interviewerName !=''">
|
|
||||||
and eu.`name` like concat('%',#{interviewerName},'%')
|
|
||||||
</if>
|
|
||||||
<if test="interviewerMobile !=null and interviewerMobile !=''">
|
|
||||||
and eu.mobile like concat('%',#{interviewerMobile},'%')
|
|
||||||
</if>
|
|
||||||
<if test="intervieweeName !=null and intervieweeName !=''">
|
|
||||||
and hpui.username like concat('%',#{intervieweeName},'%')
|
|
||||||
</if>
|
|
||||||
<if test="intervieweeMobile !=null and intervieweeMobile !=''">
|
|
||||||
and hpui.mobile like concat('%',#{intervieweeMobile},'%')
|
|
||||||
</if>
|
|
||||||
<if test="status !=null">
|
|
||||||
and hi.`status`=#{status}
|
|
||||||
</if>
|
|
||||||
<if test="codeList !=null and codeList.size>0">
|
|
||||||
and hpui.want_shop_area in
|
|
||||||
<foreach collection="codeList" separator="," open="(" close=")" item="code" >#{code}</foreach>
|
|
||||||
</if>
|
|
||||||
<if test="startTime != null and startTime != ''">
|
|
||||||
and hpi.pass_time >= #{startTime}
|
|
||||||
</if>
|
|
||||||
<if test="endTime != null and endTime != ''">
|
|
||||||
and hpi.pass_time <= #{endTime}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
order by hi.id desc
|
|
||||||
</select>
|
|
||||||
<select id="interviewInspectionGetDetail" resultType="com.cool.store.vo.interview.InterviewInspectionInfo">
|
|
||||||
SELECT b.`name` as auditorName, b.mobile as auditorMobile,inspection_time as inspectionTime,`status` ,description,files as filesStr
|
|
||||||
FROM hy_inspection a left join enterprise_user b on a.operator_user_id=b.user_id and a.deleted=0 and b.deleted=0
|
|
||||||
where a.id=#{id}
|
|
||||||
</select>
|
|
||||||
<select id="interviewInspectionResultGetList" resultType="com.cool.store.vo.interview.InterviewInspectionResultVO">
|
|
||||||
SELECT
|
|
||||||
hi.id,hi.interview_plan_id as interviewPlanId,
|
|
||||||
hpui.username AS intervieweeName,
|
|
||||||
hpui.mobile AS intervieweeMobile,
|
|
||||||
trim(BOTH '/' FROM trim(hoai.area_path)) AS wantShopAreaName,
|
|
||||||
hi.create_time AS interviewPassTime,
|
|
||||||
hi.`status` AS `status`,
|
|
||||||
euj.`name` AS auditorName,
|
|
||||||
euj.mobile AS auditorMobile,
|
|
||||||
hi.inspection_time AS inspectionTime,
|
|
||||||
hi.id AS id,
|
|
||||||
hi.interview_plan_id AS interviewPlanId
|
|
||||||
FROM
|
|
||||||
hy_inspection hi
|
|
||||||
LEFT JOIN enterprise_user euj ON hi.operator_user_id = euj.user_id
|
|
||||||
LEFT JOIN hy_partner_interview_plan hpip ON hi.interview_plan_id = hpip.id
|
|
||||||
AND hi.deleted = 0
|
|
||||||
AND hpip.deleted = 0 and `status`!=0
|
|
||||||
LEFT JOIN hy_partner_interview hpi ON hpi.interview_plan_id = hpip.id
|
|
||||||
AND hpi.deleted = 0
|
|
||||||
LEFT JOIN hy_partner_user_info hpui ON hpip.partner_id = hpui.partner_id
|
|
||||||
LEFT JOIN hy_open_area_info hoai ON hpui.want_shop_area = hoai.id
|
|
||||||
AND hoai.deleted = 0
|
|
||||||
<where>
|
|
||||||
<if test="userId !=null and userId !=''">
|
|
||||||
and hpi.interviewer = #{userId}
|
|
||||||
</if>
|
|
||||||
<if test="intervieweeName !=null and intervieweeName !=''">
|
|
||||||
and hpui.username like concat('%',#{intervieweeName},'%')
|
|
||||||
</if>
|
|
||||||
<if test="intervieweeMobile !=null and intervieweeMobile !=''">
|
|
||||||
and hpui.mobile like concat('%',#{intervieweeMobile},'%')
|
|
||||||
</if>
|
|
||||||
<if test="status !=null">
|
|
||||||
and hi.`status`=#{status}
|
|
||||||
</if>
|
|
||||||
<if test="codeList !=null">
|
|
||||||
and hpui.want_shop_area in <foreach collection="codeList" separator="," open="(" close=")" item="code" >#{code}</foreach>
|
|
||||||
</if>
|
|
||||||
<if test="startTime != null and startTime != ''">
|
|
||||||
and hpi.pass_time >= #{startTime}
|
|
||||||
</if>
|
|
||||||
<if test="endTime != null and endTime != ''">
|
|
||||||
and hpi.pass_time <= #{endTime}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
order by hi.id desc
|
|
||||||
</select>
|
|
||||||
<select id="interviewInspectionGetProvinceList" resultType="com.cool.store.vo.interview.InterviewInspectionVO">
|
|
||||||
SELECT
|
|
||||||
eu.`name` AS interviewerName,
|
|
||||||
eu.mobile AS interviewerMobile,
|
|
||||||
hpui.username AS intervieweeName,
|
|
||||||
hpui.mobile AS intervieweeMobile,
|
|
||||||
trim(BOTH '/' FROM trim(hoai.area_path)) AS wantShopAreaName,
|
|
||||||
hi.create_time AS interviewPassTime,
|
|
||||||
hi.`status` AS `status`,
|
|
||||||
euj.`name` AS auditorName,
|
|
||||||
euj.mobile AS auditorMobile,
|
|
||||||
hi.inspection_time AS inspectionTime,
|
|
||||||
hi.id AS id,
|
|
||||||
hi.interview_plan_id AS interviewPlanId
|
|
||||||
FROM
|
|
||||||
hy_inspection hi
|
|
||||||
LEFT JOIN enterprise_user euj ON hi.operator_user_id = euj.user_id
|
|
||||||
LEFT JOIN hy_partner_interview_plan hpip ON hi.interview_plan_id = hpip.id
|
|
||||||
AND hi.deleted = 0
|
|
||||||
AND hpip.deleted = 0
|
|
||||||
LEFT JOIN hy_partner_interview hpi ON hpi.interview_plan_id = hpip.id
|
|
||||||
AND hpi.deleted = 0
|
|
||||||
LEFT JOIN enterprise_user eu ON hpi.interviewer = eu.user_id
|
|
||||||
LEFT JOIN hy_partner_user_info hpui ON hpip.partner_id = hpui.partner_id
|
|
||||||
LEFT JOIN hy_inspection_setting_mapping hism ON hpui.want_shop_area = hism.open_area_mapping_id
|
|
||||||
AND hism.deleted = 0
|
|
||||||
LEFT JOIN hy_inspection_setting his ON hism.inspection_setting_id = his.id
|
|
||||||
AND his.deleted = 0
|
|
||||||
AND eu.deleted = 0
|
|
||||||
LEFT JOIN hy_open_area_info hoai ON hpui.want_shop_area = hoai.id
|
|
||||||
AND hoai.deleted = 0
|
|
||||||
left join ( SELECT c.* FROM `hy_open_area_info` a left join hy_open_area_info b on a.`id`=b.`parent_id`
|
|
||||||
left join hy_open_area_info c on b.`id`=c.`parent_id`
|
|
||||||
WHERE a.`id`=#{wantShopArea} ) mdd on hpui.want_shop_area=mdd.`id`
|
|
||||||
<where>
|
|
||||||
<if test="true">
|
|
||||||
and mdd.id is not null
|
|
||||||
</if>
|
|
||||||
<if test="userId !=null and userId !=''">
|
|
||||||
and ((his.inspection_user_id = #{userId} and hi.`status`=0 ) OR hi.operator_user_id = #{userId})
|
|
||||||
</if>
|
|
||||||
<if test="interviewerName !=null and interviewerName !=''">
|
|
||||||
and eu.`name` like concat('%',#{interviewerName},'%')
|
|
||||||
</if>
|
|
||||||
<if test="interviewerMobile !=null and interviewerMobile !=''">
|
|
||||||
and eu.mobile like concat('%',#{interviewerMobile},'%')
|
|
||||||
</if>
|
|
||||||
<if test="intervieweeName !=null and intervieweeName !=''">
|
|
||||||
and hpui.username like concat('%',#{intervieweeName},'%')
|
|
||||||
</if>
|
|
||||||
<if test="intervieweeMobile !=null and intervieweeMobile !=''">
|
|
||||||
and hpui.mobile like concat('%',{intervieweeMobile},'%')
|
|
||||||
</if>
|
|
||||||
<if test="status !=null">
|
|
||||||
and hi.`status`=#{status}
|
|
||||||
</if>
|
|
||||||
<if test="startTime != null and startTime != ''">
|
|
||||||
and hpi.pass_time >= #{startTime}
|
|
||||||
</if>
|
|
||||||
<if test="endTime != null and endTime != ''">
|
|
||||||
and hpi.pass_time <= #{endTime}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
order by hi.id desc
|
|
||||||
</select>
|
|
||||||
<select id="interviewInspectionResultGetProvinceList" resultType="com.cool.store.vo.interview.InterviewInspectionResultVO">
|
|
||||||
SELECT
|
|
||||||
hi.id,hi.interview_plan_id as interviewPlanId,
|
|
||||||
hpui.username AS intervieweeName,
|
|
||||||
hpui.mobile AS intervieweeMobile,
|
|
||||||
trim(BOTH '/' FROM trim(hoai.area_path)) AS wantShopAreaName,
|
|
||||||
hi.create_time AS interviewPassTime,
|
|
||||||
hi.`status` AS `status`,
|
|
||||||
euj.`name` AS auditorName,
|
|
||||||
euj.mobile AS auditorMobile,
|
|
||||||
hi.inspection_time AS inspectionTime,
|
|
||||||
hi.id AS id,
|
|
||||||
hi.interview_plan_id AS interviewPlanId
|
|
||||||
FROM
|
|
||||||
hy_inspection hi
|
|
||||||
LEFT JOIN enterprise_user euj ON hi.operator_user_id = euj.user_id
|
|
||||||
LEFT JOIN hy_partner_interview_plan hpip ON hi.interview_plan_id = hpip.id
|
|
||||||
AND hi.deleted = 0
|
|
||||||
AND hpip.deleted = 0 and `status`!=0
|
|
||||||
LEFT JOIN hy_partner_interview hpi ON hpi.interview_plan_id = hpip.id
|
|
||||||
AND hpi.deleted = 0
|
|
||||||
LEFT JOIN hy_partner_user_info hpui ON hpip.partner_id = hpui.partner_id
|
|
||||||
LEFT JOIN hy_open_area_info hoai ON hpui.want_shop_area = hoai.id
|
|
||||||
AND hoai.deleted = 0
|
|
||||||
left join ( SELECT c.* FROM `hy_open_area_info` a left join hy_open_area_info b on a.`id`=b.`parent_id`
|
|
||||||
left join hy_open_area_info c on b.`id`=c.`parent_id`
|
|
||||||
WHERE a.`id`=#{wantShopArea} ) mdd on hpui.want_shop_area=mdd.`id`
|
|
||||||
<where>
|
|
||||||
<if test="true">
|
|
||||||
and mdd.id is not null
|
|
||||||
</if>
|
|
||||||
<if test="userId !=null and userId !=''">
|
|
||||||
and hpi.interviewer = #{userId}
|
|
||||||
</if>
|
|
||||||
<if test="intervieweeName !=null and intervieweeName !=''">
|
|
||||||
and hpui.username like concat('%',#{intervieweeName},'%')
|
|
||||||
</if>
|
|
||||||
<if test="intervieweeMobile !=null and intervieweeMobile !=''">
|
|
||||||
and hpui.mobile like concat('%',#{intervieweeMobile},'%')
|
|
||||||
</if>
|
|
||||||
<if test="status !=null">
|
|
||||||
and hi.`status`=#{status}
|
|
||||||
</if>
|
|
||||||
<if test="startTime != null and startTime != ''">
|
|
||||||
and hpi.pass_time >= #{startTime}
|
|
||||||
</if>
|
|
||||||
<if test="endTime != null and endTime != ''">
|
|
||||||
and hpi.pass_time <= #{endTime}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
order by hi.id desc
|
|
||||||
</select>
|
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
||||||
delete from hy_inspection
|
|
||||||
where id = #{id}
|
|
||||||
</delete>
|
|
||||||
<insert id="insert" parameterType="com.cool.store.entity.HyInspectionDO">
|
|
||||||
insert into hy_inspection (id, interview_plan_id, operator_user_id,
|
|
||||||
type, status, files,
|
|
||||||
description, inspection_time, creator,
|
|
||||||
updator, remark, deleted,
|
|
||||||
create_time, update_time)
|
|
||||||
values (#{id}, #{interviewPlanId}, #{operatorUserId},
|
|
||||||
#{type}, #{status}, #{files},
|
|
||||||
#{description}, #{inspectionTime}, #{creator},
|
|
||||||
#{updator}, #{remark}, #{deleted},
|
|
||||||
#{createTime}, #{updateTime})
|
|
||||||
</insert>
|
|
||||||
<insert id="insertSelective" parameterType="com.cool.store.entity.HyInspectionDO">
|
|
||||||
insert into hy_inspection
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="id != null">
|
|
||||||
id,
|
|
||||||
</if>
|
|
||||||
<if test="interviewPlanId != null">
|
|
||||||
interview_plan_id,
|
|
||||||
</if>
|
|
||||||
<if test="operatorUserId != null">
|
|
||||||
operator_user_id,
|
|
||||||
</if>
|
|
||||||
<if test="type != null">
|
|
||||||
type,
|
|
||||||
</if>
|
|
||||||
<if test="status != null">
|
|
||||||
status,
|
|
||||||
</if>
|
|
||||||
<if test="files != null">
|
|
||||||
files,
|
|
||||||
</if>
|
|
||||||
<if test="description != null">
|
|
||||||
description,
|
|
||||||
</if>
|
|
||||||
<if test="inspectionTime != null">
|
|
||||||
inspection_time,
|
|
||||||
</if>
|
|
||||||
<if test="creator != null">
|
|
||||||
creator,
|
|
||||||
</if>
|
|
||||||
<if test="updator != null">
|
|
||||||
updator,
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
remark,
|
|
||||||
</if>
|
|
||||||
<if test="deleted != null">
|
|
||||||
deleted,
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
create_time,
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
update_time,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="id != null">
|
|
||||||
#{id},
|
|
||||||
</if>
|
|
||||||
<if test="interviewPlanId != null">
|
|
||||||
#{interviewPlanId},
|
|
||||||
</if>
|
|
||||||
<if test="operatorUserId != null">
|
|
||||||
#{operatorUserId},
|
|
||||||
</if>
|
|
||||||
<if test="type != null">
|
|
||||||
#{type},
|
|
||||||
</if>
|
|
||||||
<if test="status != null">
|
|
||||||
#{status},
|
|
||||||
</if>
|
|
||||||
<if test="files != null">
|
|
||||||
#{files},
|
|
||||||
</if>
|
|
||||||
<if test="description != null">
|
|
||||||
#{description},
|
|
||||||
</if>
|
|
||||||
<if test="inspectionTime != null">
|
|
||||||
#{inspectionTime},
|
|
||||||
</if>
|
|
||||||
<if test="creator != null">
|
|
||||||
#{creator},
|
|
||||||
</if>
|
|
||||||
<if test="updator != null">
|
|
||||||
#{updator},
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
#{remark},
|
|
||||||
</if>
|
|
||||||
<if test="deleted != null">
|
|
||||||
#{deleted},
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
#{createTime},
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
#{updateTime},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.HyInspectionDO">
|
|
||||||
update hy_inspection
|
|
||||||
<set>
|
|
||||||
<if test="interviewPlanId != null">
|
|
||||||
interview_plan_id = #{interviewPlanId},
|
|
||||||
</if>
|
|
||||||
<if test="operatorUserId != null">
|
|
||||||
operator_user_id = #{operatorUserId},
|
|
||||||
</if>
|
|
||||||
<if test="type != null">
|
|
||||||
type = #{type},
|
|
||||||
</if>
|
|
||||||
<if test="status != null">
|
|
||||||
status = #{status},
|
|
||||||
</if>
|
|
||||||
<if test="files != null">
|
|
||||||
files = #{files},
|
|
||||||
</if>
|
|
||||||
<if test="description != null">
|
|
||||||
description = #{description},
|
|
||||||
</if>
|
|
||||||
<if test="inspectionTime != null">
|
|
||||||
inspection_time = #{inspectionTime},
|
|
||||||
</if>
|
|
||||||
<if test="creator != null">
|
|
||||||
creator = #{creator},
|
|
||||||
</if>
|
|
||||||
<if test="updator != null">
|
|
||||||
updator = #{updator},
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
remark = #{remark},
|
|
||||||
</if>
|
|
||||||
<if test="deleted != null">
|
|
||||||
deleted = #{deleted},
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
create_time = #{createTime},
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
update_time = #{updateTime},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
<update id="updateByPrimaryKey" parameterType="com.cool.store.entity.HyInspectionDO">
|
|
||||||
update hy_inspection
|
|
||||||
set interview_plan_id = #{interviewPlanId},
|
|
||||||
operator_user_id = #{operatorUserId},
|
|
||||||
type = #{type},
|
|
||||||
status = #{status},
|
|
||||||
files = #{files},
|
|
||||||
description = #{description},
|
|
||||||
inspection_time = #{inspectionTime},
|
|
||||||
creator = #{creator},
|
|
||||||
updator = #{updator},
|
|
||||||
remark = #{remark},
|
|
||||||
deleted = #{deleted},
|
|
||||||
create_time = #{createTime},
|
|
||||||
update_time = #{updateTime}
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
</mapper>
|
|
||||||
@@ -1,138 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.cool.store.mapper.HyInspectionSettingMapper">
|
|
||||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyInspectionSettingDO">
|
|
||||||
<id column="id" jdbcType="BIGINT" property="id"/>
|
|
||||||
<result column="zone_name" jdbcType="VARCHAR" property="zoneName"/>
|
|
||||||
<result column="inspection_user_id" jdbcType="VARCHAR" property="inspectionUserId"/>
|
|
||||||
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId"/>
|
|
||||||
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId"/>
|
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
|
||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
|
||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
|
||||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
|
||||||
</resultMap>
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
id, zone_name, inspection_user_id, create_user_id, update_user_id, create_time, update_time, deleted
|
|
||||||
</sql>
|
|
||||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" useGeneratedKeys="true">
|
|
||||||
insert into hy_inspection_setting
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="zoneName != null">
|
|
||||||
zone_name,
|
|
||||||
</if>
|
|
||||||
<if test="inspectionUserId != null">
|
|
||||||
inspection_user_id,
|
|
||||||
</if>
|
|
||||||
<if test="createUserId != null">
|
|
||||||
create_user_id,
|
|
||||||
</if>
|
|
||||||
<if test="updateUserId != null">
|
|
||||||
update_user_id,
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
create_time,
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
update_time,
|
|
||||||
</if>
|
|
||||||
<if test="deleted != null">
|
|
||||||
deleted,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="zoneName != null">
|
|
||||||
#{zoneName},
|
|
||||||
</if>
|
|
||||||
<if test="inspectionUserId != null">
|
|
||||||
#{inspectionUserId},
|
|
||||||
</if>
|
|
||||||
<if test="createUserId != null">
|
|
||||||
#{createUserId},
|
|
||||||
</if>
|
|
||||||
<if test="updateUserId != null">
|
|
||||||
#{updateUserId},
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
#{createTime},
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
#{updateTime},
|
|
||||||
</if>
|
|
||||||
<if test="deleted != null">
|
|
||||||
#{deleted},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
<update id="updateByPrimaryKeySelective">
|
|
||||||
update hy_inspection_setting
|
|
||||||
<set>
|
|
||||||
<if test="zoneName != null">
|
|
||||||
zone_name = #{zoneName},
|
|
||||||
</if>
|
|
||||||
<if test="inspectionUserId != null">
|
|
||||||
inspection_user_id = #{inspectionUserId},
|
|
||||||
</if>
|
|
||||||
<if test="createUserId != null">
|
|
||||||
create_user_id = #{createUserId},
|
|
||||||
</if>
|
|
||||||
<if test="updateUserId != null">
|
|
||||||
update_user_id = #{updateUserId},
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
create_time = #{createTime},
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
update_time = #{updateTime},
|
|
||||||
</if>
|
|
||||||
<if test="deleted != null">
|
|
||||||
deleted = #{deleted},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<select id="getInspectionSettingPage" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"/>
|
|
||||||
from
|
|
||||||
hy_inspection_setting
|
|
||||||
where
|
|
||||||
deleted = '0'
|
|
||||||
order by create_time desc
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="getInspectionSettingDetail" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"/>
|
|
||||||
from
|
|
||||||
hy_inspection_setting
|
|
||||||
where
|
|
||||||
deleted = '0' and id = #{inspectionSettingId}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="getInspectionUserIds" resultType="string">
|
|
||||||
select inspection_user_id from hy_inspection_setting where deleted = '0'
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="getHyInspectionSettingByIds" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"/>
|
|
||||||
from
|
|
||||||
hy_inspection_setting
|
|
||||||
where
|
|
||||||
deleted = '0' and id in <foreach collection="inspectionSettingIds" item="inspectionSettingId" open="(" close=")" separator=",">#{inspectionSettingId}</foreach>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="getHyInspectionSettingByUserId" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"/>
|
|
||||||
from
|
|
||||||
hy_inspection_setting
|
|
||||||
where
|
|
||||||
deleted = '0' and inspection_user_id = #{inspectionUserId}
|
|
||||||
<if test="excludeInspectionSettingId != null">
|
|
||||||
and id != #{excludeInspectionSettingId}
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
</mapper>
|
|
||||||
@@ -1,121 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.cool.store.mapper.HyInspectionSettingMappingMapper">
|
|
||||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyInspectionSettingMappingDO">
|
|
||||||
<id column="id" jdbcType="BIGINT" property="id"/>
|
|
||||||
<result column="inspection_setting_id" jdbcType="BIGINT" property="inspectionSettingId"/>
|
|
||||||
<result column="open_area_mapping_id" jdbcType="BIGINT" property="openAreaMappingId"/>
|
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
|
||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
|
||||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
|
||||||
</resultMap>
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
id, inspection_setting_id, open_area_mapping_id, create_time, update_time, deleted
|
|
||||||
</sql>
|
|
||||||
<insert id="batchInsertSelective">
|
|
||||||
<foreach collection="insertList" item="record" separator=";">
|
|
||||||
insert into hy_inspection_setting_mapping
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="record.inspectionSettingId != null">
|
|
||||||
inspection_setting_id,
|
|
||||||
</if>
|
|
||||||
<if test="record.openAreaMappingId != null">
|
|
||||||
open_area_mapping_id,
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
create_time,
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
update_time,
|
|
||||||
</if>
|
|
||||||
<if test="record.deleted != null">
|
|
||||||
deleted,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="record.inspectionSettingId != null">
|
|
||||||
#{record.inspectionSettingId},
|
|
||||||
</if>
|
|
||||||
<if test="record.openAreaMappingId != null">
|
|
||||||
#{record.openAreaMappingId},
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
#{record.createTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
#{record.updateTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.deleted != null">
|
|
||||||
#{record.deleted},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
ON DUPLICATE KEY UPDATE update_time = now(), deleted = values(deleted)
|
|
||||||
</foreach>
|
|
||||||
</insert>
|
|
||||||
<update id="updateByPrimaryKeySelective">
|
|
||||||
update hy_inspection_setting_mapping
|
|
||||||
<set>
|
|
||||||
<if test="inspectionSettingId != null">
|
|
||||||
inspection_setting_id = #{inspectionSettingId},
|
|
||||||
</if>
|
|
||||||
<if test="openAreaMappingId != null">
|
|
||||||
open_area_mapping_id = #{openAreaMappingId},
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
create_time = #{createTime},
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
update_time = #{updateTime},
|
|
||||||
</if>
|
|
||||||
<if test="deleted != null">
|
|
||||||
deleted = #{deleted},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<select id="getOpenAreaMappingIds" resultType="long">
|
|
||||||
select open_area_mapping_id from hy_inspection_setting_mapping where inspection_setting_id = #{inspectionSettingId} and deleted = '0'
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<update id="deleteNotInOpenAreaMappingIds">
|
|
||||||
update
|
|
||||||
hy_inspection_setting_mapping
|
|
||||||
set
|
|
||||||
deleted = '1' , update_time = now()
|
|
||||||
where
|
|
||||||
inspection_setting_id = #{inspectionSettingId} and open_area_mapping_id not in
|
|
||||||
<foreach collection="openAreaMappingIds" separator="," open="(" close=")" item="openAreaMappingId" >#{openAreaMappingId}</foreach>
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<update id="deleteInspectionSettingMapping">
|
|
||||||
update hy_inspection_setting_mapping set deleted = '1' , update_time = now() where inspection_setting_id = #{inspectionSettingId}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<select id="getConflictInspectionSetting" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"/>
|
|
||||||
from
|
|
||||||
hy_inspection_setting_mapping
|
|
||||||
where
|
|
||||||
deleted = '0'
|
|
||||||
and
|
|
||||||
open_area_mapping_id in
|
|
||||||
<foreach collection="openAreaMappingIds" separator="," open="(" close=")" item="openAreaMappingId" >#{openAreaMappingId}</foreach>
|
|
||||||
<if test="inspectionSettingId != null">
|
|
||||||
and inspection_setting_id != #{inspectionSettingId}
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<update id="deleteInOpenAreaMappingIds">
|
|
||||||
update
|
|
||||||
hy_inspection_setting_mapping
|
|
||||||
set
|
|
||||||
deleted = '1' , update_time = now()
|
|
||||||
where
|
|
||||||
open_area_mapping_id in <foreach collection="openAreaMappingIds" separator="," open="(" close=")" item="openAreaMappingId" >#{openAreaMappingId}</foreach>
|
|
||||||
<if test="excludeInspectionSettingId != null">
|
|
||||||
and inspection_setting_id != #{excludeInspectionSettingId}
|
|
||||||
</if>
|
|
||||||
</update>
|
|
||||||
</mapper>
|
|
||||||
@@ -1,155 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.cool.store.mapper.HyIntendDevZoneInfoMapper">
|
|
||||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyIntendDevZoneInfoDO">
|
|
||||||
<id column="id" jdbcType="BIGINT" property="id" />
|
|
||||||
<result column="zone_name" jdbcType="VARCHAR" property="zoneName" />
|
|
||||||
<result column="associated_region_id" jdbcType="VARCHAR" property="associatedRegionId" />
|
|
||||||
<result column="type" jdbcType="VARCHAR" property="type" />
|
|
||||||
<result column="last_allot_user_id" jdbcType="VARCHAR" property="lastAllotUserId" />
|
|
||||||
<result column="deleted" jdbcType="TINYINT" property="deleted" />
|
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
||||||
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
|
|
||||||
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" />
|
|
||||||
</resultMap>
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
id, zone_name, associated_region_id, type, last_allot_user_id, deleted, create_time,
|
|
||||||
update_time, create_user_id, update_user_id
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<select id="selectById" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"></include>
|
|
||||||
from hy_intend_dev_zone_info
|
|
||||||
where id = #{id}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
|
|
||||||
insert into hy_intend_dev_zone_info
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="record.zoneName != null">
|
|
||||||
zone_name,
|
|
||||||
</if>
|
|
||||||
<if test="record.associatedRegionId != null">
|
|
||||||
associated_region_id,
|
|
||||||
</if>
|
|
||||||
<if test="record.type != null">
|
|
||||||
type,
|
|
||||||
</if>
|
|
||||||
<if test="record.lastAllotUserId != null">
|
|
||||||
last_allot_user_id,
|
|
||||||
</if>
|
|
||||||
<if test="record.deleted != null">
|
|
||||||
deleted,
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
create_time,
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
update_time,
|
|
||||||
</if>
|
|
||||||
<if test="record.createUserId != null">
|
|
||||||
create_user_id,
|
|
||||||
</if>
|
|
||||||
<if test="record.updateUserId != null">
|
|
||||||
update_user_id,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="record.zoneName != null">
|
|
||||||
#{record.zoneName},
|
|
||||||
</if>
|
|
||||||
<if test="record.associatedRegionId != null">
|
|
||||||
#{record.associatedRegionId},
|
|
||||||
</if>
|
|
||||||
<if test="record.type != null">
|
|
||||||
#{record.type},
|
|
||||||
</if>
|
|
||||||
<if test="record.lastAllotUserId != null">
|
|
||||||
#{record.lastAllotUserId},
|
|
||||||
</if>
|
|
||||||
<if test="record.deleted != null">
|
|
||||||
#{record.deleted},
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
#{record.createTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
#{record.updateTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.createUserId != null">
|
|
||||||
#{record.createUserId},
|
|
||||||
</if>
|
|
||||||
<if test="record.updateUserId != null">
|
|
||||||
#{record.updateUserId},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
<update id="updateByPrimaryKeySelective">
|
|
||||||
update hy_intend_dev_zone_info
|
|
||||||
<set>
|
|
||||||
<if test="record.zoneName != null">
|
|
||||||
zone_name = #{record.zoneName},
|
|
||||||
</if>
|
|
||||||
<if test="record.associatedRegionId != null">
|
|
||||||
associated_region_id = #{record.associatedRegionId},
|
|
||||||
</if>
|
|
||||||
<if test="record.type != null">
|
|
||||||
type = #{record.type},
|
|
||||||
</if>
|
|
||||||
<if test="record.lastAllotUserId != null">
|
|
||||||
last_allot_user_id = #{record.lastAllotUserId},
|
|
||||||
</if>
|
|
||||||
<if test="record.deleted != null">
|
|
||||||
deleted = #{record.deleted},
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
create_time = #{record.createTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
update_time = #{record.updateTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.createUserId != null">
|
|
||||||
create_user_id = #{record.createUserId},
|
|
||||||
</if>
|
|
||||||
<if test="record.updateUserId != null">
|
|
||||||
update_user_id = #{record.updateUserId},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where id = #{record.id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
|
|
||||||
<select id="getHyIntendDevZoneInfoList" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
*
|
|
||||||
from hy_intend_dev_zone_info
|
|
||||||
where type = #{type}
|
|
||||||
and deleted = 0
|
|
||||||
order by create_time desc , id desc
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="getZoneInfoByRegionIds" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"/>
|
|
||||||
from
|
|
||||||
hy_intend_dev_zone_info
|
|
||||||
where
|
|
||||||
deleted = 0 and <foreach collection="regionIds" separator="or" open="(" close=")" item="regionId">associated_region_id like concat("%", #{regionId}, "%")</foreach>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
|
|
||||||
<select id="selectByIds" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"></include>
|
|
||||||
from hy_intend_dev_zone_info
|
|
||||||
<where>
|
|
||||||
<if test="ids !=null and ids.size>0">
|
|
||||||
<foreach collection="ids" item="id" open="and id in (" close=")" separator=",">
|
|
||||||
#{id}
|
|
||||||
</foreach>
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
</mapper>
|
|
||||||
@@ -1,169 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.cool.store.mapper.HyIntendDevelopementMappingMapper">
|
|
||||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyIntendDevelopementMappingDO">
|
|
||||||
<id column="id" jdbcType="BIGINT" property="id" />
|
|
||||||
<result column="mapping_id" jdbcType="BIGINT" property="mappingId" />
|
|
||||||
<result column="open_area_mapping_id" jdbcType="VARCHAR" property="openAreaMappingId" />
|
|
||||||
<result column="type" jdbcType="VARCHAR" property="type" />
|
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
||||||
</resultMap>
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
id, mapping_id, open_area_mapping_id, type, create_time, update_time
|
|
||||||
</sql>
|
|
||||||
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
|
|
||||||
insert into hy_intend_developement_mapping
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="record.mappingId != null">
|
|
||||||
mapping_id,
|
|
||||||
</if>
|
|
||||||
<if test="record.openAreaMappingId != null">
|
|
||||||
open_area_mapping_id,
|
|
||||||
</if>
|
|
||||||
<if test="record.type != null">
|
|
||||||
type,
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
create_time,
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
update_time,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="record.mappingId != null">
|
|
||||||
#{record.mappingId},
|
|
||||||
</if>
|
|
||||||
<if test="record.openAreaMappingId != null">
|
|
||||||
#{record.openAreaMappingId},
|
|
||||||
</if>
|
|
||||||
<if test="record.type != null">
|
|
||||||
#{record.type},
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
#{record.createTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
#{record.updateTime},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
<update id="updateByPrimaryKeySelective">
|
|
||||||
update hy_intend_developement_mapping
|
|
||||||
<set>
|
|
||||||
<if test="record.mappingId != null">
|
|
||||||
mapping_id = #{record.mappingId},
|
|
||||||
</if>
|
|
||||||
<if test="record.openAreaMappingId != null">
|
|
||||||
open_area_mapping_id = #{record.openAreaMappingId},
|
|
||||||
</if>
|
|
||||||
<if test="record.type != null">
|
|
||||||
type = #{record.type},
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
create_time = #{record.createTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
update_time = #{record.updateTime},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where id = #{record.id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<delete id="deleteByOpenAreaIds">
|
|
||||||
delete from hy_intend_developement_mapping
|
|
||||||
<where>
|
|
||||||
<if test="type!=null and type!=''">
|
|
||||||
and type = #{type}
|
|
||||||
</if>
|
|
||||||
<if test="openAreaIdList!=null and openAreaIdList.size>0">
|
|
||||||
<foreach collection="openAreaIdList" open="and open_area_mapping_id in (" close=")" separator="," item="openAreaId">
|
|
||||||
#{openAreaId}
|
|
||||||
</foreach>
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<delete id="deleteByMappingIds">
|
|
||||||
delete from hy_intend_developement_mapping
|
|
||||||
<where>
|
|
||||||
<if test="type!=null and type!=''">
|
|
||||||
and type = #{type}
|
|
||||||
</if>
|
|
||||||
<if test="mappingIds!=null and mappingIds.size>0">
|
|
||||||
<foreach collection="mappingIds" open="and mapping_id in (" close=")" separator="," item="mappingId">
|
|
||||||
#{mappingId}
|
|
||||||
</foreach>
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
|
|
||||||
<insert id="batchInsert">
|
|
||||||
insert into
|
|
||||||
hy_intend_developement_mapping
|
|
||||||
(
|
|
||||||
mapping_id,
|
|
||||||
open_area_mapping_id,
|
|
||||||
type
|
|
||||||
)
|
|
||||||
values
|
|
||||||
<foreach collection="recordList" item="record" separator=",">
|
|
||||||
(#{record.mappingId},
|
|
||||||
#{record.openAreaMappingId},
|
|
||||||
#{record.type})
|
|
||||||
</foreach>
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
|
|
||||||
<select id="selectByMappingIdList" resultType="com.cool.store.dto.partner.ZoneCheckDTO">
|
|
||||||
select
|
|
||||||
a.open_area_mapping_id as openAreaMappingId,
|
|
||||||
b.zone_name as zoneName
|
|
||||||
from hy_intend_developement_mapping a inner join hy_intend_dev_zone_info b on a.mapping_id = b.id
|
|
||||||
<where>
|
|
||||||
<if test="mappingIdList!=null and mappingIdList.size>0">
|
|
||||||
<foreach collection="mappingIdList" open="and a.mapping_id in (" close=")" separator="," item="mappingId">
|
|
||||||
#{mappingId}
|
|
||||||
</foreach>
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
|
|
||||||
<select id="selectByOpenAreaMappingIdList" resultType="com.cool.store.dto.partner.ZoneCheckDTO">
|
|
||||||
select
|
|
||||||
a.open_area_mapping_id as openAreaMappingId,
|
|
||||||
b.zone_name as zoneName,
|
|
||||||
b.id as zoneId
|
|
||||||
from hy_intend_developement_mapping a inner join hy_intend_dev_zone_info b on a.mapping_id = b.id
|
|
||||||
<where>
|
|
||||||
<if test="type!=null and type !=''">
|
|
||||||
and a.type = #{type}
|
|
||||||
</if>
|
|
||||||
<if test="openAreaMappingIdList!=null and openAreaMappingIdList.size>0">
|
|
||||||
<foreach collection="openAreaMappingIdList" open="and a.open_area_mapping_id in (" close=")" separator="," item="mappingId">
|
|
||||||
#{mappingId}
|
|
||||||
</foreach>
|
|
||||||
</if>
|
|
||||||
<if test="currentId!=null">
|
|
||||||
and a.mapping_id != #{currentId}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectByOpenAreaMappingId" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
*
|
|
||||||
from hy_intend_developement_mapping a
|
|
||||||
<where>
|
|
||||||
<if test="type!=null and type !=''">
|
|
||||||
and a.type = #{type}
|
|
||||||
</if>
|
|
||||||
<if test="openAreaMappingId!=null">
|
|
||||||
and a.open_area_mapping_id = #{openAreaMappingId}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
</mapper>
|
|
||||||
@@ -1,159 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.cool.store.mapper.HyInterviewInspectionLogMapper">
|
|
||||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyInterviewInspectionLogDO">
|
|
||||||
<constructor>
|
|
||||||
<idArg column="id" javaType="java.lang.Long" />
|
|
||||||
<arg column="operator_user_id" javaType="java.lang.String" />
|
|
||||||
<arg column="inspection_id" javaType="java.lang.Long" />
|
|
||||||
<arg column="operation_type" javaType="java.lang.Byte" />
|
|
||||||
<arg column="description" javaType="java.lang.String" />
|
|
||||||
<arg column="files" javaType="java.lang.String" />
|
|
||||||
<arg column="operation_time" javaType="java.lang.String" />
|
|
||||||
<arg column="remark" javaType="java.lang.String" />
|
|
||||||
<arg column="create_time" javaType="java.lang.String" />
|
|
||||||
<arg column="update_time" javaType="java.lang.String" />
|
|
||||||
</constructor>
|
|
||||||
</resultMap>
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
id, operator_user_id, inspection_id, operation_type, description, files, operation_time,
|
|
||||||
remark, create_time, update_time
|
|
||||||
</sql>
|
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List" />
|
|
||||||
from hy_interview_inspection_log
|
|
||||||
where id = #{id}
|
|
||||||
</select>
|
|
||||||
<select id="interviewInspectionGetHistoryDetail" resultType="com.cool.store.vo.interview.InterviewInspectionHistoryInfo">
|
|
||||||
SELECT a.id, b.`name` as operatorUserName, b.mobile as operatorUserMobile,operation_time as inspectionTime, operation_type as operationType ,description,files as filesStr
|
|
||||||
FROM hy_interview_inspection_log a left join enterprise_user b on a.operator_user_id=b.user_id and b.deleted=0 WHERE inspection_id=#{inspectionId} ORDER BY operation_time desc
|
|
||||||
</select>
|
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
||||||
delete from hy_interview_inspection_log
|
|
||||||
where id = #{id}
|
|
||||||
</delete>
|
|
||||||
<insert id="insert" parameterType="com.cool.store.entity.HyInterviewInspectionLogDO">
|
|
||||||
insert into hy_interview_inspection_log (id, operator_user_id, inspection_id,
|
|
||||||
operation_type, description, files,
|
|
||||||
operation_time, remark, create_time,
|
|
||||||
update_time)
|
|
||||||
values (#{id}, #{operatorUserId}, #{inspectionId},
|
|
||||||
#{operationType}, #{description}, #{files},
|
|
||||||
#{operationTime}, #{remark}, #{createTime},
|
|
||||||
#{updateTime})
|
|
||||||
</insert>
|
|
||||||
<insert id="insertSelective" parameterType="com.cool.store.entity.HyInterviewInspectionLogDO">
|
|
||||||
insert into hy_interview_inspection_log
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="id != null">
|
|
||||||
id,
|
|
||||||
</if>
|
|
||||||
<if test="operatorUserId != null">
|
|
||||||
operator_user_id,
|
|
||||||
</if>
|
|
||||||
<if test="inspectionId != null">
|
|
||||||
inspection_id,
|
|
||||||
</if>
|
|
||||||
<if test="operationType != null">
|
|
||||||
operation_type,
|
|
||||||
</if>
|
|
||||||
<if test="description != null">
|
|
||||||
description,
|
|
||||||
</if>
|
|
||||||
<if test="files != null">
|
|
||||||
files,
|
|
||||||
</if>
|
|
||||||
<if test="operationTime != null">
|
|
||||||
operation_time,
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
remark,
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
create_time,
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
update_time,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="id != null">
|
|
||||||
#{id},
|
|
||||||
</if>
|
|
||||||
<if test="operatorUserId != null">
|
|
||||||
#{operatorUserId},
|
|
||||||
</if>
|
|
||||||
<if test="inspectionId != null">
|
|
||||||
#{inspectionId},
|
|
||||||
</if>
|
|
||||||
<if test="operationType != null">
|
|
||||||
#{operationType},
|
|
||||||
</if>
|
|
||||||
<if test="description != null">
|
|
||||||
#{description},
|
|
||||||
</if>
|
|
||||||
<if test="files != null">
|
|
||||||
#{files},
|
|
||||||
</if>
|
|
||||||
<if test="operationTime != null">
|
|
||||||
#{operationTime},
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
#{remark},
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
#{createTime},
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
#{updateTime},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.HyInterviewInspectionLogDO">
|
|
||||||
update hy_interview_inspection_log
|
|
||||||
<set>
|
|
||||||
<if test="operatorUserId != null">
|
|
||||||
operator_user_id = #{operatorUserId},
|
|
||||||
</if>
|
|
||||||
<if test="inspectionId != null">
|
|
||||||
inspection_id = #{inspectionId},
|
|
||||||
</if>
|
|
||||||
<if test="operationType != null">
|
|
||||||
operation_type = #{operationType},
|
|
||||||
</if>
|
|
||||||
<if test="description != null">
|
|
||||||
description = #{description},
|
|
||||||
</if>
|
|
||||||
<if test="files != null">
|
|
||||||
files = #{files},
|
|
||||||
</if>
|
|
||||||
<if test="operationTime != null">
|
|
||||||
operation_time = #{operationTime},
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
remark = #{remark},
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
create_time = #{createTime},
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
update_time = #{updateTime},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
<update id="updateByPrimaryKey" parameterType="com.cool.store.entity.HyInterviewInspectionLogDO">
|
|
||||||
update hy_interview_inspection_log
|
|
||||||
set operator_user_id = #{operatorUserId},
|
|
||||||
inspection_id = #{inspectionId},
|
|
||||||
operation_type = #{operationType},
|
|
||||||
description = #{description},
|
|
||||||
files = #{files},
|
|
||||||
operation_time = #{operationTime},
|
|
||||||
remark = #{remark},
|
|
||||||
create_time = #{createTime},
|
|
||||||
update_time = #{updateTime}
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
</mapper>
|
|
||||||
@@ -1,320 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.cool.store.mapper.HyOpenAreaInfoMapper">
|
|
||||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyOpenAreaInfoDO">
|
|
||||||
<id column="id" jdbcType="BIGINT" property="id" />
|
|
||||||
<result column="parent_id" jdbcType="BIGINT" property="parentId" />
|
|
||||||
<result column="area_name" jdbcType="VARCHAR" property="areaName" />
|
|
||||||
<result column="area_path" jdbcType="VARCHAR" property="areaPath" />
|
|
||||||
<result column="background_banner" jdbcType="VARCHAR" property="backgroundBanner" />
|
|
||||||
<result column="detail_banner" jdbcType="VARCHAR" property="detailBanner" />
|
|
||||||
<result column="area_status" jdbcType="VARCHAR" property="areaStatus" />
|
|
||||||
<result column="deleted" jdbcType="TINYINT" property="deleted" />
|
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
||||||
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" />
|
|
||||||
</resultMap>
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
id, parent_id, area_name, area_path, background_banner, detail_banner, area_status,
|
|
||||||
deleted, create_time, update_time, update_user_id
|
|
||||||
</sql>
|
|
||||||
<select id="selectById" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"></include>
|
|
||||||
from hy_open_area_info where id = #{id}
|
|
||||||
</select>
|
|
||||||
<insert id="insertSelective" parameterType="com.cool.store.entity.HyOpenAreaInfoDO" keyProperty="record.id" useGeneratedKeys="true">
|
|
||||||
insert into hy_open_area_info
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="record.parentId != null">
|
|
||||||
parent_id,
|
|
||||||
</if>
|
|
||||||
<if test="record.areaName != null">
|
|
||||||
area_name,
|
|
||||||
</if>
|
|
||||||
<if test="record.areaPath != null">
|
|
||||||
area_path,
|
|
||||||
</if>
|
|
||||||
<if test="record.backgroundBanner != null">
|
|
||||||
background_banner,
|
|
||||||
</if>
|
|
||||||
<if test="record.detailBanner != null">
|
|
||||||
detail_banner,
|
|
||||||
</if>
|
|
||||||
<if test="record.areaStatus != null">
|
|
||||||
area_status,
|
|
||||||
</if>
|
|
||||||
<if test="record.deleted != null">
|
|
||||||
deleted,
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
create_time,
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
update_time,
|
|
||||||
</if>
|
|
||||||
<if test="record.updateUserId != null">
|
|
||||||
update_user_id,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="record.parentId != null">
|
|
||||||
#{record.parentId},
|
|
||||||
</if>
|
|
||||||
<if test="record.areaName != null">
|
|
||||||
#{record.areaName},
|
|
||||||
</if>
|
|
||||||
<if test="record.areaPath != null">
|
|
||||||
#{record.areaPath},
|
|
||||||
</if>
|
|
||||||
<if test="record.backgroundBanner != null">
|
|
||||||
#{record.backgroundBanner},
|
|
||||||
</if>
|
|
||||||
<if test="record.detailBanner != null">
|
|
||||||
#{record.detailBanner},
|
|
||||||
</if>
|
|
||||||
<if test="record.areaStatus != null">
|
|
||||||
#{record.areaStatus},
|
|
||||||
</if>
|
|
||||||
<if test="record.deleted != null">
|
|
||||||
#{record.deleted},
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
#{record.createTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
#{record.updateTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.updateUserId != null">
|
|
||||||
#{record.updateUserId},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
<update id="updateByPrimaryKeySelective">
|
|
||||||
update hy_open_area_info
|
|
||||||
<set>
|
|
||||||
<if test="record.parentId != null">
|
|
||||||
parent_id = #{record.parentId},
|
|
||||||
</if>
|
|
||||||
<if test="record.areaName != null">
|
|
||||||
area_name = #{record.areaName},
|
|
||||||
</if>
|
|
||||||
<if test="record.areaPath != null">
|
|
||||||
area_path = #{record.areaPath},
|
|
||||||
</if>
|
|
||||||
<if test="record.backgroundBanner != null">
|
|
||||||
background_banner = #{record.backgroundBanner},
|
|
||||||
</if>
|
|
||||||
<if test="record.detailBanner != null">
|
|
||||||
detail_banner = #{record.detailBanner},
|
|
||||||
</if>
|
|
||||||
<if test="record.areaStatus != null">
|
|
||||||
area_status = #{record.areaStatus},
|
|
||||||
</if>
|
|
||||||
<if test="record.deleted != null">
|
|
||||||
deleted = #{record.deleted},
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
create_time = #{record.createTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
update_time = #{record.updateTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.updateUserId != null">
|
|
||||||
update_user_id = #{record.updateUserId},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where id = #{record.id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<update id="batchUpdateById">
|
|
||||||
update hy_open_area_info
|
|
||||||
<set>
|
|
||||||
<if test="backgroundBanner != null">
|
|
||||||
background_banner = #{backgroundBanner},
|
|
||||||
</if>
|
|
||||||
<if test="detailBanner != null">
|
|
||||||
detail_banner = #{detailBanner},
|
|
||||||
</if>
|
|
||||||
<if test="areaStatus != null">
|
|
||||||
area_status = #{areaStatus},
|
|
||||||
</if>
|
|
||||||
<if test="updateUserId != null">
|
|
||||||
update_user_id = #{updateUserId},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
<where>
|
|
||||||
<if test="ids !=null and ids.size>0">
|
|
||||||
<foreach collection="ids" item="id" open="and id in (" close=")" separator=",">
|
|
||||||
#{id}
|
|
||||||
</foreach>
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
</update>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<update id="batchUpdateByParentId">
|
|
||||||
update hy_open_area_info
|
|
||||||
<set>
|
|
||||||
<if test="backgroundBanner != null">
|
|
||||||
background_banner = #{backgroundBanner},
|
|
||||||
</if>
|
|
||||||
<if test="detailBanner != null">
|
|
||||||
detail_banner = #{detailBanner},
|
|
||||||
</if>
|
|
||||||
<if test="areaStatus != null">
|
|
||||||
area_status = #{areaStatus},
|
|
||||||
</if>
|
|
||||||
<if test="updateUserId != null">
|
|
||||||
update_user_id = #{updateUserId},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
<where>
|
|
||||||
<if test="parentIdList !=null and parentIdList.size>0">
|
|
||||||
<foreach collection="parentIdList" item="parentId" open="and parent_id in (" close=")" separator=",">
|
|
||||||
#{parentId}
|
|
||||||
</foreach>
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<select id="queryKeyOpenArea" resultMap="BaseResultMap">
|
|
||||||
select * from
|
|
||||||
hy_open_area_info
|
|
||||||
where area_status = 'keyOpen'
|
|
||||||
and province_city_flag = 1
|
|
||||||
and parent_id is not null
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="queryByKeyword" resultMap="BaseResultMap">
|
|
||||||
select * from
|
|
||||||
hy_open_area_info
|
|
||||||
<where>
|
|
||||||
<if test="keyword!=null and keyword!=''">
|
|
||||||
and area_path like concat('%',#{keyword},'%')
|
|
||||||
</if>
|
|
||||||
<if test="applyFlag!=null and applyFlag==true">
|
|
||||||
and (area_status = 'open' or area_status = 'keyOpen')
|
|
||||||
</if>
|
|
||||||
<if test="areaStatus!=null and areaStatus!=''">
|
|
||||||
and area_status = #{areaStatus}
|
|
||||||
</if>
|
|
||||||
<if test="filterData!=null and filterData==true">
|
|
||||||
and province_city_flag = 1
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
|
|
||||||
<select id="queryFirstLevel" resultMap="BaseResultMap">
|
|
||||||
select * from
|
|
||||||
hy_open_area_info where parent_id is null
|
|
||||||
</select>
|
|
||||||
|
|
||||||
|
|
||||||
<select id="queryByIdsExcludeFirstLevel" resultMap="BaseResultMap">
|
|
||||||
select * from
|
|
||||||
hy_open_area_info where parent_id is not null
|
|
||||||
<if test="ids !=null and ids.size>0">
|
|
||||||
<foreach collection="ids" item="id" open="and id in (" close=")" separator=",">
|
|
||||||
#{id}
|
|
||||||
</foreach>
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
|
|
||||||
<select id="getApplyReservationProvinceCount" resultType="com.cool.store.dto.partner.ApplyReservationProvinceDTO">
|
|
||||||
SELECT
|
|
||||||
substring(SUBSTRING_INDEX(area_path,'/',2),2) as areaName,
|
|
||||||
sum(if((area_status='open' or area_status = 'keyOpen') ,1,0)) as applyCount,
|
|
||||||
sum(if((area_status='notOpen' or area_status = 'saturated') ,1,0)) as reservationCount
|
|
||||||
FROM `hy_open_area_info` where parent_id is not null
|
|
||||||
group by substring(SUBSTRING_INDEX(area_path,'/',2),2)
|
|
||||||
</select>
|
|
||||||
|
|
||||||
|
|
||||||
<select id="getChildrenList" resultMap="BaseResultMap">
|
|
||||||
select * from
|
|
||||||
hy_open_area_info
|
|
||||||
<where>
|
|
||||||
<if test="parentId!=null">
|
|
||||||
and parent_id = #{parentId}
|
|
||||||
</if>
|
|
||||||
<if test="type!=null and type == 'apply'">
|
|
||||||
and (area_status = 'open' or area_status = 'keyOpen')
|
|
||||||
</if>
|
|
||||||
<if test="type!=null and type == 'reservation'">
|
|
||||||
and (area_status='notOpen' or area_status = 'saturated')
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="getChildrenCount" resultType="java.lang.Integer">
|
|
||||||
select count(1) from
|
|
||||||
hy_open_area_info
|
|
||||||
<where>
|
|
||||||
<if test="parentId!=null">
|
|
||||||
and parent_id = #{parentId}
|
|
||||||
</if>
|
|
||||||
<if test="type!=null and type == 'apply'">
|
|
||||||
and (area_status = 'open' or area_status = 'keyOpen')
|
|
||||||
</if>
|
|
||||||
<if test="type!=null and type == 'reservation'">
|
|
||||||
and (area_status='notOpen' or area_status = 'saturated')
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectByIds" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"></include>
|
|
||||||
from hy_open_area_info
|
|
||||||
<where>
|
|
||||||
<if test="idList !=null and idList.size>0">
|
|
||||||
<foreach collection="idList" item="id" open="and id in (" close=")" separator=",">
|
|
||||||
#{id}
|
|
||||||
</foreach>
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="getAllOpenArea" resultMap="BaseResultMap">
|
|
||||||
select <include refid="Base_Column_List"/> from hy_open_area_info
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="filterLeafNode" resultType="long">
|
|
||||||
select
|
|
||||||
id
|
|
||||||
from
|
|
||||||
hy_open_area_info
|
|
||||||
where
|
|
||||||
deleted = '0' and province_city_flag = '0' and id in <foreach collection="openAreaIds" item="openAreaId" separator="," open="(" close=")">#{openAreaId}</foreach>
|
|
||||||
</select>
|
|
||||||
<select id="getSonArea" resultType="com.cool.store.entity.HyOpenAreaInfoDO">
|
|
||||||
SELECT
|
|
||||||
<include refid="Base_Column_List"></include>
|
|
||||||
FROM hy_open_area_info
|
|
||||||
WHERE parent_id = #{id}
|
|
||||||
</select>
|
|
||||||
<select id="getProvinceAllCode" resultMap="BaseResultMap">
|
|
||||||
SELECT b.* FROM `hy_open_area_info` a inner join hy_open_area_info b on a.`id`=b.`parent_id`
|
|
||||||
WHERE a.parent_id=#{id} ORDER BY b.id desc
|
|
||||||
</select>
|
|
||||||
<select id="selectByAreaPath" resultMap="BaseResultMap">
|
|
||||||
SELECT
|
|
||||||
<include refid="Base_Column_List"></include>
|
|
||||||
FROM `hy_open_area_info`
|
|
||||||
WHERE area_path= concat('/',#{areaPath},'/') and deleted=0 and province_city_flag=0
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectAllCity" resultMap="BaseResultMap">
|
|
||||||
SELECT
|
|
||||||
<include refid="Base_Column_List"></include>
|
|
||||||
FROM `hy_open_area_info`
|
|
||||||
WHERE deleted=0 and province_city_flag = 1 and parent_id is not null
|
|
||||||
</select>
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
@@ -1,179 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.cool.store.mapper.HyOutboundMobileMapper">
|
|
||||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyOutboundMobileDO">
|
|
||||||
<id column="id" property="id" />
|
|
||||||
<result column="mobile" property="mobile" />
|
|
||||||
<result column="remark" property="remark" />
|
|
||||||
<result column="edit_user_id" property="editUserId" />
|
|
||||||
<result column="create_user_id" property="createUserId" />
|
|
||||||
<result column="update_user_id" property="updateUserId" />
|
|
||||||
<result column="deleted" property="deleted" />
|
|
||||||
<result column="create_time" property="createTime" />
|
|
||||||
<result column="update_time" property="updateTime" />
|
|
||||||
</resultMap>
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
id, mobile, remark, edit_user_id, create_user_id, update_user_id, deleted, create_time, update_time
|
|
||||||
</sql>
|
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List" />
|
|
||||||
from hy_outbound_mobile
|
|
||||||
where id = #{id}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectByPrimarySelective" resultType="com.cool.store.entity.HyOutboundMobileDO">
|
|
||||||
select <include refid="Base_Column_List" />
|
|
||||||
from hy_outbound_mobile
|
|
||||||
where deleted = 0
|
|
||||||
<if test="id != null">
|
|
||||||
and id = #{id}
|
|
||||||
</if>
|
|
||||||
<if test="mobile != null and mobile != ''">
|
|
||||||
and mobile = #{mobile}
|
|
||||||
</if>
|
|
||||||
<if test="editUserId != null and editUserId != ''">
|
|
||||||
and edit_user_id = #{editUserId}
|
|
||||||
</if>
|
|
||||||
<if test="remark != null and remark != ''">
|
|
||||||
and remark = #{remark}
|
|
||||||
</if>
|
|
||||||
<if test="createUserId != null">
|
|
||||||
and create_user_id = #{createUserId}
|
|
||||||
</if>
|
|
||||||
<if test="updateUserId != null">
|
|
||||||
and update_user_id = #{updateUserId}
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
and create_time = #{createTime}
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
and update_time = #{updateTime}
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
||||||
delete from hy_outbound_mobile
|
|
||||||
where id = #{id}
|
|
||||||
</delete>
|
|
||||||
<insert id="insert" parameterType="com.cool.store.entity.HyOutboundMobileDO">
|
|
||||||
insert into hy_outbound_mobile (id, mobile, edit_user_id, remark,
|
|
||||||
create_user_id, update_user_id, deleted,
|
|
||||||
create_time, update_time)
|
|
||||||
values (#{id}, #{mobile}, #{editUserId}, #{remark},
|
|
||||||
#{createUserId}, #{updateUserId}, #{deleted},
|
|
||||||
#{createTime}, #{updateTime})
|
|
||||||
</insert>
|
|
||||||
<insert id="insertSelective" parameterType="com.cool.store.entity.HyOutboundMobileDO">
|
|
||||||
insert into hy_outbound_mobile
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="id != null">
|
|
||||||
id,
|
|
||||||
</if>
|
|
||||||
<if test="mobile != null and mobile != ''">
|
|
||||||
mobile,
|
|
||||||
</if>
|
|
||||||
<if test="editUserId != null and editUserId != ''">
|
|
||||||
edit_user_id,
|
|
||||||
</if>
|
|
||||||
<if test="remark != null and remark != ''">
|
|
||||||
remark,
|
|
||||||
</if>
|
|
||||||
<if test="createUserId != null">
|
|
||||||
create_user_id,
|
|
||||||
</if>
|
|
||||||
<if test="updateUserId != null">
|
|
||||||
update_user_id,
|
|
||||||
</if>
|
|
||||||
<if test="deleted != null">
|
|
||||||
deleted,
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
create_time,
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
update_time,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="id != null">
|
|
||||||
#{id},
|
|
||||||
</if>
|
|
||||||
<if test="mobile != null and mobile != ''">
|
|
||||||
#{mobile},
|
|
||||||
</if>
|
|
||||||
<if test="remark != null and remark != ''">
|
|
||||||
#{remark},
|
|
||||||
</if>
|
|
||||||
<if test="editUserId != null and editUserId != ''">
|
|
||||||
#{editUserId},
|
|
||||||
</if>
|
|
||||||
<if test="createUserId != null">
|
|
||||||
#{createUserId},
|
|
||||||
</if>
|
|
||||||
<if test="updateUserId != null">
|
|
||||||
#{updateUserId},
|
|
||||||
</if>
|
|
||||||
<if test="deleted != null">
|
|
||||||
#{deleted},
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
#{createTime},
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
#{updateTime},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.HyOutboundMobileDO">
|
|
||||||
update hy_outbound_mobile
|
|
||||||
<set>
|
|
||||||
<if test="mobile != null and mobile != ''">
|
|
||||||
mobile = #{mobile},
|
|
||||||
</if>
|
|
||||||
<if test="remark != null and remark != ''">
|
|
||||||
remark = #{remark},
|
|
||||||
</if>
|
|
||||||
<if test="editUserId != null and editUserId != ''">
|
|
||||||
edit_user_id = #{editUserId},
|
|
||||||
</if>
|
|
||||||
<if test="createUserId != null">
|
|
||||||
create_user_id = #{createUserId},
|
|
||||||
</if>
|
|
||||||
<if test="updateUserId != null">
|
|
||||||
update_user_id = #{updateUserId},
|
|
||||||
</if>
|
|
||||||
<if test="deleted != null">
|
|
||||||
deleted = #{deleted},
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
create_time = #{createTime},
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
update_time = #{updateTime},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
<update id="updateByPrimaryKey" parameterType="com.cool.store.entity.HyOutboundMobileDO">
|
|
||||||
update hy_outbound_mobile
|
|
||||||
set mobile = #{mobile},
|
|
||||||
edit_user_id = #{editUserId},
|
|
||||||
remark = #{remark},
|
|
||||||
create_user_id = #{createUserId},
|
|
||||||
update_user_id = #{updateUserId},
|
|
||||||
deleted = #{deleted},
|
|
||||||
create_time = #{createTime},
|
|
||||||
update_time = #{updateTime}
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<!-- 获取呼出手机号列表 -->
|
|
||||||
<select id="getOutboundNumberList" resultType="com.cool.store.vo.HyOutboundVo">
|
|
||||||
SELECT t1.id, t1.mobile as outboundNumber, t2.name as updaterName, t2.mobile as updaterMobile, t1.update_time as update_time
|
|
||||||
FROM hy_outbound_mobile t1
|
|
||||||
LEFT JOIN enterprise_user t2 ON t1.edit_user_id = t2.user_id
|
|
||||||
WHERE t2.deleted = 0 AND t1.deleted = 0
|
|
||||||
AND t1.edit_user_id = #{userId}
|
|
||||||
</select>
|
|
||||||
</mapper>
|
|
||||||
@@ -1,326 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.cool.store.mapper.HyPartnerBaseInfoMapper">
|
|
||||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyPartnerBaseInfoDO">
|
|
||||||
<id column="id" jdbcType="BIGINT" property="id" />
|
|
||||||
<result column="partner_id" jdbcType="VARCHAR" property="partnerId" />
|
|
||||||
<result column="partner_line_id" jdbcType="BIGINT" property="partnerLineId" />
|
|
||||||
<result column="mobile" jdbcType="VARCHAR" property="mobile" />
|
|
||||||
<result column="username" jdbcType="VARCHAR" property="username" />
|
|
||||||
<result column="sex" jdbcType="BIT" property="sex" />
|
|
||||||
<result column="nation" jdbcType="VARCHAR" property="nation" />
|
|
||||||
<result column="birthdate" jdbcType="DATE" property="birthdate" />
|
|
||||||
<result column="id_card" jdbcType="VARCHAR" property="idCard" />
|
|
||||||
<result column="id_card_photo_front" jdbcType="VARCHAR" property="idCardPhotoFront" />
|
|
||||||
<result column="id_card_photo_black" jdbcType="VARCHAR" property="idCardPhotoBlack" />
|
|
||||||
<result column="live_address" jdbcType="VARCHAR" property="liveAddress" />
|
|
||||||
<result column="user_portrait" jdbcType="VARCHAR" property="userPortrait" />
|
|
||||||
<result column="status" jdbcType="TINYINT" property="status" />
|
|
||||||
<result column="latest_log_message" jdbcType="VARCHAR" property="latestLogMessage" />
|
|
||||||
<result column="pass_reason" jdbcType="VARCHAR" property="passReason" />
|
|
||||||
<result column="certify_file" jdbcType="VARCHAR" property="certifyFile" />
|
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
||||||
</resultMap>
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
id, partner_id, partner_line_id, mobile, username, sex, nation, birthdate, id_card,
|
|
||||||
id_card_photo_front, id_card_photo_black, live_address, user_portrait, status, latest_log_message,
|
|
||||||
pass_reason, certify_file, create_time, update_time
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<select id="selectById" resultMap="BaseResultMap">
|
|
||||||
select <include refid="Base_Column_List"></include>
|
|
||||||
from hy_partner_base_info
|
|
||||||
where
|
|
||||||
id = #{id}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<insert id="batchInsert">
|
|
||||||
insert into
|
|
||||||
hy_partner_base_info
|
|
||||||
(
|
|
||||||
partner_id,
|
|
||||||
partner_line_id
|
|
||||||
)
|
|
||||||
values
|
|
||||||
<foreach collection="records" item="record" separator=",">
|
|
||||||
(#{record.partnerId},
|
|
||||||
#{record.partnerLineId})
|
|
||||||
</foreach>
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
|
|
||||||
insert into hy_partner_base_info
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="record.partnerId != null">
|
|
||||||
partner_id,
|
|
||||||
</if>
|
|
||||||
<if test="record.partnerLineId != null">
|
|
||||||
partner_line_id,
|
|
||||||
</if>
|
|
||||||
<if test="record.mobile != null">
|
|
||||||
mobile,
|
|
||||||
</if>
|
|
||||||
<if test="record.username != null">
|
|
||||||
username,
|
|
||||||
</if>
|
|
||||||
<if test="record.sex != null">
|
|
||||||
sex,
|
|
||||||
</if>
|
|
||||||
<if test="record.nation != null">
|
|
||||||
nation,
|
|
||||||
</if>
|
|
||||||
<if test="record.birthdate != null">
|
|
||||||
birthdate,
|
|
||||||
</if>
|
|
||||||
<if test="record.idCard != null">
|
|
||||||
id_card,
|
|
||||||
</if>
|
|
||||||
<if test="record.idCardPhotoFront != null">
|
|
||||||
id_card_photo_front,
|
|
||||||
</if>
|
|
||||||
<if test="record.idCardPhotoBlack != null">
|
|
||||||
id_card_photo_black,
|
|
||||||
</if>
|
|
||||||
<if test="record.liveAddress != null">
|
|
||||||
live_address,
|
|
||||||
</if>
|
|
||||||
<if test="record.userPortrait != null">
|
|
||||||
user_portrait,
|
|
||||||
</if>
|
|
||||||
<if test="record.status != null">
|
|
||||||
status,
|
|
||||||
</if>
|
|
||||||
<if test="record.latestLogMessage != null">
|
|
||||||
latest_log_message,
|
|
||||||
</if>
|
|
||||||
<if test="record.passReason != null">
|
|
||||||
pass_reason,
|
|
||||||
</if>
|
|
||||||
<if test="record.certifyFile != null">
|
|
||||||
certify_file,
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
create_time,
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
update_time,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="record.partnerId != null">
|
|
||||||
#{record.partnerId},
|
|
||||||
</if>
|
|
||||||
<if test="record.partnerLineId != null">
|
|
||||||
#{record.partnerLineId},
|
|
||||||
</if>
|
|
||||||
<if test="record.mobile != null">
|
|
||||||
#{record.mobile},
|
|
||||||
</if>
|
|
||||||
<if test="record.username != null">
|
|
||||||
#{record.username},
|
|
||||||
</if>
|
|
||||||
<if test="record.sex != null">
|
|
||||||
#{record.sex},
|
|
||||||
</if>
|
|
||||||
<if test="record.nation != null">
|
|
||||||
#{record.nation},
|
|
||||||
</if>
|
|
||||||
<if test="record.birthdate != null">
|
|
||||||
#{record.birthdate},
|
|
||||||
</if>
|
|
||||||
<if test="record.idCard != null">
|
|
||||||
#{record.idCard},
|
|
||||||
</if>
|
|
||||||
<if test="record.idCardPhotoFront != null">
|
|
||||||
#{record.idCardPhotoFront},
|
|
||||||
</if>
|
|
||||||
<if test="record.idCardPhotoBlack != null">
|
|
||||||
#{record.idCardPhotoBlack},
|
|
||||||
</if>
|
|
||||||
<if test="record.liveAddress != null">
|
|
||||||
#{record.liveAddress},
|
|
||||||
</if>
|
|
||||||
<if test="record.userPortrait != null">
|
|
||||||
#{record.userPortrait},
|
|
||||||
</if>
|
|
||||||
<if test="record.status != null">
|
|
||||||
#{record.status},
|
|
||||||
</if>
|
|
||||||
<if test="record.latestLogMessage != null">
|
|
||||||
#{record.latestLogMessage},
|
|
||||||
</if>
|
|
||||||
<if test="record.passReason != null">
|
|
||||||
#{record.passReason},
|
|
||||||
</if>
|
|
||||||
<if test="record.certifyFile != null">
|
|
||||||
#{record.certifyFile},
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
#{record.createTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
#{record.updateTime},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<update id="updateByPrimaryKeySelective">
|
|
||||||
update hy_partner_base_info
|
|
||||||
<set>
|
|
||||||
<if test="record.partnerId != null">
|
|
||||||
partner_id = #{record.partnerId},
|
|
||||||
</if>
|
|
||||||
<if test="record.partnerLineId != null">
|
|
||||||
partner_line_id = #{record.partnerLineId},
|
|
||||||
</if>
|
|
||||||
<if test="record.mobile != null">
|
|
||||||
mobile = #{record.mobile},
|
|
||||||
</if>
|
|
||||||
<if test="record.username != null">
|
|
||||||
username = #{record.username},
|
|
||||||
</if>
|
|
||||||
<if test="record.sex != null">
|
|
||||||
sex = #{record.sex},
|
|
||||||
</if>
|
|
||||||
<if test="record.nation != null">
|
|
||||||
nation = #{record.nation},
|
|
||||||
</if>
|
|
||||||
<if test="record.birthdate != null">
|
|
||||||
birthdate = #{record.birthdate},
|
|
||||||
</if>
|
|
||||||
<if test="record.idCard != null">
|
|
||||||
id_card = #{record.idCard},
|
|
||||||
</if>
|
|
||||||
<if test="record.idCardPhotoFront != null">
|
|
||||||
id_card_photo_front = #{record.idCardPhotoFront},
|
|
||||||
</if>
|
|
||||||
<if test="record.idCardPhotoBlack != null">
|
|
||||||
id_card_photo_black = #{record.idCardPhotoBlack},
|
|
||||||
</if>
|
|
||||||
<if test="record.liveAddress != null">
|
|
||||||
live_address = #{record.liveAddress},
|
|
||||||
</if>
|
|
||||||
<if test="record.userPortrait != null">
|
|
||||||
user_portrait = #{record.userPortrait},
|
|
||||||
</if>
|
|
||||||
<if test="record.status != null">
|
|
||||||
status = #{record.status},
|
|
||||||
</if>
|
|
||||||
<if test="record.latestLogMessage != null">
|
|
||||||
latest_log_message = #{record.latestLogMessage},
|
|
||||||
</if>
|
|
||||||
<if test="record.passReason != null">
|
|
||||||
pass_reason = #{record.passReason},
|
|
||||||
</if>
|
|
||||||
<if test="record.certifyFile != null">
|
|
||||||
certify_file = #{record.certifyFile},
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
create_time = #{record.createTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
update_time = #{record.updateTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.passTime != null">
|
|
||||||
pass_time = #{record.passTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.passUserId != null">
|
|
||||||
pass_user_id = #{record.passUserId},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where id = #{record.id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<update id="updateByPrimaryKey">
|
|
||||||
update hy_partner_base_info
|
|
||||||
set
|
|
||||||
nation = #{record.nation},
|
|
||||||
birthdate = #{record.birthdate},
|
|
||||||
id_card = #{record.idCard},
|
|
||||||
user_portrait = #{record.userPortrait},
|
|
||||||
id_card_photo_front = #{record.idCardPhotoFront},
|
|
||||||
id_card_photo_black = #{record.idCardPhotoBlack},
|
|
||||||
live_address = #{record.liveAddress},
|
|
||||||
status = #{record.status}
|
|
||||||
where id = #{record.id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
|
|
||||||
<update id="updateByPartnerId">
|
|
||||||
update hy_partner_base_info
|
|
||||||
<set>
|
|
||||||
update_time=now(),
|
|
||||||
<if test="userName != null and userName!=''">
|
|
||||||
username = #{userName},
|
|
||||||
</if>
|
|
||||||
<if test="mobile != null and mobile!=''">
|
|
||||||
mobile = #{mobile},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where partner_id = #{partnerId}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<select id="getByPartnerIdAndLineId" resultMap="BaseResultMap" >
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"></include>
|
|
||||||
from hy_partner_base_info
|
|
||||||
where partner_id = #{partnerId} and partner_line_id = #{partnerLineId}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="getByPartnerLineId" resultMap="BaseResultMap" >
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"></include>
|
|
||||||
from hy_partner_base_info
|
|
||||||
where partner_line_id = #{partnerLineId}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="getByPartnerLineIds" resultMap="BaseResultMap" >
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"></include>
|
|
||||||
from hy_partner_base_info
|
|
||||||
<where>
|
|
||||||
<if test="partnerLineIds !=null and partnerLineIds.size>0">
|
|
||||||
<foreach collection="partnerLineIds" item="lineId" open="and partner_line_id in (" close=")" separator=",">
|
|
||||||
#{lineId}
|
|
||||||
</foreach>
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="getByIdCard" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
*
|
|
||||||
from hy_partner_base_info a
|
|
||||||
left join hy_partner_line_info b on a.partner_line_id = b.id
|
|
||||||
where a.id_card = #{idCard} and ( b.line_status != 3 and b.deleted = 0 )
|
|
||||||
</select>
|
|
||||||
<select id="selectAllList" resultType="java.lang.Integer">
|
|
||||||
SELECT count(*) FROM hy_partner_base_info where mobile is not null and user_portrait is null
|
|
||||||
</select>
|
|
||||||
<select id="selectListByLimit" resultType="com.cool.store.entity.SyncEcCustomerLabelDO">
|
|
||||||
SELECT id,mobile,user_portrait as userPortrait FROM hy_partner_base_info where mobile is not null and user_portrait is null LIMIT #{limit1},#{limit2}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<update id="cleanIdCardInfoByPartnerLineId">
|
|
||||||
update hy_partner_base_info
|
|
||||||
set
|
|
||||||
id_card = #{idCard},
|
|
||||||
id_card_photo_front = #{idCardPhotoFront},
|
|
||||||
id_card_photo_black = #{idCardPhotoBlack}
|
|
||||||
where partner_line_id = #{partnerLineId}
|
|
||||||
</update>
|
|
||||||
<update id="updateByMobile">
|
|
||||||
update hy_partner_base_info
|
|
||||||
<set>
|
|
||||||
update_time=now(),
|
|
||||||
<if test="userPortrait != null and userPortrait!=''">
|
|
||||||
user_portrait = concat(",",#{userPortrait},","),
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where mobile = #{mobile}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
@@ -1,148 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.cool.store.mapper.HyPartnerCertificationInfoMapper">
|
|
||||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyPartnerCertificationInfoDO">
|
|
||||||
<id column="id" jdbcType="BIGINT" property="id" />
|
|
||||||
<result column="partner_id" jdbcType="VARCHAR" property="partnerId" />
|
|
||||||
<result column="partner_line_id" jdbcType="BIGINT" property="partnerLineId" />
|
|
||||||
<result column="partner_interview_id" jdbcType="BIGINT" property="partnerInterviewId" />
|
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
||||||
</resultMap>
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
id, partner_id, partner_line_id, partner_interview_id, qualify_verify_id, intention_contract_no, data_source, certification_info_record_json, create_time, update_time
|
|
||||||
</sql>
|
|
||||||
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
|
|
||||||
insert into hy_partner_certification_info
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="record.partnerId != null">
|
|
||||||
partner_id,
|
|
||||||
</if>
|
|
||||||
<if test="record.partnerLineId != null">
|
|
||||||
partner_line_id,
|
|
||||||
</if>
|
|
||||||
<if test="record.partnerInterviewId != null">
|
|
||||||
partner_interview_id,
|
|
||||||
</if>
|
|
||||||
<if test="record.qualifyVerifyId != null">
|
|
||||||
qualify_verify_id,
|
|
||||||
</if>
|
|
||||||
<if test="record.intentionContractNo != null">
|
|
||||||
intention_contract_no,
|
|
||||||
</if>
|
|
||||||
<if test="record.dataSource != null">
|
|
||||||
data_source,
|
|
||||||
</if>
|
|
||||||
<if test="record.certificationInfoRecordJson != null">
|
|
||||||
certification_info_record_json,
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
create_time,
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
update_time,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="record.partnerId != null">
|
|
||||||
#{record.partnerId},
|
|
||||||
</if>
|
|
||||||
<if test="record.partnerLineId != null">
|
|
||||||
#{record.partnerLineId},
|
|
||||||
</if>
|
|
||||||
<if test="record.partnerInterviewId != null">
|
|
||||||
#{record.partnerInterviewId},
|
|
||||||
</if>
|
|
||||||
<if test="record.qualifyVerifyId != null">
|
|
||||||
#{record.qualifyVerifyId},
|
|
||||||
</if>
|
|
||||||
<if test="record.intentionContractNo != null">
|
|
||||||
#{record.intentionContractNo},
|
|
||||||
</if>
|
|
||||||
<if test="record.dataSource != null">
|
|
||||||
#{record.dataSource},
|
|
||||||
</if>
|
|
||||||
<if test="record.certificationInfoRecordJson != null">
|
|
||||||
#{record.certificationInfoRecordJson},
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
#{record.createTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
#{record.updateTime},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
<update id="updateByPrimaryKeySelective">
|
|
||||||
update hy_partner_certification_info
|
|
||||||
<set>
|
|
||||||
<if test="record.partnerId != null">
|
|
||||||
partner_id = #{record.partnerId},
|
|
||||||
</if>
|
|
||||||
<if test="record.partnerLineId != null">
|
|
||||||
partner_line_id = #{record.partnerLineId},
|
|
||||||
</if>
|
|
||||||
<if test="record.partnerInterviewId != null">
|
|
||||||
partner_interview_id = #{record.partnerInterviewId},
|
|
||||||
</if>
|
|
||||||
<if test="record.qualifyVerifyId != null">
|
|
||||||
qualify_verify_id = #{record.qualifyVerifyId},
|
|
||||||
</if>
|
|
||||||
<if test="record.intentionContractNo != null">
|
|
||||||
intention_contract_no = #{record.intentionContractNo},
|
|
||||||
</if>
|
|
||||||
<if test="record.dataSource != null">
|
|
||||||
data_source = #{record.dataSource},
|
|
||||||
</if>
|
|
||||||
<if test="record.certificationInfoRecordJson != null">
|
|
||||||
certification_info_record_json = #{record.certificationInfoRecordJson},
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
create_time = #{record.createTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
update_time = #{record.updateTime},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
<where>
|
|
||||||
1 = 0
|
|
||||||
<if test="record.id != null">
|
|
||||||
or id = #{record.id}
|
|
||||||
</if>
|
|
||||||
<if test="record.partnerLineId != null">
|
|
||||||
or partner_line_id = #{record.partnerLineId}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<!-- 根据资质审核流程 id 获取面试会议 id -->
|
|
||||||
<select id="getInterviewIdByQualifyVerifyId" resultType="java.lang.String">
|
|
||||||
select partner_interview_id
|
|
||||||
from hy_partner_certification_info
|
|
||||||
where qualify_verify_id = #{qualifyVerifyId}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 根据资质审核流程 id 获取面试会议计划 id -->
|
|
||||||
<select id="getInterviewPlanIdByQualifyVerifyId" resultType="java.lang.String">
|
|
||||||
select interview_plan_id
|
|
||||||
from hy_partner_interview
|
|
||||||
where id = (
|
|
||||||
select partner_interview_id
|
|
||||||
from hy_partner_certification_info
|
|
||||||
where qualify_verify_id = #{qualifyVerifyId}
|
|
||||||
)
|
|
||||||
and deleted = 0
|
|
||||||
</select>
|
|
||||||
<select id="selectByPartnerLineId" resultType="com.cool.store.entity.HyPartnerCertificationInfoDO">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List" />
|
|
||||||
from hy_partner_certification_info
|
|
||||||
where partner_line_id = #{partnerLineId}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<update id="updateLineId">
|
|
||||||
update hy_partner_interview
|
|
||||||
set partner_line_id = #{newLineId} , partner_id = #{newPartnerId}
|
|
||||||
where partner_line_id = #{oldLineId}
|
|
||||||
</update>
|
|
||||||
</mapper>
|
|
||||||
@@ -1,151 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.cool.store.mapper.HyPartnerClerkMapper">
|
|
||||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyPartnerClerkDO">
|
|
||||||
<id column="id" jdbcType="BIGINT" property="id" />
|
|
||||||
<result column="partner_line_id" jdbcType="BIGINT" property="partnerLineId" />
|
|
||||||
<result column="partner_id" jdbcType="VARCHAR" property="partnerId" />
|
|
||||||
<result column="username" jdbcType="VARCHAR" property="username" />
|
|
||||||
<result column="relationship" jdbcType="VARCHAR" property="relationship" />
|
|
||||||
<result column="age" jdbcType="INTEGER" property="age" />
|
|
||||||
<result column="choose_reason" jdbcType="VARCHAR" property="chooseReason" />
|
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
||||||
</resultMap>
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
id, partner_line_id, partner_id, username, relationship, age, choose_reason, create_time,
|
|
||||||
update_time
|
|
||||||
</sql>
|
|
||||||
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
|
|
||||||
insert into hy_partner_clerk
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="record.partnerLineId != null">
|
|
||||||
partner_line_id,
|
|
||||||
</if>
|
|
||||||
<if test="record.partnerId != null">
|
|
||||||
partner_id,
|
|
||||||
</if>
|
|
||||||
<if test="record.username != null">
|
|
||||||
username,
|
|
||||||
</if>
|
|
||||||
<if test="record.relationship != null">
|
|
||||||
relationship,
|
|
||||||
</if>
|
|
||||||
<if test="record.age != null">
|
|
||||||
age,
|
|
||||||
</if>
|
|
||||||
<if test="record.chooseReason != null">
|
|
||||||
choose_reason,
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
create_time,
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
update_time,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="record.partnerLineId != null">
|
|
||||||
#{record.partnerLineId},
|
|
||||||
</if>
|
|
||||||
<if test="record.partnerId != null">
|
|
||||||
#{record.partnerId},
|
|
||||||
</if>
|
|
||||||
<if test="record.username != null">
|
|
||||||
#{record.username},
|
|
||||||
</if>
|
|
||||||
<if test="record.relationship != null">
|
|
||||||
#{record.relationship},
|
|
||||||
</if>
|
|
||||||
<if test="record.age != null">
|
|
||||||
#{record.age},
|
|
||||||
</if>
|
|
||||||
<if test="record.chooseReason != null">
|
|
||||||
#{record.chooseReason},
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
#{record.createTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
#{record.updateTime},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
<update id="updateByPrimaryKeySelective">
|
|
||||||
update hy_partner_clerk
|
|
||||||
<set>
|
|
||||||
<if test="record.partnerLineId != null">
|
|
||||||
partner_line_id = #{record.partnerLineId},
|
|
||||||
</if>
|
|
||||||
<if test="record.partnerId != null">
|
|
||||||
partner_id = #{record.partnerId},
|
|
||||||
</if>
|
|
||||||
<if test="record.username != null">
|
|
||||||
username = #{record.username},
|
|
||||||
</if>
|
|
||||||
<if test="record.relationship != null">
|
|
||||||
relationship = #{record.relationship},
|
|
||||||
</if>
|
|
||||||
<if test="record.age != null">
|
|
||||||
age = #{record.age},
|
|
||||||
</if>
|
|
||||||
<if test="record.chooseReason != null">
|
|
||||||
choose_reason = #{record.chooseReason},
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
create_time = #{record.createTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
update_time = #{record.updateTime},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where id = #{record.id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<select id="getHyPartnerClerkList" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"></include>
|
|
||||||
from hy_partner_clerk
|
|
||||||
where partner_line_id = #{lineId}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<insert id="batchInsert">
|
|
||||||
insert into
|
|
||||||
hy_partner_clerk
|
|
||||||
(
|
|
||||||
partner_line_id,
|
|
||||||
partner_id,
|
|
||||||
username,
|
|
||||||
relationship,
|
|
||||||
age,
|
|
||||||
choose_reason
|
|
||||||
)
|
|
||||||
values
|
|
||||||
<foreach collection="recordList" item="record" separator=",">
|
|
||||||
(#{record.partnerLineId},
|
|
||||||
#{record.partnerId},
|
|
||||||
#{record.username},
|
|
||||||
#{record.relationship},
|
|
||||||
#{record.age},
|
|
||||||
#{record.chooseReason})
|
|
||||||
</foreach>
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
<delete id="deleteByPartnerIdAndLineId">
|
|
||||||
delete from hy_partner_clerk where partner_id = #{partnerId} and partner_line_id = #{partnerLineId}
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<select id="listByPartnerIdAndLineId" resultMap="BaseResultMap">
|
|
||||||
select <include refid="Base_Column_List"></include> from
|
|
||||||
hy_partner_clerk
|
|
||||||
where partner_id = #{partnerId} and partner_line_id = #{partnerLineId}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<update id="updateLineId">
|
|
||||||
update hy_partner_clerk
|
|
||||||
set partner_line_id = #{newLineId} , partner_id = #{newPartnerId}
|
|
||||||
where partner_line_id = #{oldLineId}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
@@ -1,345 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.cool.store.mapper.HyPartnerEcTrackLogMapper">
|
|
||||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyPartnerEcTrackLogDO">
|
|
||||||
<id column="id" jdbcType="BIGINT" property="id" />
|
|
||||||
<result column="trajectory_id" jdbcType="VARCHAR" property="trajectoryId" />
|
|
||||||
<result column="user_id" jdbcType="VARCHAR" property="userId" />
|
|
||||||
<result column="user_name" jdbcType="VARCHAR" property="userName" />
|
|
||||||
<result column="crm_id" jdbcType="VARCHAR" property="crmId" />
|
|
||||||
<result column="partner_id" jdbcType="VARCHAR" property="partnerId" />
|
|
||||||
<result column="mobile" jdbcType="VARCHAR" property="mobile" />
|
|
||||||
<result column="receive_user_ids" jdbcType="VARCHAR" property="receiveUserIds" />
|
|
||||||
<result column="receive_user" jdbcType="VARCHAR" property="receiveUser" />
|
|
||||||
<result column="trajectory_type" jdbcType="INTEGER" property="trajectoryType" />
|
|
||||||
<result column="trajectory_type_content" jdbcType="VARCHAR" property="trajectoryTypeContent" />
|
|
||||||
<result column="content" jdbcType="VARCHAR" property="content" />
|
|
||||||
<result column="operate_time" jdbcType="TIMESTAMP" property="operateTime" />
|
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
||||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
|
||||||
</resultMap>
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
id, trajectory_id, user_id, user_name, crm_id,mobile, receive_user_ids, receive_user, trajectory_type,partner_id,
|
|
||||||
trajectory_type_content, content, operate_time, create_time, update_time, remark
|
|
||||||
</sql>
|
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List" />
|
|
||||||
from hy_partner_ec_track_log
|
|
||||||
where id = #{id,jdbcType=BIGINT}
|
|
||||||
</select>
|
|
||||||
<select id="getEcLogPageByPartnerId" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List" />
|
|
||||||
from hy_partner_ec_track_log
|
|
||||||
where partner_id = #{partnerId} order by operate_time desc
|
|
||||||
</select>
|
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
||||||
delete from hy_partner_ec_track_log
|
|
||||||
where id = #{id,jdbcType=BIGINT}
|
|
||||||
</delete>
|
|
||||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.cool.store.entity.HyPartnerEcTrackLogDO" useGeneratedKeys="true">
|
|
||||||
insert into hy_partner_ec_track_log (trajectory_id, user_id, user_name, mobile,
|
|
||||||
crm_id,partner_id, receive_user_ids, receive_user,
|
|
||||||
trajectory_type, trajectory_type_content,
|
|
||||||
content, operate_time, create_time,
|
|
||||||
update_time, remark)
|
|
||||||
values (#{trajectoryId,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR},
|
|
||||||
#{crmId,jdbcType=VARCHAR},#{partnerId,jdbcType=VARCHAR}, #{receiveUserIds,jdbcType=VARCHAR}, #{receiveUser,jdbcType=VARCHAR},
|
|
||||||
#{trajectoryType,jdbcType=INTEGER}, #{trajectoryTypeContent,jdbcType=VARCHAR},
|
|
||||||
#{content,jdbcType=VARCHAR}, #{operateTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
|
|
||||||
#{updateTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR})
|
|
||||||
</insert>
|
|
||||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.cool.store.entity.HyPartnerEcTrackLogDO" useGeneratedKeys="true">
|
|
||||||
insert into hy_partner_ec_track_log
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="trajectoryId != null">
|
|
||||||
trajectory_id,
|
|
||||||
</if>
|
|
||||||
<if test="userId != null">
|
|
||||||
user_id,
|
|
||||||
</if>
|
|
||||||
<if test="userName != null">
|
|
||||||
user_name,
|
|
||||||
</if>
|
|
||||||
<if test="mobile != null">
|
|
||||||
mobile,
|
|
||||||
</if>
|
|
||||||
<if test="crmId != null">
|
|
||||||
crm_id,
|
|
||||||
</if>
|
|
||||||
<if test="partnerId != null">
|
|
||||||
partner_id,
|
|
||||||
</if>
|
|
||||||
<if test="receiveUserIds != null">
|
|
||||||
receive_user_ids,
|
|
||||||
</if>
|
|
||||||
<if test="receiveUser != null">
|
|
||||||
receive_user,
|
|
||||||
</if>
|
|
||||||
<if test="trajectoryType != null">
|
|
||||||
trajectory_type,
|
|
||||||
</if>
|
|
||||||
<if test="trajectoryTypeContent != null">
|
|
||||||
trajectory_type_content,
|
|
||||||
</if>
|
|
||||||
<if test="content != null">
|
|
||||||
content,
|
|
||||||
</if>
|
|
||||||
<if test="operateTime != null">
|
|
||||||
operate_time,
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
create_time,
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
update_time,
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
remark,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="trajectoryId != null">
|
|
||||||
#{trajectoryId,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="userId != null">
|
|
||||||
#{userId,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="userName != null">
|
|
||||||
#{userName,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="mobile != null">
|
|
||||||
#{mobile,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="crmId != null">
|
|
||||||
#{crmId,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="partnerId != null">
|
|
||||||
#{partnerId,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="receiveUserIds != null">
|
|
||||||
#{receiveUserIds,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="receiveUser != null">
|
|
||||||
#{receiveUser,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="trajectoryType != null">
|
|
||||||
#{trajectoryType,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="trajectoryTypeContent != null">
|
|
||||||
#{trajectoryTypeContent,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="content != null">
|
|
||||||
#{content,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="operateTime != null">
|
|
||||||
#{operateTime,jdbcType=TIMESTAMP},
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
#{createTime,jdbcType=TIMESTAMP},
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
#{updateTime,jdbcType=TIMESTAMP},
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
#{remark,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
ON DUPLICATE KEY UPDATE trajectory_id=values(trajectory_id)
|
|
||||||
,user_id=values(user_id)
|
|
||||||
,user_name=values(user_name)
|
|
||||||
,crm_id=values(crm_id)
|
|
||||||
,partner_id=values(partner_id)
|
|
||||||
,mobile=values(mobile)
|
|
||||||
,receive_user_ids=values(receive_user_ids)
|
|
||||||
,receive_user=values(receive_user)
|
|
||||||
,trajectory_type=values(trajectory_type)
|
|
||||||
,trajectory_type_content=values(trajectory_type_content)
|
|
||||||
,content=values(content)
|
|
||||||
,operate_time=values(operate_time)
|
|
||||||
,create_time=values(create_time)
|
|
||||||
,remark=values(remark)
|
|
||||||
</insert>
|
|
||||||
<insert id="batchInsertOrUpdate">
|
|
||||||
<foreach collection="recordList" item="record" separator=";">
|
|
||||||
insert into hy_partner_ec_track_log
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="trajectoryId != null">
|
|
||||||
trajectory_id,
|
|
||||||
</if>
|
|
||||||
<if test="userId != null">
|
|
||||||
user_id,
|
|
||||||
</if>
|
|
||||||
<if test="userName != null">
|
|
||||||
user_name,
|
|
||||||
</if>
|
|
||||||
<if test="mobile != null">
|
|
||||||
mobile,
|
|
||||||
</if>
|
|
||||||
<if test="crmId != null">
|
|
||||||
crm_id,
|
|
||||||
</if>
|
|
||||||
<if test="partnerId != null">
|
|
||||||
partner_id,
|
|
||||||
</if>
|
|
||||||
<if test="receiveUserIds != null">
|
|
||||||
receive_user_ids,
|
|
||||||
</if>
|
|
||||||
<if test="receiveUser != null">
|
|
||||||
receive_user,
|
|
||||||
</if>
|
|
||||||
<if test="trajectoryType != null">
|
|
||||||
trajectory_type,
|
|
||||||
</if>
|
|
||||||
<if test="trajectoryTypeContent != null">
|
|
||||||
trajectory_type_content,
|
|
||||||
</if>
|
|
||||||
<if test="content != null">
|
|
||||||
content,
|
|
||||||
</if>
|
|
||||||
<if test="operateTime != null">
|
|
||||||
operate_time,
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
create_time,
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
update_time,
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
remark,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="record.trajectoryId != null">
|
|
||||||
#{record.trajectoryId,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="record.userId != null">
|
|
||||||
#{record.userId,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="record.userName != null">
|
|
||||||
#{record.userName,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="record.mobile != null">
|
|
||||||
#{record.mobile,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="record.crmId != null">
|
|
||||||
#{record.crmId,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="record.partnerId != null">
|
|
||||||
#{record.partnerId,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="record.receiveUserIds != null">
|
|
||||||
#{record.receiveUserIds,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="record.receiveUser != null">
|
|
||||||
#{record.receiveUser,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="record.trajectoryType != null">
|
|
||||||
#{record.trajectoryType,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="record.trajectoryTypeContent != null">
|
|
||||||
#{record.trajectoryTypeContent,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="record.content != null">
|
|
||||||
#{record.content,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="record.operateTime != null">
|
|
||||||
#{record.operateTime,jdbcType=TIMESTAMP},
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
#{record.createTime,jdbcType=TIMESTAMP},
|
|
||||||
</if>
|
|
||||||
<if test="record.remark != null">
|
|
||||||
#{record.remark,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
ON DUPLICATE KEY UPDATE trajectory_id=values(trajectory_id)
|
|
||||||
,user_id=values(user_id)
|
|
||||||
,user_name=values(user_name)
|
|
||||||
,crm_id=values(crm_id)
|
|
||||||
,partner_id=values(partner_id)
|
|
||||||
,mobile=values(mobile)
|
|
||||||
,receive_user_ids=values(receive_user_ids)
|
|
||||||
,receive_user=values(receive_user)
|
|
||||||
,trajectory_type=values(trajectory_type)
|
|
||||||
,trajectory_type_content=values(trajectory_type_content)
|
|
||||||
,content=values(content)
|
|
||||||
,operate_time=values(operate_time)
|
|
||||||
,create_time=values(create_time)
|
|
||||||
,remark=values(remark)
|
|
||||||
</foreach>
|
|
||||||
</insert>
|
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.HyPartnerEcTrackLogDO">
|
|
||||||
update hy_partner_ec_track_log
|
|
||||||
<set>
|
|
||||||
<if test="trajectoryId != null">
|
|
||||||
trajectory_id = #{trajectoryId,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="userId != null">
|
|
||||||
user_id = #{userId,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="mobile != null">
|
|
||||||
mobile = #{mobile,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="userName != null">
|
|
||||||
user_name = #{userName,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="crmId != null">
|
|
||||||
crm_id = #{crmId,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="partnerId != null">
|
|
||||||
partner_id = #{partnerId,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="receiveUserIds != null">
|
|
||||||
receive_user_ids = #{receiveUserIds,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="receiveUser != null">
|
|
||||||
receive_user = #{receiveUser,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="trajectoryType != null">
|
|
||||||
trajectory_type = #{trajectoryType,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="trajectoryTypeContent != null">
|
|
||||||
trajectory_type_content = #{trajectoryTypeContent,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="content != null">
|
|
||||||
content = #{content,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="operateTime != null">
|
|
||||||
operate_time = #{operateTime,jdbcType=TIMESTAMP},
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
||||||
</if>
|
|
||||||
<if test="remark != null">
|
|
||||||
remark = #{remark,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where id = #{id,jdbcType=BIGINT}
|
|
||||||
</update>
|
|
||||||
<update id="updateByPrimaryKey" parameterType="com.cool.store.entity.HyPartnerEcTrackLogDO">
|
|
||||||
update hy_partner_ec_track_log
|
|
||||||
set trajectory_id = #{trajectoryId,jdbcType=VARCHAR},
|
|
||||||
user_id = #{userId,jdbcType=VARCHAR},
|
|
||||||
user_name = #{userName,jdbcType=VARCHAR},
|
|
||||||
crm_id = #{crmId,jdbcType=VARCHAR},
|
|
||||||
partner_id = #{partnerId,jdbcType=VARCHAR},
|
|
||||||
mobile = #{mobile,jdbcType=VARCHAR},
|
|
||||||
receive_user_ids = #{receiveUserIds,jdbcType=VARCHAR},
|
|
||||||
receive_user = #{receiveUser,jdbcType=VARCHAR},
|
|
||||||
trajectory_type = #{trajectoryType,jdbcType=INTEGER},
|
|
||||||
trajectory_type_content = #{trajectoryTypeContent,jdbcType=VARCHAR},
|
|
||||||
content = #{content,jdbcType=VARCHAR},
|
|
||||||
operate_time = #{operateTime,jdbcType=TIMESTAMP},
|
|
||||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
||||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
||||||
remark = #{remark,jdbcType=VARCHAR}
|
|
||||||
where id = #{id,jdbcType=BIGINT}
|
|
||||||
</update>
|
|
||||||
</mapper>
|
|
||||||
@@ -1,553 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.cool.store.mapper.HyPartnerExhibitionMapper">
|
|
||||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyPartnerExhibitionDO">
|
|
||||||
<id column="id" jdbcType="BIGINT" property="id" />
|
|
||||||
<result column="exhibition_id" jdbcType="BIGINT" property="exhibitionId" />
|
|
||||||
<result column="partner_line_id" jdbcType="BIGINT" property="partnerLineId" />
|
|
||||||
<result column="partner_id" jdbcType="VARCHAR" property="partnerId" />
|
|
||||||
<result column="want_shop_area" jdbcType="VARCHAR" property="wantShopArea" />
|
|
||||||
<result column="investment_manager_name" jdbcType="VARCHAR" property="investmentManagerName" />
|
|
||||||
<result column="expected_visitors_count" jdbcType="INTEGER" property="expectedVisitorsCount" />
|
|
||||||
<result column="expected_information" jdbcType="VARCHAR" property="expectedInformation" />
|
|
||||||
<result column="participation_status" jdbcType="TINYINT" property="participationStatus" />
|
|
||||||
<result column="interview_plan_id" jdbcType="BIGINT" property="interviewPlanId" />
|
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
||||||
<result column="creator" jdbcType="VARCHAR" property="creator" />
|
|
||||||
<result column="updater" jdbcType="VARCHAR" property="updater" />
|
|
||||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
|
||||||
<result column="check_in_time" jdbcType="TIMESTAMP" property="checkInTime" />
|
|
||||||
</resultMap>
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
id, exhibition_id, partner_line_id, partner_id, want_shop_area, investment_manager_name,
|
|
||||||
expected_visitors_count, expected_information, participation_status, interview_plan_id,
|
|
||||||
create_time, update_time, creator, updater, deleted,check_in_time
|
|
||||||
</sql>
|
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List" />
|
|
||||||
from hy_partner_exhibition
|
|
||||||
where id = #{id,jdbcType=BIGINT}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="querySelective" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List" />
|
|
||||||
from hy_partner_exhibition
|
|
||||||
<where>
|
|
||||||
<if test="exhibitionId != null">
|
|
||||||
and exhibition_id = #{exhibitionId,jdbcType=BIGINT}
|
|
||||||
</if>
|
|
||||||
<if test="partnerLineId != null">
|
|
||||||
and partner_line_id = #{partnerLineId,jdbcType=BIGINT}
|
|
||||||
</if>
|
|
||||||
<if test="partnerId != null">
|
|
||||||
and partner_id = #{partnerId,jdbcType=VARCHAR}
|
|
||||||
</if>
|
|
||||||
<if test="wantShopArea != null">
|
|
||||||
and want_shop_area = #{wantShopArea,jdbcType=VARCHAR}
|
|
||||||
</if>
|
|
||||||
<if test="investmentManagerName != null">
|
|
||||||
and investment_manager_name = #{investmentManagerName,jdbcType=VARCHAR}
|
|
||||||
</if>
|
|
||||||
<if test="expectedVisitorsCount != null">
|
|
||||||
and expected_visitors_count = #{expectedVisitorsCount,jdbcType=INTEGER}
|
|
||||||
</if>
|
|
||||||
<if test="expectedInformation != null">
|
|
||||||
and expected_information = #{expectedInformation,jdbcType=VARCHAR}
|
|
||||||
</if>
|
|
||||||
<if test="participationStatus != null">
|
|
||||||
and participation_status = #{participationStatus,jdbcType=TINYINT}
|
|
||||||
</if>
|
|
||||||
<if test="interviewPlanId != null">
|
|
||||||
and interview_plan_id = #{interviewPlanId,jdbcType=BIGINT}
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
and create_time = #{createTime,jdbcType=TIMESTAMP}
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
and update_time = #{updateTime,jdbcType=TIMESTAMP}
|
|
||||||
</if>
|
|
||||||
<if test="creator != null">
|
|
||||||
and creator = #{creator,jdbcType=VARCHAR}
|
|
||||||
</if>
|
|
||||||
<if test="updater != null">
|
|
||||||
and updater = #{updater,jdbcType=VARCHAR}
|
|
||||||
</if>
|
|
||||||
<if test="deleted != null">
|
|
||||||
and deleted = #{deleted,jdbcType=BIT}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="exhibitionLineList" resultType="com.cool.store.dto.exhibition.ExhibitionLineDTO">
|
|
||||||
select
|
|
||||||
hpe.id as id ,
|
|
||||||
hpe.exhibition_id as exhibitionId ,
|
|
||||||
hpe.interview_plan_id as planId,
|
|
||||||
hpe.partner_id as partnerId,
|
|
||||||
hpe.partner_line_id as lineId,
|
|
||||||
hpe.participation_status as participationStatus,
|
|
||||||
hpe.investment_manager_name as customerManager,
|
|
||||||
hpe.expected_visitors_count as expectedVisitorsCount,
|
|
||||||
hpe.expected_information as expectedInformation,
|
|
||||||
hpui.username as partnerName,
|
|
||||||
hpui.user_channel_id as channelId,
|
|
||||||
hpui.mobile as mobile,
|
|
||||||
hoai.id as wantShopArea,
|
|
||||||
hoai.area_path as wantShopAreaName
|
|
||||||
from hy_partner_exhibition hpe
|
|
||||||
left join hy_partner_user_info hpui on hpe.partner_id = hpui.partner_id
|
|
||||||
left join hy_open_area_info hoai on hpe.want_shop_area = hoai.id
|
|
||||||
left join hy_partner_intent_info hpii on hpii.partner_line_id = hpe.partner_line_id
|
|
||||||
left join hy_partner_interview_plan hpip on hpip.id = hpe.interview_plan_id
|
|
||||||
<where>
|
|
||||||
<if test="exhibitionId != null">
|
|
||||||
and hpe.exhibition_id = #{exhibitionId,jdbcType=BIGINT}
|
|
||||||
</if>
|
|
||||||
<if test="participationStatus == null">
|
|
||||||
and hpe.participation_status in (0,7)
|
|
||||||
</if>
|
|
||||||
<if test="participationStatus != null">
|
|
||||||
<if test="participationStatus==4">
|
|
||||||
and hpe.participation_status in (4,5,6)
|
|
||||||
</if>
|
|
||||||
<if test="participationStatus!=4">
|
|
||||||
and hpe.participation_status = #{participationStatus,jdbcType=BIGINT}
|
|
||||||
</if>
|
|
||||||
</if>
|
|
||||||
<if test="partnerUserId != null and partnerUserId!=''">
|
|
||||||
and hpui.partner_id = #{partnerUserId,jdbcType=VARCHAR}
|
|
||||||
</if>
|
|
||||||
<if test="id != null">
|
|
||||||
and hpe.id = #{id}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
<if test="participationStatus == null">
|
|
||||||
ORDER BY CASE WHEN hpe.participation_status != 7 THEN 1 ELSE 2 END, hpe.create_time DESC
|
|
||||||
</if>
|
|
||||||
<if test="participationStatus != null and participationStatus==1">
|
|
||||||
ORDER BY hpe.check_in_time DESC
|
|
||||||
</if>
|
|
||||||
<if test="participationStatus != null and participationStatus==2">
|
|
||||||
ORDER BY hpii.create_time asc
|
|
||||||
</if>
|
|
||||||
<if test="participationStatus != null and participationStatus==3">
|
|
||||||
ORDER BY CASE
|
|
||||||
WHEN hpip.interviewer = #{userId} THEN 0 ELSE 1 END,
|
|
||||||
hpip.actual_start_time DESC
|
|
||||||
</if>
|
|
||||||
<if test="participationStatus != null and participationStatus==4">
|
|
||||||
ORDER BY hpe.participation_status asc,
|
|
||||||
CASE WHEN hpip.interviewer = #{userId} THEN 0 ELSE 1 END,
|
|
||||||
hpip.actual_end_time DESC
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
||||||
delete from hy_partner_exhibition
|
|
||||||
where id = #{id,jdbcType=BIGINT}
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<select id="getExhibitionLine" resultType="com.cool.store.dto.exhibition.ExhibitionLineDTO">
|
|
||||||
select
|
|
||||||
hpe.partner_id as partnerId,
|
|
||||||
hpe.partner_line_id as lineId,
|
|
||||||
hpe.exhibition_id as exhibitionId,
|
|
||||||
pu.username as partnerName,
|
|
||||||
pu.mobile as mobile
|
|
||||||
from hy_partner_exhibition hpe left join hy_partner_user_info pu on hpe.partner_id = pu.partner_id
|
|
||||||
where hpe.participation_status != 7
|
|
||||||
and hpe.deleted = 0
|
|
||||||
<if test="exhibitionId != null and exhibitionId!=''">
|
|
||||||
and hpe.exhibition_id = #{exhibitionId}
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<insert id="insertSelective" parameterType="com.cool.store.entity.HyPartnerExhibitionDO">
|
|
||||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
|
||||||
SELECT LAST_INSERT_ID()
|
|
||||||
</selectKey>
|
|
||||||
insert into hy_partner_exhibition
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="exhibitionId != null">
|
|
||||||
exhibition_id,
|
|
||||||
</if>
|
|
||||||
<if test="partnerLineId != null">
|
|
||||||
partner_line_id,
|
|
||||||
</if>
|
|
||||||
<if test="partnerId != null">
|
|
||||||
partner_id,
|
|
||||||
</if>
|
|
||||||
<if test="wantShopArea != null">
|
|
||||||
want_shop_area,
|
|
||||||
</if>
|
|
||||||
<if test="investmentManagerName != null">
|
|
||||||
investment_manager_name,
|
|
||||||
</if>
|
|
||||||
<if test="expectedVisitorsCount != null">
|
|
||||||
expected_visitors_count,
|
|
||||||
</if>
|
|
||||||
<if test="expectedInformation != null">
|
|
||||||
expected_information,
|
|
||||||
</if>
|
|
||||||
<if test="participationStatus != null">
|
|
||||||
participation_status,
|
|
||||||
</if>
|
|
||||||
<if test="interviewPlanId != null">
|
|
||||||
interview_plan_id,
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
create_time,
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
update_time,
|
|
||||||
</if>
|
|
||||||
<if test="creator != null">
|
|
||||||
creator,
|
|
||||||
</if>
|
|
||||||
<if test="updater != null">
|
|
||||||
updater,
|
|
||||||
</if>
|
|
||||||
<if test="deleted != null">
|
|
||||||
deleted,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="exhibitionId != null">
|
|
||||||
#{exhibitionId,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="partnerLineId != null">
|
|
||||||
#{partnerLineId,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
<if test="partnerId != null">
|
|
||||||
#{partnerId,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="wantShopArea != null">
|
|
||||||
#{wantShopArea,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="investmentManagerName != null">
|
|
||||||
#{investmentManagerName,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="expectedVisitorsCount != null">
|
|
||||||
#{expectedVisitorsCount,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="expectedInformation != null">
|
|
||||||
#{expectedInformation,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="participationStatus != null">
|
|
||||||
#{participationStatus,jdbcType=TINYINT},
|
|
||||||
</if>
|
|
||||||
<if test="interviewPlanId != null">
|
|
||||||
#{interviewPlanId,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
#{createTime,jdbcType=TIMESTAMP},
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
#{updateTime,jdbcType=TIMESTAMP},
|
|
||||||
</if>
|
|
||||||
<if test="creator != null">
|
|
||||||
#{creator,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="updater != null">
|
|
||||||
#{updater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="deleted != null">
|
|
||||||
#{deleted,jdbcType=BIT},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.HyPartnerExhibitionDO">
|
|
||||||
update hy_partner_exhibition
|
|
||||||
<set>
|
|
||||||
<if test="exhibitionId != null">
|
|
||||||
exhibition_id = #{exhibitionId,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
<if test="partnerLineId != null">
|
|
||||||
partner_line_id = #{partnerLineId,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
<if test="partnerId != null">
|
|
||||||
partner_id = #{partnerId,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="wantShopArea != null">
|
|
||||||
want_shop_area = #{wantShopArea,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="investmentManagerName != null">
|
|
||||||
investment_manager_name = #{investmentManagerName,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="expectedVisitorsCount != null">
|
|
||||||
expected_visitors_count = #{expectedVisitorsCount,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="expectedInformation != null">
|
|
||||||
expected_information = #{expectedInformation,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="participationStatus != null">
|
|
||||||
participation_status = #{participationStatus,jdbcType=TINYINT},
|
|
||||||
</if>
|
|
||||||
<if test="interviewPlanId != null">
|
|
||||||
interview_plan_id = #{interviewPlanId,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
||||||
</if>
|
|
||||||
<if test="creator != null">
|
|
||||||
creator = #{creator,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="updater != null">
|
|
||||||
updater = #{updater,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="deleted != null">
|
|
||||||
deleted = #{deleted,jdbcType=BIT},
|
|
||||||
</if>
|
|
||||||
<if test="checkInTime != null">
|
|
||||||
check_in_time = #{checkInTime,jdbcType=TIMESTAMP},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where id = #{id,jdbcType=BIGINT}
|
|
||||||
</update>
|
|
||||||
<sql id="dynamicQuery">
|
|
||||||
<trim prefix="WHERE" prefixOverrides="AND | OR">
|
|
||||||
<if test="null != id">
|
|
||||||
and t.id = #{id,jdbcType=BIGINT}
|
|
||||||
</if>
|
|
||||||
<if test="null != exhibitionId">
|
|
||||||
and t.exhibition_id = #{exhibitionId,jdbcType=VARCHAR}
|
|
||||||
</if>
|
|
||||||
<if test="null != partnerLineId">
|
|
||||||
and t.partner_line_id = #{partnerLineId,jdbcType=BIGINT}
|
|
||||||
</if>
|
|
||||||
<if test="null != partnerId">
|
|
||||||
and t.partner_id = #{partnerId,jdbcType=VARCHAR}
|
|
||||||
</if>
|
|
||||||
<if test="null != wantShopArea">
|
|
||||||
and t.want_shop_area = #{wantShopArea,jdbcType=VARCHAR}
|
|
||||||
</if>
|
|
||||||
<if test="null != investmentManagerName">
|
|
||||||
and t.investment_manager_name = #{investmentManagerName,jdbcType=VARCHAR}
|
|
||||||
</if>
|
|
||||||
<if test="null != expectedVisitorsCount">
|
|
||||||
and t.expected_visitors_count = #{expectedVisitorsCount,jdbcType=INTEGER}
|
|
||||||
</if>
|
|
||||||
<if test="null != expectedInformation">
|
|
||||||
and t.expected_information = #{expectedInformation,jdbcType=VARCHAR}
|
|
||||||
</if>
|
|
||||||
<if test="null != participationStatus">
|
|
||||||
and t.participation_status = #{participationStatus,jdbcType=TINYINT}
|
|
||||||
</if>
|
|
||||||
<if test="null != interviewPlanId">
|
|
||||||
and t.interview_plan_id = #{interviewPlanId,jdbcType=BIGINT}
|
|
||||||
</if>
|
|
||||||
<if test="null != createTime">
|
|
||||||
and t.create_time = #{createTime,jdbcType=TIMESTAMP}
|
|
||||||
</if>
|
|
||||||
<if test="null != updateTime">
|
|
||||||
and t.update_time = #{updateTime,jdbcType=TIMESTAMP}
|
|
||||||
</if>
|
|
||||||
<if test="null != creator">
|
|
||||||
and t.creator = #{creator,jdbcType=VARCHAR}
|
|
||||||
</if>
|
|
||||||
<if test="null != updater">
|
|
||||||
and t.updater = #{updater,jdbcType=VARCHAR}
|
|
||||||
</if>
|
|
||||||
<if test="null != deleted">
|
|
||||||
and t.deleted = #{deleted,jdbcType=BIT}
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<update id="rejectExhibitionInterview">
|
|
||||||
UPDATE hy_partner_exhibition
|
|
||||||
SET participation_status = 6
|
|
||||||
WHERE partner_line_id = #{partnerLineId}
|
|
||||||
AND participation_status = 4
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<update id="deleteAllByLineId">
|
|
||||||
UPDATE hy_partner_exhibition
|
|
||||||
SET deleted = 1
|
|
||||||
WHERE partner_line_id = #{partnerLineId}
|
|
||||||
AND deleted = 0
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<select id="queryListByInterviewPlanIds" resultType="java.lang.Long">
|
|
||||||
SELECT interview_plan_id
|
|
||||||
FROM hy_partner_exhibition
|
|
||||||
WHERE deleted = 0
|
|
||||||
AND interview_plan_id IN (
|
|
||||||
<foreach collection="interviewPlanIds" item="interviewPlanId" separator=",">
|
|
||||||
#{interviewPlanId}
|
|
||||||
</foreach>
|
|
||||||
)
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="queryListByLineIds" resultMap="BaseResultMap">
|
|
||||||
SELECT partner_line_id, exhibition_id, t3.name AS exhibitionCreatorName, t3.mobile AS exhibitionCreatorMobile
|
|
||||||
FROM (
|
|
||||||
SELECT partner_line_id, exhibition_id
|
|
||||||
FROM hy_partner_exhibition
|
|
||||||
WHERE partner_line_id IN (
|
|
||||||
<foreach collection="lineIds" item="lineId" separator=",">
|
|
||||||
#{lineId}
|
|
||||||
</foreach>
|
|
||||||
)
|
|
||||||
AND deleted = 0
|
|
||||||
-- 面试中状态
|
|
||||||
AND participation_status = #{status}
|
|
||||||
) t1
|
|
||||||
INNER JOIN (
|
|
||||||
SELECT id, creator
|
|
||||||
FROM hy_exhibition
|
|
||||||
WHERE deleted = 0
|
|
||||||
AND closed_type = 0
|
|
||||||
) t2 ON t1.exhibition_id = t2.id
|
|
||||||
INNER JOIN enterprise_user t3 ON t2.creator= t3.user_id
|
|
||||||
</select>
|
|
||||||
<select id="queryPartnerExhibitionInterviewInfo"
|
|
||||||
resultType="com.cool.store.entity.HyPartnerExhibitionInterviewDO">
|
|
||||||
SELECT
|
|
||||||
exhibition_id AS exhibitionId,
|
|
||||||
interview_plan_id AS interviewPlanId,
|
|
||||||
exhibition_name AS exhibitionName,
|
|
||||||
start_date AS exhibitionDate,
|
|
||||||
name AS exhibitionCreatorName,
|
|
||||||
mobile AS exhibitionCreatorMobile
|
|
||||||
FROM (
|
|
||||||
SELECT exhibition_id, interview_plan_id
|
|
||||||
FROM hy_partner_exhibition
|
|
||||||
WHERE deleted = 0
|
|
||||||
AND partner_line_id = #{partnerLineId}
|
|
||||||
AND interview_plan_id = #{interviewPlanId}
|
|
||||||
) t1 INNER JOIN (
|
|
||||||
SELECT hy_exhibition.id, exhibition_name, start_date, enterprise_user.name, enterprise_user.mobile
|
|
||||||
FROM hy_exhibition
|
|
||||||
INNER JOIN enterprise_user ON hy_exhibition.creator = enterprise_user.user_id
|
|
||||||
WHERE hy_exhibition.deleted = 0
|
|
||||||
) t2 ON t1.exhibition_id = t2.id
|
|
||||||
</select>
|
|
||||||
|
|
||||||
|
|
||||||
<select id="exhibitionLineBaseInfo" resultType="com.cool.store.dto.exhibition.ExhibitionLineBaseDTO">
|
|
||||||
select
|
|
||||||
hpe.participation_status as participationStatus,
|
|
||||||
hpui.username as partnerName,
|
|
||||||
hpui.partner_id as partnerId,
|
|
||||||
hpui.mobile as mobile
|
|
||||||
from hy_partner_exhibition hpe
|
|
||||||
left join hy_partner_user_info hpui
|
|
||||||
on hpe.partner_id = hpui.partner_id
|
|
||||||
<where>
|
|
||||||
<if test="partnerName!=null and partnerName!=''">
|
|
||||||
and hpui.username like concat("%", #{partnerName}, "%")
|
|
||||||
</if>
|
|
||||||
<if test="id!=null">
|
|
||||||
and hpe.exhibition_id = #{id}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
|
|
||||||
<select id="getPartnerExhibition" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List" />
|
|
||||||
from hy_partner_exhibition
|
|
||||||
<where>
|
|
||||||
<if test="exhibitionId!=null">
|
|
||||||
and exhibition_id = #{exhibitionId}
|
|
||||||
</if>
|
|
||||||
<if test="lineId!=null">
|
|
||||||
and partner_line_id = #{lineId}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="partnerSignUpCount" resultType="com.cool.store.dto.exhibition.PartnerSignUpDTO">
|
|
||||||
select
|
|
||||||
a.partner_line_id as lineId ,
|
|
||||||
count(1) as count
|
|
||||||
from hy_partner_exhibition a
|
|
||||||
left join hy_exhibition b on a.exhibition_id = b.id
|
|
||||||
where a.participation_status != 7 and b.closed_type=0
|
|
||||||
<foreach collection="lineIds" item="lineId" open="and a.partner_line_id in (" separator="," close=")">
|
|
||||||
#{lineId}
|
|
||||||
</foreach>
|
|
||||||
group by a.partner_line_id
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="getCloseExhibitionLineIds" resultType="java.lang.Long">
|
|
||||||
SELECT DISTINCT partner_line_id
|
|
||||||
FROM hy_partner_exhibition
|
|
||||||
WHERE deleted = 0
|
|
||||||
AND exhibition_id IN (
|
|
||||||
<foreach collection="exhibitionIds" item="exhibitionId" separator=",">
|
|
||||||
#{exhibitionId}
|
|
||||||
</foreach>
|
|
||||||
)
|
|
||||||
AND participation_status != 7
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="getLineByExhibitionIds" resultType="com.cool.store.dto.exhibition.ExhibitionLineDTO">
|
|
||||||
select distinct
|
|
||||||
hpe.partner_id as partnerId,
|
|
||||||
hpe.partner_line_id as lineId,
|
|
||||||
hpe.exhibition_id as exhibitionId,
|
|
||||||
pu.username as partnerName,
|
|
||||||
pu.mobile as mobile
|
|
||||||
from hy_partner_exhibition hpe left join hy_partner_user_info pu on hpe.partner_id = pu.partner_id
|
|
||||||
where hpe.participation_status != 7
|
|
||||||
and hpe.deleted = 0
|
|
||||||
and hpe.exhibition_id in (
|
|
||||||
<foreach collection="exhibitionIds" item="exhibitionId" separator=",">
|
|
||||||
#{exhibitionId}
|
|
||||||
</foreach>
|
|
||||||
)
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<update id="updateStatusAfterSubmitIndustry">
|
|
||||||
UPDATE hy_partner_exhibition t1
|
|
||||||
INNER JOIN hy_exhibition t2 ON t1.exhibition_id = t2.id
|
|
||||||
SET t1.participation_status = 2
|
|
||||||
WHERE t1.deleted = 0
|
|
||||||
AND t2.deleted = 0
|
|
||||||
AND t2.closed_type = 0
|
|
||||||
AND partner_line_id = #{partnerLineId}
|
|
||||||
AND participation_status = 1
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<update id="updateStatusAfterFinishInterview">
|
|
||||||
UPDATE hy_partner_exhibition
|
|
||||||
SET participation_status = 4
|
|
||||||
WHERE deleted = 0
|
|
||||||
AND participation_status = 3
|
|
||||||
AND interview_plan_id = #{interviewPlanId}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<update id="updateStatusAfterSubmitQualification">
|
|
||||||
UPDATE hy_partner_exhibition
|
|
||||||
SET participation_status = 5
|
|
||||||
WHERE deleted = 0
|
|
||||||
AND participation_status = 4
|
|
||||||
AND interview_plan_id = #{interviewPlanId}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<select id="getStartInterviewInfo" resultType="com.cool.store.dto.exhibition.ExhibitionInterviewInfoDTO">
|
|
||||||
SELECT t3.user_id, t3.`name` AS exhibitionInterviewerName, t3.mobile AS exhibitionInterviewerMobile, t1.interview_plan_id AS exhibitionInterviewPlanId, t2.create_time AS exhibitionInterviewTime
|
|
||||||
FROM
|
|
||||||
(
|
|
||||||
SELECT exhibition_id, partner_line_id, interview_plan_id
|
|
||||||
FROM hy_partner_exhibition
|
|
||||||
WHERE partner_line_id = #{lineId}
|
|
||||||
AND participation_status >= 3
|
|
||||||
AND participation_status != 7
|
|
||||||
ORDER BY update_time DESC
|
|
||||||
LIMIT 1
|
|
||||||
) t1
|
|
||||||
INNER JOIN hy_partner_interview_plan t2 ON t1.interview_plan_id = t2.id
|
|
||||||
INNER JOIN enterprise_user t3 ON t2.interviewer = t3.user_id
|
|
||||||
</select>
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
@@ -1,484 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.cool.store.mapper.HyPartnerIntentInfoMapper">
|
|
||||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyPartnerIntentInfoDO">
|
|
||||||
<id column="id" jdbcType="BIGINT" property="id" />
|
|
||||||
<result column="partner_id" jdbcType="VARCHAR" property="partnerId" />
|
|
||||||
<result column="partner_line_id" jdbcType="BIGINT" property="partnerLineId" />
|
|
||||||
<result column="live_area" jdbcType="VARCHAR" property="liveArea" />
|
|
||||||
<result column="want_shop_area" jdbcType="VARCHAR" property="wantShopArea" />
|
|
||||||
<result column="accept_adjust_type" jdbcType="TINYINT" property="acceptAdjustType" />
|
|
||||||
<result column="is_have_want_shop" jdbcType="TINYINT" property="isHaveWantShop" />
|
|
||||||
<result column="want_shop_info" jdbcType="VARCHAR" property="wantShopInfo" />
|
|
||||||
<result column="max_budget" jdbcType="VARCHAR" property="maxBudget" />
|
|
||||||
<result column="money_source" jdbcType="VARCHAR" property="moneySource" />
|
|
||||||
<result column="money_prove" jdbcType="VARCHAR" property="moneyProve" />
|
|
||||||
<result column="credit_prove" jdbcType="VARCHAR" property="creditProve" />
|
|
||||||
<result column="education" jdbcType="VARCHAR" property="education" />
|
|
||||||
<result column="work_year" jdbcType="VARCHAR" property="workYear" />
|
|
||||||
<result column="is_have_work_exp" jdbcType="TINYINT" property="isHaveWorkExp" />
|
|
||||||
<result column="work_exp" jdbcType="VARCHAR" property="workExp" />
|
|
||||||
<result column="is_consumer" jdbcType="TINYINT" property="isConsumer" />
|
|
||||||
<result column="other_band" jdbcType="VARCHAR" property="otherBand" />
|
|
||||||
<result column="brand_strength" jdbcType="VARCHAR" property="brandStrength" />
|
|
||||||
<result column="need_improve" jdbcType="VARCHAR" property="needImprove" />
|
|
||||||
<result column="strength" jdbcType="VARCHAR" property="strength" />
|
|
||||||
<result column="weakness" jdbcType="VARCHAR" property="weakness" />
|
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
||||||
<result column="detailed_address" jdbcType="VARCHAR" property="detailedAddress" />
|
|
||||||
<result column="email" jdbcType="VARCHAR" property="email" />
|
|
||||||
<result column="acquaintance_flag" jdbcType="TINYINT" property="acquaintanceFlag" />
|
|
||||||
<result column="acquaintance_name" jdbcType="VARCHAR" property="acquaintanceName" />
|
|
||||||
<result column="acquaintance_relationship_type" jdbcType="TINYINT" property="acquaintanceRelationshipType" />
|
|
||||||
<result column="other_relationship_type" jdbcType="VARCHAR" property="otherRelationshipType" />
|
|
||||||
</resultMap>
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
id, partner_id, partner_line_id, live_area, want_shop_area, accept_adjust_type, is_have_want_shop,
|
|
||||||
want_shop_info, max_budget, money_source, money_prove, education, work_year, is_have_work_exp,
|
|
||||||
work_exp, is_consumer, other_band, brand_strength, need_improve, strength, weakness,credit_prove,
|
|
||||||
create_time, update_time,detailed_address,email ,acquaintance_flag,acquaintance_name,acquaintance_relationship_type,other_relationship_type
|
|
||||||
</sql>
|
|
||||||
<select id="selectByPrimaryKeySelective" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"></include>
|
|
||||||
from hy_partner_intent_info
|
|
||||||
<where>
|
|
||||||
and id = #{id}
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
|
|
||||||
insert into hy_partner_intent_info
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="record.partnerId != null">
|
|
||||||
partner_id,
|
|
||||||
</if>
|
|
||||||
<if test="record.partnerLineId != null">
|
|
||||||
partner_line_id,
|
|
||||||
</if>
|
|
||||||
<if test="record.liveArea != null">
|
|
||||||
live_area,
|
|
||||||
</if>
|
|
||||||
<if test="record.wantShopArea != null">
|
|
||||||
want_shop_area,
|
|
||||||
</if>
|
|
||||||
<if test="record.acceptAdjustType != null">
|
|
||||||
accept_adjust_type,
|
|
||||||
</if>
|
|
||||||
<if test="record.isHaveWantShop != null">
|
|
||||||
is_have_want_shop,
|
|
||||||
</if>
|
|
||||||
<if test="record.wantShopInfo != null">
|
|
||||||
want_shop_info,
|
|
||||||
</if>
|
|
||||||
<if test="record.maxBudget != null">
|
|
||||||
max_budget,
|
|
||||||
</if>
|
|
||||||
<if test="record.moneySource != null">
|
|
||||||
money_source,
|
|
||||||
</if>
|
|
||||||
<if test="record.moneyProve != null">
|
|
||||||
money_prove,
|
|
||||||
</if>
|
|
||||||
<if test="record.creditProve != null">
|
|
||||||
credit_prove,
|
|
||||||
</if>
|
|
||||||
<if test="record.education != null">
|
|
||||||
education,
|
|
||||||
</if>
|
|
||||||
<if test="record.workYear != null">
|
|
||||||
work_year,
|
|
||||||
</if>
|
|
||||||
<if test="record.isHaveWorkExp != null">
|
|
||||||
is_have_work_exp,
|
|
||||||
</if>
|
|
||||||
<if test="record.workExp != null">
|
|
||||||
work_exp,
|
|
||||||
</if>
|
|
||||||
<if test="record.isConsumer != null">
|
|
||||||
is_consumer,
|
|
||||||
</if>
|
|
||||||
<if test="record.otherBand != null">
|
|
||||||
other_band,
|
|
||||||
</if>
|
|
||||||
<if test="record.brandStrength != null">
|
|
||||||
brand_strength,
|
|
||||||
</if>
|
|
||||||
<if test="record.needImprove != null">
|
|
||||||
need_improve,
|
|
||||||
</if>
|
|
||||||
<if test="record.strength != null">
|
|
||||||
strength,
|
|
||||||
</if>
|
|
||||||
<if test="record.weakness != null">
|
|
||||||
weakness,
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
create_time,
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
update_time,
|
|
||||||
</if>
|
|
||||||
<if test="record.detailedAddress != null">
|
|
||||||
detailed_address,
|
|
||||||
</if>
|
|
||||||
<if test="record.email != null">
|
|
||||||
email,
|
|
||||||
</if>
|
|
||||||
<if test="record.acquaintanceFlag != null">
|
|
||||||
acquaintance_flag,
|
|
||||||
</if>
|
|
||||||
<if test="record.acquaintanceName != null">
|
|
||||||
acquaintance_name,
|
|
||||||
</if>
|
|
||||||
<if test="record.acquaintanceRelationshipType != null">
|
|
||||||
acquaintance_relationship_type,
|
|
||||||
</if>
|
|
||||||
<if test="record.otherRelationshipType != null">
|
|
||||||
other_relationship_type,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="record.partnerId != null">
|
|
||||||
#{record.partnerId},
|
|
||||||
</if>
|
|
||||||
<if test="record.partnerLineId != null">
|
|
||||||
#{record.partnerLineId},
|
|
||||||
</if>
|
|
||||||
<if test="record.liveArea != null">
|
|
||||||
#{record.liveArea},
|
|
||||||
</if>
|
|
||||||
<if test="record.wantShopArea != null">
|
|
||||||
#{record.wantShopArea},
|
|
||||||
</if>
|
|
||||||
<if test="record.acceptAdjustType != null">
|
|
||||||
#{record.acceptAdjustType},
|
|
||||||
</if>
|
|
||||||
<if test="record.isHaveWantShop != null">
|
|
||||||
#{record.isHaveWantShop},
|
|
||||||
</if>
|
|
||||||
<if test="record.wantShopInfo != null">
|
|
||||||
#{record.wantShopInfo},
|
|
||||||
</if>
|
|
||||||
<if test="record.maxBudget != null">
|
|
||||||
#{record.maxBudget},
|
|
||||||
</if>
|
|
||||||
<if test="record.moneySource != null">
|
|
||||||
#{record.moneySource},
|
|
||||||
</if>
|
|
||||||
<if test="record.moneyProve != null">
|
|
||||||
#{record.moneyProve},
|
|
||||||
</if>
|
|
||||||
<if test="record.creditProve != null">
|
|
||||||
#{record.creditProve},
|
|
||||||
</if>
|
|
||||||
<if test="record.education != null">
|
|
||||||
#{record.education},
|
|
||||||
</if>
|
|
||||||
<if test="record.workYear != null">
|
|
||||||
#{record.workYear},
|
|
||||||
</if>
|
|
||||||
<if test="record.isHaveWorkExp != null">
|
|
||||||
#{record.isHaveWorkExp},
|
|
||||||
</if>
|
|
||||||
<if test="record.workExp != null">
|
|
||||||
#{record.workExp},
|
|
||||||
</if>
|
|
||||||
<if test="record.isConsumer != null">
|
|
||||||
#{record.isConsumer},
|
|
||||||
</if>
|
|
||||||
<if test="record.otherBand != null">
|
|
||||||
#{record.otherBand},
|
|
||||||
</if>
|
|
||||||
<if test="record.brandStrength != null">
|
|
||||||
#{record.brandStrength},
|
|
||||||
</if>
|
|
||||||
<if test="record.needImprove != null">
|
|
||||||
#{record.needImprove},
|
|
||||||
</if>
|
|
||||||
<if test="record.strength != null">
|
|
||||||
#{record.strength},
|
|
||||||
</if>
|
|
||||||
<if test="record.weakness != null">
|
|
||||||
#{record.weakness},
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
#{record.createTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
#{record.updateTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.detailedAddress != null">
|
|
||||||
#{record.detailedAddress},
|
|
||||||
</if>
|
|
||||||
<if test="record.email != null">
|
|
||||||
#{record.email},
|
|
||||||
</if>
|
|
||||||
<if test="record.acquaintanceFlag != null">
|
|
||||||
#{record.acquaintanceFlag},
|
|
||||||
</if>
|
|
||||||
<if test="record.acquaintanceName != null">
|
|
||||||
#{record.acquaintanceName},
|
|
||||||
</if>
|
|
||||||
<if test="record.acquaintanceRelationshipType != null">
|
|
||||||
#{record.acquaintanceRelationshipType},
|
|
||||||
</if>
|
|
||||||
<if test="record.otherRelationshipType != null">
|
|
||||||
#{record.otherRelationshipType},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
<update id="updateByPrimaryKeySelective">
|
|
||||||
update hy_partner_intent_info
|
|
||||||
<set>
|
|
||||||
<if test="record.partnerId != null">
|
|
||||||
partner_id = #{record.partnerId},
|
|
||||||
</if>
|
|
||||||
<if test="record.partnerLineId != null">
|
|
||||||
partner_line_id = #{record.partnerLineId},
|
|
||||||
</if>
|
|
||||||
<if test="record.liveArea != null">
|
|
||||||
live_area = #{record.liveArea},
|
|
||||||
</if>
|
|
||||||
<if test="record.wantShopArea != null">
|
|
||||||
want_shop_area = #{record.wantShopArea},
|
|
||||||
</if>
|
|
||||||
<if test="record.acceptAdjustType != null">
|
|
||||||
accept_adjust_type = #{record.acceptAdjustType},
|
|
||||||
</if>
|
|
||||||
<if test="record.isHaveWantShop != null">
|
|
||||||
is_have_want_shop = #{record.isHaveWantShop},
|
|
||||||
</if>
|
|
||||||
<if test="record.wantShopInfo != null">
|
|
||||||
want_shop_info = #{record.wantShopInfo},
|
|
||||||
</if>
|
|
||||||
<if test="record.maxBudget != null">
|
|
||||||
max_budget = #{record.maxBudget},
|
|
||||||
</if>
|
|
||||||
<if test="record.moneySource != null">
|
|
||||||
money_source = #{record.moneySource},
|
|
||||||
</if>
|
|
||||||
<if test="record.moneyProve != null">
|
|
||||||
money_prove = #{record.moneyProve},
|
|
||||||
</if>
|
|
||||||
<if test="record.creditProve != null">
|
|
||||||
credit_prove = #{record.creditProve},
|
|
||||||
</if>
|
|
||||||
<if test="record.education != null">
|
|
||||||
education = #{record.education},
|
|
||||||
</if>
|
|
||||||
<if test="record.workYear != null">
|
|
||||||
work_year = #{record.workYear},
|
|
||||||
</if>
|
|
||||||
<if test="record.isHaveWorkExp != null">
|
|
||||||
is_have_work_exp = #{record.isHaveWorkExp},
|
|
||||||
</if>
|
|
||||||
<if test="record.workExp != null">
|
|
||||||
work_exp = #{record.workExp},
|
|
||||||
</if>
|
|
||||||
<if test="record.isConsumer != null">
|
|
||||||
is_consumer = #{record.isConsumer},
|
|
||||||
</if>
|
|
||||||
<if test="record.otherBand != null">
|
|
||||||
other_band = #{record.otherBand},
|
|
||||||
</if>
|
|
||||||
<if test="record.brandStrength != null">
|
|
||||||
brand_strength = #{record.brandStrength},
|
|
||||||
</if>
|
|
||||||
<if test="record.needImprove != null">
|
|
||||||
need_improve = #{record.needImprove},
|
|
||||||
</if>
|
|
||||||
<if test="record.strength != null">
|
|
||||||
strength = #{record.strength},
|
|
||||||
</if>
|
|
||||||
<if test="record.weakness != null">
|
|
||||||
weakness = #{record.weakness},
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
create_time = #{record.createTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
update_time = #{record.updateTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.detailedAddress != null">
|
|
||||||
detailed_address = #{record.detailedAddress},
|
|
||||||
</if>
|
|
||||||
<if test="record.email != null">
|
|
||||||
email = #{record.email},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where id = #{record.id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<select id="selectPartnerIntentApplyInfoList" resultType="com.cool.store.dto.partner.PartnerIntentApplyInfoDTO">
|
|
||||||
select
|
|
||||||
a.id as partnerLineId,
|
|
||||||
a.partner_id as partnerId,
|
|
||||||
a.workflow_stage as workflowStage,
|
|
||||||
a.workflow_status as workflowStatus,
|
|
||||||
b.id as id,
|
|
||||||
b.create_time as partnerSubmitTime,
|
|
||||||
b.deadline as deadline,
|
|
||||||
bi.user_portrait as userPortrait,
|
|
||||||
hpuinfo.mobile as mobile,
|
|
||||||
hpuinfo.username as partnerUserName,
|
|
||||||
hpuinfo.user_channel_id as userChannelId,
|
|
||||||
hpuinfo.live_area as liveArea,
|
|
||||||
hpuinfo.want_shop_area as wantShopArea,
|
|
||||||
hpuinfo.ec_want_shop_area as ecWantShopArea,
|
|
||||||
hpuinfo.accept_adjust_type as acceptAdjustType,
|
|
||||||
cr.create_time as lastFollowTime,
|
|
||||||
cr.call_status as callStatus
|
|
||||||
from hy_partner_line_info a
|
|
||||||
left join hy_partner_intent_info b on a.id = b.partner_line_id
|
|
||||||
left join hy_partner_base_info bi on a.id = bi.partner_line_id
|
|
||||||
LEFT JOIN hy_partner_user_info hpuinfo ON a.partner_id = hpuinfo.partner_id
|
|
||||||
LEFT join call_record cr on a.id = cr.partner_line_id
|
|
||||||
where deleted = 0 and line_status!=3
|
|
||||||
and (cr.id in (
|
|
||||||
select max(id) maxId
|
|
||||||
from call_record group by partner_line_id) or cr.id is null)
|
|
||||||
<if test="keyword!=null and keyword!=''">
|
|
||||||
and (hpuinfo.mobile like concat('%',#{keyword},'%') or hpuinfo.username like concat('%',#{keyword},'%'))
|
|
||||||
</if>
|
|
||||||
<if test="callStatus!=null and callStatus==1">
|
|
||||||
and cr.call_status = #{callStatus}
|
|
||||||
</if>
|
|
||||||
<if test="callStatus!=null and callStatus==0">
|
|
||||||
and cr.call_status != 1
|
|
||||||
</if>
|
|
||||||
<if test="lastFollowStartTime!=null and lastFollowEndTime!=null">
|
|
||||||
and cr.create_time>#{lastFollowStartTime} and cr.create_time <![CDATA[<]]> #{lastFollowEndTime}
|
|
||||||
</if>
|
|
||||||
<if test="userChannelIdList!=null and userChannelIdList.size>0">
|
|
||||||
<foreach collection="userChannelIdList" open="and hpuinfo.user_channel_id in (" close=")" separator="," item="userChannelId">
|
|
||||||
#{userChannelId}
|
|
||||||
</foreach>
|
|
||||||
</if>
|
|
||||||
<if test="userPortraitIdList!=null and userPortraitIdList.size>0">
|
|
||||||
and
|
|
||||||
<foreach collection="userPortraitIdList" separator="or" open="(" close=")" item="userPortraitId">
|
|
||||||
bi.user_portrait like concat("%,", #{userPortraitId}, ",%")
|
|
||||||
</foreach>
|
|
||||||
</if>
|
|
||||||
<if test="userId!=null and userId!=''">
|
|
||||||
and a.investment_manager = #{userId}
|
|
||||||
</if>
|
|
||||||
<if test="workflowStage!=null and workflowStage!=''">
|
|
||||||
and a.workflow_stage= #{workflowStage}
|
|
||||||
</if>
|
|
||||||
<if test="workflowStatus!=null and workflowStatus!=''">
|
|
||||||
and a.workflow_status = #{workflowStatus}
|
|
||||||
</if>
|
|
||||||
<if test="workflowStatus!=null and workflowStatus=='1'">
|
|
||||||
order by a.create_time
|
|
||||||
</if>
|
|
||||||
<if test="workflowStatus!=null and workflowStatus=='0'">
|
|
||||||
order by a.update_time
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectByLineId" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"></include>
|
|
||||||
from hy_partner_intent_info
|
|
||||||
<where>
|
|
||||||
and partner_line_id = #{lineId}
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="getByPartnerIdAndLineId" resultMap="BaseResultMap" >
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"></include>
|
|
||||||
from hy_partner_intent_info
|
|
||||||
where partner_id = #{partnerId} and partner_line_id = #{partnerLineId}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
|
|
||||||
<update id="updateLineId">
|
|
||||||
update hy_partner_intent_info
|
|
||||||
set partner_line_id = #{newLineId},partner_id = #{newPartnerId}
|
|
||||||
where partner_line_id = #{oldLineId}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<update id="updateAcquaintanceFlag">
|
|
||||||
update hy_partner_intent_info
|
|
||||||
set
|
|
||||||
acquaintance_flag = #{acquaintanceFlag} ,
|
|
||||||
other_relationship_type = #{otherRelationshipType},
|
|
||||||
acquaintance_name = #{acquaintanceName},
|
|
||||||
acquaintance_relationship_type = #{acquaintanceRelationshipType}
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<update id="updateByPartnerLineId">
|
|
||||||
update hy_partner_intent_info
|
|
||||||
<set>
|
|
||||||
<if test="record.liveArea != null">
|
|
||||||
live_area = #{record.liveArea},
|
|
||||||
</if>
|
|
||||||
<if test="record.wantShopArea != null">
|
|
||||||
want_shop_area = #{record.wantShopArea},
|
|
||||||
</if>
|
|
||||||
<if test="record.acceptAdjustType != null">
|
|
||||||
accept_adjust_type = #{record.acceptAdjustType},
|
|
||||||
</if>
|
|
||||||
<if test="record.isHaveWantShop != null">
|
|
||||||
is_have_want_shop = #{record.isHaveWantShop},
|
|
||||||
</if>
|
|
||||||
<if test="record.wantShopInfo != null">
|
|
||||||
want_shop_info = #{record.wantShopInfo},
|
|
||||||
</if>
|
|
||||||
<if test="record.maxBudget != null">
|
|
||||||
max_budget = #{record.maxBudget},
|
|
||||||
</if>
|
|
||||||
<if test="record.moneySource != null">
|
|
||||||
money_source = #{record.moneySource},
|
|
||||||
</if>
|
|
||||||
<if test="record.moneyProve != null">
|
|
||||||
money_prove = #{record.moneyProve},
|
|
||||||
</if>
|
|
||||||
<if test="record.creditProve != null">
|
|
||||||
credit_prove = #{record.creditProve},
|
|
||||||
</if>
|
|
||||||
<if test="record.education != null">
|
|
||||||
education = #{record.education},
|
|
||||||
</if>
|
|
||||||
<if test="record.workYear != null">
|
|
||||||
work_year = #{record.workYear},
|
|
||||||
</if>
|
|
||||||
<if test="record.isHaveWorkExp != null">
|
|
||||||
is_have_work_exp = #{record.isHaveWorkExp},
|
|
||||||
</if>
|
|
||||||
<if test="record.workExp != null">
|
|
||||||
work_exp = #{record.workExp},
|
|
||||||
</if>
|
|
||||||
<if test="record.isConsumer != null">
|
|
||||||
is_consumer = #{record.isConsumer},
|
|
||||||
</if>
|
|
||||||
<if test="record.otherBand != null">
|
|
||||||
other_band = #{record.otherBand},
|
|
||||||
</if>
|
|
||||||
<if test="record.brandStrength != null">
|
|
||||||
brand_strength = #{record.brandStrength},
|
|
||||||
</if>
|
|
||||||
<if test="record.needImprove != null">
|
|
||||||
need_improve = #{record.needImprove},
|
|
||||||
</if>
|
|
||||||
<if test="record.strength != null">
|
|
||||||
strength = #{record.strength},
|
|
||||||
</if>
|
|
||||||
<if test="record.weakness != null">
|
|
||||||
weakness = #{record.weakness},
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
create_time = #{record.createTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
update_time = #{record.updateTime},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where partner_line_id = #{record.partnerLineId}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
@@ -1,526 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.cool.store.mapper.HyPartnerInterviewMapper">
|
|
||||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyPartnerInterviewDO">
|
|
||||||
<id column="id" jdbcType="BIGINT" property="id" />
|
|
||||||
<result column="status" jdbcType="TINYINT" property="status" />
|
|
||||||
<result column="partner_line_id" jdbcType="BIGINT" property="partnerLineId" />
|
|
||||||
<result column="interview_plan_id" jdbcType="BIGINT" property="interviewPlanId" />
|
|
||||||
<result column="partner_id" jdbcType="VARCHAR" property="partnerId" />
|
|
||||||
<result column="deadline" jdbcType="TIMESTAMP" property="deadline" />
|
|
||||||
<result column="interviewer" jdbcType="VARCHAR" property="interviewer" />
|
|
||||||
<result column="recorder" jdbcType="VARCHAR" property="recorder" />
|
|
||||||
<result column="process_info" jdbcType="VARCHAR" property="processInfo" />
|
|
||||||
<result column="record_time" jdbcType="TIMESTAMP" property="recordTime" />
|
|
||||||
<result column="summary" jdbcType="VARCHAR" property="summary" />
|
|
||||||
<result column="auth_code" jdbcType="VARCHAR" property="authCode" />
|
|
||||||
<result column="pass_pdf_url" jdbcType="VARCHAR" property="passPdfUrl" />
|
|
||||||
<result column="pass_image_url" jdbcType="VARCHAR" property="passImageUrl" />
|
|
||||||
<result column="expiry_date" jdbcType="TIMESTAMP" property="expiryDate" />
|
|
||||||
<result column="latest_log_message" jdbcType="VARCHAR" property="latestLogMessage" />
|
|
||||||
<result column="pass_reason" jdbcType="VARCHAR" property="passReason" />
|
|
||||||
<result column="certify_file" jdbcType="VARCHAR" property="certifyFile" />
|
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
||||||
<result column="approve_time" jdbcType="TIMESTAMP" property="approveTime" />
|
|
||||||
<result column="partner_enter_time" jdbcType="TIMESTAMP" property="partnerEnterTime" />
|
|
||||||
<result column="interviewer_enter_time" jdbcType="TIMESTAMP" property="interviewerEnterTime" />
|
|
||||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<resultMap id="PartnerInterviewInfoVO" type="com.cool.store.vo.PartnerInterviewInfoVO">
|
|
||||||
<id column="interviewId" property="interviewId"/>
|
|
||||||
<result column="partnerId" property="partnerId"/>
|
|
||||||
<result column="interviewerId" property="interviewerId"/>
|
|
||||||
<association property="partnerName" column="partnerId" select="queryPartnerName" javaType="string"/>
|
|
||||||
<association property="interviewerName" column="interviewerId" select="queryInterviewerName" javaType="string"/>
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<resultMap id="partnerEnterInterviewVO" type="com.cool.store.vo.EnterInterviewVO">
|
|
||||||
<association property="partnerName" column="partner_id" select="queryPartnerName"></association>
|
|
||||||
<association property="interviewerName" column="interviewer" select="queryInterviewerName"></association>
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<resultMap id="passLetterDetail" type="com.cool.store.vo.PartnerPassLetterDetailVO">
|
|
||||||
<association property="partnerName" column="partner_id" select="queryPartnerName"></association>
|
|
||||||
<association property="verifyCity" column="partner_line_id" select="getVerifyCity"></association>
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
id, status, partner_line_id, interview_plan_id, partner_id, deadline, interviewer,
|
|
||||||
recorder, process_info, record_time, summary, auth_code, pass_pdf_url, pass_image_url, expiry_date,
|
|
||||||
latest_log_message, pass_reason, certify_file, create_time, update_time, approve_time,
|
|
||||||
partner_enter_time, interviewer_enter_time,deleted
|
|
||||||
</sql>
|
|
||||||
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
|
|
||||||
insert into hy_partner_interview
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="record.status != null">
|
|
||||||
status,
|
|
||||||
</if>
|
|
||||||
<if test="record.partnerLineId != null">
|
|
||||||
partner_line_id,
|
|
||||||
</if>
|
|
||||||
<if test="record.interviewPlanId != null">
|
|
||||||
interview_plan_id,
|
|
||||||
</if>
|
|
||||||
<if test="record.partnerId != null">
|
|
||||||
partner_id,
|
|
||||||
</if>
|
|
||||||
<if test="record.deadline != null">
|
|
||||||
deadline,
|
|
||||||
</if>
|
|
||||||
<if test="record.interviewer != null">
|
|
||||||
interviewer,
|
|
||||||
</if>
|
|
||||||
<if test="record.recorder != null">
|
|
||||||
recorder,
|
|
||||||
</if>
|
|
||||||
<if test="record.processInfo != null">
|
|
||||||
process_info,
|
|
||||||
</if>
|
|
||||||
<if test="record.recordTime != null">
|
|
||||||
record_time,
|
|
||||||
</if>
|
|
||||||
<if test="record.summary != null">
|
|
||||||
summary,
|
|
||||||
</if>
|
|
||||||
<if test="record.authCode != null">
|
|
||||||
auth_code,
|
|
||||||
</if>
|
|
||||||
<if test="record.passPdfUrl != null">
|
|
||||||
pass_pdf_url,
|
|
||||||
</if>
|
|
||||||
<if test="record.passImageUrl != null">
|
|
||||||
pass_image_url,
|
|
||||||
</if>
|
|
||||||
<if test="record.expiryDate != null">
|
|
||||||
expiry_date,
|
|
||||||
</if>
|
|
||||||
<if test="record.latestLogMessage != null">
|
|
||||||
latest_log_message,
|
|
||||||
</if>
|
|
||||||
<if test="record.passReason != null">
|
|
||||||
pass_reason,
|
|
||||||
</if>
|
|
||||||
<if test="record.certifyFile != null">
|
|
||||||
certify_file,
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
create_time,
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
update_time,
|
|
||||||
</if>
|
|
||||||
<if test="record.approveTime != null">
|
|
||||||
approve_time,
|
|
||||||
</if>
|
|
||||||
<if test="record.partnerEnterTime != null">
|
|
||||||
partner_enter_time,
|
|
||||||
</if>
|
|
||||||
<if test="record.interviewerEnterTime != null">
|
|
||||||
interviewer_enter_time,
|
|
||||||
</if>
|
|
||||||
<if test="record.deleted != null">
|
|
||||||
deleted,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="record.status != null">
|
|
||||||
#{record.status},
|
|
||||||
</if>
|
|
||||||
<if test="record.partnerLineId != null">
|
|
||||||
#{record.partnerLineId},
|
|
||||||
</if>
|
|
||||||
<if test="record.interviewPlanId != null">
|
|
||||||
#{record.interviewPlanId},
|
|
||||||
</if>
|
|
||||||
<if test="record.partnerId != null">
|
|
||||||
#{record.partnerId},
|
|
||||||
</if>
|
|
||||||
<if test="record.deadline != null">
|
|
||||||
#{record.deadline},
|
|
||||||
</if>
|
|
||||||
<if test="record.interviewer != null">
|
|
||||||
#{record.interviewer},
|
|
||||||
</if>
|
|
||||||
<if test="record.recorder != null">
|
|
||||||
#{record.recorder},
|
|
||||||
</if>
|
|
||||||
<if test="record.processInfo != null">
|
|
||||||
#{record.processInfo},
|
|
||||||
</if>
|
|
||||||
<if test="record.recordTime != null">
|
|
||||||
#{record.recordTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.summary != null">
|
|
||||||
#{record.summary},
|
|
||||||
</if>
|
|
||||||
<if test="record.authCode != null">
|
|
||||||
#{record.authCode},
|
|
||||||
</if>
|
|
||||||
<if test="record.passPdfUrl != null">
|
|
||||||
#{record.passPdfUrl},
|
|
||||||
</if>
|
|
||||||
<if test="record.passImageUrl != null">
|
|
||||||
#{record.passImageUrl},
|
|
||||||
</if>
|
|
||||||
<if test="record.expiryDate != null">
|
|
||||||
#{record.expiryDate},
|
|
||||||
</if>
|
|
||||||
<if test="record.latestLogMessage != null">
|
|
||||||
#{record.latestLogMessage},
|
|
||||||
</if>
|
|
||||||
<if test="record.passReason != null">
|
|
||||||
#{record.passReason},
|
|
||||||
</if>
|
|
||||||
<if test="record.certifyFile != null">
|
|
||||||
#{record.certifyFile},
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
#{record.createTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
#{record.updateTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.approveTime != null">
|
|
||||||
#{record.approveTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.partnerEnterTime != null">
|
|
||||||
#{record.partnerEnterTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.interviewerEnterTime != null">
|
|
||||||
#{record.interviewerEnterTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.deleted != null">
|
|
||||||
#{record.deleted},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
<update id="updateByPrimaryKeySelective">
|
|
||||||
update hy_partner_interview
|
|
||||||
<set>
|
|
||||||
<if test="status != null">
|
|
||||||
status = #{status},
|
|
||||||
</if>
|
|
||||||
<if test="partnerLineId != null">
|
|
||||||
partner_line_id = #{partnerLineId},
|
|
||||||
</if>
|
|
||||||
<if test="interviewPlanId != null">
|
|
||||||
interview_plan_id = #{interviewPlanId},
|
|
||||||
</if>
|
|
||||||
<if test="partnerId != null">
|
|
||||||
partner_id = #{partnerId},
|
|
||||||
</if>
|
|
||||||
<if test="deadline != null">
|
|
||||||
deadline = #{deadline},
|
|
||||||
</if>
|
|
||||||
<if test="interviewer != null">
|
|
||||||
interviewer = #{interviewer},
|
|
||||||
</if>
|
|
||||||
<if test="recorder != null">
|
|
||||||
recorder = #{recorder},
|
|
||||||
</if>
|
|
||||||
<if test="processInfo != null">
|
|
||||||
process_info = #{processInfo},
|
|
||||||
</if>
|
|
||||||
<if test="recordTime != null">
|
|
||||||
record_time = #{recordTime},
|
|
||||||
</if>
|
|
||||||
<if test="summary != null">
|
|
||||||
summary = #{summary},
|
|
||||||
</if>
|
|
||||||
<if test="authCode != null">
|
|
||||||
auth_code = #{authCode},
|
|
||||||
</if>
|
|
||||||
<if test="passCode != null">
|
|
||||||
pass_code = #{passCode},
|
|
||||||
</if>
|
|
||||||
<if test="passPdfUrl != null">
|
|
||||||
pass_pdf_url = #{passPdfUrl},
|
|
||||||
</if>
|
|
||||||
<if test="passImageUrl != null">
|
|
||||||
pass_image_url = #{passImageUrl},
|
|
||||||
</if>
|
|
||||||
<if test="passTime != null">
|
|
||||||
pass_time = #{passTime},
|
|
||||||
</if>
|
|
||||||
<if test="expiryDate != null">
|
|
||||||
expiry_date = #{expiryDate},
|
|
||||||
</if>
|
|
||||||
<if test="latestLogMessage != null">
|
|
||||||
latest_log_message = #{latestLogMessage},
|
|
||||||
</if>
|
|
||||||
<if test="passReason != null">
|
|
||||||
pass_reason = #{passReason},
|
|
||||||
</if>
|
|
||||||
<if test="certifyFile != null">
|
|
||||||
certify_file = #{certifyFile},
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
create_time = #{createTime},
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
update_time = #{updateTime},
|
|
||||||
</if>
|
|
||||||
<if test="approveTime != null">
|
|
||||||
approve_time = #{approveTime},
|
|
||||||
</if>
|
|
||||||
<if test="partnerEnterTime != null">
|
|
||||||
partner_enter_time = #{partnerEnterTime},
|
|
||||||
</if>
|
|
||||||
<if test="interviewerEnterTime != null">
|
|
||||||
interviewer_enter_time = #{interviewerEnterTime},
|
|
||||||
</if>
|
|
||||||
<if test="deleted != null">
|
|
||||||
deleted = #{deleted},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
<where>
|
|
||||||
1 = 0
|
|
||||||
<if test="id != null">
|
|
||||||
or id = #{id}
|
|
||||||
</if>
|
|
||||||
<if test="interviewPlanId != null">
|
|
||||||
or interview_plan_id = #{interviewPlanId}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<!-- 根据加盟商id查询面试信息 -->
|
|
||||||
<select id="queryByPartnerId" resultMap="PartnerInterviewInfoVO">
|
|
||||||
SELECT t1.id interviewId, t1.id interview_id, t2.id as interviewPlanId, `status`, start_time, end_time, room_id, t1.partner_id partnerId, t1.interviewer interviewerId
|
|
||||||
FROM hy_partner_interview t1
|
|
||||||
LEFT JOIN hy_partner_interview_plan t2 ON t1.interview_plan_id = t2.id
|
|
||||||
WHERE t1.partner_id = #{partnerId}
|
|
||||||
AND t1.deleted = 0
|
|
||||||
AND t2.deleted = 0
|
|
||||||
</select>
|
|
||||||
<select id="queryPartnerName" resultType="string">
|
|
||||||
SELECT username
|
|
||||||
FROM hy_partner_user_info
|
|
||||||
WHERE partner_id = #{partnerId}
|
|
||||||
</select>
|
|
||||||
<select id="queryInterviewerName" resultType="string">
|
|
||||||
SELECT name
|
|
||||||
FROM enterprise_user
|
|
||||||
WHERE deleted = 0
|
|
||||||
AND user_id = #{interview}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 根据会议 id 获取面试官 id -->
|
|
||||||
<select id="getInterviewerByInterviewPlanId" resultMap="partnerEnterInterviewVO">
|
|
||||||
SELECT interviewer, interviewer interviewer_id, partner_id
|
|
||||||
FROM hy_partner_interview
|
|
||||||
WHERE interview_plan_id = #{interviewPlanId} and deleted = 0
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 获取通知函详情 -->
|
|
||||||
<select id="getPassLetterDetail" resultMap="passLetterDetail">
|
|
||||||
SELECT auth_code, pass_code, pass_pdf_url, pass_image_url,
|
|
||||||
expiry_date, pass_time as createTime,
|
|
||||||
partner_id, partner_line_id
|
|
||||||
FROM hy_partner_interview
|
|
||||||
WHERE interview_plan_id = #{interviewPlanId} and deleted = 0
|
|
||||||
</select>
|
|
||||||
<!-- 获取意向开店区域 -->
|
|
||||||
<select id="getVerifyCity" resultType="string">
|
|
||||||
SELECT area_path
|
|
||||||
FROM hy_open_area_info
|
|
||||||
WHERE id = (
|
|
||||||
SELECT want_shop_area
|
|
||||||
FROM hy_partner_intent_info
|
|
||||||
WHERE partner_line_id = #{partner_line_id}
|
|
||||||
)
|
|
||||||
</select>
|
|
||||||
<select id="selectByPrimaryKeySelective" resultType="com.cool.store.entity.HyPartnerInterviewDO">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"/>
|
|
||||||
from
|
|
||||||
hy_partner_interview
|
|
||||||
where
|
|
||||||
id = #{interviewId}
|
|
||||||
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 生成通过函 pdf 后修改 -->
|
|
||||||
<update id="updatePassLetterInfo">
|
|
||||||
UPDATE hy_partner_interview
|
|
||||||
<set>
|
|
||||||
<if test="passCode != null and passCode != ''">
|
|
||||||
pass_code = #{passCode},
|
|
||||||
</if>
|
|
||||||
<if test="passPdfUrl != null and passPdfUrl != ''">
|
|
||||||
pass_pdf_url = #{passPdfUrl},
|
|
||||||
</if>
|
|
||||||
<if test="passImageUrl != null and passImageUrl != ''">
|
|
||||||
pass_image_url = #{passImageUrl},
|
|
||||||
</if>
|
|
||||||
<if test="expiryDate != null and expiryDate != ''">
|
|
||||||
expiry_date = #{expiryDate}
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
WHERE id = #{interviewId}
|
|
||||||
</update>
|
|
||||||
<update id="batchUpdateInterviewStatus">
|
|
||||||
UPDATE hy_partner_interview
|
|
||||||
<set>
|
|
||||||
<if test="status != null and status != ''">
|
|
||||||
status = #{status},
|
|
||||||
</if>
|
|
||||||
<if test="deleted != null ">
|
|
||||||
deleted = #{deleted},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
WHERE id in
|
|
||||||
<foreach collection="interviewIds" item="item" index="index" open="(" separator="," close=")">
|
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<!-- 根据 interviewId 获取意向区域 -->
|
|
||||||
<select id="getVerifyCityByInterviewId" resultType="java.lang.String">
|
|
||||||
SELECT area_path
|
|
||||||
FROM hy_open_area_info
|
|
||||||
WHERE id = (
|
|
||||||
SELECT want_shop_area
|
|
||||||
FROM hy_partner_intent_info
|
|
||||||
WHERE partner_line_id = (
|
|
||||||
SELECT partner_line_id
|
|
||||||
FROM hy_partner_interview
|
|
||||||
WHERE id = #{interviewId} and deleted = 0
|
|
||||||
)
|
|
||||||
)
|
|
||||||
</select>
|
|
||||||
<select id="getInterviewBaseInfoList" resultType="com.cool.store.entity.HyPartnerInterviewDO">
|
|
||||||
select
|
|
||||||
*
|
|
||||||
from hy_partner_interview_plan hpip
|
|
||||||
left join hy_partner_interview hpi on hpi.interview_plan_id = hpip.id
|
|
||||||
<where>
|
|
||||||
<if test="record.status != null">
|
|
||||||
and hpi.status = #{record.status}
|
|
||||||
</if>
|
|
||||||
<if test="record.startTime != null">
|
|
||||||
and hpip.start_time >= #{record.startTime}
|
|
||||||
</if>
|
|
||||||
<if test="record.endTime != null">
|
|
||||||
and hpip.end_time <= #{record.endTime}
|
|
||||||
</if>
|
|
||||||
<if test="record.deleted != null">
|
|
||||||
and hpi.deleted = #{record.deleted} and hpip.deleted = #{record.deleted}
|
|
||||||
</if>
|
|
||||||
<if test="record.isPartnerInterview != null">
|
|
||||||
and hpip.is_partner_interview = #{record.isPartnerInterview}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
|
|
||||||
</select>
|
|
||||||
|
|
||||||
|
|
||||||
<select id="getOverTimeReserveInterviewList" resultType="com.cool.store.entity.HyPartnerInterviewDO">
|
|
||||||
SELECT
|
|
||||||
<include refid="Base_Column_List"></include>
|
|
||||||
FROM hy_partner_interview_plan where
|
|
||||||
partner_line_id in ( select id from hy_partner_line_info
|
|
||||||
WHERE workflow_flow_stage = #{workflowStage}
|
|
||||||
AND workflow_flow_status = #{workflowStatus}
|
|
||||||
AND deadline <= NOW()
|
|
||||||
AND deleted = 0) and deleted = 0
|
|
||||||
</select>
|
|
||||||
<!-- 根据面试计划id获取面试信息 -->
|
|
||||||
<select id="getInterviewInfoByInterviewPlanId" resultType="com.cool.store.entity.HyPartnerInterviewDO">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"/>
|
|
||||||
from
|
|
||||||
hy_partner_interview
|
|
||||||
where
|
|
||||||
interview_plan_id = #{interviewPlanId}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 修改面试状态 -->
|
|
||||||
<update id="updateInterviewStatus">
|
|
||||||
UPDATE hy_partner_interview
|
|
||||||
SET status = #{status}
|
|
||||||
WHERE interview_plan_id = #{interviewPlanId}
|
|
||||||
</update>
|
|
||||||
<update id="batchUpdateStatusByLineIds">
|
|
||||||
UPDATE hy_partner_interview
|
|
||||||
<set>
|
|
||||||
<if test="status != null and status != ''">
|
|
||||||
status = #{status}
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
WHERE partner_line_id in
|
|
||||||
<foreach collection="lineIds" item="item" index="index" open="(" separator="," close=")">
|
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
and deleted = 0
|
|
||||||
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<!-- 获取面试对应的线索id -->
|
|
||||||
<select id="getLineId" resultType="java.lang.String">
|
|
||||||
SELECT partner_line_id
|
|
||||||
FROM hy_partner_interview
|
|
||||||
WHERE interview_plan_id = #{interviewPlanId}
|
|
||||||
</select>
|
|
||||||
<select id="getInterviewBaseInfoListByLineIds" resultType="com.cool.store.entity.HyPartnerInterviewDO">
|
|
||||||
select <include refid="Base_Column_List"/> from hy_partner_interview where partner_line_id in
|
|
||||||
<foreach collection="lineIds" item="item" index="index" open="(" separator="," close=")">
|
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
and deleted = 0
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 获取面试流程状态 -->
|
|
||||||
<select id="getStatus" resultType="java.lang.String">
|
|
||||||
SELECT status
|
|
||||||
FROM hy_partner_interview
|
|
||||||
WHERE interview_plan_id = #{interviewPlanId}
|
|
||||||
</select>
|
|
||||||
<select id="queryByPartnerLineId" resultMap="PartnerInterviewInfoVO">
|
|
||||||
SELECT t1.id interviewId, t1.id interview_id, t2.id as interviewPlanId, `status`, start_time, end_time, room_id, t1.partner_id partnerId, t1.interviewer interviewerId
|
|
||||||
FROM hy_partner_interview_plan t2
|
|
||||||
LEFT JOIN hy_partner_interview t1 ON t1.interview_plan_id = t2.id
|
|
||||||
WHERE t2.partner_line_id = #{partnerLineId}
|
|
||||||
AND t1.deleted = 0
|
|
||||||
AND t2.deleted = 0
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 根据 room_id 添加 process_info -->
|
|
||||||
<update id="addVideoUrl">
|
|
||||||
UPDATE hy_partner_interview
|
|
||||||
SET process_info = IF(process_info IS NULL, #{videoUrl}, CONCAT(process_info, ',' ,#{videoUrl}))
|
|
||||||
WHERE interview_plan_id = (
|
|
||||||
SELECT id
|
|
||||||
FROM hy_partner_interview_plan
|
|
||||||
WHERE room_id = #{roomId}
|
|
||||||
)
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<select id="hasVideoUrls" resultType="java.lang.Boolean">
|
|
||||||
SELECT COUNT(*)
|
|
||||||
FROM hy_partner_interview
|
|
||||||
WHERE FIND_IN_SET(#{videoUrl}, process_info)
|
|
||||||
</select>
|
|
||||||
<select id="getInterviewInfoByQualifyVerifyId" resultType="com.cool.store.entity.HyPartnerInterviewDO">
|
|
||||||
SELECT
|
|
||||||
hpi.id, hpi.status, hpi.partner_line_id, hpi.interview_plan_id
|
|
||||||
FROM
|
|
||||||
hy_partner_interview hpi
|
|
||||||
LEFT JOIN hy_partner_certification_info hpci ON hpci.partner_interview_id = hpi.id
|
|
||||||
WHERE
|
|
||||||
hpci.qualify_verify_id = #{qualifyVerifyId}
|
|
||||||
|
|
||||||
AND hpi.deleted = 0
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<update id="updateLineId">
|
|
||||||
update hy_partner_interview
|
|
||||||
set partner_line_id = #{newLineId} , partner_id = #{newPartnerId}
|
|
||||||
where partner_line_id = #{oldLineId}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
@@ -1,624 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.cool.store.mapper.HyPartnerInterviewPlanMapper">
|
|
||||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyPartnerInterviewPlanDO">
|
|
||||||
<id column="id" jdbcType="BIGINT" property="id" />
|
|
||||||
<result column="partner_line_id" jdbcType="BIGINT" property="partnerLineId" />
|
|
||||||
<result column="partner_id" jdbcType="VARCHAR" property="partnerId" />
|
|
||||||
<result column="interview_date" jdbcType="DATE" property="interviewDate" />
|
|
||||||
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
|
|
||||||
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
|
|
||||||
<result column="is_partner_interview" jdbcType="TINYINT" property="isPartnerInterview" />
|
|
||||||
<result column="application_approved" jdbcType="TINYINT" property="applicationApproved" />
|
|
||||||
<result column="actual_start_time" jdbcType="TIMESTAMP" property="actualStartTime" />
|
|
||||||
<result column="actual_end_time" jdbcType="TIMESTAMP" property="actualEndTime" />
|
|
||||||
<result column="room_id" jdbcType="VARCHAR" property="roomId" />
|
|
||||||
<result column="feishu_calendar_id" jdbcType="VARCHAR" property="feishuCalendarId" />
|
|
||||||
<result column="feishu_schedule_id" jdbcType="VARCHAR" property="feishuScheduleId" />
|
|
||||||
<result column="room_password" jdbcType="VARCHAR" property="roomPassword" />
|
|
||||||
<result column="interviewer" jdbcType="VARCHAR" property="interviewer" />
|
|
||||||
<result column="room_status" jdbcType="TINYINT" property="roomStatus" />
|
|
||||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
||||||
</resultMap>
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
id, partner_line_id, partner_id, interview_date, start_time, end_time, is_partner_interview,
|
|
||||||
actual_start_time, actual_end_time, room_id, room_password, interviewer, room_status,
|
|
||||||
deleted, create_time, update_time,feishu_calendar_id,feishu_schedule_id
|
|
||||||
</sql>
|
|
||||||
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
|
|
||||||
insert into hy_partner_interview_plan
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="record.partnerLineId != null">
|
|
||||||
partner_line_id,
|
|
||||||
</if>
|
|
||||||
<if test="record.partnerId != null">
|
|
||||||
partner_id,
|
|
||||||
</if>
|
|
||||||
<if test="record.interviewDate != null">
|
|
||||||
interview_date,
|
|
||||||
</if>
|
|
||||||
<if test="record.startTime != null">
|
|
||||||
start_time,
|
|
||||||
</if>
|
|
||||||
<if test="record.endTime != null">
|
|
||||||
end_time,
|
|
||||||
</if>
|
|
||||||
<if test="record.isPartnerInterview != null">
|
|
||||||
is_partner_interview,
|
|
||||||
</if>
|
|
||||||
<if test="record.actualStartTime != null">
|
|
||||||
actual_start_time,
|
|
||||||
</if>
|
|
||||||
<if test="record.actualEndTime != null">
|
|
||||||
actual_end_time,
|
|
||||||
</if>
|
|
||||||
<if test="record.roomId != null">
|
|
||||||
room_id,
|
|
||||||
</if>
|
|
||||||
<if test="record.roomPassword != null">
|
|
||||||
room_password,
|
|
||||||
</if>
|
|
||||||
<if test="record.interviewer != null">
|
|
||||||
interviewer,
|
|
||||||
</if>
|
|
||||||
<if test="record.roomStatus != null">
|
|
||||||
room_status,
|
|
||||||
</if>
|
|
||||||
<if test="record.deleted != null">
|
|
||||||
deleted,
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
create_time,
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
update_time,
|
|
||||||
</if>
|
|
||||||
<if test="record.applicationApproved != null">
|
|
||||||
application_approved,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="record.partnerLineId != null">
|
|
||||||
#{record.partnerLineId},
|
|
||||||
</if>
|
|
||||||
<if test="record.partnerId != null">
|
|
||||||
#{record.partnerId},
|
|
||||||
</if>
|
|
||||||
<if test="record.interviewDate != null">
|
|
||||||
#{record.interviewDate},
|
|
||||||
</if>
|
|
||||||
<if test="record.startTime != null">
|
|
||||||
#{record.startTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.endTime != null">
|
|
||||||
#{record.endTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.isPartnerInterview != null">
|
|
||||||
#{record.isPartnerInterview},
|
|
||||||
</if>
|
|
||||||
<if test="record.actualStartTime != null">
|
|
||||||
#{record.actualStartTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.actualEndTime != null">
|
|
||||||
#{record.actualEndTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.roomId != null">
|
|
||||||
#{record.roomId},
|
|
||||||
</if>
|
|
||||||
<if test="record.roomPassword != null">
|
|
||||||
#{record.roomPassword},
|
|
||||||
</if>
|
|
||||||
<if test="record.interviewer != null">
|
|
||||||
#{record.interviewer},
|
|
||||||
</if>
|
|
||||||
<if test="record.roomStatus != null">
|
|
||||||
#{record.roomStatus},
|
|
||||||
</if>
|
|
||||||
<if test="record.deleted != null">
|
|
||||||
#{record.deleted},
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
#{record.createTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
#{record.updateTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.applicationApproved != null">
|
|
||||||
#{record.applicationApproved},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
<update id="updateByPrimaryKeySelective">
|
|
||||||
update hy_partner_interview_plan
|
|
||||||
<set>
|
|
||||||
<if test="record.partnerLineId != null">
|
|
||||||
partner_line_id = #{record.partnerLineId},
|
|
||||||
</if>
|
|
||||||
<if test="record.partnerId != null">
|
|
||||||
partner_id = #{record.partnerId},
|
|
||||||
</if>
|
|
||||||
<if test="record.interviewDate != null">
|
|
||||||
interview_date = #{record.interviewDate},
|
|
||||||
</if>
|
|
||||||
<if test="record.startTime != null">
|
|
||||||
start_time = #{record.startTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.endTime != null">
|
|
||||||
end_time = #{record.endTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.isPartnerInterview != null">
|
|
||||||
is_partner_interview = #{record.isPartnerInterview},
|
|
||||||
</if>
|
|
||||||
<if test="record.actualStartTime != null">
|
|
||||||
actual_start_time = #{record.actualStartTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.actualEndTime != null">
|
|
||||||
actual_end_time = #{record.actualEndTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.roomId != null">
|
|
||||||
room_id = #{record.roomId},
|
|
||||||
</if>
|
|
||||||
<if test="record.roomPassword != null">
|
|
||||||
room_password = #{record.roomPassword},
|
|
||||||
</if>
|
|
||||||
<if test="record.interviewer != null">
|
|
||||||
interviewer = #{record.interviewer},
|
|
||||||
</if>
|
|
||||||
<if test="record.roomStatus != null">
|
|
||||||
room_status = #{record.roomStatus},
|
|
||||||
</if>
|
|
||||||
<if test="record.deleted != null">
|
|
||||||
deleted = #{record.deleted},
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
create_time = #{record.createTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
update_time = #{record.updateTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.feishuCalendarId != null">
|
|
||||||
feishu_calendar_id = #{record.feishuCalendarId},
|
|
||||||
</if>
|
|
||||||
<if test="record.feishuScheduleId != null">
|
|
||||||
feishu_schedule_id = #{record.feishuScheduleId},
|
|
||||||
</if>
|
|
||||||
<if test="record.applicationApproved != null">
|
|
||||||
application_approved = #{record.applicationApproved},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where id = #{record.id}
|
|
||||||
</update>
|
|
||||||
<update id="batchDeleteInterviewPlans">
|
|
||||||
update hy_partner_interview_plan
|
|
||||||
set deleted = 1
|
|
||||||
where id in
|
|
||||||
<foreach collection="interviewPlanIds" item="id" open="(" separator="," close=")">
|
|
||||||
#{id}
|
|
||||||
</foreach>
|
|
||||||
</update>
|
|
||||||
<update id="updateInterviewRoomStatus">
|
|
||||||
update hy_partner_interview_plan
|
|
||||||
set room_status = #{roomStatus},update_time = now()
|
|
||||||
<where>
|
|
||||||
<if test="record.roomStatus !=null and record.roomStatus!=''">
|
|
||||||
and room_status = #{record.roomStatus}
|
|
||||||
</if>
|
|
||||||
<if test="record.startTime !=null'">
|
|
||||||
and start_time >= #{record.startTime}
|
|
||||||
</if>
|
|
||||||
<if test="record.endTime !=null">
|
|
||||||
and end_time <= #{record.endTime}
|
|
||||||
</if>
|
|
||||||
<if test="record.deleted !=null and record.deleted!=''">
|
|
||||||
and deleted = #{deleted}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<update id="openInterviewRoom">
|
|
||||||
update hy_partner_interview_plan
|
|
||||||
set room_status = #{roomStatus},update_time = now()
|
|
||||||
<where>
|
|
||||||
partner_line_id in
|
|
||||||
<foreach collection="lineIds" item="item" index="index" open="(" separator="," close=")">
|
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
and deleted = 0
|
|
||||||
</where>
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<update id="closeInterviewRoom">
|
|
||||||
update hy_partner_interview_plan
|
|
||||||
set room_status = #{roomStatus},update_time = now()
|
|
||||||
<where>
|
|
||||||
<if test="record.roomStatus !=null and record.roomStatus!=''">
|
|
||||||
and room_status = #{record.roomStatus}
|
|
||||||
</if>
|
|
||||||
<if test="record.startTime !=null">
|
|
||||||
and end_time >= #{record.startTime}
|
|
||||||
</if>
|
|
||||||
<if test="record.endTime !=null">
|
|
||||||
and end_time <= #{record.endTime}
|
|
||||||
</if>
|
|
||||||
<if test="record.deleted !=null and record.deleted!=''">
|
|
||||||
and deleted = #{deleted}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<!-- 修改面试实际开始时间 -->
|
|
||||||
<update id="updateActualStartTime">
|
|
||||||
update hy_partner_interview_plan
|
|
||||||
set actual_start_time = IF(actual_start_time is NULL, #{now}, actual_start_time)
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<select id="getCurrentDateInterviewCount" resultType="com.cool.store.dto.partner.AdvanceLineDTO">
|
|
||||||
select interview_date as date,count(1) as count from hy_partner_interview_plan t1
|
|
||||||
left join hy_partner_exhibition t2 ON t1.id = t2.interview_plan_id
|
|
||||||
<where>
|
|
||||||
<if test="userId!=null and userId!=''">
|
|
||||||
and interviewer = #{userId}
|
|
||||||
</if>
|
|
||||||
<if test="currentDate!=null and currentDate!=''">
|
|
||||||
and interview_date BETWEEN #{currentDate} and #{endDate}
|
|
||||||
</if>
|
|
||||||
and t1.deleted = 0 and application_approved = 1
|
|
||||||
-- 排除会销面试
|
|
||||||
and t2.interview_plan_id is null
|
|
||||||
-- 排除已结束的面试
|
|
||||||
and t1.actual_end_time is null
|
|
||||||
</where>
|
|
||||||
group by interview_date
|
|
||||||
</select>
|
|
||||||
|
|
||||||
|
|
||||||
<select id="getInterviewCount" resultType="com.cool.store.dto.partner.SpecialDateRangeInterviewCountDTO">
|
|
||||||
select
|
|
||||||
ifnull(sum(if(interview_date = #{currentDate} and room_status!=2,1,0)),0) as currentDayInterviewCount,
|
|
||||||
ifnull(sum(if(start_time > #{startTime} and end_time <= #{endTime} ,1,0)),0) as lastSevenDayInterviewCount
|
|
||||||
FROM hy_partner_interview_plan t1
|
|
||||||
LEFT JOIN hy_partner_exhibition t2 ON t1.id = t2.interview_plan_id
|
|
||||||
where interviewer = #{userId}
|
|
||||||
and t1.deleted = 0
|
|
||||||
and t1.application_approved = 1
|
|
||||||
and t2.interview_plan_id IS NULL
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="getInterviewPlanList" resultMap="BaseResultMap">
|
|
||||||
select * from hy_partner_interview_plan
|
|
||||||
<where>
|
|
||||||
<if test="userId!=null and userId!=''">
|
|
||||||
and interviewer = #{userId}
|
|
||||||
</if>
|
|
||||||
<if test="currentDay!=null and currentDay!=''">
|
|
||||||
and interview_date = #{currentDay}
|
|
||||||
</if>
|
|
||||||
and room_status!=2
|
|
||||||
and deleted = 0
|
|
||||||
and application_approved = 1
|
|
||||||
order by start_time
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="getPartnerInterviewInfoList" resultType="com.cool.store.dto.partner.PartnerInterviewInfoDTO">
|
|
||||||
select
|
|
||||||
hpli.id as partnerLineId,
|
|
||||||
hpli.partner_id as partnerId,
|
|
||||||
hpli.deadline as deadline,
|
|
||||||
hpli.workflow_status as status,
|
|
||||||
cr.create_time as lastFollowTime,
|
|
||||||
cr.call_status as callStatus,
|
|
||||||
bi.user_portrait as userPortrait,
|
|
||||||
a.id as interviewId,
|
|
||||||
a.auth_code as authCode,
|
|
||||||
a.approve_time as approveTime,
|
|
||||||
a.process_info as processInfo,
|
|
||||||
b.start_time as startTime,
|
|
||||||
b.end_time as endTime,
|
|
||||||
b.interviewer as interviewer,
|
|
||||||
b.create_time as createTime,
|
|
||||||
b.room_id as roomId,
|
|
||||||
b.id as id,
|
|
||||||
hpci.intention_contract_no as intentionContractNo
|
|
||||||
from hy_partner_line_info hpli
|
|
||||||
left join hy_partner_interview a on hpli.id = a.partner_line_id and a.deleted = 0
|
|
||||||
left join hy_partner_base_info bi on hpli.id = bi.partner_line_id
|
|
||||||
left join hy_partner_interview_plan b on a.interview_plan_id = b.id and b.deleted = 0
|
|
||||||
left join hy_partner_certification_info hpci on hpci.partner_interview_id = a.id
|
|
||||||
LEFT join call_record cr on hpli.id = cr.partner_line_id
|
|
||||||
where hpli.deleted = 0 and hpli.line_status!=3
|
|
||||||
and (cr.id in (
|
|
||||||
select max(id) maxId
|
|
||||||
from call_record group by partner_line_id) or cr.id is null)
|
|
||||||
<if test="workflowStage!=null and workflowStage!=''">
|
|
||||||
and hpli.workflow_stage = #{workflowStage}
|
|
||||||
</if>
|
|
||||||
<if test="workflowStatus!=null and workflowStatus!=''">
|
|
||||||
and hpli.workflow_status = #{workflowStatus}
|
|
||||||
</if>
|
|
||||||
<if test="userId!=null and userId!=''">
|
|
||||||
and hpli.investment_manager = #{userId}
|
|
||||||
</if>
|
|
||||||
<if test="workflowStatus!=null and workflowStatus!='' and workflowStatus==4 and workflowStage!=null and workflowStage!='' and workflowStage==1 ">
|
|
||||||
order by hpli.create_time
|
|
||||||
</if>
|
|
||||||
<if test="workflowStatus!=null and workflowStatus!='' and workflowStatus==5 and workflowStage!=null and workflowStage!='' and workflowStage==1 ">
|
|
||||||
order by hpli.update_time
|
|
||||||
</if>
|
|
||||||
<if test="workflowStatus!=null and workflowStatus!='' and workflowStatus==1 and workflowStage!=null and workflowStage!='' and workflowStage==2 ">
|
|
||||||
order by hpli.create_time
|
|
||||||
</if>
|
|
||||||
<if test="workflowStatus!=null and workflowStatus!='' and workflowStatus==0 and workflowStage!=null and workflowStage!='' and workflowStage==2 ">
|
|
||||||
order by hpli.update_time
|
|
||||||
</if>
|
|
||||||
<if test="workflowStatus!=null and workflowStatus!='' and workflowStatus==4 and workflowStage!=null and workflowStage!='' and workflowStage==3 ">
|
|
||||||
order by hpli.create_time
|
|
||||||
</if>
|
|
||||||
<if test="workflowStatus!=null and workflowStatus!='' and workflowStatus==5 and workflowStage!=null and workflowStage!='' and workflowStage==3 ">
|
|
||||||
order by hpli.update_time
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="getInterviewList" resultType="com.cool.store.vo.interview.InterviewVO">
|
|
||||||
select hpip.id as interviewPlanId,
|
|
||||||
hpip.partner_id as partnerId,
|
|
||||||
hpui.username as partnerName,
|
|
||||||
hpui.mobile as partnerMobile,
|
|
||||||
hpip.room_id as roomId,
|
|
||||||
hpip.start_time as startTime,
|
|
||||||
hpip.interviewer as interviewerId,
|
|
||||||
eu.name as interviewerName,
|
|
||||||
eu.mobile as interviewerMobile,
|
|
||||||
hpip.room_status as roomStatus,
|
|
||||||
hpip.end_time as endTime
|
|
||||||
from hy_partner_interview_plan hpip
|
|
||||||
left join hy_partner_interview hpi on hpip.id = hpi.interview_plan_id
|
|
||||||
left join hy_partner_line_info hpll on hpip.partner_line_id = hpll.id
|
|
||||||
left join hy_partner_user_info hpui on hpui.partner_id = hpip.partner_id
|
|
||||||
left join enterprise_user eu on hpip.interviewer = eu.user_id
|
|
||||||
<where>
|
|
||||||
hpip.deleted = 0 and hpi.deleted = 0 and hpi.status != 1
|
|
||||||
<if test="record.partnerName !=null and record.partnerName!=''">
|
|
||||||
and hpui.username like concat('%',#{record.partnerName},'%')
|
|
||||||
</if>
|
|
||||||
<if test="record.partnerMobile !=null and record.partnerMobile!=''">
|
|
||||||
and hpui.mobile like concat('%',#{record.partnerMobile},'%')
|
|
||||||
</if>
|
|
||||||
<if test="record.roomId !=null and record.roomId!=''">
|
|
||||||
and hpip.room_id like concat('%', #{record.roomId}, '%')
|
|
||||||
</if>
|
|
||||||
<if test="record.interviewerName !=null and record.interviewerName!=''">
|
|
||||||
and eu.name like concat('%',#{record.interviewerName},'%')
|
|
||||||
</if>
|
|
||||||
<if test="record.interviewerMobile !=null and record.interviewerMobile!=''">
|
|
||||||
and eu.mobile like concat('%',#{record.interviewerMobile},'%')
|
|
||||||
</if>
|
|
||||||
<if test="record.roomStatus !=null">
|
|
||||||
and hpip.room_status = #{record.roomStatus}
|
|
||||||
</if>
|
|
||||||
<if test="record.startTime !=null and record.startTime != ''">
|
|
||||||
and hpip.start_time >= #{record.startTime}
|
|
||||||
</if>
|
|
||||||
<if test="record.endTime != null and record.endTime != ''">
|
|
||||||
and hpip.end_time <= #{record.endTime}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
|
|
||||||
</select>
|
|
||||||
<select id="getInterviewInfo" resultType="com.cool.store.vo.interview.InterviewVO">
|
|
||||||
select hpip.id as interviewPlanId,
|
|
||||||
hpi.id as interviewId,
|
|
||||||
hpll.id as partnerLineId,
|
|
||||||
hpci.qualify_verify_id as qualifyVerifyId,
|
|
||||||
hpci.intention_contract_no as intentionContractNo,
|
|
||||||
hpll.workflow_stage as workflowStage,
|
|
||||||
hpll.line_status as lineStatus,
|
|
||||||
hpi.pass_time as passTime,
|
|
||||||
hpi.pass_reason as passReason,
|
|
||||||
hpi.recorder as recorderId,
|
|
||||||
hpi.record_time as recordTime,
|
|
||||||
hpi.summary as summary,
|
|
||||||
hpi.process_info as processInfo,
|
|
||||||
hpi.auth_code as authCode,
|
|
||||||
hpi.expiry_date as expiryDate,
|
|
||||||
hpi.pass_pdf_url as passPdfUrl,
|
|
||||||
hpi.pass_image_url as passImageUrl,
|
|
||||||
hpui.username as partnerName,
|
|
||||||
hpui.mobile as partnerMobile,
|
|
||||||
hpip.room_id as roomId,
|
|
||||||
hpip.start_time as startTime,
|
|
||||||
hpui.username as interviewerName,
|
|
||||||
hpui.mobile as interviewerMobile,
|
|
||||||
hpip.room_status as roomStatus,
|
|
||||||
hpip.end_time as endTime,
|
|
||||||
hpip.partner_id as partnerId,
|
|
||||||
hpip.interviewer as interviewerId,
|
|
||||||
hpip.feishu_calendar_id as feishuCalendarId,
|
|
||||||
hpip.feishu_schedule_id as feishuScheduleId,
|
|
||||||
hpi.status as status,
|
|
||||||
hpip.actual_start_time actualStartTime,
|
|
||||||
hpip.actual_end_time actualEndTime
|
|
||||||
from hy_partner_interview_plan hpip
|
|
||||||
left join hy_partner_line_info hpll on hpip.partner_line_id = hpll.id
|
|
||||||
left join hy_partner_user_info hpui on hpui.partner_id = hpip.partner_id
|
|
||||||
left join hy_partner_interview hpi on hpip.id = hpi.interview_plan_id
|
|
||||||
left join hy_partner_certification_info hpci on hpci.partner_interview_id = hpi.id
|
|
||||||
where hpip.id = #{interviewPlanId} and hpip.deleted = 0 and hpi.deleted = 0
|
|
||||||
</select>
|
|
||||||
<select id="selectBySelective" resultType="com.cool.store.entity.HyPartnerInterviewPlanDO">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"/>
|
|
||||||
from hy_partner_interview_plan
|
|
||||||
<where>
|
|
||||||
<if test="record.id !=null and record.id!=''">
|
|
||||||
and id = #{record.id}
|
|
||||||
</if>
|
|
||||||
<if test="record.partnerLineId !=null and record.partnerLineId!=''">
|
|
||||||
and partner_line_id = #{record.partnerLineId}
|
|
||||||
</if>
|
|
||||||
<if test="record.partnerId !=null and record.partnerId!=''">
|
|
||||||
and partner_id = #{record.partnerId}
|
|
||||||
</if>
|
|
||||||
<if test="record.startTime !=null">
|
|
||||||
and start_time = #{record.startTime}
|
|
||||||
</if>
|
|
||||||
<if test="record.endTime !=null">
|
|
||||||
and end_time = #{record.endTime}
|
|
||||||
</if>
|
|
||||||
<if test="record.interviewer !=null and record.interviewer!=''">
|
|
||||||
and interviewer = #{record.interviewer}
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime !=null and record.createTime!=''">
|
|
||||||
and create_time = #{record.createTime}
|
|
||||||
</if>
|
|
||||||
<if test="record.roomId !=null and record.roomId!=''">
|
|
||||||
and room_id = #{record.roomId}
|
|
||||||
</if>
|
|
||||||
<if test="record.roomStatus !=null and record.roomStatus!=''">
|
|
||||||
and room_status = #{record.roomStatus}
|
|
||||||
</if>
|
|
||||||
<if test="record.interviewDate !=null and record.interviewDate!=''">
|
|
||||||
and interview_date = #{record.interviewDate}
|
|
||||||
</if>
|
|
||||||
<if test="record.deleted !=null">
|
|
||||||
and deleted = #{record.deleted}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectInterviewIdByLineId" resultType="java.lang.Long">
|
|
||||||
select id from hy_partner_interview_plan where partner_line_id = #{lineId} and deleted = '0'
|
|
||||||
</select>
|
|
||||||
|
|
||||||
|
|
||||||
<select id="getHyPartnerInterviewPlanByLineIds" resultMap="BaseResultMap">
|
|
||||||
select <include refid="Base_Column_List"></include>
|
|
||||||
from hy_partner_interview_plan
|
|
||||||
where deleted = 0
|
|
||||||
<if test="lindIds!=null and lindIds.size>0">
|
|
||||||
<foreach collection="lindIds" item="lindId" open="and partner_line_id in (" close=")" separator=",">
|
|
||||||
#{lindId}
|
|
||||||
</foreach>
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- 查询用户基本信息 -->
|
|
||||||
<select id="getEnterpriseUserBaseInfo" resultType="com.cool.store.vo.EnterpriseUserBaseInfoVO">
|
|
||||||
select name, mobile
|
|
||||||
from enterprise_user
|
|
||||||
where user_id = #{userId}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 获取面试房间状态 -->
|
|
||||||
<select id="getRoomStatus" resultType="java.lang.Integer">
|
|
||||||
select room_status
|
|
||||||
from hy_partner_interview_plan
|
|
||||||
where id = #{interviewPlanId}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 获取面试开始时间 -->
|
|
||||||
<select id="getInterviewStartTime" resultType="java.lang.String">
|
|
||||||
select start_time
|
|
||||||
from hy_partner_interview_plan
|
|
||||||
where id = #{interviewPlanId}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!-- 根据id获取面试计划信息 -->
|
|
||||||
<select id="getInterviewPlanById" resultType="com.cool.store.entity.HyPartnerInterviewPlanDO">
|
|
||||||
select <include refid="Base_Column_List"></include>
|
|
||||||
from hy_partner_interview_plan
|
|
||||||
where id = #{interviewPlanId}
|
|
||||||
</select>
|
|
||||||
<select id="getInterviewPlanByLineId" resultType="com.cool.store.entity.HyPartnerInterviewPlanDO">
|
|
||||||
select <include refid="Base_Column_List"></include>
|
|
||||||
from hy_partner_interview_plan
|
|
||||||
where partner_line_id = #{lineId} and deleted = 0
|
|
||||||
</select>
|
|
||||||
<select id="selectRemindInterviewPlan" resultType="com.cool.store.dto.message.RemindInterviewMsgDTO">
|
|
||||||
select hpip.partner_id as partnerId,
|
|
||||||
hpip.interviewer as interviewerId,
|
|
||||||
hpui.username as partnerName,
|
|
||||||
hpui.mobile as partnerMobile,
|
|
||||||
hpip.start_time as startTime
|
|
||||||
from hy_partner_interview_plan hpip
|
|
||||||
left join hy_partner_line_info hpll on hpip.partner_line_id = hpll.id
|
|
||||||
left join hy_partner_interview hpi on hpip.id = hpi.interview_plan_id
|
|
||||||
left join hy_partner_user_info hpui on hpui.partner_id = hpip.partner_id
|
|
||||||
where hpip.deleted = 0
|
|
||||||
and hpi.deleted = 0
|
|
||||||
and hpll.deleted = 0
|
|
||||||
and hpip.start_time >= #{startTime}
|
|
||||||
and hpip.start_time <= #{endTime}
|
|
||||||
and hpll.workflow_stage = #{workflowStage}
|
|
||||||
and hpll.workflow_status = #{workflowStatus}
|
|
||||||
|
|
||||||
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<update id="updateLineId">
|
|
||||||
update hy_partner_interview_plan
|
|
||||||
set partner_line_id = #{newLineId} , partner_id = #{newPartnerId}
|
|
||||||
where partner_line_id = #{oldLineId}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<!--获取明天开始面试的面试开始时间和 partnerId(17:00 前确定为明天面试的)-->
|
|
||||||
<select id="getTomorrowInterview" resultType="com.cool.store.entity.HyInterviewRemindDO">
|
|
||||||
SELECT t1.start_time, t3.mobile
|
|
||||||
FROM hy_partner_interview_plan t1
|
|
||||||
LEFT JOIN hy_partner_interview t2 ON t1.id = t2.interview_plan_id
|
|
||||||
LEFT JOIN hy_partner_user_info t3 ON t1.partner_id = t3.partner_id
|
|
||||||
WHERE t1.deleted = 0 ANd t2.deleted = 0
|
|
||||||
AND t2.`status` = 2
|
|
||||||
AND DATE(start_time) = DATE_ADD(CURDATE(), INTERVAL 1 DAY)
|
|
||||||
AND t1.update_time < CONCAT(CURDATE(), ' 17:00:00')
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<!--获取 30 分钟后开始的面试(预约30分钟之内的面试不发获取)-->
|
|
||||||
<select id="remindInterviewStartMinutes" resultType="com.cool.store.entity.HyInterviewRemindDO">
|
|
||||||
SELECT t1.start_time, t3.mobile
|
|
||||||
FROM hy_partner_interview_plan t1
|
|
||||||
LEFT JOIN hy_partner_interview t2 ON t1.id = t2.interview_plan_id
|
|
||||||
LEFT JOIN hy_partner_user_info t3 ON t1.partner_id = t3.partner_id
|
|
||||||
WHERE t1.deleted = 0 ANd t2.deleted = 0
|
|
||||||
AND t2.`status` = 2
|
|
||||||
-- 开始时间在 now 和 now + 30 以内的(即下一场面试的)
|
|
||||||
AND start_time > NOW() AND start_time <= DATE_ADD(NOW(), INTERVAL 30 MINUTE)
|
|
||||||
-- 更新时间(同意面试预约时间)在当前时间之前的(即在面试开始 30 分钟之前同意预约的)
|
|
||||||
AND t1.update_time <= NOW()
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="getInterviewBookSituation" resultType="com.cool.store.entity.HyPartnerInterviewBookSituation">
|
|
||||||
SELECT t_booking_times.*, IFNULL(application_approved, 0) AS booked, partner_id AS booked_partner_id
|
|
||||||
FROM (
|
|
||||||
-- 查询已被预约成功的时间段
|
|
||||||
SELECT t1.start_time, t1.end_time, t1.application_approved, t1.partner_id, t1.deleted
|
|
||||||
FROM hy_partner_interview_plan t1
|
|
||||||
LEFT JOIN hy_partner_interview t2 ON t1.id = t2.interview_plan_id
|
|
||||||
WHERE t1.interviewer = #{interviewerId}
|
|
||||||
AND t1.deleted = 0
|
|
||||||
AND t1.application_approved = 1
|
|
||||||
AND t1.start_time >= #{startTime}
|
|
||||||
AND t1.end_time <= #{endTime}
|
|
||||||
)
|
|
||||||
AS t_booking_success
|
|
||||||
RIGHT JOIN (
|
|
||||||
-- 查询所有时间段预约人数
|
|
||||||
SELECT COUNT(*) AS booking_count, start_time, end_time, deleted
|
|
||||||
FROM hy_partner_interview_plan
|
|
||||||
WHERE interviewer = #{interviewerId}
|
|
||||||
AND deleted = 0
|
|
||||||
AND start_time >= #{startTime}
|
|
||||||
AND end_time <= #{endTime}
|
|
||||||
GROUP BY start_time
|
|
||||||
)
|
|
||||||
AS t_booking_times ON t_booking_times.start_time = t_booking_success.start_time
|
|
||||||
</select>
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user