授权相关修改

20230922-ljl-fixBug
cxxxxxxx详 1 year ago
parent 8c3dd8b8da
commit 0a6fc19412

@ -5,7 +5,7 @@ curl --location --request POST 'localhost:8080/base/cloud/spi' \
--data-raw '{
"appId":"7264840234423027259",
"authId":"4463798",
"method":"batchDeleteTaskDetail",
"method":"searchDSProductCatTree",
"data":"{\"moveCollectTaskDetailIds\":[26],\"deleteOnSaleProduct\":0,\"deleteProduct\":0}"
}'

@ -6,7 +6,7 @@ import java.util.List;
public class CommonConst {
public static final String SUCCESS = "success";
public static final String FAIL = "fail";
public static final String PLATFORM = "dd";
public static final String PLATFORM = "ddmicroapp";
public static final String BIZ_MOVE = "move";
public static final int MATERIAL_AUDIT_STATUS_QUEUE_MAX_CNT = 5000;
public static final String COLLECT_TASK_SOURCE_1688 = "1688";

@ -34,7 +34,7 @@ import java.util.Objects;
*/
@ExtensionService("memberAuthCallBack")
@Slf4j
public class MemberAuthCallback extends SPIBaseService implements ExtensionServiceHandler<MemberAuthCallBackRequestDTO, Ret> {
public class MemberAuthCallbackService extends SPIBaseService implements ExtensionServiceHandler<MemberAuthCallBackRequestDTO, Ret> {
@Autowired
private Shop1688DsAuthService shop1688DsAuthService;
@Autowired

@ -1,11 +1,14 @@
package com.ms.web;
import com.alibaba.fastjson.JSON;
import com.jinritemai.cloud.base.api.BaseRequest;
import com.jinritemai.cloud.base.api.BaseResponse;
import com.ms.api.common.R;
import com.ms.api.common.Ret;
import com.ms.api.dto.auth.MemberAuthCallBackRequestDTO;
import com.ms.api.dto.move.DsRelationRequestDTO;
import com.ms.api.service.ProductToDsItemService;
import com.ms.api.spi.callback.MemberAuthCallbackService;
import com.ms.api.tool.CommonTool;
import com.ms.dal.entity.ProductToDsItem;
import lombok.extern.slf4j.Slf4j;
@ -23,6 +26,9 @@ public class MoveController {
@Autowired
ProductToDsItemService productToDsItemService;
@Autowired
private MemberAuthCallbackService memberAuthCallbackService;
@GetMapping("/testDsRelation")
public BaseResponse<Ret> testDsRelation(@ModelAttribute DsRelationRequestDTO dto) {
if(StringUtils.isBlank(dto.getPlatformItemId())){
@ -46,5 +52,15 @@ public class MoveController {
}
return R.ok(CommonTool.successResult("data", JSON.toJSONString(productToDsItem)));
}
@PostMapping("/memberAuthCallBack")
public BaseResponse<Ret> memberAuthCallBack(@RequestBody MemberAuthCallBackRequestDTO request) {
try {
BaseRequest<MemberAuthCallBackRequestDTO> baseRequest =new BaseRequest<>();
baseRequest.setData(request);
memberAuthCallbackService.handle(baseRequest);
return R.ok(CommonTool.successResult());
} catch (RuntimeException e) {
return R.ok(Ret.fail(e.getMessage()));
}
}
}

Loading…
Cancel
Save