4-25 代码提交 todo
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.yxt.demo.system.api.sys_role;
|
||||
|
||||
import com.yxt.demo.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -11,10 +12,10 @@ import lombok.Data;
|
||||
@Data
|
||||
public class SysRole extends BaseEntity {
|
||||
private static final long serialVersionUID = -1613625558809353237L;
|
||||
|
||||
@ApiModelProperty("角色名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("排序")
|
||||
private int sort;
|
||||
|
||||
@ApiModelProperty("角色类型")
|
||||
private int type;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.yxt.demo.system.api.sys_role;
|
||||
|
||||
import com.yxt.demo.common.core.dto.Dto;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* @Author dimengzhe
|
||||
* @Date 2023/4/24 11:28
|
||||
* @Description
|
||||
*/
|
||||
@Data
|
||||
public class SysRoleDto implements Dto {
|
||||
private static final long serialVersionUID = 2068661415449582838L;
|
||||
|
||||
@ApiModelProperty("角色名称")
|
||||
@NotBlank(message = "角色名称不能为空")
|
||||
private String name;
|
||||
@ApiModelProperty("排序")
|
||||
private int sort;
|
||||
@ApiModelProperty("角色类型")
|
||||
@NotBlank(message = "角色类型不能为空")
|
||||
private int type;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,9 +1,28 @@
|
||||
package com.yxt.demo.system.api.sys_role;
|
||||
|
||||
import com.yxt.demo.common.core.result.ResultBean;
|
||||
import com.yxt.demo.system.api.sys_user.SysUserDto;
|
||||
import com.yxt.demo.system.api.sys_user.SysUserFeignFallback;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
/**
|
||||
* @Author dimengzhe
|
||||
* @Date 2023/4/24 14:27
|
||||
* @Description
|
||||
*/
|
||||
@Api(tags = "角色表")
|
||||
@FeignClient(
|
||||
contextId = "demo-system-SysRole",
|
||||
name = "demo-system",
|
||||
path = "v1/sysrole",
|
||||
fallback = SysRoleFeignFallback.class)
|
||||
public interface SysRoleFeign {
|
||||
|
||||
@ApiOperation(value = "添加角色")
|
||||
@PostMapping("/addRole")
|
||||
ResultBean addRole(@RequestBody SysRole sysRole);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.yxt.demo.system.api.sys_role;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @Author dimengzhe
|
||||
* @Date 2023/4/24 11:28
|
||||
* @Description
|
||||
*/
|
||||
@Component
|
||||
public class SysRoleFeignFallback {
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.yxt.demo.system.api.sys_score;
|
||||
|
||||
import com.yxt.demo.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -11,10 +12,10 @@ import lombok.Data;
|
||||
@Data
|
||||
public class SysScore extends BaseEntity {
|
||||
private static final long serialVersionUID = -1676424079241884880L;
|
||||
|
||||
@ApiModelProperty("类别")
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty("类别Key")
|
||||
private String typeKey;
|
||||
|
||||
@ApiModelProperty("成绩")
|
||||
private String score;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.yxt.demo.system.api.sys_score;
|
||||
|
||||
import com.yxt.demo.common.core.dto.Dto;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* @author shkstart
|
||||
* @create 2023-04-25-16:07
|
||||
*/
|
||||
@Data
|
||||
public class SysScoreDto implements Dto {
|
||||
|
||||
@ApiModelProperty("类别")
|
||||
@NotBlank(message = "类别不能为空")
|
||||
private String type;
|
||||
@ApiModelProperty("类别Key")
|
||||
@NotBlank(message = "类别Key不能为空")
|
||||
private String typeKey;
|
||||
@ApiModelProperty("成绩")
|
||||
private String score;
|
||||
}
|
||||
@@ -1,9 +1,32 @@
|
||||
package com.yxt.demo.system.api.sys_score;
|
||||
|
||||
import com.yxt.demo.common.core.result.ResultBean;
|
||||
import com.yxt.demo.system.api.sys_user.SysUserDto;
|
||||
import com.yxt.demo.system.api.sys_user.SysUserFeignFallback;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
/**
|
||||
* @Author dimengzhe
|
||||
* @Date 2023/4/24 14:28
|
||||
* @Description
|
||||
*/
|
||||
@Api(tags = "用户表")
|
||||
@FeignClient(
|
||||
contextId = "demo-system-SysScore",
|
||||
name = "demo-system",
|
||||
path = "v1/sysscore",
|
||||
fallback = SysScoreFeignFallback.class)
|
||||
public interface SysScoreFeign {
|
||||
|
||||
@ApiOperation(value = "查询成绩")
|
||||
@PostMapping("/save")
|
||||
ResultBean save(@RequestBody SysScoreDto sysScoreDto);
|
||||
|
||||
@ApiOperation(value = "成绩修改")
|
||||
@PostMapping("/update")
|
||||
ResultBean alterById(@RequestBody SysScore sysScore);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.yxt.demo.system.api.sys_score;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author shkstart
|
||||
* @create 2023-04-25-16:10
|
||||
*/
|
||||
@Component
|
||||
public class SysScoreFeignFallback {
|
||||
}
|
||||
Reference in New Issue
Block a user