diff --git a/nanopart-server/pom.xml b/nanopart-server/pom.xml
index 2b2f9b27..f2210aca 100644
--- a/nanopart-server/pom.xml
+++ b/nanopart-server/pom.xml
@@ -96,6 +96,18 @@
black-list-service
2.0.0-SNAPSHOT
+
+
+ cn.axzo.nanopart
+ op-api
+ 2.0.0-SNAPSHOT
+
+
+
+ cn.axzo.nanopart
+ op-server
+ 2.0.0-SNAPSHOT
+
diff --git a/op/op-api/pom.xml b/op/op-api/pom.xml
new file mode 100644
index 00000000..ce89d3c9
--- /dev/null
+++ b/op/op-api/pom.xml
@@ -0,0 +1,32 @@
+
+
+ 4.0.0
+
+ cn.axzo.nanopart
+ op
+ ${revision}
+ ../pom.xml
+
+
+ op-api
+ jar
+ op-api
+
+
+
+ org.springframework.cloud
+ spring-cloud-openfeign-core
+
+
+ cn.axzo.framework
+ axzo-common-domain
+
+
+
+ cn.axzo.basics
+ basics-common
+
+
+
diff --git a/op/op-api/src/main/java/cn/axzo/nanopart/api/OpApi.java b/op/op-api/src/main/java/cn/axzo/nanopart/api/OpApi.java
new file mode 100644
index 00000000..53494837
--- /dev/null
+++ b/op/op-api/src/main/java/cn/axzo/nanopart/api/OpApi.java
@@ -0,0 +1,110 @@
+package cn.axzo.nanopart.api;
+
+import cn.axzo.framework.domain.web.result.ApiPageResult;
+import cn.axzo.pokonyan.dao.page.IPageParam;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.experimental.SuperBuilder;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import java.util.Date;
+import java.util.List;
+
+@FeignClient(name = "nanopart", url = "http://nanopart:8080")
+public interface OpApi {
+
+ @PostMapping("/api/op-message-config/page")
+ ApiPageResult page(@RequestBody PageOpMessageConfigReq req);
+
+
+ @SuperBuilder
+ @Data
+ @NoArgsConstructor
+ @AllArgsConstructor
+ class ListOpMessageConfigReq {
+
+ private List ids;
+
+ private Date planStartTimeLE;
+
+ private String status;
+ }
+
+ @SuperBuilder
+ @Data
+ @NoArgsConstructor
+ @AllArgsConstructor
+ class PageOpMessageConfigReq extends ListOpMessageConfigReq implements IPageParam {
+ Integer pageNumber;
+
+ Integer pageSize;
+
+ /**
+ * 排序:使用示例,createTime__DESC
+ */
+ List sort;
+ }
+
+ @Data
+ @Builder
+ @AllArgsConstructor
+ @NoArgsConstructor
+ class OpMessageConfigResp {
+ private Long id;
+
+ /**
+ * im-center服务im_message_task的id
+ */
+ private Long imMessageTaskId;
+
+ /**
+ * 消息名字
+ */
+ private String name;
+
+ /**
+ * 发送者的三方平台账号id
+ */
+ private String sendImAccount;
+
+ /**
+ * 消息接收配置
+ */
+ private JSONObject receiveData;
+
+ private String status;
+
+ private String title;
+
+ private String content;
+
+ private String contentType;
+
+ @TableField(value = "cover_img")
+ private String coverImg;
+
+ private JSONObject jumpData;
+
+ private JSONObject pushData;
+
+ private JSONObject ext;
+
+ private Date planStartTime;
+
+ private Date startedTime;
+
+ private Date finishedTime;
+
+ private Integer isDelete;
+
+ private Date createAt;
+
+ private Date updateAt;
+ }
+}
diff --git a/op/op-api/src/main/java/cn/axzo/nanopart/api/config/NanopartApiAutoConfiguration.java b/op/op-api/src/main/java/cn/axzo/nanopart/api/config/NanopartApiAutoConfiguration.java
new file mode 100644
index 00000000..816d5e34
--- /dev/null
+++ b/op/op-api/src/main/java/cn/axzo/nanopart/api/config/NanopartApiAutoConfiguration.java
@@ -0,0 +1,9 @@
+package cn.axzo.nanopart.api.config;
+
+import cn.axzo.nanopart.api.constant.NanopartConstant;
+import org.springframework.cloud.openfeign.EnableFeignClients;
+
+@EnableFeignClients(NanopartConstant.BASIC_FEIGN_PACKAGE)
+public class NanopartApiAutoConfiguration {
+
+}
diff --git a/op/op-api/src/main/java/cn/axzo/nanopart/api/constant/NanopartConstant.java b/op/op-api/src/main/java/cn/axzo/nanopart/api/constant/NanopartConstant.java
new file mode 100644
index 00000000..24a48010
--- /dev/null
+++ b/op/op-api/src/main/java/cn/axzo/nanopart/api/constant/NanopartConstant.java
@@ -0,0 +1,13 @@
+package cn.axzo.nanopart.api.constant;
+
+/**
+ * @author: chenwenjian
+ * @date: 2023/8/14 9:38
+ * @description:
+ * @modifiedBy:
+ * @version: 1.0
+ */
+public class NanopartConstant {
+
+ public static final String BASIC_FEIGN_PACKAGE = "cn.axzo.nanopart.api";
+}
\ No newline at end of file
diff --git a/op/op-api/src/main/resources/META-INF/spring.factories b/op/op-api/src/main/resources/META-INF/spring.factories
new file mode 100644
index 00000000..bf796ec6
--- /dev/null
+++ b/op/op-api/src/main/resources/META-INF/spring.factories
@@ -0,0 +1,2 @@
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+cn.axzo.nanopart.api.config.NanopartApiAutoConfiguration
\ No newline at end of file
diff --git a/op/op-server/pom.xml b/op/op-server/pom.xml
new file mode 100644
index 00000000..22770c3f
--- /dev/null
+++ b/op/op-server/pom.xml
@@ -0,0 +1,45 @@
+
+ 4.0.0
+
+ cn.axzo.nanopart
+ op
+ ${revision}
+ ../pom.xml
+
+
+ op-server
+ jar
+
+ op-server
+
+
+
+
+ cn.axzo.framework
+ axzo-mybatisplus-spring-boot-starter
+
+
+
+ com.alibaba
+ druid-spring-boot-starter
+
+
+ cn.axzo.basics
+ basics-common
+
+
+ cn.axzo.nanopart
+ op-api
+ 2.0.0-SNAPSHOT
+
+
+ org.springframework.cloud
+ spring-cloud-context
+
+
+ cn.axzo.pokonyan
+ pokonyan
+
+
+
\ No newline at end of file
diff --git a/op/op-server/src/main/java/cn/axzo/op/controller/OpMessageConfigController.java b/op/op-server/src/main/java/cn/axzo/op/controller/OpMessageConfigController.java
new file mode 100644
index 00000000..7a26f031
--- /dev/null
+++ b/op/op-server/src/main/java/cn/axzo/op/controller/OpMessageConfigController.java
@@ -0,0 +1,33 @@
+package cn.axzo.op.controller;
+
+import cn.axzo.framework.domain.web.result.ApiPageResult;
+import cn.axzo.nanopart.api.OpApi;
+import cn.axzo.op.domain.OpMessageConfig;
+import cn.axzo.op.service.OpMessageConfigService;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+public class OpMessageConfigController implements OpApi {
+
+ @Autowired
+ private OpMessageConfigService opMessageConfigService;
+
+ @Override
+ public ApiPageResult page(PageOpMessageConfigReq param) {
+ OpMessageConfigService.PageOpMessageConfigParam pageOpMessageConfigParam = OpMessageConfigService.PageOpMessageConfigParam.builder().build();
+ BeanUtils.copyProperties(param, pageOpMessageConfigParam);
+
+ Page page = opMessageConfigService.page(pageOpMessageConfigParam);
+
+ return ApiPageResult.ok(page.convert(record -> {
+ OpMessageConfigResp opMessageConfigResp = OpMessageConfigResp.builder().build();
+ BeanUtils.copyProperties(record, opMessageConfigResp);
+ return opMessageConfigResp;
+ }));
+ }
+
+
+}
diff --git a/op/op-server/src/main/java/cn/axzo/op/domain/OpMessageConfig.java b/op/op-server/src/main/java/cn/axzo/op/domain/OpMessageConfig.java
new file mode 100644
index 00000000..939b6f60
--- /dev/null
+++ b/op/op-server/src/main/java/cn/axzo/op/domain/OpMessageConfig.java
@@ -0,0 +1,100 @@
+package cn.axzo.op.domain;
+
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+import lombok.experimental.SuperBuilder;
+
+import java.util.Date;
+
+@Data
+@SuperBuilder
+@Accessors(chain = true)
+@NoArgsConstructor
+@AllArgsConstructor
+@TableName(value = "`op_message_config`", autoResultMap = true)
+public class OpMessageConfig {
+
+ @TableId(type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * im-center服务im_message_task的id
+ */
+ @TableField(value = "im_message_task_id")
+ private Long imMessageTaskId;
+
+ /**
+ * 消息名字
+ */
+ @TableField(value = "name")
+ private String name;
+
+ /**
+ * 发送者的三方平台账号id
+ */
+ @TableField(value = "send_im_account")
+ private String sendImAccount;
+
+ /**
+ * 消息接收配置
+ */
+ @TableField(typeHandler = FastjsonTypeHandler.class)
+ private JSONObject receiveData;
+
+ private Status status;
+
+ @TableField(value = "title")
+ private String title;
+
+ @TableField(value = "content")
+ private String content;
+
+ @TableField(value = "content_type")
+ private String contentType;
+
+ @TableField(value = "cover_img")
+ private String coverImg;
+
+ @TableField(typeHandler = FastjsonTypeHandler.class)
+ private JSONObject jumpData;
+
+ @TableField(typeHandler = FastjsonTypeHandler.class)
+ private JSONObject pushData;
+
+ @TableField(typeHandler = FastjsonTypeHandler.class)
+ private JSONObject ext;
+
+ @TableField
+ private Date planStartTime;
+
+ @TableField
+ private Date startedTime;
+
+ @TableField
+ private Date finishedTime;
+
+ @TableField
+ private Integer isDelete;
+
+ @TableField
+ private Date createAt;
+
+ @TableField
+ private Date updateAt;
+
+ public enum Status {
+ DRAFT,
+ PENDING,
+ RUNNING,
+ COMPLETED,
+ ;
+ }
+}
diff --git a/op/op-server/src/main/java/cn/axzo/op/mapper/OpMessageConfigMapper.java b/op/op-server/src/main/java/cn/axzo/op/mapper/OpMessageConfigMapper.java
new file mode 100644
index 00000000..abd0d8ba
--- /dev/null
+++ b/op/op-server/src/main/java/cn/axzo/op/mapper/OpMessageConfigMapper.java
@@ -0,0 +1,9 @@
+package cn.axzo.op.mapper;
+
+import cn.axzo.op.domain.OpMessageConfig;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface OpMessageConfigMapper extends BaseMapper {
+}
diff --git a/op/op-server/src/main/java/cn/axzo/op/service/OpMessageConfigService.java b/op/op-server/src/main/java/cn/axzo/op/service/OpMessageConfigService.java
new file mode 100644
index 00000000..f0237771
--- /dev/null
+++ b/op/op-server/src/main/java/cn/axzo/op/service/OpMessageConfigService.java
@@ -0,0 +1,57 @@
+package cn.axzo.op.service;
+
+import cn.axzo.nanopart.api.OpApi;
+import cn.axzo.op.domain.OpMessageConfig;
+import cn.axzo.pokonyan.dao.page.IPageParam;
+import cn.axzo.pokonyan.dao.wrapper.CriteriaField;
+import cn.axzo.pokonyan.dao.wrapper.Operator;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.IService;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.experimental.SuperBuilder;
+
+import java.lang.annotation.Native;
+import java.util.Date;
+import java.util.List;
+
+public interface OpMessageConfigService extends IService {
+
+ Page page(PageOpMessageConfigParam param);
+
+ @SuperBuilder
+ @Data
+ @NoArgsConstructor
+ @AllArgsConstructor
+ class ListOpMessageConfigParam {
+
+ @CriteriaField(field = "id", operator = Operator.IN)
+ private List ids;
+
+ @CriteriaField(field = "planStartTime", operator = Operator.LE)
+ private Date planStartTimeLE;
+
+ @CriteriaField(field = "status", operator = Operator.EQ)
+ private OpMessageConfig.Status status;
+ }
+
+ @SuperBuilder
+ @Data
+ @NoArgsConstructor
+ @AllArgsConstructor
+ class PageOpMessageConfigParam extends ListOpMessageConfigParam implements IPageParam {
+ @CriteriaField(ignore = true)
+ Integer pageNumber;
+
+ @CriteriaField(ignore = true)
+ Integer pageSize;
+
+ /**
+ * 排序:使用示例,createTime__DESC
+ */
+ @CriteriaField(ignore = true)
+ List sort;
+ }
+
+}
diff --git a/op/op-server/src/main/java/cn/axzo/op/service/impl/OpMessageConfigServiceImpl.java b/op/op-server/src/main/java/cn/axzo/op/service/impl/OpMessageConfigServiceImpl.java
new file mode 100644
index 00000000..ebcba4e6
--- /dev/null
+++ b/op/op-server/src/main/java/cn/axzo/op/service/impl/OpMessageConfigServiceImpl.java
@@ -0,0 +1,26 @@
+package cn.axzo.op.service.impl;
+
+import cn.axzo.op.domain.OpMessageConfig;
+import cn.axzo.op.mapper.OpMessageConfigMapper;
+import cn.axzo.op.service.OpMessageConfigService;
+import cn.axzo.pokonyan.dao.converter.PageConverter;
+import cn.axzo.pokonyan.dao.mysql.QueryWrapperHelper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+@Slf4j
+@Service
+public class OpMessageConfigServiceImpl extends ServiceImpl
+ implements OpMessageConfigService {
+
+ @Override
+ public Page page(PageOpMessageConfigParam param) {
+ QueryWrapper wrapper = QueryWrapperHelper.fromBean(param, OpMessageConfig.class);
+ wrapper.eq("is_delete", 0);
+
+ return this.page(PageConverter.convertToMybatis(param, OpMessageConfig.class), wrapper);
+ }
+}
diff --git a/op/op-server/src/test/resources/mysql/schema.sql b/op/op-server/src/test/resources/mysql/schema.sql
new file mode 100644
index 00000000..e768549c
--- /dev/null
+++ b/op/op-server/src/test/resources/mysql/schema.sql
@@ -0,0 +1,25 @@
+
+CREATE TABLE IF NOT EXISTS op_message_config
+(
+ id bigint auto_increment comment '主键',
+ im_message_task_id bigint null comment 'im-center服务im_message_task的id',
+ `name` varchar(50) not null comment '消息名字',
+ send_im_account varchar(100) not null comment '发送者的三方平台账号id',
+ receive_data json not null comment '消息接收配置',
+ status varchar(32) not null default 'DRAFT' comment '消息状态:DRAFT、PENDING、RUNNING、COMPLETED',
+ title varchar(128) not null default '' comment '消息标题',
+ content varchar(512) not null default '' comment '消息内容',
+ content_type varchar(32) not null comment '消息形式:IMAGE_TEXT_SAMPLE',
+ cover_img varchar(512) not null default '' comment '消息封面大图',
+ jump_data json comment '跳转配置',
+ push_data json comment 'push配置',
+ ext varchar(1024) not null default '{}' COMMENT '其它额外信息',
+ plan_start_time DATETIME(3) not null comment '任务计划开始时间,时间大于改时间会对未完成的任务进行执行操作',
+ started_time DATETIME(3) null comment '实际开始时间',
+ finished_time DATETIME(3) null comment '实际完成时间',
+ is_delete tinyint default 0 not null comment '未删除0,删除1',
+ create_at datetime default CURRENT_TIMESTAMP not null comment '创建时间',
+ update_at datetime default CURRENT_TIMESTAMP not null comment '更新时间',
+ PRIMARY KEY (`id`)
+ ) ENGINE = InnoDB
+ DEFAULT CHARSET = utf8 comment '运营消息配置';
\ No newline at end of file
diff --git a/op/pom.xml b/op/pom.xml
new file mode 100644
index 00000000..8ec4c801
--- /dev/null
+++ b/op/pom.xml
@@ -0,0 +1,25 @@
+
+ 4.0.0
+
+ cn.axzo.nanopart
+ nanopart
+ ${revision}
+ ../pom.xml
+
+
+ op
+ pom
+
+ op
+
+
+ op-api
+ op-server
+
+
+
+
+
+
+
diff --git a/pom.xml b/pom.xml
index 964c6818..783f4ea1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -31,6 +31,7 @@
nanopart-server
config
job
+ op