Merge remote-tracking branch 'origin/cc_20230520_partner' into cc_20230520_partner

This commit is contained in:
苏竹红
2023-06-14 19:40:01 +08:00
66 changed files with 1421 additions and 242 deletions

View File

@@ -127,6 +127,10 @@
<orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.48.Final" level="project" />
<orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.3.4.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.3" level="project" />
<orderEntry type="library" name="Maven: com.github.tencentyun:tls-sig-api-v2:2.0" level="project" />
<orderEntry type="library" name="Maven: org.json:json:20180130" level="project" />
<orderEntry type="library" name="Maven: com.github.librepdf:openpdf:1.3.30" level="project" />
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:3.0.2" level="project" />
<orderEntry type="library" name="Maven: mysql:mysql-connector-java:8.0.18" level="project" />
<orderEntry type="library" name="Maven: com.google.protobuf:protobuf-java:3.6.1" level="project" />
<orderEntry type="library" name="Maven: com.alibaba:druid-spring-boot-starter:1.1.20" level="project" />

View File

@@ -1,5 +1,6 @@
package com.cool.store.dao;
import com.cool.store.constants.CommonConstants;
import com.cool.store.entity.EnterpriseUserDO;
import com.cool.store.mapper.EnterpriseUserMapper;
import com.google.common.collect.Lists;
@@ -52,4 +53,11 @@ public class EnterpriseUserDAO {
}
enterpriseUserMapper.deleteUser(excludeUserIds);
}
public Integer deleteUserByUserId(String userId){
if(StringUtils.isBlank(userId)){
return CommonConstants.ZERO;
}
return enterpriseUserMapper.deleteUserByUserId(userId);
}
}

View File

@@ -1,5 +1,6 @@
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;
@@ -43,4 +44,11 @@ public class EnterpriseUserRoleDAO {
return enterpriseUserRoleMapper.deleteUserInRole(userId, dataSourceEnum.getCode(), excludeRoleId);
}
public Integer deleteUserRole(String userId){
if(StringUtils.isBlank(userId)){
return CommonConstants.ZERO;
}
return enterpriseUserRoleMapper.deleteUserRole(userId);
}
}

View File

@@ -4,11 +4,15 @@ 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.springframework.stereotype.Repository;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @author zhangchenbiao
@@ -49,4 +53,12 @@ public class RegionDAO {
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));
}
}

View File

@@ -1,5 +1,6 @@
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;
@@ -51,4 +52,11 @@ public class UserRegionMappingDAO {
return userRegionMappingMapper.deleteRegionUserByExcludeUserIds(excludeUserIds);
}
public Integer deleteUserRegionByUserId(String userId){
if(StringUtils.isBlank(userId)){
return CommonConstants.ZERO;
}
return userRegionMappingMapper.deleteUserRegionByUserId(userId);
}
}

View File

@@ -45,4 +45,11 @@ public interface EnterpriseUserMapper {
* @return
*/
int deleteUser(@Param("excludeUserIds") List<String> excludeUserIds);
/**
* 删除用户
* @param userId
* @return
*/
Integer deleteUserByUserId(@Param("userId") String userId);
}

View File

@@ -26,13 +26,27 @@ public interface EnterpriseUserRoleMapper {
int updateByPrimaryKeySelective(EnterpriseUserRoleDO record);
/**
* 删除用户角色
* 删除角色下的用户
* @param roleId
* @param type
* @param userIds
* @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);
}

View File

@@ -3,6 +3,8 @@ package com.cool.store.mapper;
import com.cool.store.dto.partner.PartnerInterviewInfoDTO;
import com.cool.store.dto.partner.SpecialDateRangeInterviewCountDTO;
import com.cool.store.entity.HyPartnerInterviewPlanDO;
import com.cool.store.request.GetInterviewListReq;
import com.cool.store.vo.interview.InterviewVO;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;
@@ -50,7 +52,6 @@ public interface HyPartnerInterviewPlanMapper {
@Param("currentDate") String currentDate,
@Param("startTime") String startTime,
@Param("endTime") String endTime);
/**
* 查询面试列表
* @param userId
@@ -70,4 +71,20 @@ public interface HyPartnerInterviewPlanMapper {
PageInfo<PartnerInterviewInfoDTO> getPartnerInterviewInfoList(@Param("userId") String userId,
@Param("workflowStage") String workflowStage ,
@Param("workflowStatus") String workflowStatus);
/**
* 查询面试列表
*
* @param request
* @return
*/
List<InterviewVO> getInterviewList(@Param("record") GetInterviewListReq request);
/**
* 查询面试详情
*
* @param interviewId
* @return
*/
InterviewVO getInterviewInfo(String interviewId);
}

