Commit adf1598f authored by 王业雄's avatar 王业雄

资金产品分页查询返回id

parent b905b71d
......@@ -7,6 +7,7 @@ import java.sql.Timestamp;
@Data
public class FundProductQueryResultVo {
private Long id;
private Integer seqNo;
private Long fundId;
private Long fundProId;
......
......@@ -7,4 +7,6 @@ import org.springframework.data.querydsl.QueryDslPredicateExecutor;
public interface IWhiteListRepository extends JpaRepository<WhiteListEntity, Long>, QueryDslPredicateExecutor<WhiteListEntity> {
WhiteListEntity getByPhoneEquals(String phone);
WhiteListEntity getByPhoneEqualsAndFundIdEqualsAndFundProIdEquals(String phone,Long fundId,Long fundProId);
}
......@@ -83,6 +83,11 @@ public class WhiteListServiceImpl implements IWhiteListService {
@Override
public GlobalResponse save(WhiteListSaveVo whiteListSaveVo) {
WhiteListEntity one = whiteListRepository.getByPhoneEqualsAndFundIdEqualsAndFundProIdEquals(whiteListSaveVo.getPhone(), whiteListSaveVo.getFundId(), whiteListSaveVo.getFundProId());
if (Objects.nonNull(one)){
return GlobalResponse.error("这个用户已经配置过这个资金产品的白名单了,请确认");
}
WhiteListEntity whiteListEntity = new WhiteListEntity();
BeanUtils.copyProperties(whiteListSaveVo,whiteListEntity);
FundProductEntity fundProductEntity = fundProductRepository.getByFundIdEqualsAndFundProIdEqualsAndEnableEquals(whiteListSaveVo.getFundId(), whiteListSaveVo.getFundProId(), Byte.valueOf("1"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment