物料同步接口编写

This commit is contained in:
lvleigang 2025-03-17 08:51:30 +08:00
parent 372f91e086
commit 274c70e73d
7 changed files with 175 additions and 0 deletions

View File

@ -0,0 +1,18 @@
package com.hzya.frame.plugin.zjmaterielsynchronizationevent.dao;
import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.plugin.zjmaterielsynchronizationevent.entity.ZjMaterielSynchronizationEventEntity;
/****
* 万盛客商档案同步插件
* @content:
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2025-03-03 10:57
* @param
* @return
**/
public interface IZjMaterielSynchronizationEventDao extends IBaseDao<ZjMaterielSynchronizationEventEntity, String> {
}

View File

@ -0,0 +1,18 @@
package com.hzya.frame.plugin.zjmaterielsynchronizationevent.dao.impl;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import com.hzya.frame.plugin.zjmaterielsynchronizationevent.dao.IZjMaterielSynchronizationEventDao;
import com.hzya.frame.plugin.zjmaterielsynchronizationevent.entity.ZjMaterielSynchronizationEventEntity;
/***
* 万盛客商
* @content:
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2025-03-03 11:12
* @param
* @return
**/
public class ZjMaterielSynchronizationEventDaoImpl extends MybatisGenericDao<ZjMaterielSynchronizationEventEntity, String> implements IZjMaterielSynchronizationEventDao {
}

View File

@ -0,0 +1,16 @@
package com.hzya.frame.plugin.zjmaterielsynchronizationevent.entity;
import com.hzya.frame.web.entity.BaseEntity;
/****
* 万盛客商档案实体类
* @content:
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2025-03-03 10:53
* @param
* @return
**/
public class ZjMaterielSynchronizationEventEntity extends BaseEntity {
}

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hzya.frame.plugin.zjmaterielsynchronizationevent.dao.impl.ZjMaterielSynchronizationEventDaoImpl">
</mapper>

View File

@ -0,0 +1,62 @@
package com.hzya.frame.plugin.zjmaterielsynchronizationevent.plugin;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.plugin.zjmaterielsynchronizationevent.service.IZjMaterielSynchronizationEventService;
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;
/**
* 主数据同步
*
* @author makejava
* @since 2024-06-21 13:52:35
*/
public class ZjMaterielSynchronizationEventPluginInitializer extends PluginBaseEntity{
Logger logger = LoggerFactory.getLogger(ZjMaterielSynchronizationEventPluginInitializer.class);
@Autowired
private IZjMaterielSynchronizationEventService zjMaterielSynchronizationEventService;
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
@Override
public String getPluginId() {
return "ZjMaterielSynchronizationEventPluginInitializer";
}
@Override
public String getPluginName() {
return "万盛A8客商接收数据插件";
}
@Override
public String getPluginLabel() {
return "ZjMaterielSynchronizationEventPluginInitializer";
}
@Override
public String getPluginType() {
return "1";
}
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) {
try {
logger.info("======开始执行客商档案同步========");
return BaseResult.getSuccessMessageEntity("");
}catch (Exception e){
logger.info("======客商档案同步失败:{}========",e.getMessage());
e.printStackTrace();
return BaseResult.getFailureMessageEntity("======客商档案同步失败:{}========",e.getMessage());
}
}
}

View File

@ -0,0 +1,20 @@
package com.hzya.frame.plugin.zjmaterielsynchronizationevent.service;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.basedao.service.IBaseService;
import com.hzya.frame.plugin.zjmaterielsynchronizationevent.entity.ZjMaterielSynchronizationEventEntity;
import com.hzya.frame.web.entity.JsonResultEntity;
/***
* 万盛客商档案同步插件
* @content:
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2025-03-03 10:55
* @param
* @return
**/
public interface IZjMaterielSynchronizationEventService extends IBaseService<ZjMaterielSynchronizationEventEntity, String> {
}

View File

@ -0,0 +1,30 @@
package com.hzya.frame.plugin.zjmaterielsynchronizationevent.service.impl;
import com.hzya.frame.basedao.service.impl.BaseService;
import com.hzya.frame.plugin.zjmaterielsynchronizationevent.dao.IZjMaterielSynchronizationEventDao;
import com.hzya.frame.plugin.zjmaterielsynchronizationevent.entity.ZjMaterielSynchronizationEventEntity;
import com.hzya.frame.plugin.zjmaterielsynchronizationevent.service.IZjMaterielSynchronizationEventService;
import org.springframework.beans.factory.annotation.Autowired;
/***
* 万盛客商档案同步插件
* @content:
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2025-03-03 10:56
* @param
* @return
**/
public class ZjMaterielSynchronizationEventServiceImpl extends BaseService<ZjMaterielSynchronizationEventEntity, String> implements IZjMaterielSynchronizationEventService {
private IZjMaterielSynchronizationEventDao zjMaterielSynchronizationEventDao;
@Autowired
public void setZjMaterielSynchronizationEventDao(IZjMaterielSynchronizationEventDao zjMaterielSynchronizationEventDao) {
this.zjMaterielSynchronizationEventDao = zjMaterielSynchronizationEventDao;
this.dao = zjMaterielSynchronizationEventDao;
}
}