View File

@@ -39,6 +39,13 @@ public interface RegionMapper {
*/
List<RegionDO> getRegionByRegionIds(@Param("regionIds")List<String> regionIds);
/**
* 根据区域id获取名称
* @param regionIds
* @return
*/
List<RegionDO> getRegionNameByRegionIds(@Param("regionIds")List<String> regionIds);
/**
* 获取区域基本信息
* @return

View File

@@ -47,4 +47,11 @@ public interface UserRegionMappingMapper {
* @return
*/
Integer deleteRegionUserByExcludeUserIds(@Param("excludeUserIds") List<String> excludeUserIds);
/**
* 删除用户所在的区域
* @param userId
* @return
*/
Integer deleteUserRegionByUserId(@Param("userId") String userId);
}

View File

@@ -257,4 +257,8 @@
<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>
</mapper>

View File

@@ -91,4 +91,8 @@
<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>

View File

@@ -237,4 +237,65 @@
</if>
</where>
</select>
<select id="getInterviewList" resultType="com.cool.store.vo.interview.InterviewVO">
select hpip.id as interviewId,
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
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
<where>
<if test="record.partnerName !=null and partnerName!=''">
hpui.username like concat('%',#{record.partnerName},'%')
</if>
<if test="record.partnerMobile !=null and partnerMobile!=''">
hpui.mobile like concat('%',#{record.partnerMobile},'%')
</if>
<if test="record.roomId !=null and roomId!=''">
hpip.room_id = #{record.roomId}
</if>
<if test="record.interviewerName !=null and interviewerName!=''">
hpui.username like concat('%',#{record.interviewerName},'%')
</if>
<if test="record.interviewerMobile !=null and interviewerMobile!=''">
hpui.mobile like concat('%',#{record.interviewerMobile},'%')
</if>
<if test="record.roomStatus !=null and roomStatus!=''">
hpip.room_status = #{record.roomStatus}
</if>
<if test="record.startTime !=null and startTime!=''">
hpip.start_time &lt;= #{record.startTime}
</if>
<if test="record.endTime !=null and endTime!=''">
hpip.end_time &gt;= #{record.endTime}
</if>
</where>
</select>
<select id="getInterviewInfo" resultType="com.cool.store.vo.interview.InterviewVO">
select hpip.id as interviewId,
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,
hpi.status as status
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
where hpip.id = #{interviewId}
</select>
</mapper>

View File

@@ -169,6 +169,16 @@
</select>
<select id="getRegionNameByRegionIds" resultMap="BaseResultMap">
select
region_id, name
from
region
where
deleted = 0 and region_id in <foreach collection="regionIds" item="regionId" separator="," open="(" close=")">#{regionId}</foreach>
</select>
<select id="getRegionBaseInfoList" resultMap="BaseResultMap">
select
region_id, name, parent_id

View File

@@ -119,4 +119,8 @@
update user_region_mapping set deleted = 1 where user_id not in <foreach collection="excludeUserIds" open="(" close=")" separator="," item="userId">#{userId}</foreach>
</update>
<update id="deleteUserRegionByUserId">
update user_region_mapping set deleted = 1 where user_id = #{userId}
</update>
</mapper>