diff --git a/center.manager/src/main/java/com/lyms/cm/controller/sys/SysRemoteController.java b/center.manager/src/main/java/com/lyms/cm/controller/sys/SysRemoteController.java index b6a7277..fc64b2d 100644 --- a/center.manager/src/main/java/com/lyms/cm/controller/sys/SysRemoteController.java +++ b/center.manager/src/main/java/com/lyms/cm/controller/sys/SysRemoteController.java @@ -9,10 +9,10 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; -import com.lyms.sycn.channel.ChannelData; import com.lyms.sync.ParamsAdpter; import com.lyms.sync.SyncHandler; import com.lyms.sync.SyncUtils; +import com.lyms.sync.channel.ChannelData; import com.lyms.web.controller.BaseController; @Controller diff --git a/center.manager/src/main/java/com/lyms/cm/job/SyncFixJob.java b/center.manager/src/main/java/com/lyms/cm/job/SyncFixJob.java index b5ee2c2..6c1e48d 100644 --- a/center.manager/src/main/java/com/lyms/cm/job/SyncFixJob.java +++ b/center.manager/src/main/java/com/lyms/cm/job/SyncFixJob.java @@ -6,12 +6,12 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; -import com.lyms.sycn.channel.ChannelData; import com.lyms.sync.ParamsAdpter; import com.lyms.sync.SyncCallback; import com.lyms.sync.SyncCenter; import com.lyms.sync.SyncHandler; import com.lyms.sync.SyncCenter.Work; +import com.lyms.sync.channel.ChannelData; import com.lyms.util.HttpUtils; import com.lyms.util.JsonUtils; diff --git a/center.manager/src/main/java/com/lyms/cm/job/SyncTmpJob.java b/center.manager/src/main/java/com/lyms/cm/job/SyncTmpJob.java index 33775cf..5c7437e 100644 --- a/center.manager/src/main/java/com/lyms/cm/job/SyncTmpJob.java +++ b/center.manager/src/main/java/com/lyms/cm/job/SyncTmpJob.java @@ -4,10 +4,10 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; -import com.lyms.sycn.channel.ChannelData; import com.lyms.sync.SyncCallback; import com.lyms.sync.SyncCenter; import com.lyms.sync.SyncCenter.Work; +import com.lyms.sync.channel.ChannelData; import com.lyms.util.HttpUtils; import com.lyms.util.JsonUtils; diff --git a/center.manager/src/main/resources/xml/app-timer.xml b/center.manager/src/main/resources/xml/app-timer.xml index 8483291..6552600 100644 --- a/center.manager/src/main/resources/xml/app-timer.xml +++ b/center.manager/src/main/resources/xml/app-timer.xml @@ -15,9 +15,9 @@ - + - - + + \ No newline at end of file diff --git a/center.manager/src/test/java/center/manager/test/user/WorkTest.java b/center.manager/src/test/java/center/manager/test/user/WorkTest.java index 817191c..de85451 100644 --- a/center.manager/src/test/java/center/manager/test/user/WorkTest.java +++ b/center.manager/src/test/java/center/manager/test/user/WorkTest.java @@ -4,9 +4,9 @@ import org.apache.commons.lang3.builder.ToStringBuilder; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; -import com.lyms.sycn.channel.ChannelData; import com.lyms.sync.SyncCallback; import com.lyms.sync.SyncCenter; +import com.lyms.sync.channel.ChannelData; import com.lyms.util.StrUtils; /** diff --git a/core.sdk/src/main/java/com/lyms/sycn/channel/ChannelData.java b/core.sdk/src/main/java/com/lyms/sycn/channel/ChannelData.java deleted file mode 100644 index fa0d710..0000000 --- a/core.sdk/src/main/java/com/lyms/sycn/channel/ChannelData.java +++ /dev/null @@ -1,170 +0,0 @@ -package com.lyms.sycn.channel; - -import java.io.Serializable; - -import org.apache.commons.lang3.StringUtils; - -import com.lyms.util.JsonUtils; -import com.lyms.util.StrUtils; - -/** - *
  • @ClassName: ChannelData - *
  • @Description: 通道实体 - *
  • @author maliang - *
  • @date 2017年3月15日 - *
  • - */ -public class ChannelData implements Serializable { - - /** - */ - private static final long serialVersionUID = -4448732709523865922L; - - public ChannelData() { - this.ts = System.currentTimeMillis(); - }; - - public static ChannelData emtpy() { - return new ChannelData(); - } - - /** - * 数据传输ID - */ - private String id; - - /** - * remote address - */ - private String remote; - - /** - * remote class name - */ - private String remoteClazz; - - /** - * remote method name - */ - private String remoteMethod; - - /** - * remote body json - */ - private String data; - - private Boolean loop = Boolean.FALSE; - - /** - * 是否回执信息 - */ - private Boolean ack = Boolean.FALSE; - - /** - * 创建时间 - */ - private Long ts; - - public ChannelData(String remote, String remoteClazz, String remoteMethod, String data, boolean loop) { - this.id = StrUtils.uuid(); - this.remote = remote; - this.remoteClazz = remoteClazz; - this.remoteMethod = remoteMethod; - this.data = data; - this.ts = System.currentTimeMillis(); - this.loop = loop; - } - - /** - * - * 使用不为空的ID,与业务数据保持一个相同的ID - *

    - * 如果为空将会创建新的ID - * - * @param id - * @param remote - * @param remoteClazz - * @param remoteMethod - * @param data - * {@link ChannelData#toJsonString()} - * @param loop - */ - public ChannelData(String id, String remote, String remoteClazz, String remoteMethod, String data, boolean loop) { - this.id = StringUtils.isBlank(id) ? StrUtils.uuid() : id; - this.remote = remote; - this.remoteClazz = remoteClazz; - this.remoteMethod = remoteMethod; - this.data = data; - this.ts = System.currentTimeMillis(); - this.loop = loop; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getRemote() { - return remote; - } - - public void setRemote(String remote) { - this.remote = remote; - } - - public String getRemoteClazz() { - return remoteClazz; - } - - public void setRemoteClazz(String remoteClazz) { - this.remoteClazz = remoteClazz; - } - - public String getRemoteMethod() { - return remoteMethod; - } - - public void setRemoteMethod(String remoteMethod) { - this.remoteMethod = remoteMethod; - } - - public String getData() { - return data; - } - - public void setData(String data) { - this.data = data; - } - - public Long getTs() { - return ts; - } - - public void setTs(Long ts) { - this.ts = ts; - } - - public Boolean getLoop() { - return loop; - } - - public void setLoop(Boolean loop) { - this.loop = loop; - } - - public Boolean getAck() { - return ack; - } - - public void setAck(Boolean ack) { - this.ack = ack; - } - - public String toJsonString() { - return JsonUtils.beanToJson(this); - } - -} diff --git a/core.sdk/src/main/java/com/lyms/sycn/channel/package-info.java b/core.sdk/src/main/java/com/lyms/sycn/channel/package-info.java deleted file mode 100644 index cd74938..0000000 --- a/core.sdk/src/main/java/com/lyms/sycn/channel/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - *

  • @Title: package-info.java - *
  • @Package com.lyms.sycn.channel - *
  • @Description: TODO(文件描述) - *
  • @author maliang - *
  • @date 2017年3月16日 - */ -/** - *
  • @ClassName: package-info - *
  • @Description: TODO(类描述) - *
  • @author maliang - *
  • @date 2017年3月16日 - *
  • - */ -package com.lyms.sycn.channel; \ No newline at end of file diff --git a/core.sdk/src/main/java/com/lyms/sycn/queue/SycnQueue.java b/core.sdk/src/main/java/com/lyms/sycn/queue/SycnQueue.java deleted file mode 100644 index 125dfde..0000000 --- a/core.sdk/src/main/java/com/lyms/sycn/queue/SycnQueue.java +++ /dev/null @@ -1,198 +0,0 @@ -package com.lyms.sycn.queue; - -import java.io.Serializable; - -import org.springframework.data.redis.core.RedisTemplate; - -import com.lyms.spring.redis.operation.RedisLock; -import com.lyms.sycn.channel.ChannelData; - -/** - *
  • @ClassName: SyncnQueue - *
  • @Description: 数据队列 - *
  • @author maliang - *
  • @date 2017年3月13日 - *
  • - */ -public class SycnQueue { - - public RedisTemplate template; - - /** - * 构建临时任务队列,固定任务队列锁 - *

    - * 区分锁,避免高并发下锁释放的错误 - */ - public static RedisLock Fix_Lock; - - public static RedisLock Tmp_Lock; - - /** - * 针对数据获取的时候添加锁 - */ - private static final String LOCK_TMP_NAME = "TMP_lock"; - - private static final String LOCK_FIXATION_NAME = "FIXATION_lock"; - - /** - * 等待获取锁的时间5 S - */ - private static final Long WAIT_LOCK_TIME = 5000L; - - /** - * 固定任务 - */ - private static final String FIXATION_WORK = "FIXATION_WORK"; - - /** - * 临时任务 - */ - private static final String TMP_WORK = "TMP_WORK"; - - /** - * 回执消息任务 - */ - @Deprecated - private static final String ACK_WORK = "ACK_WORK"; - - public SycnQueue(RedisTemplate template) { - this.template = template; - Fix_Lock = new RedisLock(template); - Tmp_Lock = new RedisLock(template); - } - - /** - *

  • @Description:固定任务 {@link ModelType#GET} - *

    - * 固定任务执行效率跟任务链表的长度有关系 - *

  • @param model - *
  • @return - *
  • 创建人:maliang - *
  • 创建时间:2017年3月13日 - *
  • 修改人: - *
  • 修改时间: - */ - private Boolean pushFixationWork(ChannelData data) { - Long tag = template.opsForList().leftPush(FIXATION_WORK, data); - return tag >= 1; - } - - private ChannelData pullFixationData() { - // 添加锁 - try { - if (Fix_Lock.acquireLock(LOCK_FIXATION_NAME, WAIT_LOCK_TIME)) { - ChannelData obj = (ChannelData) template.opsForList().rightPopAndLeftPush(FIXATION_WORK, FIXATION_WORK); - return obj; - } - } catch (Exception e) { - e.printStackTrace(); - } finally { - try { - if (Fix_Lock != null) { - Fix_Lock.releaseLock(); - } - } catch (Exception e) { - e.printStackTrace(); - } - } - return null; - - } - - /** - *
  • @Description:临时任务 - *

    - * {@link ModelType#ADD ModelType#UPDATE ModelType#DEL} - *

  • @param model - *
  • @return - *
  • 创建人:maliang - *
  • 创建时间:2017年3月13日 - *
  • 修改人: - *
  • 修改时间: - */ - private boolean pushTempWork(ChannelData data) { - Long tag = template.opsForList().leftPush(TMP_WORK, data); - return tag >= 1; - } - - /** - *
  • @Description:临时队列数据弹出 - *
  • @return - *
  • 创建人:maliang - *
  • 创建时间:2017年3月13日 - *
  • 修改人: - *
  • 修改时间: - */ - private ChannelData pullTempData() { - - try { - if (Tmp_Lock.acquireLock(LOCK_TMP_NAME, WAIT_LOCK_TIME)) { - Serializable object = template.opsForList().rightPop(TMP_WORK); - return object != null ? (ChannelData) object : null; - } - } catch (Exception e) { - e.printStackTrace(); - } finally { - if (Tmp_Lock != null) { - try { - Tmp_Lock.releaseLock(); - } catch (Exception e) { - e.printStackTrace(); - } - } - } - return null; - } - - /** - *
  • @Description:将任务信息添加到队列中,任务分为固定任务,临时任务,目前拉取数据的任务为固定任务 - * {@link ModelType#GET} - *
  • @param model - *
  • @return - *
  • 创建人:maliang - *
  • 创建时间:2017年3月13日 - *
  • 修改人: - *
  • 修改时间: - */ - public Boolean push(ChannelData data) { - if (template == null || data == null) - return Boolean.FALSE; - // 设置任务添加时间 - /* - * model.setTs(System.currentTimeMillis()); String modelType = - * model.getType(); if (ModelType.isGet(modelType)) { return - * this.pushFixationWork(model); } else { return - * this.pushTempWork(model); } - */ - boolean loop = data.getLoop(); - return loop ? this.pushFixationWork(data) : this.pushTempWork(data); - } - - /** - *
  • @Description:获取队列中的数据 - *

    - *

  • @param type - *
  • @return - *
  • 创建人:maliang - *
  • 创建时间:2017年3月13日 - *
  • 修改人: - *
  • 修改时间: - */ - public ChannelData pull(boolean loop) { - // boolean loop = data != null && data.getLoop(); - return loop ? this.pullFixationData() : this.pullTempData(); - /* - * if (ModelType.isGet(type)) { return this.pullFixationModel(); } else - * { return this.pullTempModel(); } - */ - } - - public RedisTemplate getTemplate() { - return template; - } - - public void setTemplate(RedisTemplate template) { - this.template = template; - } - -} diff --git a/core.sdk/src/main/java/com/lyms/sycn/queue/package-info.java b/core.sdk/src/main/java/com/lyms/sycn/queue/package-info.java deleted file mode 100644 index 4e71164..0000000 --- a/core.sdk/src/main/java/com/lyms/sycn/queue/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - *
  • @Title: package-info.java - *
  • @Package com.lyms.sycn.queue - *
  • @Description: TODO(文件描述) - *
  • @author maliang - *
  • @date 2017年3月16日 - */ -/** - *
  • @ClassName: package-info - *
  • @Description: TODO(类描述) - *
  • @author maliang - *
  • @date 2017年3月16日 - *
  • - */ -package com.lyms.sycn.queue; \ No newline at end of file diff --git a/core.sdk/src/main/java/com/lyms/sync/SyncCenter.java b/core.sdk/src/main/java/com/lyms/sync/SyncCenter.java index d022959..87cc264 100644 --- a/core.sdk/src/main/java/com/lyms/sync/SyncCenter.java +++ b/core.sdk/src/main/java/com/lyms/sync/SyncCenter.java @@ -3,8 +3,8 @@ package com.lyms.sync; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; -import com.lyms.sycn.channel.ChannelData; -import com.lyms.sycn.queue.SycnQueue; +import com.lyms.sync.channel.ChannelData; +import com.lyms.sync.queue.SycnQueue; import com.lyms.util.HttpUtils; /** diff --git a/core.sdk/src/main/java/com/lyms/sync/SyncHandler.java b/core.sdk/src/main/java/com/lyms/sync/SyncHandler.java index 6ffb7dc..61b809c 100644 --- a/core.sdk/src/main/java/com/lyms/sync/SyncHandler.java +++ b/core.sdk/src/main/java/com/lyms/sync/SyncHandler.java @@ -9,8 +9,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.lyms.spring.SpringContextHolder; -import com.lyms.sycn.channel.ChannelData; import com.lyms.sync.ParamsAdpter.Param; +import com.lyms.sync.channel.ChannelData; import com.lyms.util.JsonUtils; /** diff --git a/core.sdk/src/main/java/com/lyms/sync/SyncUtils.java b/core.sdk/src/main/java/com/lyms/sync/SyncUtils.java index 758c5c3..05aaca5 100644 --- a/core.sdk/src/main/java/com/lyms/sync/SyncUtils.java +++ b/core.sdk/src/main/java/com/lyms/sync/SyncUtils.java @@ -4,7 +4,7 @@ import java.io.ObjectInputStream; import javax.servlet.http.HttpServletRequest; -import com.lyms.sycn.channel.ChannelData; +import com.lyms.sync.channel.ChannelData; /** *
  • @ClassName: SyncUtils diff --git a/core.sdk/src/main/java/com/lyms/sync/channel/ChannelData.java b/core.sdk/src/main/java/com/lyms/sync/channel/ChannelData.java new file mode 100644 index 0000000..e28fae5 --- /dev/null +++ b/core.sdk/src/main/java/com/lyms/sync/channel/ChannelData.java @@ -0,0 +1,170 @@ +package com.lyms.sync.channel; + +import java.io.Serializable; + +import org.apache.commons.lang3.StringUtils; + +import com.lyms.util.JsonUtils; +import com.lyms.util.StrUtils; + +/** + *
  • @ClassName: ChannelData + *
  • @Description: 通道实体 + *
  • @author maliang + *
  • @date 2017年3月15日 + *
  • + */ +public class ChannelData implements Serializable { + + /** + */ + private static final long serialVersionUID = -4448732709523865922L; + + public ChannelData() { + this.ts = System.currentTimeMillis(); + }; + + public static ChannelData emtpy() { + return new ChannelData(); + } + + /** + * 数据传输ID + */ + private String id; + + /** + * remote address + */ + private String remote; + + /** + * remote class name + */ + private String remoteClazz; + + /** + * remote method name + */ + private String remoteMethod; + + /** + * remote body json + */ + private String data; + + private Boolean loop = Boolean.FALSE; + + /** + * 是否回执信息 + */ + private Boolean ack = Boolean.FALSE; + + /** + * 创建时间 + */ + private Long ts; + + public ChannelData(String remote, String remoteClazz, String remoteMethod, String data, boolean loop) { + this.id = StrUtils.uuid(); + this.remote = remote; + this.remoteClazz = remoteClazz; + this.remoteMethod = remoteMethod; + this.data = data; + this.ts = System.currentTimeMillis(); + this.loop = loop; + } + + /** + * + * 使用不为空的ID,与业务数据保持一个相同的ID + *

    + * 如果为空将会创建新的ID + * + * @param id + * @param remote + * @param remoteClazz + * @param remoteMethod + * @param data + * {@link ChannelData#toJsonString()} + * @param loop + */ + public ChannelData(String id, String remote, String remoteClazz, String remoteMethod, String data, boolean loop) { + this.id = StringUtils.isBlank(id) ? StrUtils.uuid() : id; + this.remote = remote; + this.remoteClazz = remoteClazz; + this.remoteMethod = remoteMethod; + this.data = data; + this.ts = System.currentTimeMillis(); + this.loop = loop; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getRemote() { + return remote; + } + + public void setRemote(String remote) { + this.remote = remote; + } + + public String getRemoteClazz() { + return remoteClazz; + } + + public void setRemoteClazz(String remoteClazz) { + this.remoteClazz = remoteClazz; + } + + public String getRemoteMethod() { + return remoteMethod; + } + + public void setRemoteMethod(String remoteMethod) { + this.remoteMethod = remoteMethod; + } + + public String getData() { + return data; + } + + public void setData(String data) { + this.data = data; + } + + public Long getTs() { + return ts; + } + + public void setTs(Long ts) { + this.ts = ts; + } + + public Boolean getLoop() { + return loop; + } + + public void setLoop(Boolean loop) { + this.loop = loop; + } + + public Boolean getAck() { + return ack; + } + + public void setAck(Boolean ack) { + this.ack = ack; + } + + public String toJsonString() { + return JsonUtils.beanToJson(this); + } + +} diff --git a/core.sdk/src/main/java/com/lyms/sync/queue/SycnQueue.java b/core.sdk/src/main/java/com/lyms/sync/queue/SycnQueue.java new file mode 100644 index 0000000..956d1a6 --- /dev/null +++ b/core.sdk/src/main/java/com/lyms/sync/queue/SycnQueue.java @@ -0,0 +1,198 @@ +package com.lyms.sync.queue; + +import java.io.Serializable; + +import org.springframework.data.redis.core.RedisTemplate; + +import com.lyms.spring.redis.operation.RedisLock; +import com.lyms.sync.channel.ChannelData; + +/** + *

  • @ClassName: SyncnQueue + *
  • @Description: 数据队列 + *
  • @author maliang + *
  • @date 2017年3月13日 + *
  • + */ +public class SycnQueue { + + public RedisTemplate template; + + /** + * 构建临时任务队列,固定任务队列锁 + *

    + * 区分锁,避免高并发下锁释放的错误 + */ + public static RedisLock Fix_Lock; + + public static RedisLock Tmp_Lock; + + /** + * 针对数据获取的时候添加锁 + */ + private static final String LOCK_TMP_NAME = "TMP_lock"; + + private static final String LOCK_FIXATION_NAME = "FIXATION_lock"; + + /** + * 等待获取锁的时间5 S + */ + private static final Long WAIT_LOCK_TIME = 5000L; + + /** + * 固定任务 + */ + private static final String FIXATION_WORK = "FIXATION_WORK"; + + /** + * 临时任务 + */ + private static final String TMP_WORK = "TMP_WORK"; + + /** + * 回执消息任务 + */ + @Deprecated + private static final String ACK_WORK = "ACK_WORK"; + + public SycnQueue(RedisTemplate template) { + this.template = template; + Fix_Lock = new RedisLock(template); + Tmp_Lock = new RedisLock(template); + } + + /** + *

  • @Description:固定任务 {@link ModelType#GET} + *

    + * 固定任务执行效率跟任务链表的长度有关系 + *

  • @param model + *
  • @return + *
  • 创建人:maliang + *
  • 创建时间:2017年3月13日 + *
  • 修改人: + *
  • 修改时间: + */ + private Boolean pushFixationWork(ChannelData data) { + Long tag = template.opsForList().leftPush(FIXATION_WORK, data); + return tag >= 1; + } + + private ChannelData pullFixationData() { + // 添加锁 + try { + if (Fix_Lock.acquireLock(LOCK_FIXATION_NAME, WAIT_LOCK_TIME)) { + ChannelData obj = (ChannelData) template.opsForList().rightPopAndLeftPush(FIXATION_WORK, FIXATION_WORK); + return obj; + } + } catch (Exception e) { + e.printStackTrace(); + } finally { + try { + if (Fix_Lock != null) { + Fix_Lock.releaseLock(); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + return null; + + } + + /** + *
  • @Description:临时任务 + *

    + * {@link ModelType#ADD ModelType#UPDATE ModelType#DEL} + *

  • @param model + *
  • @return + *
  • 创建人:maliang + *
  • 创建时间:2017年3月13日 + *
  • 修改人: + *
  • 修改时间: + */ + private boolean pushTempWork(ChannelData data) { + Long tag = template.opsForList().leftPush(TMP_WORK, data); + return tag >= 1; + } + + /** + *
  • @Description:临时队列数据弹出 + *
  • @return + *
  • 创建人:maliang + *
  • 创建时间:2017年3月13日 + *
  • 修改人: + *
  • 修改时间: + */ + private ChannelData pullTempData() { + + try { + if (Tmp_Lock.acquireLock(LOCK_TMP_NAME, WAIT_LOCK_TIME)) { + Serializable object = template.opsForList().rightPop(TMP_WORK); + return object != null ? (ChannelData) object : null; + } + } catch (Exception e) { + e.printStackTrace(); + } finally { + if (Tmp_Lock != null) { + try { + Tmp_Lock.releaseLock(); + } catch (Exception e) { + e.printStackTrace(); + } + } + } + return null; + } + + /** + *
  • @Description:将任务信息添加到队列中,任务分为固定任务,临时任务,目前拉取数据的任务为固定任务 + * {@link ModelType#GET} + *
  • @param model + *
  • @return + *
  • 创建人:maliang + *
  • 创建时间:2017年3月13日 + *
  • 修改人: + *
  • 修改时间: + */ + public Boolean push(ChannelData data) { + if (template == null || data == null) + return Boolean.FALSE; + // 设置任务添加时间 + /* + * model.setTs(System.currentTimeMillis()); String modelType = + * model.getType(); if (ModelType.isGet(modelType)) { return + * this.pushFixationWork(model); } else { return + * this.pushTempWork(model); } + */ + boolean loop = data.getLoop(); + return loop ? this.pushFixationWork(data) : this.pushTempWork(data); + } + + /** + *
  • @Description:获取队列中的数据 + *

    + *

  • @param type + *
  • @return + *
  • 创建人:maliang + *
  • 创建时间:2017年3月13日 + *
  • 修改人: + *
  • 修改时间: + */ + public ChannelData pull(boolean loop) { + // boolean loop = data != null && data.getLoop(); + return loop ? this.pullFixationData() : this.pullTempData(); + /* + * if (ModelType.isGet(type)) { return this.pullFixationModel(); } else + * { return this.pullTempModel(); } + */ + } + + public RedisTemplate getTemplate() { + return template; + } + + public void setTemplate(RedisTemplate template) { + this.template = template; + } + +} diff --git a/core.sdk/src/main/java/com/lyms/util/remote/HttpRemote.java b/core.sdk/src/main/java/com/lyms/util/remote/HttpRemote.java index c26a626..50d226b 100644 --- a/core.sdk/src/main/java/com/lyms/util/remote/HttpRemote.java +++ b/core.sdk/src/main/java/com/lyms/util/remote/HttpRemote.java @@ -11,7 +11,7 @@ import org.apache.http.client.methods.HttpPost; import org.apache.http.client.protocol.HttpClientContext; import org.apache.http.entity.SerializableEntity; -import com.lyms.sycn.channel.ChannelData; +import com.lyms.sync.channel.ChannelData; /** * http,https 远程调用 diff --git a/hospital.web/src/main/java/com/lyms/hospital/controller/RouterController.java b/hospital.web/src/main/java/com/lyms/hospital/controller/RouterController.java index d5b3f04..ff6d4e8 100644 --- a/hospital.web/src/main/java/com/lyms/hospital/controller/RouterController.java +++ b/hospital.web/src/main/java/com/lyms/hospital/controller/RouterController.java @@ -9,10 +9,10 @@ import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import com.lyms.sycn.channel.ChannelData; import com.lyms.sync.ParamsAdpter; import com.lyms.sync.SyncHandler; import com.lyms.sync.SyncUtils; +import com.lyms.sync.channel.ChannelData; import com.lyms.web.controller.BaseController; /** diff --git a/hospital.web/src/main/java/com/lyms/hospital/entity/sys/SyncDataBasic.java b/hospital.web/src/main/java/com/lyms/hospital/entity/sys/SyncDataBasic.java index 08c0aa3..bb0bdda 100644 --- a/hospital.web/src/main/java/com/lyms/hospital/entity/sys/SyncDataBasic.java +++ b/hospital.web/src/main/java/com/lyms/hospital/entity/sys/SyncDataBasic.java @@ -6,7 +6,7 @@ import java.util.Date; import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableName; -import com.lyms.sycn.channel.ChannelData; +import com.lyms.sync.channel.ChannelData; /** * diff --git a/hospital.web/src/main/java/com/lyms/hospital/service/sys/SyncDataBasicService.java b/hospital.web/src/main/java/com/lyms/hospital/service/sys/SyncDataBasicService.java index 67c20f9..338ebec 100644 --- a/hospital.web/src/main/java/com/lyms/hospital/service/sys/SyncDataBasicService.java +++ b/hospital.web/src/main/java/com/lyms/hospital/service/sys/SyncDataBasicService.java @@ -4,7 +4,7 @@ import java.io.Serializable; import java.util.List; import com.lyms.hospital.entity.sys.SyncDataBasic; -import com.lyms.sycn.channel.ChannelData; +import com.lyms.sync.channel.ChannelData; import com.lyms.web.service.BaseService; /** diff --git a/hospital.web/src/main/java/com/lyms/hospital/service/sys/impl/SyncDataBasicServiceImpl.java b/hospital.web/src/main/java/com/lyms/hospital/service/sys/impl/SyncDataBasicServiceImpl.java index 8e3fc73..fd5ebf4 100644 --- a/hospital.web/src/main/java/com/lyms/hospital/service/sys/impl/SyncDataBasicServiceImpl.java +++ b/hospital.web/src/main/java/com/lyms/hospital/service/sys/impl/SyncDataBasicServiceImpl.java @@ -12,7 +12,7 @@ import com.baomidou.mybatisplus.service.impl.ServiceImpl; import com.lyms.hospital.dao.sys.SyncDataBasicMapper; import com.lyms.hospital.entity.sys.SyncDataBasic; import com.lyms.hospital.service.sys.SyncDataBasicService; -import com.lyms.sycn.channel.ChannelData; +import com.lyms.sync.channel.ChannelData; import com.lyms.util.JsonUtils; /**