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

This commit is contained in:
zhangchenbiao
2023-06-13 09:50:18 +08:00
38 changed files with 1938 additions and 47 deletions

View File

@@ -0,0 +1,59 @@
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 com.github.pagehelper.PageInfo;
import com.google.common.collect.Lists;
import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import javax.annotation.Resource;
import java.util.List;
/**
* @Author suzhuhong
* @Date 2023/6/9 15:02
* @Version 1.0
*/
@Repository
public class HyPartnerIntentInfoDAO {
@Resource
HyPartnerIntentInfoMapper hyPartnerIntentInfoMapper;
public int insertSelective( HyPartnerIntentInfoDO record){
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 PageInfo<PartnerIntentApplyInfoDTO> selectPartnerIntentApplyInfoList(String userId, String workflowStage, String workflowStatus){
if (StringUtils.isEmpty(userId)){
return new PageInfo<>();
}
return hyPartnerIntentInfoMapper.selectPartnerIntentApplyInfoList(userId,workflowStage,workflowStatus);
}
public PartnerIntentApplyInfoDTO selectByLineId(Long lineId){
if (lineId==null){
return null;
}
return hyPartnerIntentInfoMapper.selectByLineId(lineId);
}
}

View File

@@ -0,0 +1,85 @@
package com.cool.store.dao;
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 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/8 14:54
* @Version 1.0
*/
@Repository
public class HyPartnerInterviewPlanDAO {
@Resource
HyPartnerInterviewPlanMapper hyPartnerInterviewPlanMapper;
/**
* 查询当前用户当天是否有面试
* @param userId
* @param currentDate
* @return
*/
public Integer getCurrentDateInterviewCount(String userId,String currentDate){
if (StringUtils.isEmpty(userId)){
return 0;
}
return hyPartnerInterviewPlanMapper.getCurrentDateInterviewCount(userId,currentDate);
}
/**
* 查询指定日期面试数量 与未来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 currentDate){
if (StringUtils.isEmpty(userId)){
return new ArrayList<>();
}
return hyPartnerInterviewPlanMapper.getInterviewPlanList(userId,currentDate);
}
/**
* 工作台 招商经理 预约面试时间 合格资格面试 列表
* @param userId
* @param workflowStage
* @param workflowStatus
* @return
*/
public PageInfo<PartnerInterviewInfoDTO> getPartnerInterviewInfoList(String userId, String workflowStage,String workflowStatus){
if (StringUtils.isEmpty(userId)){
return new PageInfo();
}
return hyPartnerInterviewPlanMapper.getPartnerInterviewInfoList(userId,workflowStage,workflowStatus);
}
}

View File

@@ -0,0 +1,111 @@
package com.cool.store.dao;
import com.cool.store.dto.partner.PartnerIntentApplyInfoDTO;
import com.cool.store.dto.partner.PartnerLineInfoAndBaseInfoDTO;
import com.cool.store.dto.partner.StageCountDTO;
import com.cool.store.entity.HyPartnerLineInfoDO;
import com.cool.store.mapper.HyPartnerLineInfoMapper;
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.List;
/**
* @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 Integer getAdventLineCount( String userId, String currentDate){
if (StringUtils.isEmpty(userId)){
return 0;
}
return hyPartnerLineInfoMapper.getAdventLineCount(userId,currentDate);
}
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 PageInfo<HyPartnerLineInfoDO> lastMonthCloseLine(String userId, String lastMonthTodayDate){
if (userId==null){
return new PageInfo<>();
}
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);
}
}

View File

@@ -0,0 +1,51 @@
package com.cool.store.dao;
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.apache.ibatis.annotations.Param;
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;
/**
* 根据PartnerId查询用户
* @param partnerId
* @return
*/
public HyPartnerUserInfoDO selectByPartnerId(String partnerId){
if (StringUtils.isEmpty(partnerId)){
return null;
}
return hyPartnerUserInfoMapper.selectByPartnerId(partnerId);
}
/**
* 根据PartnerIds批量查询用户
* @param partnerIds
* @return
*/
public List<HyPartnerUserInfoDO> selectByPartnerIds(List<String> partnerIds){
if (CollectionUtils.isEmpty(partnerIds)){
return Lists.newArrayList();
}
return hyPartnerUserInfoMapper.selectByPartnerIds(partnerIds);
}
}

