wangchaoxu 1 year ago
commit 8b854c34db

File diff suppressed because one or more lines are too long

@ -45,7 +45,7 @@ public class MemberAuthCallback extends SPIBaseService implements ExtensionServi
MemberAuthCallBackRequestDTO fields = req.getData();
log.info("receive callback: " + JSON.toJSONString(fields));
// String body = fields.getBody();
String body = "userId=gfZbbg6BSAlPMmw75xlCzQ%3D%3D&cnaliMemberId=b2b-221123084407697b20&authCode=NGNiYzEyODUtNzFhOS01ZmIwLWE5MDEtYzI3ZTAyYWFjOTA2&gmtMemberExpireTime=2023-11-13+23%3A59%3A59&type=auth";
String body = "userId=4463798&cnaliMemberId=b2b-221123084407697b20&authCode=NGNiYzEyODUtNzFhOS01ZmIwLWE5MDEtYzI3ZTAyYWFjOTA3&gmtMemberExpireTime=2023-11-13+23%3A59%3A59&type=auth";
Map<String, String> map = new HashMap<String, String>();
// ----逻辑校验----
@ -64,24 +64,24 @@ public class MemberAuthCallback extends SPIBaseService implements ExtensionServi
String gmtMemberExpireTime = map.get("gmtMemberExpireTime");
String userId = map.get("userId");
this.authCode = fields.getAuthCode();
log.info(map.toString());
Shop1688DsAuth shop1688DsAuth = shop1688DsAuthService.getDetailByShopId(Long.valueOf(SecurityTool.decodeByAES(userId)));
Shop1688DsAuth shop1688DsAuth = shop1688DsAuthService.getDetailByShopId(Long.valueOf(userId));
if (Objects.isNull(shop1688DsAuth)) {
shop1688DsAuth = new Shop1688DsAuth();
shop1688DsAuthService.insert(shop1688DsAuth);
}
shop1688DsAuth.setAuthCode(authCode);
shop1688DsAuth.setShopId(Long.valueOf(SecurityTool.decodeByAES(userId)));
shop1688DsAuth.setShopId(Long.valueOf(userId));
log.info("receive callback: " + shop1688DsAuth);
shop1688DsAuthService.updateByPrimaryKey(shop1688DsAuth);
ShopTo1688DsMember shopTo1688DsMember = shopTo1688DsMemberService.getDetailByShopId(Long.valueOf(SecurityTool.decodeByAES(userId)));
ShopTo1688DsMember shopTo1688DsMember = shopTo1688DsMemberService.getDetailByShopId(Long.valueOf(userId));
if (Objects.isNull(shopTo1688DsMember)) {
shopTo1688DsMember = new ShopTo1688DsMember();
shopTo1688DsMemberService.insert(shopTo1688DsMember);
}
shopTo1688DsMember.setCnaliMemberId(cnaliMemberId);
shopTo1688DsMember.setShopId(Long.valueOf(SecurityTool.decodeByAES(userId)));
shopTo1688DsMember.setShopId(Long.valueOf(userId));
shopTo1688DsMember.setGmtExpire(gmtMemberExpireTime);
shopTo1688DsMemberService.updateByPrimaryKey(shopTo1688DsMember);
} catch (Exception e) {

@ -31,19 +31,15 @@ public class CancelCollectTaskService extends SPIBaseService implements Extensio
// ----逻辑校验----
// ----业务处理----
// if (!$this->webShop->validateCsrfToken()) {
// return $this->renderJSON(CommonTool::failResult('CSRF校验不通过'));
// }
//
// list($successCancelDetailIds, $skipCancelDetailIds) = $this->moveUtil->cancelCollectTask();
// $html = '';
// if ($skipCancelDetailIds) {
String html = "";
// if ($skipCancelDetailIds) { //这一段不知道在干嘛
// list($processingTaskCount, $taskDetailList,) = $this->productUtil->getHistoryProductList($_SESSION[SessionConst::shopId], ['taskDetailIds' => $skipCancelDetailIds], 1, count($skipCancelDetailIds));
// $html = $this->renderWithoutLayout(array(
// 'taskDetailList' => $taskDetailList,
// ), 'move/batch/skip_cancel', true);
// }
//
// return $this->renderJSON(CommonTool::successResult([
// 'processCount' => count($successCancelDetailIds),
// 'skipCount' => count($skipCancelDetailIds),

@ -1,7 +1,9 @@
package com.ms.api.spi.move;
import cn.hutool.core.bean.BeanUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.doudian.open.gson.Gson;
import com.jinritemai.cloud.base.api.BaseRequest;
import com.jinritemai.cloud.base.api.BaseResponse;
import com.jinritemai.cloud.base.api.ExtensionService;
@ -43,6 +45,8 @@ public class FailRetryMoveTasksService extends SPIBaseService implements Extensi
private MoveCollectTaskService moveCollectTaskService;
@Autowired
private MoveProductPublishBufferService moveProductPublishBufferService;
@Autowired
private MoveShopSettingService moveShopSettingService;
@Override
public BaseResponse<Ret> handle(BaseRequest<FailRetryMoveTasksRequestDTO> req) {
@ -97,10 +101,16 @@ public class FailRetryMoveTasksService extends SPIBaseService implements Extensi
}
MoveCollectTask moveCollectTask = moveCollectTaskService.getMoveCollectTask(moveCollectTaskDetail.getMoveCollectTaskId(), shopId);
if (BeanUtil.isEmpty(moveCollectTask.getCondition())) {
String condition=moveCollectTask.getCondition();
if (BeanUtil.isEmpty(condition)) {
return R.fail("未找到配置信息!无法重试,请使用链接重新搬家!");
}
MoveShopSetting shopMoveCondition = moveShopSettingService.getDetailByShopId(shopId);
shopMoveCondition.setSkipSeason(reason);
String shopMoveConditionStr = JSON.toJSONString(shopMoveCondition);
if (Objects.equals(moveCollectTaskDetail.getStatus(), StatusConst.fail) || Objects.equals(moveCollectTaskDetail.getStatus(), StatusConst.cancel)
|| Objects.equals(moveCollectTaskDetail.getStatus(), StatusConst.delete) || Objects.equals(moveCollectTaskDetail.getStatus(), StatusConst.skip)) {
MoveCollectTaskDetail moveCollectTaskDetail1 = new MoveCollectTaskDetail();
@ -114,7 +124,7 @@ public class FailRetryMoveTasksService extends SPIBaseService implements Extensi
MoveCollectTask moveCollectTask1 = new MoveCollectTask();
moveCollectTask1.setMoveCollectTaskId(moveCollectTask.getMoveCollectTaskId());
moveCollectTask1.setGmtModified(new Date());
moveCollectTask1.setCondition(moveCollectTask.getCondition());
moveCollectTask1.setCondition(shopMoveConditionStr);
moveCollectTaskService.updateByPrimaryKey(moveCollectTask1);
int priority = getTaskPriority(shopId);

@ -2,8 +2,6 @@ package com.ms.api.tool;
import com.ms.api.common.Ret;
import com.ms.api.common.StrObjMap;
import com.sun.scenario.effect.ImageData;
import java.awt.image.BufferedImage;
import javax.imageio.ImageIO;
import java.io.ByteArrayInputStream;

Loading…
Cancel
Save