Commit 7cec384c by 胡超

删除多余代码

parent 73cf2012
package cn.freemud.controller.test; package cn.freemud.controller.test;
import cn.freemud.amp.service.ProduceMQService;
import cn.freemud.base.entity.BaseResponse;
import cn.freemud.entities.dto.delivery.CallbackUrlRequestDto;
import cn.freemud.entities.vo.CheckBeforeCreateOrderRequestVo;
import cn.freemud.monitorcenter.tools.HealthUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.freemud.application.sdk.api.log.ApiAnnotation; import com.freemud.application.sdk.api.log.ApiAnnotation;
import com.freemud.application.sdk.api.log.LogParams; import com.freemud.application.sdk.api.log.LogParams;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.client.producer.SendResult;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/** /**
* All rights Reserved, Designed By www.freemud.com * All rights Reserved, Designed By www.freemud.com
* *
...@@ -64,42 +53,4 @@ public class TestController { ...@@ -64,42 +53,4 @@ public class TestController {
return platformBaseResponse; return platformBaseResponse;
} }
@Resource
ProduceMQService produceMQService;
@ApiAnnotation(logMessage = "test")
@PostMapping("/test")
public PlatformBaseResponse test(String order,String partnerId,String channel) {
CallbackUrlRequestDto deliveryRequest = buildCallbackUrlRequestDto();
deliveryRequest.setOrderId(order);
deliveryRequest.setPartnerId(partnerId);
deliveryRequest.setChannelCode(channel);
produceMQService.sendRocketMqOfDeliveryInfo(deliveryRequest);
PlatformBaseResponse platformBaseResponse = new PlatformBaseResponse();
platformBaseResponse.setResponseBody(JSON.toJSONString(sendResult));
platformBaseResponse.setStatusCode("100");
return platformBaseResponse;
}
public CallbackUrlRequestDto buildCallbackUrlRequestDto() {
String json = "{\n" +
" \"channelCode\":\"MeiTuan\",\n" +
" \"channelDeliveryId\":\"1584868781086019780\",\n" +
" \"channelName\":\"美团\",\n" +
" \"deliveryId\":\"6913353047542579209b\",\n" +
" \"deliveryStatus\":2,\n" +
" \"orderId\":\"17283381807564801000006\",\n" +
" \"partnerId\":\"1864\",\n" +
" \"riderName\":\"宋**\",\n" +
" \"riderPhone\":\"1782****316\",\n" +
" \"storeId\":\"a785e270-0f67-4805-b3db-6e2604b87909\",\n" +
" \"updateTime\":\"2020-03-22 17:20:45\"\n" +
"}";
CallbackUrlRequestDto callbackUrlRequestDto = JSON.parseObject(json, CallbackUrlRequestDto.class);
return callbackUrlRequestDto;
}
} }
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