Commit a1a9164c authored by suntao's avatar suntao

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

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