feat:阶段性代码提交:部分基础配置功能、检测标准、检验委托等
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
package cn.iocoder.yudao.module.jybusiness.enums;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.exception.ErrorCode;
|
||||
|
||||
/**
|
||||
* jy-business 错误码枚举类
|
||||
*
|
||||
* jy-business 系统,使用 1-xxx-xxx-xxx 段
|
||||
*
|
||||
* @author ZT
|
||||
*/
|
||||
public interface ErrorCodeConstants {
|
||||
|
||||
// ========== 示例模块 1-001-000-000 ==========
|
||||
ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package cn.iocoder.yudao.module.qms.api.task;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.module.qms.api.task.dto.QmsBpmDTO;
|
||||
import cn.iocoder.yudao.module.qms.enums.ApiConstants;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
@FeignClient(name = ApiConstants.NAME, fallbackFactory = QmsApiFallback.class)
|
||||
@Tag(name = "RPC 服务 - 检验检测")
|
||||
public interface QmsApi {
|
||||
|
||||
String PREFIX = ApiConstants.PREFIX + "/process-instance";
|
||||
|
||||
@PostMapping(PREFIX + "/updateQmdDataByWf")
|
||||
@Operation(summary = "流程节点触发业务数据改变")
|
||||
CommonResult<JSONObject> bpmCallback(@Valid @RequestBody QmsBpmDTO reqDTO);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package cn.iocoder.yudao.module.qms.api.task;
|
||||
|
||||
import lombok.Setter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
public class QmsApiFallback implements FallbackFactory<QmsApi> {
|
||||
|
||||
@Setter private Throwable cause;
|
||||
@Override
|
||||
public QmsApi create(Throwable cause) {
|
||||
log.error("QMS微服务接口调用失败:{}", cause.getMessage());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package cn.iocoder.yudao.module.qms.api.task.dto;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Schema(description = "RPC 服务 - 流程回调 Request DTO")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class QmsBpmDTO {
|
||||
@Schema(description = "流程实例ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "流程实例ID不能为空")
|
||||
private String processInstanceId;
|
||||
|
||||
@Schema(description = "业务的唯一标识")
|
||||
private String businessKey;
|
||||
|
||||
@Schema(description = "传入数据", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private JSONObject variables;
|
||||
|
||||
@Schema(description = "状态")
|
||||
private String state;
|
||||
|
||||
/* variables,传入业务类型
|
||||
{
|
||||
"beanName": "dataFormService"
|
||||
|
||||
}
|
||||
* */
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package cn.iocoder.yudao.module.qms.enums;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.enums.RpcConstants;
|
||||
|
||||
/**
|
||||
* API 相关的枚举
|
||||
*
|
||||
* @author ZT
|
||||
*/
|
||||
public class ApiConstants {
|
||||
|
||||
/**
|
||||
* 服务名
|
||||
*
|
||||
* 注意,需要保证和 spring.application.name 保持一致
|
||||
*/
|
||||
public static final String NAME = "qms-server";
|
||||
|
||||
public static final String PREFIX = RpcConstants.RPC_API_PREFIX + "/qms";
|
||||
|
||||
public static final String VERSION = "1.0.0";
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,18 +0,0 @@
|
||||
package cn.iocoder.yudao.module.jybusiness;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* JyBusiness 模块的启动类
|
||||
*
|
||||
* @author ZT
|
||||
*/
|
||||
//@SpringBootApplication
|
||||
public class JyBusinessServerApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(JyBusinessServerApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
package cn.iocoder.yudao.module.jybusiness.controller.admin.jybusiness;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
/**
|
||||
* JyBusiness 控制器
|
||||
*
|
||||
* @author ZT
|
||||
*/
|
||||
@Tag(name = "管理后台 - JyBusiness")
|
||||
@RestController
|
||||
@RequestMapping("/admin/jy-business/jy-business")
|
||||
public class JyBusinessController {
|
||||
|
||||
@GetMapping("/hello")
|
||||
@Operation(summary = "Hello JyBusiness")
|
||||
public CommonResult<String> hello() {
|
||||
return success("Hello, JyBusiness!");
|
||||
}
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user