jyy
2021-04-20 e3f5c0d35739ffa2c713033d4dabc7dd39ae2425
添加一个官网联系我们的的通知接口
2 files modified
30 ■■■■ changed files
zq-erp/src/main/java/com/matrix/core/tools/DingDingRobotUtil.java 1 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/common/actions/CommonAction.java 29 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/core/tools/DingDingRobotUtil.java
@@ -70,6 +70,7 @@
            response = httpclient.execute(httppost);
            if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
                String result = EntityUtils.toString(response.getEntity(), "utf-8");
                LogUtil.debug("发送钉钉结果"+result);
            }
        } catch (IOException e) {
            e.printStackTrace();
zq-erp/src/main/java/com/matrix/system/common/actions/CommonAction.java
@@ -5,10 +5,7 @@
import com.matrix.core.constance.SystemErrorCode;
import com.matrix.core.exception.GlobleException;
import com.matrix.core.pojo.AjaxResult;
import com.matrix.core.tools.LogUtil;
import com.matrix.core.tools.RSAUtils;
import com.matrix.core.tools.StringUtils;
import com.matrix.core.tools.WebUtil;
import com.matrix.core.tools.*;
import com.matrix.core.web.BaseAction;
import com.matrix.system.common.authority.DefaultAuthorityManager;
import com.matrix.system.common.authority.strategy.AccountPasswordLogin;
@@ -23,10 +20,7 @@
import com.matrix.system.hive.statistics.StatisticsBusinessDataJob;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.*;
import java.security.Key;
import java.util.Map;
@@ -262,4 +256,23 @@
    @Autowired
    /**
     * 官网联系我们通知
     */
    @RequestMapping(value = "/gwLinkUs")
    public @ResponseBody
    AjaxResult gwLinkUs(@RequestBody Map<String , Object> param) {
        String title = "hive新客户在官网提交联系请求";
        String content = "hive=>name:" + param.get("name") + "  tel:" +  param.get("tel") ;
        DingDingRobotUtil.sendLink("https://oapi.dingtalk.com/robot/send?access_token=62bb902f0e3945f0ece31306b99abae043fc69a66da0ef04d89fd20bf58d88d8", content, title, "", "www.baidu.com");
        return AjaxResult.buildSuccessInstance("提交成功");
    }
}