Merge branch 'dev/feat/partner1.5.2_20231121' into hxd/feat/partner1.5.2
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
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,10 +1,12 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.dto.calendar.UserFreeBusyInfoDTO;
|
||||
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;
|
||||
@@ -185,4 +187,13 @@ public interface HyPartnerInterviewPlanMapper {
|
||||
* @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);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
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);
|
||||
}
|
||||
@@ -587,4 +587,31 @@
|
||||
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>
|
||||
@@ -602,11 +602,6 @@
|
||||
<if test="storeKeyword!=null and storeKeyword!='' and storeKeywordType!=null and storeKeywordType=='partnerMobile'">
|
||||
AND hpuinfo.recommend_partner_mobile like concat('%',#{storeKeyword},'%')
|
||||
</if>
|
||||
<if test="userIdList!=null and userIdList.size>0 and developmentManagerList!=null and developmentManagerList.size==0">
|
||||
<foreach collection="userIdList" item="userId" open="and hpli.investment_manager in (" close=")" separator=",">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="userPortraitIdList!=null and userPortraitIdList.size>0 and userPortraitQueryType!=null and userPortraitQueryType=='contains'">
|
||||
<foreach collection="userPortraitIdList" separator="or" open="and (" close=")" item="userPortraitId">
|
||||
bi.user_portrait like concat("%,", #{userPortraitId}, ",%")
|
||||
@@ -634,6 +629,11 @@
|
||||
<if test="userChannelQueryType!=null and userChannelQueryType == 'blank' ">
|
||||
AND hpuinfo.user_channel_id is null
|
||||
</if>
|
||||
<if test="userIdList!=null and userIdList.size>0 and developmentManagerList!=null and developmentManagerList.size==0">
|
||||
<foreach collection="userIdList" item="userId" open="and hpli.investment_manager in (" close=")" separator=",">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="userIdList!=null and userIdList.size==0 and developmentManagerList!=null and developmentManagerList.size>0">
|
||||
<foreach collection="developmentManagerList" item="developmentManager" open="and hpli.development_manager in (" close=")" separator=",">
|
||||
#{developmentManager}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
<?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.SuperAdminConfigMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.SuperAdminConfigDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="super_admin_user_id" jdbcType="VARCHAR" property="superAdminUserId" />
|
||||
<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, super_admin_user_id, deleted, create_time, update_time, create_user_id, update_user_id
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select <include refid="Base_Column_List"></include>
|
||||
from super_admin_config where
|
||||
id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
|
||||
<select id="isSuperAdmin" resultMap="BaseResultMap">
|
||||
select <include refid="Base_Column_List"></include>
|
||||
from super_admin_config
|
||||
where deleted = 0 and super_admin_user_id = #{userId} limit 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -29,7 +29,7 @@
|
||||
<!-- targetPackage:mapper接口生成的位置 -->
|
||||
<javaClientGenerator targetPackage="com.cool.store.mapper" targetProject="coolstore-partner-dao/src/main/java" type="XMLMAPPER" />
|
||||
|
||||
<table tableName="${table.name}" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"
|
||||
<table tableName="super_admin_config" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"
|
||||
enableSelectByExample="false" selectByExampleQueryId="false">
|
||||
<generatedKey column="id" sqlStatement="Mysql" identity="true" type=""/>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user