Commit a0eb8c12 by Ren Ping

feat:增加新增消息feign接口

1 parent 149ddb2d
......@@ -27,12 +27,12 @@ import org.springframework.scheduling.annotation.EnableScheduling;
*/
@SpringBootApplication
@EnableScheduling
@EnableFeignClients(basePackages = {"com.dituhui.pea.user"})
@EnableFeignClients(basePackages = {"com.dituhui.pea.user", "com.dituhui.pea.msg"})
@Import(cn.hutool.extra.spring.SpringUtil.class)
public class DispatchServiceApplication {
public static void main(String[] args) {
SpringApplication.run(DispatchServiceApplication.class, args);
}
public static void main(String[] args) {
SpringApplication.run(DispatchServiceApplication.class, args);
}
}
......@@ -3,7 +3,7 @@ server:
dispatch:
cron:
expr: 0 20 8-23 * * ?
expr: 0 58 8-23 * * ?
next-day-limit: 2
scheduler:
......
package com.dituhui.pea.msg;
import com.dituhui.pea.common.Result;
import com.dituhui.pea.pojo.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
/**
* 角色相关接口
*/
@FeignClient(value = "project-order", contextId = "msg")
public interface IMsg {
/**
* 新增消息
*
* @param dto 消息
* @return
*/
@PostMapping(value = "/pea-order/msg/add")
public Result<Boolean> add(@RequestBody @Valid MsgDTO dto);
}
package com.dituhui.pea.pojo;
import lombok.Data;
@Data
public class MsgDTO {
/**
* 大区ID(大区Id、分部Id、分组Id只需传一个)
*/
private String clusterId;
/**
* 分部ID
*/
private String branchId;
/**
* 小组ID
*/
private String groupId;
/**
* 消息类型,0:派工类,1:服务类,2:容量类
*/
private Integer type;
/**
* 消息内容
*/
private String content;
/**
* 单号集合,以“、”连接
*/
private String orderIds;
/**
* 标签类型,0:紧急,1:正常
*/
private Integer tag;
/**
* 容量所属图层 ID
*/
private String capacityLayerId;
/**
* 容量所属日期
*/
private String capacityDate;
}
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!