Commit a1a9164c authored by suntao's avatar suntao

添加用户 是渠道id 错误 获取渠道是 获取 api 渠道

parent 7176b0ed
......@@ -94,6 +94,11 @@ public class ChannelConfController {
List<ChannelModel> all = channelConfService.getAll();
return Result.buildSuccess(all);
}
@GetMapping("/apiChannel")
public Result getApiChannel() {
List<ChannelModel> all = channelConfService.getAllApiChannel();
return Result.buildSuccess(all);
}
@GetMapping("/conf/export")
......
......@@ -23,6 +23,8 @@ public interface ChannelConfService {
List<ChannelModel> getAll();
List<ChannelModel> getAllApiChannel();
String exportChannelConf(Long channelId);
......
......@@ -194,17 +194,28 @@ public class ChannelConfServiceImpl implements ChannelConfService {
@Override
public List<ChannelModel> getAll() {
List<ClfChannelConfiguration> all = clfCenterService.findAll();
List<ChannelModel> channelModelList = new ArrayList<>(all.size());
all.forEach(e -> {
ChannelModel model = new ChannelModel();
model.setId(e.getId());
model.setId(e.getRegisteredFrom());
model.setName(e.getChannelName());
channelModelList.add(model);
});
return channelModelList;
}
@Override
public List<ChannelModel> getAllApiChannel() {
List<ClfChannelConfiguration> all = clfCenterService.findAll();
List<ChannelModel> channelModelList = new ArrayList<>(all.size());
all.forEach(e -> {
ChannelModel model = new ChannelModel();
model.setId(e.getRegisteredFrom());
model.setName(e.getChannelName());
channelModelList.add(model);
});
return channelModelList;
}
@Override
......
......@@ -97,6 +97,12 @@ public class ClfChannelConfiguration implements Serializable {
@Column(name = "xyqb_product_id")
private String xyqbProductId;
/**
* 订单创建系统
*/
@Column(name = "loan_created_sys")
private Integer loanCreatedSys;
}
......@@ -7,9 +7,13 @@ import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;
import java.util.List;
@CashLoanFlowDataSource
@Repository
public interface ClfChannelConfigurationRepository extends PagingAndSortingRepository<ClfChannelConfiguration, Long>, JpaSpecificationExecutor<ClfChannelConfiguration> {
ClfChannelConfiguration findByRegisteredFrom(Long channelId);
List<ClfChannelConfiguration> findByLoanCreatedSys(Integer loanCreatedSys);
}
......@@ -47,6 +47,8 @@ public interface CLFCenterService {
List<ClfChannelConfiguration> findAll();
List<ClfChannelConfiguration> findAllApiChannel();
void saveChannelSecurityKey(ChannelSecurityKey securityKey);
ChannelSecurityKey findChannelSecurityByChannelId(Long channelId);
......
......@@ -173,6 +173,11 @@ public class CLFCenterServiceImpl implements CLFCenterService {
return list;
}
@Override
public List<ClfChannelConfiguration> findAllApiChannel() {
return clfChannelConfigurationRepository.findByLoanCreatedSys(0);
}
@Override
public ClfCallbackConfiguration findCallbackConfigurationByChannelId(Long channelId) {
......
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