B端 部分接口

This commit is contained in:
苏竹红
2023-06-13 15:43:27 +08:00
parent 66cab97c70
commit deace8ecd5
15 changed files with 344 additions and 37 deletions

View File

@@ -1,5 +1,6 @@
package com.cool.store.dao;
import com.cool.store.dto.partner.PartnerBlackListDTO;
import com.cool.store.dto.partner.PartnerIntentApplyInfoDTO;
import com.cool.store.dto.partner.PartnerLineInfoAndBaseInfoDTO;
import com.cool.store.dto.partner.StageCountDTO;
@@ -54,6 +55,10 @@ public class HyPartnerLineInfoDAO {
return hyPartnerLineInfoMapper.selectByPrimaryKeySelective(id);
}
public int updateByPrimaryKeySelective(HyPartnerLineInfoDO hyPartnerLineInfoDO){
return hyPartnerLineInfoMapper.updateByPrimaryKeySelective(hyPartnerLineInfoDO);
}
public Integer getAdventLineCount( String userId, String currentDate){
if (StringUtils.isEmpty(userId)){
@@ -108,4 +113,16 @@ public class HyPartnerLineInfoDAO {
}
public PageInfo<PartnerBlackListDTO> getBlackList( String keyWord, String intentArea , Integer acceptAdjustType){
return hyPartnerLineInfoMapper.getBlackList(keyWord,intentArea,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);
}
}

View File

@@ -1,5 +1,6 @@
package com.cool.store.mapper;
import com.cool.store.dto.partner.PartnerBlackListDTO;
import com.cool.store.dto.partner.PartnerIntentApplyInfoDTO;
import com.cool.store.dto.partner.PartnerLineInfoAndBaseInfoDTO;
import com.cool.store.dto.partner.StageCountDTO;
@@ -105,4 +106,30 @@ public interface HyPartnerLineInfoMapper {
* @return
*/
List<HyPartnerLineInfoDO> getLineListByLineIds(List<Long> lineIdList);
/**
* 查询黑名单列表
* @param keyWord
* @param intentArea
* @param acceptAdjustType
* @return
*/
PageInfo<PartnerBlackListDTO> getBlackList(@Param("keyWord") String keyWord,
@Param("intentArea") String intentArea ,
@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);
}

View File

@@ -233,6 +233,12 @@
<if test="record.closeUserId != null">
close_user_id = #{record.closeUserId},
</if>
<if test="record.joinBlackReason != null">
join_black_reason = #{record.joinBlackReason},
</if>
<if test="record.removeBlackReason != null">
remove_black_reason = #{record.removeBlackReason},
</if>
</set>
where id = #{record.id}
</update>
@@ -336,4 +342,45 @@
</if>
</select>
<select id="getBlackList" resultType="com.cool.store.dto.partner.PartnerBlackListDTO" >
select
b.partner_id as partnerId,
b.mobile as mobile,
b.username as partnerUserName,
a.id as lineId,
a.create_time as createTime,
a.close_user_id as closeUserId,
a.close_time as closeTime,
a.join_black_reason as joinBlackReason
from hy_partner_line_info a inner join hy_partner_user_info b where a.partner_id = b.partner_id
where deleted = 0
and line_status = 3
<if test="keyWord!=null and keyWord !=''">
and (b.username like concat('%', #{keyWord}, '%') or b.mobile like concat('%', #{keyWord}, '%'))
</if>
<if test="intentArea!=null and intentArea!=''">
and b.want_shop_area = #{intentArea}
</if>
<if test="acceptAdjustType!=null">
and b.accept_adjust_type =#{acceptAdjustType}
</if>
</select>
<update id="joinAndRemoveBlack">
update hy_partner_line_info
<set>
<if test="line_status != null">
line_status = #{status},
</if>
<if test="joinCause != null and joinCause!=''">
join_black_reason = #{joinCause},
</if>
<if test="removeReason != null and removeReason!=''">
remove_black_reason = #{removeReason},
</if>
</set>
where id = #{lineId}
</update>
</mapper>