|
|
@@ -1,8 +1,8 @@
|
|
|
package com.txz.cif;
|
|
|
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
+import cn.hutool.json.JSONObject;
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
-import com.txz.cif.dto.jpush.JPushSmsDTO;
|
|
|
-import com.txz.cif.dto.jpush.JPushTemplateDTO;
|
|
|
import org.junit.jupiter.api.Test;
|
|
|
|
|
|
/**
|
|
|
@@ -16,11 +16,13 @@ public class CifLocalTest {
|
|
|
@Test
|
|
|
public void test() {
|
|
|
|
|
|
- JPushSmsDTO pushSmsDTO = new JPushSmsDTO();
|
|
|
- pushSmsDTO.setTo("+" + "01998549097");
|
|
|
- pushSmsDTO.setCode("123456");
|
|
|
- pushSmsDTO.setTemplate(new JPushTemplateDTO());
|
|
|
+ // String body = "{\"send_channel\":\"sms\",\"message_id\":\"1988900596811325440\"}";
|
|
|
+ String body = "{\"code\": 3005,\"message\": \"balance not enough\"}";
|
|
|
+ JSONObject resultJson = JSONUtil.parseObj(body);
|
|
|
|
|
|
- System.out.println(JSONUtil.toJsonStr(pushSmsDTO));
|
|
|
+ if (ObjectUtil.isNotEmpty(resultJson.get("message_id"))) {
|
|
|
+ System.out.println("success");
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
}
|