修改用户通用附件获取
This commit is contained in:
		@ -45,6 +45,9 @@ public class AnnexQueryBo extends BaseEntity {
 | 
			
		||||
	/** 用户类型 */
 | 
			
		||||
	@ApiModelProperty("用户类型")
 | 
			
		||||
	private String userType;
 | 
			
		||||
	/** 招工ID */
 | 
			
		||||
	@ApiModelProperty("招工ID")
 | 
			
		||||
	private Long recruitId;
 | 
			
		||||
	/** 附件类型 */
 | 
			
		||||
	@ApiModelProperty("附件类型")
 | 
			
		||||
	private String annexType;
 | 
			
		||||
 | 
			
		||||
@ -74,4 +74,9 @@ public interface IAnnexService extends IServicePlus<Annex> {
 | 
			
		||||
	 * 根据表自增ID来删除指定附件数据,并删除对应的资源
 | 
			
		||||
	 */
 | 
			
		||||
	Boolean deleteByIds(Long id);
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * 根据务工者唯一标识+招工标识 得到附件信息
 | 
			
		||||
	 */
 | 
			
		||||
	List<Annex> findByUserIdAndRecruitId(Long userId,Long recruitId,String[] types);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -24,6 +24,8 @@ import java.util.List;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
import java.util.stream.Collectors;
 | 
			
		||||
 | 
			
		||||
import static com.ruoyi.common.constant.Constants.WGZ;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 附件Service业务层处理
 | 
			
		||||
 *
 | 
			
		||||
@ -56,6 +58,8 @@ public class AnnexServiceImpl extends ServicePlusImpl<AnnexMapper, Annex> implem
 | 
			
		||||
        Map<String, Object> params = bo.getParams();
 | 
			
		||||
        LambdaQueryWrapper<Annex> lqw = Wrappers.lambdaQuery();
 | 
			
		||||
        lqw.eq(bo.getUserId() != null, Annex::getUserId, bo.getUserId());
 | 
			
		||||
		lqw.eq(StrUtil.isNotBlank(bo.getUserType()), Annex::getUserType, bo.getUserType());
 | 
			
		||||
		lqw.eq(bo.getRecruitId() != null, Annex::getRecruitId, bo.getRecruitId());
 | 
			
		||||
        lqw.eq(StrUtil.isNotBlank(bo.getAnnexType()), Annex::getAnnexType, bo.getAnnexType());
 | 
			
		||||
        lqw.like(StrUtil.isNotBlank(bo.getAnnexName()), Annex::getAnnexName, bo.getAnnexName());
 | 
			
		||||
        lqw.eq(StrUtil.isNotBlank(bo.getAnnexUrl()), Annex::getAnnexUrl, bo.getAnnexUrl());
 | 
			
		||||
@ -128,4 +132,14 @@ public class AnnexServiceImpl extends ServicePlusImpl<AnnexMapper, Annex> implem
 | 
			
		||||
		}
 | 
			
		||||
		return true;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	@Override
 | 
			
		||||
	public List<Annex> findByUserIdAndRecruitId(Long userId, Long recruitId, String[] types) {
 | 
			
		||||
		LambdaQueryWrapper<Annex> wra = new LambdaQueryWrapper<Annex>().
 | 
			
		||||
			eq(Annex::getUserType,WGZ).
 | 
			
		||||
			eq(Annex::getUserId,userId).
 | 
			
		||||
			eq(Annex::getRecruitId,recruitId).
 | 
			
		||||
			in(Annex::getAnnexType,types);
 | 
			
		||||
		return baseMapper.selectList(wra);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user