记得上下班打卡 | git大法好,push需谨慎

Commit 2911b0b3 authored by anjiabin's avatar anjiabin

优化相关策略实现

parent 0fdd01d3
...@@ -59,6 +59,14 @@ public class GalaxyArtworkController { ...@@ -59,6 +59,14 @@ public class GalaxyArtworkController {
return galaxyArtworkService.seriesClaim(reqDto); return galaxyArtworkService.seriesClaim(reqDto);
} }
@ControllerLog(description = "NFT系列声明结果查询")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "NFT系列声明结果查询")
@PostMapping(value = {"seriesClaimResultQuery"})
public ResponseDto<GalaxyArtSeriesClaimResultQueryRespDto> seriesClaimResultQuery(@Valid @RequestBody GalaxyArtSeriesClaimResultQueryReqDto reqDto) {
return galaxyArtworkService.seriesClaimResultQuery(reqDto);
}
// @ControllerLog(description = "NFT素材上传(form-data文件提交)") // @ControllerLog(description = "NFT素材上传(form-data文件提交)")
// @ApiOperationSupport(order = 1) // @ApiOperationSupport(order = 1)
// @ApiOperation(value = "NFT素材上传") // @ApiOperation(value = "NFT素材上传")
......
...@@ -27,7 +27,7 @@ import javax.validation.Valid; ...@@ -27,7 +27,7 @@ import javax.validation.Valid;
* @Copyright: LightNet @ Copyright (c) 2021 * @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/15 12:11 * @date 2022/3/15 12:11
*/ */
@Api(tags = "NFT-发行相关") @Api(tags = "NFT发行相关")
@RestController @RestController
@RequestMapping("nftPublish") @RequestMapping("nftPublish")
@Validated @Validated
......
...@@ -27,7 +27,7 @@ import javax.validation.Valid; ...@@ -27,7 +27,7 @@ import javax.validation.Valid;
* @Copyright: LightNet @ Copyright (c) 2021 * @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/11 12:11 * @date 2022/3/11 12:11
*/ */
@Api(tags = "NFT-用户相关") @Api(tags = "NFT用户相关")
@RestController @RestController
@RequestMapping("user") @RequestMapping("user")
@Validated @Validated
......
package com.liquidnet.service.galaxy.router.eth.service; package com.liquidnet.service.galaxy.router.eth.service;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.galaxy.constant.GalaxyConstant; import com.liquidnet.service.galaxy.constant.GalaxyConstant;
import com.liquidnet.service.galaxy.dto.param.*;
import com.liquidnet.service.galaxy.router.strategy.IGalaxyRouterStrategyArtwork;
import com.liquidnet.service.galaxy.router.strategy.annotation.StrategyGalaxyRouterArtworkHandler; import com.liquidnet.service.galaxy.router.strategy.annotation.StrategyGalaxyRouterArtworkHandler;
import com.liquidnet.service.galaxy.router.strategy.impl.AbstractGalaxyRouterStrategyArtwork;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -18,5 +20,24 @@ import org.springframework.stereotype.Component; ...@@ -18,5 +20,24 @@ import org.springframework.stereotype.Component;
@Slf4j @Slf4j
@Component @Component
@StrategyGalaxyRouterArtworkHandler(GalaxyConstant.RouterTypeEnum.ETH) @StrategyGalaxyRouterArtworkHandler(GalaxyConstant.RouterTypeEnum.ETH)
public class GalaxyRouterStrategyEthArtworkImpl extends AbstractGalaxyRouterStrategyArtwork { public class GalaxyRouterStrategyEthArtworkImpl implements IGalaxyRouterStrategyArtwork {
@Override
public ResponseDto<GalaxyNftImageRespDto> nftImageCheck(GalaxyNftImageReqDto reqDto) {
return null;
}
@Override
public ResponseDto<GalaxyNftUploadRespDto> nftUpload(GalaxyNftUploadReqDto reqDto) {
return null;
}
@Override
public ResponseDto<GalaxyArtSeriesClaimRespDto> seriesClaim(GalaxyArtSeriesClaimReqDto reqDto) {
return null;
}
@Override
public ResponseDto<GalaxyArtSeriesClaimResultQueryRespDto> seriesClaimResultQuery(GalaxyArtSeriesClaimResultQueryReqDto reqDto) {
return null;
}
} }
package com.liquidnet.service.galaxy.router.eth.service; package com.liquidnet.service.galaxy.router.eth.service;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.galaxy.constant.GalaxyConstant; import com.liquidnet.service.galaxy.constant.GalaxyConstant;
import com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishReqDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishRespDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishResultQueryReqDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishResultQueryRespDto;
import com.liquidnet.service.galaxy.router.strategy.IGalaxyRouterStrategyPublish;
import com.liquidnet.service.galaxy.router.strategy.annotation.StrategyGalaxyRouterPublishHandler; import com.liquidnet.service.galaxy.router.strategy.annotation.StrategyGalaxyRouterPublishHandler;
import com.liquidnet.service.galaxy.router.strategy.impl.AbstractGalaxyRouterStrategyPublish;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -18,6 +23,15 @@ import org.springframework.stereotype.Component; ...@@ -18,6 +23,15 @@ import org.springframework.stereotype.Component;
@Slf4j @Slf4j
@Component @Component
@StrategyGalaxyRouterPublishHandler(GalaxyConstant.RouterTypeEnum.ETH) @StrategyGalaxyRouterPublishHandler(GalaxyConstant.RouterTypeEnum.ETH)
public class GalaxyRouterStrategyEthPublishImpl extends AbstractGalaxyRouterStrategyPublish { public class GalaxyRouterStrategyEthPublishImpl implements IGalaxyRouterStrategyPublish {
@Override
public ResponseDto<GalaxyNftPublishRespDto> nftPublish(GalaxyNftPublishReqDto reqDto) {
return null;
}
@Override
public ResponseDto<GalaxyNftPublishResultQueryRespDto> nftPublishResultQuery(GalaxyNftPublishResultQueryReqDto reqDto) {
return null;
}
} }
package com.liquidnet.service.galaxy.router.eth.service; package com.liquidnet.service.galaxy.router.eth.service;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.galaxy.constant.GalaxyConstant; import com.liquidnet.service.galaxy.constant.GalaxyConstant;
import com.liquidnet.service.galaxy.dto.param.*;
import com.liquidnet.service.galaxy.router.strategy.IGalaxyRouterStrategyTrade;
import com.liquidnet.service.galaxy.router.strategy.annotation.StrategyGalaxyRouterTradeHandler; import com.liquidnet.service.galaxy.router.strategy.annotation.StrategyGalaxyRouterTradeHandler;
import com.liquidnet.service.galaxy.router.strategy.impl.AbstractGalaxyRouterStrategyTrade;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -18,6 +20,25 @@ import org.springframework.stereotype.Component; ...@@ -18,6 +20,25 @@ import org.springframework.stereotype.Component;
@Slf4j @Slf4j
@Component @Component
@StrategyGalaxyRouterTradeHandler(GalaxyConstant.RouterTypeEnum.ETH) @StrategyGalaxyRouterTradeHandler(GalaxyConstant.RouterTypeEnum.ETH)
public class GalaxyRouterStrategyEthTradeImpl extends AbstractGalaxyRouterStrategyTrade { public class GalaxyRouterStrategyEthTradeImpl implements IGalaxyRouterStrategyTrade {
@Override
public ResponseDto<GalaxyNftBuyRespDto> nftBuy(GalaxyNftBuyReqDto reqDto) {
return null;
}
@Override
public ResponseDto<GalaxyNftPublishAndBuyRespDto> nftPublishAndBuy(GalaxyNftPublishAndBuyReqDto reqDto) {
return null;
}
@Override
public ResponseDto<GalaxyNftBuyResultQueryRespDto> nftBuyResultQuery(GalaxyNftBuyResultQueryReqDto reqDto) {
return null;
}
@Override
public ResponseDto<GalaxyNftBuyPayResultQueryRespDto> nftBuyPayResultQuery(GalaxyNftBuyPayResultQueryReqDto reqDto) {
return null;
}
} }
package com.liquidnet.service.galaxy.router.eth.service; package com.liquidnet.service.galaxy.router.eth.service;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.galaxy.constant.GalaxyConstant; import com.liquidnet.service.galaxy.constant.GalaxyConstant;
import com.liquidnet.service.galaxy.dto.param.GalaxyUserBindStatusQueryReqDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyUserBindStatusQueryRespDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyUserRegisterReqDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyUserRegisterRespDto;
import com.liquidnet.service.galaxy.router.strategy.IGalaxyRouterStrategyUser;
import com.liquidnet.service.galaxy.router.strategy.annotation.StrategyGalaxyRouterUserHandler; import com.liquidnet.service.galaxy.router.strategy.annotation.StrategyGalaxyRouterUserHandler;
import com.liquidnet.service.galaxy.router.strategy.impl.AbstractGalaxyRouterStrategyUser;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -18,6 +23,15 @@ import org.springframework.stereotype.Component; ...@@ -18,6 +23,15 @@ import org.springframework.stereotype.Component;
@Slf4j @Slf4j
@Component @Component
@StrategyGalaxyRouterUserHandler(GalaxyConstant.RouterTypeEnum.ETH) @StrategyGalaxyRouterUserHandler(GalaxyConstant.RouterTypeEnum.ETH)
public class GalaxyRouterStrategyEthUserImpl extends AbstractGalaxyRouterStrategyUser { public class GalaxyRouterStrategyEthUserImpl implements IGalaxyRouterStrategyUser {
@Override
public ResponseDto<GalaxyUserRegisterRespDto> userRegister(GalaxyUserRegisterReqDto reqDto) {
return null;
}
@Override
public ResponseDto<GalaxyUserBindStatusQueryRespDto> userBindStatusQuery(GalaxyUserBindStatusQueryReqDto reqDto) {
return null;
}
} }
package com.liquidnet.service.galaxy.router.strategy; package com.liquidnet.service.galaxy.router.strategy;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.galaxy.service.IGalaxyArtworkService;
import com.liquidnet.service.galaxy.dto.param.*;
/** /**
* @author AnJiabin <anjiabin@zhengzai.tv> * @author AnJiabin <anjiabin@zhengzai.tv>
...@@ -12,10 +11,6 @@ import com.liquidnet.service.galaxy.dto.param.*; ...@@ -12,10 +11,6 @@ import com.liquidnet.service.galaxy.dto.param.*;
* @Copyright: LightNet @ Copyright (c) 2022 * @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/3/18 12:27 * @date 2022/3/18 12:27
*/ */
public interface IGalaxyRouterStrategyArtwork { public interface IGalaxyRouterStrategyArtwork extends IGalaxyArtworkService {
ResponseDto<GalaxyNftImageRespDto> nftImageCheck(GalaxyNftImageReqDto reqDto);
ResponseDto<GalaxyNftUploadRespDto> nftUpload(GalaxyNftUploadReqDto reqDto);
ResponseDto<GalaxyArtSeriesClaimRespDto> seriesClaim(GalaxyArtSeriesClaimReqDto reqDto);
} }
package com.liquidnet.service.galaxy.router.strategy; package com.liquidnet.service.galaxy.router.strategy;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.galaxy.service.IGalaxyPublishService;
import com.liquidnet.service.galaxy.dto.param.*;
/** /**
* @author AnJiabin <anjiabin@zhengzai.tv> * @author AnJiabin <anjiabin@zhengzai.tv>
...@@ -12,6 +11,6 @@ import com.liquidnet.service.galaxy.dto.param.*; ...@@ -12,6 +11,6 @@ import com.liquidnet.service.galaxy.dto.param.*;
* @Copyright: LightNet @ Copyright (c) 2022 * @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/3/18 12:27 * @date 2022/3/18 12:27
*/ */
public interface IGalaxyRouterStrategyPublish { public interface IGalaxyRouterStrategyPublish extends IGalaxyPublishService {
ResponseDto<GalaxyNftPublishRespDto> nftPublish(GalaxyNftPublishReqDto reqDto);
} }
package com.liquidnet.service.galaxy.router.strategy; package com.liquidnet.service.galaxy.router.strategy;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.galaxy.service.IGalaxyTradeService;
import com.liquidnet.service.galaxy.dto.param.*;
/** /**
* @author AnJiabin <anjiabin@zhengzai.tv> * @author AnJiabin <anjiabin@zhengzai.tv>
...@@ -12,9 +11,6 @@ import com.liquidnet.service.galaxy.dto.param.*; ...@@ -12,9 +11,6 @@ import com.liquidnet.service.galaxy.dto.param.*;
* @Copyright: LightNet @ Copyright (c) 2022 * @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/3/18 12:27 * @date 2022/3/18 12:27
*/ */
public interface IGalaxyRouterStrategyTrade { public interface IGalaxyRouterStrategyTrade extends IGalaxyTradeService {
ResponseDto<GalaxyNftPublishAndBuyRespDto> nftPublishAndBuy(GalaxyNftPublishAndBuyReqDto reqDto);
ResponseDto<GalaxyNftBuyRespDto> nftBuy(GalaxyNftBuyReqDto reqDto);
} }
package com.liquidnet.service.galaxy.router.strategy; package com.liquidnet.service.galaxy.router.strategy;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.galaxy.service.IGalaxyUserService;
import com.liquidnet.service.galaxy.dto.param.*;
/** /**
* @author AnJiabin <anjiabin@zhengzai.tv> * @author AnJiabin <anjiabin@zhengzai.tv>
...@@ -12,6 +11,6 @@ import com.liquidnet.service.galaxy.dto.param.*; ...@@ -12,6 +11,6 @@ import com.liquidnet.service.galaxy.dto.param.*;
* @Copyright: LightNet @ Copyright (c) 2022 * @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/3/18 12:27 * @date 2022/3/18 12:27
*/ */
public interface IGalaxyRouterStrategyUser { public interface IGalaxyRouterStrategyUser extends IGalaxyUserService {
ResponseDto<GalaxyUserRegisterRespDto> userRegister(GalaxyUserRegisterReqDto reqDto);
} }
//package com.liquidnet.service.galaxy.router.strategy.biz;
//
//import com.liquidnet.commons.lang.util.DateUtil;
//import com.liquidnet.commons.lang.util.HttpUtil;
//import com.liquidnet.commons.lang.util.JsonUtils;
//import com.liquidnet.commons.lang.util.StringUtil;
//import com.liquidnet.service.dragon.biz.DragonServiceCommonBiz;
//import com.liquidnet.service.dragon.bo.PayNotifyReqBo;
//import com.liquidnet.service.dragon.constant.DragonConstant;
//import com.liquidnet.service.dragon.dto.DragonOrdersDto;
//import com.liquidnet.service.dragon.dto.DragonPayOrderQueryRespDto;
//import com.liquidnet.service.dragon.dto.PayNotifyDto;
//import com.liquidnet.service.dragon.utils.ObjectUtil;
//import lombok.extern.slf4j.Slf4j;
//import org.apache.http.NameValuePair;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//import org.springframework.util.MultiValueMap;
//
//import java.time.LocalDateTime;
//import java.util.HashMap;
//import java.util.List;
//import java.util.Map;
//
///**
// * @author AnJiabin <anjiabin@zhengzai.tv>
// * @version V1.0
// * @Description: TODO
// * @class: DragonPayBiz
// * @Package com.liquidnet.service.dragon.channel.strategy.biz
// * @Copyright: LightNet @ Copyright (c) 2021
// * @date 2021/7/14 14:12
// */
//@Slf4j
//@Component
//public class GalaxyRouterBiz {
// @Autowired
// private DragonServiceCommonBiz dragonServiceCommonBiz;
//
//
// public PayNotifyReqBo buildPayNotifyReqBo(DragonOrdersDto dragonOrdersDto) {
// PayNotifyReqBo payNotifyReqBo = new PayNotifyReqBo();
// payNotifyReqBo.setNotifyUrl(dragonOrdersDto.getNotifyUrl());
// PayNotifyDto payNotifyDto = new PayNotifyDto();
// payNotifyDto.setStatus(dragonOrdersDto.getStatus());
// payNotifyDto.setType(dragonOrdersDto.getType());
// payNotifyDto.setCode(dragonOrdersDto.getCode());
// payNotifyDto.setPaymentId(dragonOrdersDto.getPaymentId());
// payNotifyDto.setOrderCode(dragonOrdersDto.getOrderCode());
// payNotifyDto.setOrderCodeId(dragonOrdersDto.getOrderCodeId());
// payNotifyDto.setPrice(dragonOrdersDto.getPrice());
// payNotifyDto.setPaymentType(dragonOrdersDto.getPaymentType());
// if (StringUtil.isNotNull(dragonOrdersDto.getPaymentAt())) {
// payNotifyDto.setPaymentAt(DateUtil.Formatter.yyyyMMddHHmmss.format(dragonOrdersDto.getPaymentAt()));
// } else {
// payNotifyDto.setPaymentAt("");
// }
// payNotifyReqBo.setPayNotifyDto(payNotifyDto);
// return payNotifyReqBo;
// }
//
// public DragonPayOrderQueryRespDto buildPayOrderQueryRespDto(DragonOrdersDto ordersDto) {
// DragonPayOrderQueryRespDto queryRespDto = new DragonPayOrderQueryRespDto();
// queryRespDto.setStatus(ordersDto.getStatus());
// queryRespDto.setType(ordersDto.getType());
// queryRespDto.setCode(ordersDto.getCode());
// queryRespDto.setPaymentId(ordersDto.getPaymentId());
// queryRespDto.setOrderCode(ordersDto.getOrderCode());
// queryRespDto.setOrderCodeId(ordersDto.getOrderCodeId());
// queryRespDto.setPrice(ordersDto.getPrice());
// queryRespDto.setPaymentType(ordersDto.getPaymentType());
// if (StringUtil.isNotNull(ordersDto.getPaymentAt())) {
// queryRespDto.setPaymentAt(DateUtil.Formatter.yyyyMMddHHmmss.format(ordersDto.getPaymentAt()));
// } else {
// queryRespDto.setPaymentAt("");
// }
// return queryRespDto;
// }
//
//
// public boolean sendNotify(PayNotifyReqBo payNotifyReqBo) {
// PayNotifyDto payNotifyDto = payNotifyReqBo.getPayNotifyDto();
// LocalDateTime nowTime = LocalDateTime.now();
//
// String jsonData = "";
// try {
// MultiValueMap<String, String> params = ObjectUtil.cloneLinkedMultiValueMapStringAndString();
// params.add("status", payNotifyDto.getStatus().toString());
// params.add("type", payNotifyDto.getType());
// params.add("code", payNotifyDto.getCode());
// params.add("paymentId", payNotifyDto.getPaymentId());
// params.add("orderCode", payNotifyDto.getOrderCode());
// params.add("orderCodeId", payNotifyDto.getOrderCodeId());
// params.add("price", payNotifyDto.getPrice().toString());
// params.add("paymentType", payNotifyDto.getPaymentType());
// params.add("paymentAt", payNotifyDto.getPaymentAt());
// jsonData = JsonUtils.toJson(covertNVPS2Params(params));
// log.info("dragon:notify:post url:{}", payNotifyReqBo.getNotifyUrl());
// log.info("dragon:notify:post data:{}", jsonData);
//
// //执行post请求
// String response = HttpUtil.post(payNotifyReqBo.getNotifyUrl(), params);
// log.debug("PAY RESPONSE=" + response);
// if (response.equalsIgnoreCase("success")) {
// dragonServiceCommonBiz.createDragonPayNotify(payNotifyReqBo, jsonData);
// //更新通知状态-通知成功
// dragonServiceCommonBiz.updateNotifyStatus(payNotifyDto.getCode(), Integer.valueOf(DragonConstant.PayNotifyStatusEnum.NOTIFY_SUCCESS.getCode()));
// return true;
// } else {
// dragonServiceCommonBiz.createDragonPayNotifyFail(payNotifyReqBo, jsonData);
// //更新通知状态-通知失败
// dragonServiceCommonBiz.updateNotifyStatus(payNotifyDto.getCode(), Integer.valueOf(DragonConstant.PayNotifyStatusEnum.NOTIFY_FAIL.getCode()));
// return false;
// }
//
// }
//// catch (ConnectTimeoutException e) {
//// log.error("dragon:sendNotify 请求超时",e);
//// dragonServiceCommonBiz.createDragonPayNotifyFail(payNotifyReqBo,jsonData);
//// //更新通知状态-通知失败
//// dragonServiceCommonBiz.updateNotifyStatus(payNotifyDto.getCode(),Integer.valueOf(DragonConstant.PayNotifyStatusEnum.NOTIFY_EXPIRE.getCode()));
//// return false;
//// }
// catch (Exception e) {
// log.error("dragon:sendNotify 请求失败", e);
// dragonServiceCommonBiz.createDragonPayNotifyFail(payNotifyReqBo, jsonData);
// //更新通知状态-通知失败
// dragonServiceCommonBiz.updateNotifyStatus(payNotifyDto.getCode(), Integer.valueOf(DragonConstant.PayNotifyStatusEnum.NOTIFY_FAIL.getCode()));
// return false;
// }
// }
//// public boolean sendNotifyBackup(PayNotifyReqBo payNotifyReqBo){
//// PayNotifyDto payNotifyDto = payNotifyReqBo.getPayNotifyDto();
//// LocalDateTime nowTime = LocalDateTime.now();
////
//// CloseableHttpClient httpclient = HttpClients.createDefault();
//// String jsonData = "";
//// try {
//// HttpPost httpPost = new HttpPost(payNotifyReqBo.getNotifyUrl());
//// //配置超时
//// RequestConfig requestConfig = RequestConfig.custom()
//// .setConnectTimeout(5000).setConnectionRequestTimeout(5000)
//// .setSocketTimeout(5000).build();
//// httpPost.setConfig(requestConfig);
////
//// //设置post请求参数
//// List<NameValuePair> nvps = new ArrayList<NameValuePair>();
//// nvps.add(new BasicNameValuePair("status", payNotifyDto.getStatus().toString()));
//// nvps.add(new BasicNameValuePair("type", payNotifyDto.getType()));
//// nvps.add(new BasicNameValuePair("code", payNotifyDto.getCode()));
//// nvps.add(new BasicNameValuePair("paymentId", payNotifyDto.getPaymentId()));
//// nvps.add(new BasicNameValuePair("orderCode", payNotifyDto.getOrderCode()));
//// nvps.add(new BasicNameValuePair("price", payNotifyDto.getPrice().toString()));
//// nvps.add(new BasicNameValuePair("paymentType", payNotifyDto.getPaymentType()));
//// nvps.add(new BasicNameValuePair("paymentAt", payNotifyDto.getPaymentAt()));
//// jsonData = JsonUtils.toJson(covertNVPS2Params(nvps));
//// log.info("dragon:notify:post url:{}",payNotifyReqBo.getNotifyUrl());
//// log.info("dragon:notify:post data:{}",jsonData);
//// httpPost.setEntity(new UrlEncodedFormEntity(nvps));
////
//// //执行post请求
//// CloseableHttpResponse responseObj = httpclient.execute(httpPost);
//// String response = EntityUtils.toString(responseObj.getEntity(), "utf-8");
//// log.debug("PAY RESPONSE=" + response);
//// if (response.equalsIgnoreCase("success")) {
//// dragonServiceCommonBiz.createDragonPayNotify(payNotifyReqBo,jsonData);
//// //更新通知状态-通知成功
//// dragonServiceCommonBiz.updateNotifyStatus(payNotifyDto.getCode(),Integer.valueOf(DragonConstant.PayNotifyStatusEnum.NOTIFY_SUCCESS.getCode()));
//// return true;
//// } else {
//// dragonServiceCommonBiz.createDragonPayNotifyFail(payNotifyReqBo,jsonData);
//// //更新通知状态-通知失败
//// dragonServiceCommonBiz.updateNotifyStatus(payNotifyDto.getCode(),Integer.valueOf(DragonConstant.PayNotifyStatusEnum.NOTIFY_FAIL.getCode()));
//// return false;
//// }
////
//// } catch (ConnectTimeoutException e) {
//// log.error("dragon:sendNotify 请求超时",e);
//// dragonServiceCommonBiz.createDragonPayNotifyFail(payNotifyReqBo,jsonData);
//// //更新通知状态-通知失败
//// dragonServiceCommonBiz.updateNotifyStatus(payNotifyDto.getCode(),Integer.valueOf(DragonConstant.PayNotifyStatusEnum.NOTIFY_EXPIRE.getCode()));
//// return false;
//// } catch (Exception e) {
//// log.error("dragon:sendNotify 请求失败",e);
//// dragonServiceCommonBiz.createDragonPayNotifyFail(payNotifyReqBo,jsonData);
//// //更新通知状态-通知失败
//// dragonServiceCommonBiz.updateNotifyStatus(payNotifyDto.getCode(),Integer.valueOf(DragonConstant.PayNotifyStatusEnum.NOTIFY_FAIL.getCode()));
//// return false;
//// }finally {
//// //释放连接
//// try {
//// if (httpclient != null) {
//// httpclient.close();
//// }
//// } catch (IOException e) {
//// log.error("连接无法关闭",e);
//// }
//// }
//// }
//
// public String getPaymentType(String payType, String deviceFrom) {
// return (deviceFrom + payType).toUpperCase();
// }
//
// private static Map<String, Object> covertNVPS2Params(List<NameValuePair> nvpList) {
// Map<String, Object> rsMap = ObjectUtil.cloneHashMapStringAndObj();
// for (NameValuePair nameValuePair : nvpList) {
// rsMap.put(nameValuePair.getName(), nameValuePair.getValue());
// }
// return rsMap;
// }
//
// private static Map<String, Object> covertNVPS2Params(MultiValueMap<String, String> params) {
// Map<String, Object> rsMap = new HashMap<>();
// for (Map.Entry<String, List<String>> param : params.entrySet()) {
// rsMap.put(param.getKey(), param.getValue().get(0));
// }
// return rsMap;
// }
//}
package com.liquidnet.service.galaxy.router.strategy.impl;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.galaxy.dto.param.*;
import com.liquidnet.service.galaxy.router.strategy.IGalaxyRouterStrategyArtwork;
import lombok.extern.slf4j.Slf4j;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: AbstractGalaxyRouterArtworkStrategyImpl
* @Package com.liquidnet.service.galaxy.router.strategy.impl
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/3/18 12:54
*/
@Slf4j
public abstract class AbstractGalaxyRouterStrategyArtwork implements IGalaxyRouterStrategyArtwork {
public ResponseDto<GalaxyNftImageRespDto> nftImageCheck(GalaxyNftImageReqDto reqDto){
return null;
}
public ResponseDto<GalaxyNftUploadRespDto> nftUpload(GalaxyNftUploadReqDto reqDto){
return null;
}
public ResponseDto<GalaxyArtSeriesClaimRespDto> seriesClaim(GalaxyArtSeriesClaimReqDto reqDto){
return null;
}
}
package com.liquidnet.service.galaxy.router.strategy.impl;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishReqDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishRespDto;
import com.liquidnet.service.galaxy.router.strategy.IGalaxyRouterStrategyPublish;
import lombok.extern.slf4j.Slf4j;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: AbstractGalaxyRouterPublishStrategyImpl
* @Package com.liquidnet.service.galaxy.router.strategy.impl
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/3/18 12:54
*/
@Slf4j
public abstract class AbstractGalaxyRouterStrategyPublish implements IGalaxyRouterStrategyPublish {
public ResponseDto<GalaxyNftPublishRespDto> nftPublish(GalaxyNftPublishReqDto reqDto) {
return null;
}
}
package com.liquidnet.service.galaxy.router.strategy.impl;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyNftBuyReqDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyNftBuyRespDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishAndBuyReqDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishAndBuyRespDto;
import com.liquidnet.service.galaxy.router.strategy.IGalaxyRouterStrategyTrade;
import lombok.extern.slf4j.Slf4j;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: AbstractGalaxyRouterTradeStrategyImpl
* @Package com.liquidnet.service.galaxy.router.strategy.impl
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/3/18 12:54
*/
@Slf4j
public abstract class AbstractGalaxyRouterStrategyTrade implements IGalaxyRouterStrategyTrade {
public ResponseDto<GalaxyNftPublishAndBuyRespDto> nftPublishAndBuy(GalaxyNftPublishAndBuyReqDto reqDto){
return null;
}
public ResponseDto<GalaxyNftBuyRespDto> nftBuy(GalaxyNftBuyReqDto reqDto){
return null;
}
}
package com.liquidnet.service.galaxy.router.strategy.impl;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyUserRegisterReqDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyUserRegisterRespDto;
import com.liquidnet.service.galaxy.router.strategy.IGalaxyRouterStrategyUser;
import lombok.extern.slf4j.Slf4j;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: AbstractGalaxyRouterUserStrategyImpl
* @Package com.liquidnet.service.galaxy.router.strategy.impl
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/3/18 12:54
*/
@Slf4j
public abstract class AbstractGalaxyRouterStrategyUser implements IGalaxyRouterStrategyUser {
public ResponseDto<GalaxyUserRegisterRespDto> userRegister(GalaxyUserRegisterReqDto reqDto){
return null;
}
}
...@@ -3,8 +3,8 @@ package com.liquidnet.service.galaxy.router.zxin.service; ...@@ -3,8 +3,8 @@ package com.liquidnet.service.galaxy.router.zxin.service;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.galaxy.constant.GalaxyConstant; import com.liquidnet.service.galaxy.constant.GalaxyConstant;
import com.liquidnet.service.galaxy.dto.param.*; import com.liquidnet.service.galaxy.dto.param.*;
import com.liquidnet.service.galaxy.router.strategy.IGalaxyRouterStrategyArtwork;
import com.liquidnet.service.galaxy.router.strategy.annotation.StrategyGalaxyRouterArtworkHandler; import com.liquidnet.service.galaxy.router.strategy.annotation.StrategyGalaxyRouterArtworkHandler;
import com.liquidnet.service.galaxy.router.strategy.impl.AbstractGalaxyRouterStrategyArtwork;
import com.liquidnet.service.galaxy.router.zxin.biz.ZxinArtworkBiz; import com.liquidnet.service.galaxy.router.zxin.biz.ZxinArtworkBiz;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -22,7 +22,7 @@ import org.springframework.stereotype.Component; ...@@ -22,7 +22,7 @@ import org.springframework.stereotype.Component;
@Slf4j @Slf4j
@Component @Component
@StrategyGalaxyRouterArtworkHandler(GalaxyConstant.RouterTypeEnum.ZXINCHAIN) @StrategyGalaxyRouterArtworkHandler(GalaxyConstant.RouterTypeEnum.ZXINCHAIN)
public class GalaxyRouterStrategyZxlArtworkImpl extends AbstractGalaxyRouterStrategyArtwork { public class GalaxyRouterStrategyZxlArtworkImpl implements IGalaxyRouterStrategyArtwork {
@Autowired @Autowired
private ZxinArtworkBiz zxinArtworkBiz; private ZxinArtworkBiz zxinArtworkBiz;
...@@ -40,4 +40,9 @@ public class GalaxyRouterStrategyZxlArtworkImpl extends AbstractGalaxyRouterStra ...@@ -40,4 +40,9 @@ public class GalaxyRouterStrategyZxlArtworkImpl extends AbstractGalaxyRouterStra
public ResponseDto<GalaxyArtSeriesClaimRespDto> seriesClaim(GalaxyArtSeriesClaimReqDto reqDto) { public ResponseDto<GalaxyArtSeriesClaimRespDto> seriesClaim(GalaxyArtSeriesClaimReqDto reqDto) {
return zxinArtworkBiz.seriesClaim(reqDto); return zxinArtworkBiz.seriesClaim(reqDto);
} }
@Override
public ResponseDto<GalaxyArtSeriesClaimResultQueryRespDto> seriesClaimResultQuery(GalaxyArtSeriesClaimResultQueryReqDto reqDto) {
return null;
}
} }
...@@ -4,8 +4,10 @@ import com.liquidnet.service.base.ResponseDto; ...@@ -4,8 +4,10 @@ import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.galaxy.constant.GalaxyConstant; import com.liquidnet.service.galaxy.constant.GalaxyConstant;
import com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishReqDto; import com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishReqDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishRespDto; import com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishRespDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishResultQueryReqDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishResultQueryRespDto;
import com.liquidnet.service.galaxy.router.strategy.IGalaxyRouterStrategyPublish;
import com.liquidnet.service.galaxy.router.strategy.annotation.StrategyGalaxyRouterPublishHandler; import com.liquidnet.service.galaxy.router.strategy.annotation.StrategyGalaxyRouterPublishHandler;
import com.liquidnet.service.galaxy.router.strategy.impl.AbstractGalaxyRouterStrategyPublish;
import com.liquidnet.service.galaxy.router.zxin.biz.ZxinPublishBiz; import com.liquidnet.service.galaxy.router.zxin.biz.ZxinPublishBiz;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -23,7 +25,7 @@ import org.springframework.stereotype.Component; ...@@ -23,7 +25,7 @@ import org.springframework.stereotype.Component;
@Slf4j @Slf4j
@Component @Component
@StrategyGalaxyRouterPublishHandler(GalaxyConstant.RouterTypeEnum.ZXINCHAIN) @StrategyGalaxyRouterPublishHandler(GalaxyConstant.RouterTypeEnum.ZXINCHAIN)
public class GalaxyRouterStrategyZxlPublishImpl extends AbstractGalaxyRouterStrategyPublish { public class GalaxyRouterStrategyZxlPublishImpl implements IGalaxyRouterStrategyPublish {
@Autowired @Autowired
private ZxinPublishBiz zxinPublishBiz; private ZxinPublishBiz zxinPublishBiz;
...@@ -31,4 +33,9 @@ public class GalaxyRouterStrategyZxlPublishImpl extends AbstractGalaxyRouterStra ...@@ -31,4 +33,9 @@ public class GalaxyRouterStrategyZxlPublishImpl extends AbstractGalaxyRouterStra
public ResponseDto<GalaxyNftPublishRespDto> nftPublish(GalaxyNftPublishReqDto reqDto) { public ResponseDto<GalaxyNftPublishRespDto> nftPublish(GalaxyNftPublishReqDto reqDto) {
return zxinPublishBiz.nftPublish(reqDto); return zxinPublishBiz.nftPublish(reqDto);
} }
@Override
public ResponseDto<GalaxyNftPublishResultQueryRespDto> nftPublishResultQuery(GalaxyNftPublishResultQueryReqDto reqDto) {
return null;
}
} }
...@@ -2,12 +2,9 @@ package com.liquidnet.service.galaxy.router.zxin.service; ...@@ -2,12 +2,9 @@ package com.liquidnet.service.galaxy.router.zxin.service;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.galaxy.constant.GalaxyConstant; import com.liquidnet.service.galaxy.constant.GalaxyConstant;
import com.liquidnet.service.galaxy.dto.param.GalaxyNftBuyReqDto; import com.liquidnet.service.galaxy.dto.param.*;
import com.liquidnet.service.galaxy.dto.param.GalaxyNftBuyRespDto; import com.liquidnet.service.galaxy.router.strategy.IGalaxyRouterStrategyTrade;
import com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishAndBuyReqDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishAndBuyRespDto;
import com.liquidnet.service.galaxy.router.strategy.annotation.StrategyGalaxyRouterTradeHandler; import com.liquidnet.service.galaxy.router.strategy.annotation.StrategyGalaxyRouterTradeHandler;
import com.liquidnet.service.galaxy.router.strategy.impl.AbstractGalaxyRouterStrategyTrade;
import com.liquidnet.service.galaxy.router.zxin.biz.ZxinTradeBiz; import com.liquidnet.service.galaxy.router.zxin.biz.ZxinTradeBiz;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -25,7 +22,7 @@ import org.springframework.stereotype.Component; ...@@ -25,7 +22,7 @@ import org.springframework.stereotype.Component;
@Slf4j @Slf4j
@Component @Component
@StrategyGalaxyRouterTradeHandler(GalaxyConstant.RouterTypeEnum.ZXINCHAIN) @StrategyGalaxyRouterTradeHandler(GalaxyConstant.RouterTypeEnum.ZXINCHAIN)
public class GalaxyRouterStrategyZxlTradeImpl extends AbstractGalaxyRouterStrategyTrade { public class GalaxyRouterStrategyZxlTradeImpl implements IGalaxyRouterStrategyTrade {
@Autowired @Autowired
private ZxinTradeBiz zxinTradeBiz; private ZxinTradeBiz zxinTradeBiz;
...@@ -34,6 +31,16 @@ public class GalaxyRouterStrategyZxlTradeImpl extends AbstractGalaxyRouterStrate ...@@ -34,6 +31,16 @@ public class GalaxyRouterStrategyZxlTradeImpl extends AbstractGalaxyRouterStrate
return zxinTradeBiz.nftPublishAndBuy(reqDto); return zxinTradeBiz.nftPublishAndBuy(reqDto);
} }
@Override
public ResponseDto<GalaxyNftBuyResultQueryRespDto> nftBuyResultQuery(GalaxyNftBuyResultQueryReqDto reqDto) {
return null;
}
@Override
public ResponseDto<GalaxyNftBuyPayResultQueryRespDto> nftBuyPayResultQuery(GalaxyNftBuyPayResultQueryReqDto reqDto) {
return null;
}
@Override @Override
public ResponseDto<GalaxyNftBuyRespDto> nftBuy(GalaxyNftBuyReqDto reqDto) { public ResponseDto<GalaxyNftBuyRespDto> nftBuy(GalaxyNftBuyReqDto reqDto) {
return zxinTradeBiz.nftBuy(reqDto); return zxinTradeBiz.nftBuy(reqDto);
......
...@@ -2,10 +2,12 @@ package com.liquidnet.service.galaxy.router.zxin.service; ...@@ -2,10 +2,12 @@ package com.liquidnet.service.galaxy.router.zxin.service;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.galaxy.constant.GalaxyConstant; import com.liquidnet.service.galaxy.constant.GalaxyConstant;
import com.liquidnet.service.galaxy.dto.param.GalaxyUserBindStatusQueryReqDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyUserBindStatusQueryRespDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyUserRegisterReqDto; import com.liquidnet.service.galaxy.dto.param.GalaxyUserRegisterReqDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyUserRegisterRespDto; import com.liquidnet.service.galaxy.dto.param.GalaxyUserRegisterRespDto;
import com.liquidnet.service.galaxy.router.strategy.IGalaxyRouterStrategyUser;
import com.liquidnet.service.galaxy.router.strategy.annotation.StrategyGalaxyRouterUserHandler; import com.liquidnet.service.galaxy.router.strategy.annotation.StrategyGalaxyRouterUserHandler;
import com.liquidnet.service.galaxy.router.strategy.impl.AbstractGalaxyRouterStrategyUser;
import com.liquidnet.service.galaxy.router.zxin.biz.ZxinUserBiz; import com.liquidnet.service.galaxy.router.zxin.biz.ZxinUserBiz;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -23,7 +25,7 @@ import org.springframework.stereotype.Component; ...@@ -23,7 +25,7 @@ import org.springframework.stereotype.Component;
@Slf4j @Slf4j
@Component @Component
@StrategyGalaxyRouterUserHandler(GalaxyConstant.RouterTypeEnum.ZXINCHAIN) @StrategyGalaxyRouterUserHandler(GalaxyConstant.RouterTypeEnum.ZXINCHAIN)
public class GalaxyRouterStrategyZxlUserImpl extends AbstractGalaxyRouterStrategyUser { public class GalaxyRouterStrategyZxlUserImpl implements IGalaxyRouterStrategyUser {
@Autowired @Autowired
private ZxinUserBiz zxinUserBiz; private ZxinUserBiz zxinUserBiz;
...@@ -31,4 +33,9 @@ public class GalaxyRouterStrategyZxlUserImpl extends AbstractGalaxyRouterStrateg ...@@ -31,4 +33,9 @@ public class GalaxyRouterStrategyZxlUserImpl extends AbstractGalaxyRouterStrateg
public ResponseDto<GalaxyUserRegisterRespDto> userRegister(GalaxyUserRegisterReqDto reqDto) { public ResponseDto<GalaxyUserRegisterRespDto> userRegister(GalaxyUserRegisterReqDto reqDto) {
return zxinUserBiz.userRegister(reqDto); return zxinUserBiz.userRegister(reqDto);
} }
@Override
public ResponseDto<GalaxyUserBindStatusQueryRespDto> userBindStatusQuery(GalaxyUserBindStatusQueryReqDto reqDto) {
return null;
}
} }
...@@ -40,6 +40,6 @@ public class GalaxyArtworkServiceImpl implements IGalaxyArtworkService { ...@@ -40,6 +40,6 @@ public class GalaxyArtworkServiceImpl implements IGalaxyArtworkService {
@Override @Override
public ResponseDto<GalaxyArtSeriesClaimResultQueryRespDto> seriesClaimResultQuery(GalaxyArtSeriesClaimResultQueryReqDto reqDto) { public ResponseDto<GalaxyArtSeriesClaimResultQueryRespDto> seriesClaimResultQuery(GalaxyArtSeriesClaimResultQueryReqDto reqDto) {
return null; return galaxyRouterStrategyContext.getArtworkStrategy(reqDto.getRouteType()).seriesClaimResultQuery(reqDto);
} }
} }
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