|
@@ -5,6 +5,8 @@ import com.miaxis.ZzjsApplication;
|
|
|
import com.miaxis.common.sms.MD5Utils;
|
|
|
import com.miaxis.feign.dto.fulu.FuluDTO;
|
|
|
import com.miaxis.feign.service.IFuluService;
|
|
|
+import com.miaxis.wx.domain.WxOrder;
|
|
|
+import com.miaxis.wx.service.IWxOrderService;
|
|
|
import org.junit.Test;
|
|
|
import org.junit.runner.RunWith;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -23,28 +25,16 @@ public class FuluTest {
|
|
|
|
|
|
String AppSecret = "0a091b3aa4324435aab703142518a8f7";
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IWxOrderService wxOrderService;
|
|
|
+
|
|
|
|
|
|
@Test
|
|
|
public void test1() {
|
|
|
- FuluDTO fuluDTO = new FuluDTO();
|
|
|
- fuluDTO.setApp_key("i4esv1l+76l/7NQCL3QudG90Fq+YgVfFGJAWgT+7qO1Bm9o/adG/1iwO2qXsAXNB");
|
|
|
- fuluDTO.setMethod("fulu.goods.list.get");
|
|
|
- SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
- fuluDTO.setTimestamp(simpleDateFormat.format(new Date()));
|
|
|
- fuluDTO.setVersion("2.0");
|
|
|
- fuluDTO.setFormat("json");
|
|
|
- fuluDTO.setCharset("utf-8");
|
|
|
- fuluDTO.setSign_type("md5");
|
|
|
- fuluDTO.setApp_auth_token("");
|
|
|
- fuluDTO.setBiz_content("{}");
|
|
|
- String str = JSONObject.toJSONString(fuluDTO);
|
|
|
- System.out.println("json字符串"+str);
|
|
|
- char[] s = str.toCharArray();
|
|
|
- Arrays.sort(s);
|
|
|
- String outputSignOriginalStr = new String(s) + AppSecret;
|
|
|
- String sign = MD5Utils.MD5Encode(outputSignOriginalStr);
|
|
|
- fuluDTO.setSign(sign);
|
|
|
- fuluService.fuluCommonApi(fuluDTO);
|
|
|
+// WxOrder wxOrder =new WxOrder();
|
|
|
+//// JSONObject jsonObject = new JSONObject();
|
|
|
+//// jsonObject.put("product_id",wxOrderCreateDTO.getProduct_id());
|
|
|
+//// wxOrderService.createFuluOrder();
|
|
|
|
|
|
}
|
|
|
|