View File

@@ -1,8 +1,12 @@
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
@@ -16,10 +20,31 @@ public interface HyPartnerIntentInfoMapper {
*/
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
*/
PageInfo<PartnerIntentApplyInfoDTO> selectPartnerIntentApplyInfoList(@Param("userId") String userId,
@Param("workflowStage") String workflowStage ,
@Param("workflowStatus") String workflowStatus);
/**
* 根据线索ID查询数据
* @param lineId
* @return
*/
PartnerIntentApplyInfoDTO selectByLineId(@Param("lineId") Long lineId);
}

View File

@@ -1,8 +1,14 @@
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.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
/**
* @author zhangchenbiao
* @date 2023-05-29 03:52
@@ -22,4 +28,46 @@ public interface HyPartnerInterviewPlanMapper {
* dateTime:2023-05-29 03:52
*/
int updateByPrimaryKeySelective(@Param("record") HyPartnerInterviewPlanDO record);
/**
* 查询当天面试数量
* @param userId
* @param currentDate
* @return
*/
Integer getCurrentDateInterviewCount(@Param("userId") String userId, @Param("currentDate") String currentDate);
/**
* 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("currentDate") String currentDate);
/**
* 工作台 招商经理 预约面试时间 合格资格面试 列表
* @param userId
* @param workflowStage
* @param workflowStatus
* @return
*/
PageInfo<PartnerInterviewInfoDTO> getPartnerInterviewInfoList(@Param("userId") String userId,
@Param("workflowStage") String workflowStage ,
@Param("workflowStatus") String workflowStatus);
}

View File

@@ -1,9 +1,15 @@
package com.cool.store.mapper;
import com.cool.store.dto.partner.PartnerIntentApplyInfoDTO;
import com.cool.store.dto.partner.PartnerLineInfoAndBaseInfoDTO;
import com.cool.store.dto.partner.StageCountDTO;
import com.cool.store.entity.HyPartnerLineInfoDO;
import com.cool.store.entity.HyPartnerLineInfoDO;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author zhangchenbiao
* @date 2023-05-29 03:52
@@ -17,10 +23,86 @@ public interface HyPartnerLineInfoMapper {
*/
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);
/**
* 当前用户指定时间 临期线索
* @param userId
* @param currentDate
* @return
*/
Integer getAdventLineCount(@Param("userId") String userId, @Param("currentDate") String currentDate);
/**
* 招商经理 对应各阶段待处理数据
* @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
*/
PageInfo<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);
}

View File

@@ -3,6 +3,8 @@ package com.cool.store.mapper;
import com.cool.store.entity.HyPartnerUserInfoDO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author zhangchenbiao
* @date 2023-05-29 03:53
@@ -22,4 +24,18 @@ public interface HyPartnerUserInfoMapper {
* dateTime:2023-05-29 03:53
*/
int updateByPrimaryKeySelective(@Param("record") HyPartnerUserInfoDO record);
/**
* 根据partnerID查询用户信息
* @param partnerId
* @return
*/
HyPartnerUserInfoDO selectByPartnerId(@Param("partnerId") String partnerId);
/**
* 根据partnerIDs批量查询用户信息
* @param partnerIdList
* @return
*/
List<HyPartnerUserInfoDO> selectByPartnerIds(@Param("partnerIdList") List<String> partnerIdList);
}

View File

