|
@@ -26,6 +26,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.ssj.alipay.utils.AlipayOrderHelper;
|
|
|
+import com.ssj.api.request.RequestOpenApiUtils;
|
|
|
import com.ssj.bean.curator.TbVacationLimit;
|
|
|
import com.ssj.bean.sys.fx.domain.Merchant;
|
|
|
import com.ssj.bean.sys.give.GiveRecord;
|
|
@@ -1813,60 +1814,12 @@ public class LibVipServiceServiceImpl extends BaseServiceImpl<LibVipService, Str
|
|
|
|
|
|
@Override
|
|
|
public void openApiServiceCRM(Integer type,String libId,Integer num,String endTime) {
|
|
|
-
|
|
|
- String host=PropertiesUtil.getValue("API_OPEN_URL");
|
|
|
- String appid="zhidian";
|
|
|
- String accessKey="Zhidian@34889_";
|
|
|
-
|
|
|
- String accessToken=createOpenToken(appid, accessKey);
|
|
|
- String url=host+"/api/parents/share/dealServiceCRM?appid="+appid+"&accessToken="+accessToken;
|
|
|
-
|
|
|
- JSONObject json=new JSONObject();
|
|
|
- json.put("type", type);
|
|
|
- json.put("libId", libId);
|
|
|
- json.put("num", num);
|
|
|
- json.put("endTime", endTime);
|
|
|
-
|
|
|
- try {
|
|
|
- logger.info("调用第三方接口【dealServiceCRM】,请求URL:"+url);
|
|
|
- logger.info("调用第三方接口【dealServiceCRM】,请求参数:"+json);
|
|
|
- String text=HttpRemote.POSTMethod(url, json.toJSONString());
|
|
|
- logger.info("调用第三方接口【dealServiceCRM】,返回结果:"+text);
|
|
|
- } catch (Exception e) {
|
|
|
- logger.info("调用第三方接口【dealServiceCRM】,异常");
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
+ RequestOpenApiUtils.openApiServiceCRM(type, libId, num, endTime);
|
|
|
}
|
|
|
|
|
|
- public static String createOpenToken(String appid, String accessKey) {
|
|
|
- long time = System.currentTimeMillis() / 60000;
|
|
|
- return MD5Util.MD5Encode(appid + accessKey + time, "utf-8");
|
|
|
- }
|
|
|
|
|
|
|
|
|
-// public static void main(String[] args) {
|
|
|
-// String appid="zhidian";
|
|
|
-// String accessKey="Zhidian@34889_";
|
|
|
-// String accessToken=createOpenToken(appid, accessKey);
|
|
|
-// String url="https://master.sharingschool.com/open/api/parents/share/dealServiceCRM?appid="+appid+"&accessToken="+accessToken;
|
|
|
-//
|
|
|
-// JSONObject json=new JSONObject();
|
|
|
-// json.put("type", 1);
|
|
|
-// json.put("libId", "111");
|
|
|
-// json.put("num", 1);
|
|
|
-// json.put("endTime", "2020-10-10");
|
|
|
-// try {
|
|
|
-// System.out.println("调用第三方接口【dealServiceCRM】,请求URL:"+url);
|
|
|
-// System.out.println("调用第三方接口【dealServiceCRM】,请求参数:"+json);
|
|
|
-// String text=HttpRemote.POSTMethod(url, json.toJSONString());
|
|
|
-// System.out.println("调用第三方接口【dealServiceCRM】,返回结果:"+text);
|
|
|
-// } catch (Exception e) {
|
|
|
-// e.printStackTrace();
|
|
|
-// }
|
|
|
-//
|
|
|
-// }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
|
|
|
}
|