提交 b2a953cb authored 作者: 吴德鹏's avatar 吴德鹏

属性优化

上级 8f361631
......@@ -44,11 +44,13 @@ public class AttributesController {
if (collect.size() > 0 && collect != null) {
collect.forEach(p -> {
AttributesVo attributesVo = new AttributesVo();
attributesVo.setAttrName(attributesRepository.findById(p.getAttrId()).get().getAttrName());
String attrName = attributesRepository.findById(p.getAttrId()).get().getAttrName();
attributesVo.setAttrName(attrName);
List<AttributesDesc> descs = attributesDescRepository.findByAttrDescIdIn(p.getAttrDescId().split(","));
String descValue = descs.stream().map(AttributesDesc::getAttrValue).collect(Collectors.joining(","));
attributesVo.setAttrValue(descValue);
attributesVos.add(attributesVo);
if (!StringUtils.isBlank(attrName) && !StringUtils.isBlank(descValue))
attributesVos.add(attributesVo);
});
}
......
......@@ -81,7 +81,7 @@ public class FlutterWaveController extends Controller {
public ResponseEntity<String> payForOrderByCard(@RequestParam("orderId") String orderId, @RequestBody FlutterWaveCard flutterWaveCard) {
RaveConstant.PUBLIC_KEY = PUBLIC_KEY;
RaveConstant.SECRET_KEY = SECRET_KEY;
RaveConstant.ENVIRONMENT = Environment.LIVE; //or live
RaveConstant.ENVIRONMENT = Environment.STAGING; //or live
// Result result = new Result();
Optional<TbCfOrder> byId = repository.findById(orderId);
......
......@@ -173,6 +173,7 @@ public class PaypalContoller extends Controller {
//获取paypal的最新token
Optional<Token> tokenOptional = tokenRepository.findFirstToken();
String token = PayPalUtil.getToken(tokenOptional.get().getToken(), mode);
// String token = PayPalUtil.getToken(oldApiContext.getAccessToken(), mode);
APIContext apiContext = new APIContext(token);
Map<String, String> sdkConfig = new HashMap<>();
sdkConfig.put("mode", mode);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论