@@ -32,6 +32,14 @@
work_exp, is_consumer, other_band, brand_strength, need_improve, strength, weakness,
create_time, update_time
</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=",">
@@ -243,4 +251,41 @@
</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.live_area as liveArea,
b.want_shop_area as wantShopArea,
b.accept_adjust_type as acceptAdjustType,
b.deadline as deadline
from hy_partner_intent_info b left join hy_partner_line_info a on a.id = b.partner_line_id
<where>
<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>
</where>
order by b.create_time
</select>
<select id="selectByLineId" resultType="com.cool.store.dto.partner.PartnerIntentApplyInfoDTO">
select
<include refid="Base_Column_List"></include>
from hy_partner_intent_info
<where>
and partner_line_id = #{lineId}
</where>
</select>
</mapper>

View File

@@ -172,4 +172,69 @@
</set>
where id = #{record.id}
</update>
<select id="getCurrentDateInterviewCount" resultType="java.lang.Integer">
select count(1) from hy_partner_interview_plan
<where>
<if test="userId!=null and userId!=''">
and interviewer = #{userId}
</if>
<if test="currentDate!=null and currentDate!=''">
and interview_date = #{currentDate}
</if>
</where>
</select>
<select id="getInterviewCount" resultType="com.cool.store.dto.partner.SpecialDateRangeInterviewCountDTO">
select
sum(if(interview_date=#{currentDate},1,0)) as currentDayInterviewCount,
sum(if(start_time>#{startTime} and #{endTime},1,0)) as lastSevenDayInterviewCount
FROM hy_partner_interview_plan
where interviewer = #{userId}
</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="currentDate!=null and currentDate!=''">
and interview_date = #{currentDate}
</if>
and (start_time>now() or (start_time<![CDATA[<]]>now() and room_status!=2))
order by start_time
</where>
</select>
<select id="getPartnerInterviewInfoList" resultType="com.cool.store.dto.partner.PartnerInterviewInfoDTO">
select
a.id as id,
a.deadline as deadline,
a.status as status,
a.auth_code as authCode,
a.approve_time as approveTime,
a.process_info as processInfo,
b.id as interviewId,
b.partner_line_id as partnerLineId,
b.partner_id as partnerId,
b.start_time as startTime,
b.end_time as endTime,
b.interviewer as interviewer,
b.create_time as createTime,
b.room_id as roomId
from hy_partner_interview a inner join hy_partner_interview_plan b on a.interview_plan_id = b.id
<where>
<if test="userId!=null and userId!=''">
and a.interviewer = #{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>
</where>
</select>
</mapper>

View File

@@ -27,6 +27,49 @@
reject_real_reason, certify_file, deleted, create_time, update_time, close_time,
close_user_id
</sql>
<select id="selectByPrimaryKeySelective" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"></include>
from hy_partner_line_info
where id = #{id}
</select>
<insert id="batchInsert">
insert into
hy_partner_line_info
(
partner_id,
workflow_stage,
workflow_status,
line_status,
investment_manager
)
values
<foreach collection="recordList" item="record" separator=",">
(#{record.partnerId},
#{record.workflowStage},
#{record.workflowStatus},
#{record.lineStatus},
#{record.investmentManager})
</foreach>
</insert>
<update id="batchDeleted">
update hy_partner_line_info
set deleted = 1
<where>
<if test="lineIdList!=null and lineIdList.size>0">
<foreach collection="lineIdList" open="and id in (" close=")" separator="," item="lineId">
#{lineId}
</foreach>
</if>
</where>
</update>
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
insert into hy_partner_line_info
<trim prefix="(" suffix=")" suffixOverrides=",">
@@ -193,4 +236,104 @@
</set>
where id = #{record.id}
</update>
<select id="getAdventLineCount" resultType="java.lang.Integer">
select count(1) from hy_partner_line_info
<where>
<if test="userId!=null and userId!=''">
and investment_manager = #{userId}
</if>
<if test="currentDate!=null and currentDate!=''">
and deadline = #{currentDate}
</if>
and
(
(workflow_stage = 1 and workflow_status = 0) or
(workflow_stage = 2 and workflow_status = 0) or
(workflow_stage = 3 and workflow_status = 4)
)
</where>
</select>
<select id="selectStagePendingCount" resultType="com.cool.store.dto.partner.StageCountDTO">
select
IFNULL(sum(if(workflow_stage=1 and workflow_status = 1,1,0)),0) as intentApplyApproveCount,
IFNULL(sum(if(workflow_stage=3 and workflow_status = 3,1,0)),0) as qualifiedInterviewCount
from hy_partner_line_info
<where>
<if test="userId!=null and userId!=''">
and investment_manager = #{userId}
</if>
</where>
</select>
<select id="selectStageFollowCount" resultType="com.cool.store.dto.partner.StageCountDTO">
select
IFNULL(sum(if(workflow_stage=1 and workflow_status = 1,1,0)),0) as intentApplyApproveCount,
IFNULL(sum(if(workflow_stage=2 and workflow_status = 0,1,0)),0) as reservationInterviewCount,
IFNULL(sum(if(workflow_stage=3 and workflow_status = 4,1,0)),0) as qualifiedInterviewCount
from hy_partner_line_info
<where>
<if test="userId!=null and userId!=''">
and investment_manager = #{userId}
</if>
</where>
</select>
<select id="selectPartnerLineInfoAndBaseInfo" resultType="com.cool.store.dto.partner.PartnerLineInfoAndBaseInfoDTO">
select
a.id as id,
a.partner_id as partnerId,
a.workflow_stage as workflowStage,
a.workflow_status as workflowStatus,
a.partner_id as partnerUserId,
a.investment_manager as investmentManager,
b.user_portrait as user_portrait
from hy_partner_line_info a inner join hy_partner_base_info b
on a.id = b.partner_line_id
<where>
<if test="lineId!=null">
and a.id = #{id}
</if>
</where>
</select>
<select id="lastMonthCloseLine" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"></include>
from hy_partner_line_info
<where>
<if test="userId">
and investment_manager = #{userId}
</if>
<if test="lastMonthTodayDate!=null">
and close_time > #{lastMonthTodayDate} and close_time <![CDATA[<]]> now
</if>
</where>
</select>
<update id="updateInvestmentManager">
update hy_partner_line_info
set investment_manager = #{userId}
<if test="lineIdList!=null and lineIdList.size>0">
<foreach collection="lineIdList" open="where id in (" close=")" separator="," item="lineId">
#{lineId}
</foreach>
</if>
</update>
<select id="getLineListByLineIds" resultMap="BaseResultMap" >
select
<include refid="Base_Column_List"></include>
from hy_partner_line_info
where deleted = 0
<if test="lineIdList!=null and lineIdList.size>0">
<foreach collection="lineIdList" open="and id in (" close=")" separator="," item="lineId">
#{lineId}
</foreach>
</if>
</select>
</mapper>

View File

@@ -18,6 +18,25 @@
id, partner_id, mobile, username, live_area, want_shop_area, accept_adjust_type,
invite_code, is_write_partner_know, create_time, update_time
</sql>
<select id="selectByPartnerId" resultMap="BaseResultMap" >
select
<include refid="Base_Column_List"></include>
from hy_partner_user_info
where partner_id = #{partnerId}
</select>
<select id="selectByPartnerIds" resultMap="BaseResultMap" >
select
<include refid="Base_Column_List"></include>
from hy_partner_user_info
<if test="partnerIdList!=null and partnerIdList.size>0">
<foreach collection="partnerIdList" open="and partner_id in (" close=")" separator="," item="partnerId">
#{partnerId}
</foreach>
</if>
</select>
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
insert into hy_partner_user_info
<trim prefix="(" suffix=")" suffixOverrides=",">