对接吉客云代码
This commit is contained in:
parent
f7abab248c
commit
b294f5e274
|
@ -0,0 +1,105 @@
|
|||
package com.hzya.frame.plugin.kjs.plugin;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.barcode.entity.BarcodeEntity;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.dd.robot.service.IDingRobotService;
|
||||
import com.hzya.frame.plugin.kjs.service.IDingTalkInitService;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
/**
|
||||
* @Description 钉钉机器人消息推送
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/9/2 16:19
|
||||
**/
|
||||
public class DingRobotPluginInitializer extends PluginBaseEntity {
|
||||
Logger logger = LoggerFactory.getLogger(getClass());
|
||||
|
||||
@Autowired
|
||||
private IDingRobotService dingRobotService;
|
||||
/***
|
||||
* 插件初始化方法
|
||||
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @Date 2023-08-02 10:48
|
||||
* @Param []
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public void initialize() {
|
||||
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件销毁方法
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public void destroy() {
|
||||
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件的ID
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public String getPluginId() {
|
||||
return "kjsDingRobotPlugin";
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件的名称
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return "kjs钉钉机器人信息初始化插件";
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件的显示值
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public String getPluginLabel() {
|
||||
return "kjs钉钉机器人信息初始化插件";
|
||||
}
|
||||
|
||||
/***
|
||||
* 插件类型 1、场景插件
|
||||
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @Date 2023-08-02 14:01
|
||||
* @Param []
|
||||
* @return java.lang.String
|
||||
**/
|
||||
@Override
|
||||
public String getPluginType() {
|
||||
return "1";
|
||||
}
|
||||
|
||||
/***
|
||||
* 执行业务代码
|
||||
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @Date 2023-08-07 11:20
|
||||
* @param requestJson 执行业务代码的参数
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||
logger.info("开始执行"+getPluginName()+requestJson.toString());
|
||||
String res = dingRobotService.getBarcodeList(new BarcodeEntity());
|
||||
return BaseResult.getSuccessMessageEntity("成功");
|
||||
}
|
||||
}
|
|
@ -9,6 +9,9 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
*
|
||||
* @content 收款单同步CRM插件
|
||||
|
@ -99,6 +102,7 @@ public class ReceiptPluginInitializer extends PluginBaseEntity {
|
|||
**/
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||
|
||||
receiptService.getU8ReceiptCrm(requestJson);
|
||||
return BaseResult.getSuccessMessageEntity("操作成功");
|
||||
}
|
||||
|
|
|
@ -16,4 +16,6 @@
|
|||
<bean name="JeckYunGoodsdocInBakPluginInitializer" class="com.hzya.frame.plugin.kjs.plugin.JeckYunGoodsdocInBakPluginInitializer" />
|
||||
<bean name="JeckYunGoodsdocOutBakPluginInitializer" class="com.hzya.frame.plugin.kjs.plugin.JeckYunGoodsdocOutBakPluginInitializer" />
|
||||
<bean name="JeckYunGoodsdocInToU8PluginInitializer" class="com.hzya.frame.plugin.kjs.plugin.JeckYunGoodsdocInToU8PluginInitializer" />
|
||||
<bean name="DingRobotPluginInitializer" class="com.hzya.frame.plugin.kjs.plugin.DingRobotPluginInitializer" />
|
||||
|
||||
</beans>
|
||||
|
|
Loading…
Reference in New Issue