master
ljl 9 months ago
parent b89c918999
commit 5354f9175a

@ -0,0 +1,39 @@
package com.ms.biz.spi.timer;
import com.doudian.open.utils.StringUtil;
import com.jinritemai.cloud.base.api.BaseRequest;
import com.jinritemai.cloud.base.api.BaseResponse;
import com.jinritemai.cloud.base.api.ExtensionService;
import com.jinritemai.cloud.base.api.ExtensionServiceHandler;
import com.jinritemai.cloud.base.core.util.AuthThreadLocalUtil;
import com.ms.api.dto.ShopInfoDao;
import com.ms.biz.common.R;
import com.ms.biz.common.Ret;
import com.ms.biz.common.TimerBaseService;
import com.ms.biz.service.DoudianMsgService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.ArrayList;
import java.util.List;
@ExtensionService("testSendMsg")
@Slf4j
public class TestSendMsgService extends TimerBaseService implements ExtensionServiceHandler<ShopInfoDao, Ret> {
@Autowired
private DoudianMsgService doudianMsgService;
@Override
public BaseResponse<Ret> handle(BaseRequest<ShopInfoDao> req) {
String shopId = req.getData().getShopId();
if (StringUtil.isEmpty(shopId)) {
shopId = "4463798";
}
AuthThreadLocalUtil.set(shopId);
List<String> msgList = new ArrayList<>();
msgList.add("{\"tag\":\"16000\",\"msg_id\":\"57088508275362107630:037250343:16000:1709036986:1925842976:7290512081592305208\",\"data\":\"{\\\"cargo_id\\\":3658552585478095162,\\\"event_time\\\":1709036986,\\\"product_id\\\":3670126357280588075,\\\"shop_id\\\":37250343}\"}");
doudianMsgService.receiveMessages(msgList);
return R.ok(Ret.success());
}
}

@ -42,8 +42,8 @@ public class DfJsonRequestTemplate {
dfHost = dfHostProd;
dfToken = dfTokenProd;
} else {
dfHost = dfHostTest;
dfToken = dfTokenTest;
dfHost = dfHostProd;
dfToken = dfTokenProd;
}
}
System.out.println(dfHost + url);

Loading…
Cancel
Save