Authored by LUOXC

Merge branch 'hotfix_0428_logconfig'

... ... @@ -94,6 +94,8 @@ public class OrderHelpController {
IStoredSellerService storedSellerService;
/**
* 6.9.23的版本,一次性接口
* 将线上的超级卖家全部降级成为普通入驻
... ... @@ -127,6 +129,20 @@ public class OrderHelpController {
}
@IgnoreSignature
@IgnoreSession
@RequestMapping(value = "/logPayConfig")
public ApiResponse logPayConfig() {
storedSellerService.logPayConfig();
return new ApiResponse.ApiResponseBuilder()
.code(200)
.message("打印配置成功")
.build();
}
@IgnoreSignature
@IgnoreSession
... ...
... ... @@ -14,6 +14,7 @@ import java.util.Map;
public interface IStoredSellerService {
public void logPayConfig();
void compensate(List<Integer> uids);
... ...
... ... @@ -29,6 +29,8 @@ import com.yohoufo.order.common.SuperEntrySellerStatus;
import com.yohoufo.order.service.IStoredSellerService;
import com.yohoufo.order.service.MerchantOrderPaymentService;
import com.yohoufo.order.service.cache.StoredSellerCacheService;
import com.yohoufo.order.service.pay.AbstractPayConfig;
import com.yohoufo.order.service.pay.AbstractPayService;
import com.yohoufo.order.service.proxy.ProductProxyService;
import com.yohoufo.order.service.proxy.SellerNoticeFacade;
import com.yohoufo.order.service.seller.setting.SellerService;
... ... @@ -41,7 +43,10 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.Pair;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.integration.context.Orderable;
import org.springframework.stereotype.Service;
... ... @@ -54,7 +59,7 @@ import java.util.function.Function;
import java.util.stream.Collectors;
@Service
public class StoreSellerServiceImpl implements IStoredSellerService {
public class StoreSellerServiceImpl implements IStoredSellerService,ApplicationContextAware {
private static final Logger logger = LoggerUtils.getSellerOrderLogger();
... ... @@ -472,6 +477,19 @@ public class StoreSellerServiceImpl implements IStoredSellerService {
}
public void logPayConfig(){
for (String key : abstractPayServiceMap.keySet()){
scriptLogger.info("logPayConfig {}", key);
AbstractPayConfig abstractPayConfig = abstractPayServiceMap.get(key).abstractConfig();
if (abstractPayConfig == null) {
scriptLogger.info("logPayConfig {}, config null", key);
}else{
scriptLogger.info("logPayConfig {}, app_id {}, partner_id {}", key, abstractPayConfig.appId(), abstractPayConfig.partnerId());
}
}
}
public void compensate(List<Integer> uids){
... ... @@ -743,6 +761,12 @@ public class StoreSellerServiceImpl implements IStoredSellerService {
return Pair.of(onshelfSkups, onShelfSkupsEarnest);
}
private Map<String, AbstractPayService> abstractPayServiceMap = Maps.newConcurrentMap();
@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
abstractPayServiceMap = applicationContext.getBeansOfType(AbstractPayService.class);
}
}
... ...
... ... @@ -57,6 +57,16 @@ public class JsUnionpayService extends UnionpayServiceAbstract {
@Override
public AbstractPayConfig abstractConfig() {
return null;
return new AbstractPayConfig() {
@Override
public String appId() {
return "";
}
@Override
public String partnerId() {
return "";
}
};
}
}
... ...
... ... @@ -35,7 +35,17 @@ public class WalletPayService extends AbstractPayService {
@Override
public AbstractPayConfig abstractConfig() {
return null;
return new AbstractPayConfig() {
@Override
public String appId() {
return "";
}
@Override
public String partnerId() {
return "";
}
};
}
/**
... ...