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

Commit 0d6d764a authored by 张国柄's avatar 张国柄

~api:藏品转赠过期批处理调整延后30秒处理;

parent 14cd2a5b
...@@ -9,6 +9,7 @@ import com.xxl.job.core.handler.annotation.XxlJob; ...@@ -9,6 +9,7 @@ import com.xxl.job.core.handler.annotation.XxlJob;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.LinkedMultiValueMap;
...@@ -76,13 +77,15 @@ public class PlatformGoblinTaskHandler { ...@@ -76,13 +77,15 @@ public class PlatformGoblinTaskHandler {
try { try {
String url = sevPlatformUrl.concat("/platfrom/artwork/task/transfer_expire"); String url = sevPlatformUrl.concat("/platfrom/artwork/task/transfer_expire");
LinkedMultiValueMap<String, String> paramsMap = CollectionUtil.linkedMultiValueMapStringString(); LinkedMultiValueMap<String, String> paramsMap = CollectionUtil.linkedMultiValueMapStringString();
String jobParam = XxlJobHelper.getJobParam(); String jobParam = XxlJobHelper.getJobParam();
if (StringUtils.isNotBlank(jobParam)) { if (StringUtils.isNotBlank(jobParam)) {
paramsMap.add("expiredSeconds", DESUtils.DES().encrypt(jobParam)); paramsMap.add("expiredSeconds", DESUtils.DES().encrypt(jobParam));
} }
LinkedMultiValueMap<String, String> headersMap = CollectionUtil.linkedMultiValueMapStringString();
headersMap.add("Accept", MediaType.APPLICATION_JSON_UTF8_VALUE);
headersMap.add("Content-Type", MediaType.APPLICATION_FORM_URLENCODED_VALUE);
XxlJobHelper.handleSuccess("结果:" + HttpUtil.put(url, paramsMap)); XxlJobHelper.handleSuccess("结果:" + HttpUtil.post(url, paramsMap, headersMap));
} catch (Exception e) { } catch (Exception e) {
XxlJobHelper.log(e); XxlJobHelper.log(e);
XxlJobHelper.handleFail(); XxlJobHelper.handleFail();
......
...@@ -7,12 +7,14 @@ import com.liquidnet.commons.lang.util.DESUtils; ...@@ -7,12 +7,14 @@ import com.liquidnet.commons.lang.util.DESUtils;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.goblin.entity.GoblinNftTransferOrder; import com.liquidnet.service.goblin.entity.GoblinNftTransferOrder;
import com.liquidnet.service.platform.service.impl.goblin.PlatformGoblinNftTransferOrderService; import com.liquidnet.service.platform.service.impl.goblin.PlatformGoblinNftTransferOrderService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.List; import java.util.List;
...@@ -30,9 +32,9 @@ public class GoblinUserDigitalArtworkTaskController { ...@@ -30,9 +32,9 @@ public class GoblinUserDigitalArtworkTaskController {
* @param expiredSeconds 过期时间,单位秒,不传默认24小时即86400秒(这里统一延后30秒处理) * @param expiredSeconds 过期时间,单位秒,不传默认24小时即86400秒(这里统一延后30秒处理)
* @return ResponseDto<String> * @return ResponseDto<String>
*/ */
@PutMapping("transfer_expire") @PostMapping("transfer_expire")
public ResponseDto<String> processForTransferExpire(@RequestParam(required = false) String expiredSeconds) { public ResponseDto<String> processForTransferExpire(@RequestParam(required = false) String expiredSeconds) {
int expiredSecondsIntVal = 0; int expiredSecondsIntVal = 86400 + 30;
if (StringUtils.isNotBlank(expiredSeconds)) { if (StringUtils.isNotBlank(expiredSeconds)) {
try { try {
String decrypt = DESUtils.DES().decrypt(expiredSeconds); String decrypt = DESUtils.DES().decrypt(expiredSeconds);
......
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