admin
2019-12-14 fbdc33244c80ff94b42ac404872692267bd38629
充值修改
2个文件已修改
25 ■■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/service/impl/order/InviteOrderSubsidyServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/charge/FuLuChargeApiUtil.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/order/InviteOrderSubsidyServiceImpl.java
@@ -67,11 +67,6 @@
    @Transactional
    private void addOrderSubsidy(InviteOrderSubsidy orderSubsidy) throws InviteOrderSubsidyException {
        // TODO 确定生效日期 机制2020年生效
        if (System.currentTimeMillis() < TimeUtil.convertToTimeTemp("2020-01-01", "yyyy-MM-dd")&&!Constant.IS_TEST) {
            return;
        }
        if (orderSubsidy.getMoney() == null || StringUtil.isNullOrEmpty(orderSubsidy.getOrderNo())
                || orderSubsidy.getSourceType() == null || orderSubsidy.getUid() == null)
            throw new InviteOrderSubsidyException(1, "数据不完整");
fanli/src/main/java/com/yeshi/fanli/util/charge/FuLuChargeApiUtil.java
@@ -22,19 +22,18 @@
 *
 */
public class FuLuChargeApiUtil {
    // 测试
    private final static String APP_KEY = "i4esv1l+76l/7NQCL3QudG90Fq+YgVfFGJAWgT+7qO1Bm9o/adG/1iwO2qXsAXNB";
    private final static String APP_SECRET = "0a091b3aa4324435aab703142518a8f7";
    // 正式
    // 沙箱
    // private final static String APP_KEY =
    // "CrtDnTh1E5eYY5D42T8uArVrl4GWq9AWR9ZrNC2qvXYIBMwOTuiJQy7YYaJSYlb6";
    // "i4esv1l+76l/7NQCL3QudG90Fq+YgVfFGJAWgT+7qO1Bm9o/adG/1iwO2qXsAXNB";
    // private final static String APP_SECRET =
    // "a5f6c827903e4b1eac6eb2ba2cf715be";
    // "0a091b3aa4324435aab703142518a8f7";
    // 正式
    private final static String APP_KEY = "CrtDnTh1E5eYY5D42T8uArVrl4GWq9AWR9ZrNC2qvXYIBMwOTuiJQy7YYaJSYlb6";
    private final static String APP_SECRET = "a5f6c827903e4b1eac6eb2ba2cf715be";
    @SuppressWarnings("deprecation")
    private static String post(String url, String body) {
        HttpClient client = new HttpClient();
        // client.getHostConfiguration().setProxy("192.168.1.122", 8888);
        PostMethod method = new PostMethod(url);
        method.addRequestHeader("Content-Type", "application/json;charset=UTF-8");
        method.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
@@ -51,8 +50,8 @@
    }
    private static void baseRequest(String method, JSONObject bizContent) throws FuLuChargeException {
         String url = "http://pre.openapi.fulu.com/api/getway";
//        String url = "http://openapi.fulu.com/api/getway";
        // String url = "http://pre.openapi.fulu.com/api/getway";
        String url = "http://openapi.fulu.com/api/getway";
        Map<String, String> params = new HashMap<>();
        params.put("app_key", APP_KEY);
        params.put("method", method);
@@ -90,7 +89,6 @@
     */
    public static void charge(String goodsNo, String orderId, String account) throws FuLuChargeException {
        JSONObject json = new JSONObject();
        json.put("charge_type", "爱奇艺会员");
        json.put("customer_order_no", orderId);
        json.put("product_id", goodsNo);
        json.put("charge_account", account);
@@ -105,7 +103,7 @@
        JSONObject json = new JSONObject();
        json.put("charge_type", "爱奇艺会员");
        json.put("customer_order_no", orderId);
        json.put("product_id", "10000586 ");
        json.put("product_id", "10000586");
        json.put("charge_account", account);
        json.put("buy_num", "1");
        baseRequest("fulu.order.direct.add", json);