|
|
|
@ -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()));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|