Commit 227d5f64 authored by suntao's avatar suntao

渠道信息编辑

parent 3fef99b3
...@@ -6,6 +6,7 @@ import cn.quantgroup.cashloanflowboss.component.security.annotiation.Security; ...@@ -6,6 +6,7 @@ import cn.quantgroup.cashloanflowboss.component.security.annotiation.Security;
import cn.quantgroup.cashloanflowboss.core.annotation.ChannelIdInit; import cn.quantgroup.cashloanflowboss.core.annotation.ChannelIdInit;
import cn.quantgroup.cashloanflowboss.core.annotation.CheckChannelRole; import cn.quantgroup.cashloanflowboss.core.annotation.CheckChannelRole;
import cn.quantgroup.cashloanflowboss.core.base.Result; import cn.quantgroup.cashloanflowboss.core.base.Result;
import cn.quantgroup.cashloanflowboss.spi.clf.service.CLFCenterService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -23,6 +24,8 @@ public class ChannelConfController { ...@@ -23,6 +24,8 @@ public class ChannelConfController {
@Autowired @Autowired
private ChannelConfService channelConfService; private ChannelConfService channelConfService;
@Autowired
private CLFCenterService clfCenterService;
/** /**
...@@ -67,7 +70,14 @@ public class ChannelConfController { ...@@ -67,7 +70,14 @@ public class ChannelConfController {
@CheckChannelRole(isObjParam = true, paramClazz = ChannelConfVo.class) @CheckChannelRole(isObjParam = true, paramClazz = ChannelConfVo.class)
@PostMapping("/cfg/info") @PostMapping("/cfg/info")
public Result editChannelConfInfo(@RequestBody @Valid ChannelConfVo channelConfVo) { public Result editChannelConfInfo(@RequestBody @Valid ChannelConfVo channelConfVo) {
return Result.buildSuccess(channelConfService.editChannelConfInfo(channelConfVo)); Boolean aBoolean = channelConfService.editChannelConfInfo(channelConfVo);
if (aBoolean) {
// 属性ka缓存
clfCenterService.reloadKAConfiguration();
}
return Result.buildSuccess(aBoolean ? "编辑修改成功" : "编辑修改失败");
} }
......
...@@ -2,6 +2,7 @@ package cn.quantgroup.cashloanflowboss.spi.clf.service; ...@@ -2,6 +2,7 @@ package cn.quantgroup.cashloanflowboss.spi.clf.service;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
...@@ -9,17 +10,25 @@ import org.springframework.web.bind.annotation.RequestParam; ...@@ -9,17 +10,25 @@ import org.springframework.web.bind.annotation.RequestParam;
@FeignClient(name = "CLFServiceCenter", url = "${qapi.https}", fallback = CLFCenter.Fallback.class) @FeignClient(name = "CLFServiceCenter", url = "${qapi.https}", fallback = CLFCenter.Fallback.class)
public interface CLFCenter { public interface CLFCenter {
@PostMapping(value = "/test//loanMq/batch", consumes = "application/x-www-form-urlencoded") @PostMapping(value = "/test//loanMq/batch", consumes = "application/x-www-form-urlencoded")
public void loanMq(@RequestParam("json") String loanMq); void loanMq(@RequestParam("json") String loanMq);
@Component @GetMapping(value = "/configuration/lPm6usTlPYLqtDPQHIldvszWakDHlDh4", consumes = "application/x-www-form-urlencoded")
class Fallback implements CLFCenter { void reloadKASetting(@RequestParam("token") String token);
@Override @Component
public void loanMq(String loanMq) { class Fallback implements CLFCenter {
return ;
@Override
public void loanMq(String loanMq) {
return;
}
@Override
public void reloadKASetting(String token) {
}
} }
}
} }
...@@ -34,4 +34,6 @@ public interface CLFCenterService { ...@@ -34,4 +34,6 @@ public interface CLFCenterService {
void saveOrderCall(List<ClfOrderCallBack> clfOrderCallBackList); void saveOrderCall(List<ClfOrderCallBack> clfOrderCallBackList);
ClfOrderCallBack findOrderCallBackByByCallbackStatusAndChannelId(String name, Long channelId); ClfOrderCallBack findOrderCallBackByByCallbackStatusAndChannelId(String name, Long channelId);
void reloadKAConfiguration();
} }
...@@ -25,6 +25,9 @@ import java.util.Objects; ...@@ -25,6 +25,9 @@ import java.util.Objects;
public class CLFCenterServiceImpl implements CLFCenterService{ public class CLFCenterServiceImpl implements CLFCenterService{
@Autowired
private CLFCenter clfCenter;
@Autowired @Autowired
private CallbackFailRecordRepository callbackFailRecordRepository; private CallbackFailRecordRepository callbackFailRecordRepository;
@Autowired @Autowired
...@@ -132,4 +135,9 @@ public class CLFCenterServiceImpl implements CLFCenterService{ ...@@ -132,4 +135,9 @@ public class CLFCenterServiceImpl implements CLFCenterService{
public ClfOrderCallBack findOrderCallBackByByCallbackStatusAndChannelId(String kaNoticeName, Long channelId) { public ClfOrderCallBack findOrderCallBackByByCallbackStatusAndChannelId(String kaNoticeName, Long channelId) {
return clfOrderCallbackRepository.findByCallbackStatusAndRegisteredFrom(kaNoticeName, channelId); return clfOrderCallbackRepository.findByCallbackStatusAndRegisteredFrom(kaNoticeName, channelId);
} }
@Override
public void reloadKAConfiguration() {
clfCenter.reloadKASetting("");
}
} }
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