接口
This commit is contained in:
@@ -20,4 +20,6 @@ public class DictCommon extends BaseEntity {
|
||||
private String dictKey;
|
||||
@ApiModelProperty("value")
|
||||
private String dictValue;
|
||||
@ApiModelProperty("父级sid")
|
||||
private String parentSid;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.yxt.demo.system.api.dict_common;
|
||||
|
||||
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 15:34
|
||||
* @Description
|
||||
*/
|
||||
@Data
|
||||
public class DictCommonDto implements Dto {
|
||||
|
||||
private String sid;
|
||||
|
||||
@ApiModelProperty(value = "数据项值", required = true)
|
||||
@NotBlank(message = "数据项值不能为空")
|
||||
private String dictKey;
|
||||
|
||||
@ApiModelProperty(value = "数据类型", required = true)
|
||||
@NotBlank(message = "数据类型不能为空")
|
||||
private String dictType;
|
||||
|
||||
@ApiModelProperty(value = "数据项相对应的value值", required = true)
|
||||
@NotBlank(message = "数据项相对应的value值不能为空")
|
||||
private String dictValue;
|
||||
|
||||
@ApiModelProperty(value = "数据项的父级sid", required = true)
|
||||
@NotBlank(message = "数据项的父级sid不能为空")
|
||||
private String parentSid;
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.yxt.demo.system.api.dict_common;
|
||||
|
||||
import com.yxt.demo.common.core.query.PagerQuery;
|
||||
import com.yxt.demo.common.core.result.ResultBean;
|
||||
import com.yxt.demo.common.core.vo.PagerVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author dimengzhe
|
||||
* @Date 2023/4/24 14:16
|
||||
* @Description
|
||||
*/
|
||||
@Api(tags = "数据字典数据项")
|
||||
@FeignClient(
|
||||
contextId = "demo-system-DictCommon",
|
||||
name = "demo-system",
|
||||
path = "v1/DictCommon",
|
||||
fallback = DictCommonFeignFallback.class)
|
||||
public interface DictCommonFeign {
|
||||
|
||||
@PostMapping(value = "/save")
|
||||
@ApiOperation(value = "数据字典数据项保存")
|
||||
ResultBean save(@Valid @RequestBody DictCommonDto dictCommonDto);
|
||||
|
||||
@DeleteMapping("/delete/{sid}")
|
||||
@ApiOperation(value = "删除")
|
||||
ResultBean delete(@ApiParam(value = "数据项sid", required = true) @PathVariable("sid") String sid);
|
||||
|
||||
@PostMapping("/pageList")
|
||||
@ApiOperation(value = "数据字典数据项分页列表")
|
||||
ResultBean<PagerVo<DictCommonVo>> pageList(@RequestBody PagerQuery<DictCommonQuery> pagerQuery);
|
||||
|
||||
@GetMapping("/typeValues")
|
||||
@ApiOperation("下拉框的获取")
|
||||
ResultBean<List<DictCommonVo>> getTypeValues(@RequestParam("type") String type, @RequestParam(value = "psid", defaultValue = "0") String psid);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.yxt.demo.system.api.dict_common;
|
||||
|
||||
/**
|
||||
* @Author dimengzhe
|
||||
* @Date 2023/4/24 14:46
|
||||
* @Description
|
||||
*/
|
||||
public class DictCommonFeignFallback {
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.yxt.demo.system.api.dict_common;
|
||||
|
||||
import com.yxt.demo.common.core.query.Query;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author dimengzhe
|
||||
* @Date 2023/4/24 16:20
|
||||
* @Description
|
||||
*/
|
||||
@Data
|
||||
public class DictCommonQuery implements Query {
|
||||
private static final long serialVersionUID = 6235063340152975098L;
|
||||
|
||||
@ApiModelProperty(value = "数据字典条目key", required = false)
|
||||
private String dictKey;
|
||||
|
||||
@ApiModelProperty(value = "数据字典文本", required = false)
|
||||
private String dictValue;
|
||||
|
||||
@ApiModelProperty(value = "dictType")
|
||||
private String dictType;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.yxt.demo.system.api.dict_common;
|
||||
|
||||
import com.yxt.demo.common.core.query.Query;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2021/9/30 15:33
|
||||
* @description 下拉框条件
|
||||
*/
|
||||
@Data
|
||||
public class DictCommonTypeQuery implements Query {
|
||||
private static final long serialVersionUID = 139959085226402464L;
|
||||
|
||||
@ApiModelProperty(value = "数据字典类型", required = true)
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "psid", required = false, example = "0")
|
||||
private String psid;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.yxt.demo.system.api.dict_common;
|
||||
|
||||
import com.yxt.demo.common.core.vo.Vo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author dimengzhe
|
||||
* @Date 2023/4/24 16:19
|
||||
* @Description
|
||||
*/
|
||||
@Data
|
||||
public class DictCommonVo implements Vo {
|
||||
|
||||
private static final long serialVersionUID = 5516430679944504663L;
|
||||
@ApiModelProperty(value = "数据字典项key")
|
||||
private String dictKey;
|
||||
|
||||
@ApiModelProperty(value = "数据字典类型")
|
||||
private String dictType;
|
||||
|
||||
@ApiModelProperty(value = "数据字典项名称")
|
||||
private String dictValue;
|
||||
@ApiModelProperty(value = "父级sid:0为第一级")
|
||||
private String parentSid;
|
||||
|
||||
private String sid;
|
||||
|
||||
}
|
||||
@@ -17,8 +17,4 @@ public class DictType extends BaseEntity {
|
||||
private String dictTypeCode;
|
||||
@ApiModelProperty("类型名称")
|
||||
private String dictTypeName;
|
||||
@ApiModelProperty("级别")
|
||||
private String dictTypeLevel;
|
||||
@ApiModelProperty("名称")
|
||||
private String name;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.yxt.demo.system.api.dict_type;
|
||||
|
||||
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 16:48
|
||||
* @Description
|
||||
*/
|
||||
@Data
|
||||
public class DictTypeDto implements Dto {
|
||||
private static final long serialVersionUID = -7638091202643596231L;
|
||||
|
||||
@ApiModelProperty(value = "类型代码", required = true)
|
||||
@NotBlank(message = "类型代码不能为空")
|
||||
private String dictTypeCode;
|
||||
|
||||
@ApiModelProperty(value = "类型名称", required = true)
|
||||
@NotBlank(message = "类型名称不能为空")
|
||||
private String dictTypeName;
|
||||
|
||||
@ApiModelProperty(value = "类型说明", required = false)
|
||||
private String remarks;
|
||||
|
||||
private String sid;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.yxt.demo.system.api.dict_type;
|
||||
|
||||
import com.yxt.demo.common.core.query.PagerQuery;
|
||||
import com.yxt.demo.common.core.result.ResultBean;
|
||||
import com.yxt.demo.common.core.vo.PagerVo;
|
||||
import com.yxt.demo.system.api.dict_common.DictCommonFeignFallback;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* @Author dimengzhe
|
||||
* @Date 2023/4/24 14:21
|
||||
* @Description
|
||||
*/
|
||||
@Api(tags = "数据字典数据项")
|
||||
@FeignClient(
|
||||
contextId = "demo-system-DictType",
|
||||
name = "demo-system",
|
||||
path = "v1/DictType",
|
||||
fallback = DictTypeFeignFallback.class)
|
||||
public interface DictTypeFeign {
|
||||
|
||||
@PostMapping(value = "/save")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "数据字典类型保存")
|
||||
ResultBean save(@Valid @RequestBody DictTypeDto dictTypeDto);
|
||||
|
||||
@PostMapping("/pageList")
|
||||
@ApiOperation(value = "数据字典类型分页列表")
|
||||
ResultBean<PagerVo<DictTypeVo>> pageList(@RequestBody PagerQuery<DictTypeQuery> pagerQuery);
|
||||
|
||||
@DeleteMapping("/delete/{sid}")
|
||||
@ApiOperation(value = "数据字典类型删除")
|
||||
ResultBean delete(@ApiParam(value = "sid", required = true) @PathVariable("sid") String sid);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.yxt.demo.system.api.dict_type;
|
||||
|
||||
/**
|
||||
* @Author dimengzhe
|
||||
* @Date 2023/4/24 14:47
|
||||
* @Description
|
||||
*/
|
||||
public class DictTypeFeignFallback {
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.yxt.demo.system.api.dict_type;
|
||||
|
||||
import com.yxt.demo.common.core.query.Query;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author dimengzhe
|
||||
* @Date 2023/4/24 17:15
|
||||
* @Description
|
||||
*/
|
||||
@Data
|
||||
public class DictTypeQuery implements Query {
|
||||
|
||||
@ApiModelProperty(value = "数据字典code", required = false)
|
||||
private String dictTypeCode;
|
||||
|
||||
@ApiModelProperty(value = "数据分类名称", required = false)
|
||||
private String dictTypeName;
|
||||
|
||||
@ApiModelProperty(value = "说明", required = false)
|
||||
private String remarks;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.yxt.demo.system.api.dict_type;
|
||||
|
||||
import com.yxt.demo.common.core.vo.Vo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author dimengzhe
|
||||
* @Date 2023/4/24 17:16
|
||||
* @Description
|
||||
*/
|
||||
@Data
|
||||
public class DictTypeVo implements Vo {
|
||||
private static final long serialVersionUID = -3404457483419237424L;
|
||||
|
||||
@ApiModelProperty(value = "数据类型sid")
|
||||
private String sid;
|
||||
|
||||
@ApiModelProperty(value = "类型代码")
|
||||
private String dictTypeCode;
|
||||
|
||||
@ApiModelProperty(value = "类型名称")
|
||||
private String dictTypeName;
|
||||
|
||||
@ApiModelProperty(value = "说明")
|
||||
private String remarks;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.yxt.demo.system.api.sys_forum;
|
||||
|
||||
import com.yxt.demo.system.api.dict_type.DictTypeFeignFallback;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
|
||||
/**
|
||||
* @Author dimengzhe
|
||||
* @Date 2023/4/24 14:21
|
||||
* @Description
|
||||
*/
|
||||
@Api(tags = "论坛")
|
||||
@FeignClient(
|
||||
contextId = "demo-system-SysForum",
|
||||
name = "demo-system",
|
||||
path = "v1/sysforum",
|
||||
fallback = SysForumFeignFallback.class)
|
||||
public interface SysForumFeign {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.yxt.demo.system.api.sys_forum;
|
||||
|
||||
/**
|
||||
* @Author dimengzhe
|
||||
* @Date 2023/4/24 14:47
|
||||
* @Description
|
||||
*/
|
||||
public class SysForumFeignFallback {
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.yxt.demo.system.api.sys_forum_comment;
|
||||
|
||||
import com.yxt.demo.system.api.sys_forum.SysForumFeignFallback;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
|
||||
/**
|
||||
* @Author dimengzhe
|
||||
* @Date 2023/4/24 14:22
|
||||
* @Description
|
||||
*/
|
||||
@Api(tags = "论坛评论")
|
||||
@FeignClient(
|
||||
contextId = "demo-system-SysForumComment",
|
||||
name = "demo-system",
|
||||
path = "v1/SysForumComment",
|
||||
fallback = SysForumCommentFeignFallback.class)
|
||||
public interface SysForumCommentFeign {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.yxt.demo.system.api.sys_forum_comment;
|
||||
|
||||
/**
|
||||
* @Author dimengzhe
|
||||
* @Date 2023/4/24 15:25
|
||||
* @Description
|
||||
*/
|
||||
public class SysForumCommentFeignFallback {
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.yxt.demo.system.api.sys_info;
|
||||
|
||||
import com.yxt.demo.system.api.sys_user.SysUserFeignFallback;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
|
||||
/**
|
||||
* @Author dimengzhe
|
||||
* @Date 2023/4/24 11:50
|
||||
* @Description
|
||||
*/
|
||||
@Api(tags = "基础信息")
|
||||
@FeignClient(
|
||||
contextId = "demo-system-SysInfo",
|
||||
name = "demo-system",
|
||||
path = "v1/sysinfo",
|
||||
fallback = SysInfoFeignFallback.class)
|
||||
public interface SysInfoFeign {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.yxt.demo.system.api.sys_info;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @Author dimengzhe
|
||||
* @Date 2023/4/24 11:53
|
||||
* @Description
|
||||
*/
|
||||
@Component
|
||||
public class SysInfoFeignFallback {
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.yxt.demo.system.api.sys_menu;
|
||||
|
||||
import com.yxt.demo.system.api.sys_info.SysInfoFeignFallback;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
|
||||
/**
|
||||
* @Author dimengzhe
|
||||
* @Date 2023/4/24 14:08
|
||||
* @Description
|
||||
*/
|
||||
@Api(tags = "菜单表")
|
||||
@FeignClient(
|
||||
contextId = "demo-system-SysMenu",
|
||||
name = "demo-system",
|
||||
path = "v1/sysmenu",
|
||||
fallback = SysMenuFeignFallback.class)
|
||||
public interface SysMenuFeign {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.yxt.demo.system.api.sys_menu;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @Author dimengzhe
|
||||
* @Date 2023/4/24 14:09
|
||||
* @Description
|
||||
*/
|
||||
@Component
|
||||
public class SysMenuFeignFallback {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.yxt.demo.system.api.sys_notice;
|
||||
|
||||
/**
|
||||
* @Author dimengzhe
|
||||
* @Date 2023/4/24 14:23
|
||||
* @Description
|
||||
*/
|
||||
public interface SysNoticeFeign {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.yxt.demo.system.api.sys_plan;
|
||||
|
||||
/**
|
||||
* @Author dimengzhe
|
||||
* @Date 2023/4/24 14:24
|
||||
* @Description
|
||||
*/
|
||||
public interface SysPlanFeign {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.yxt.demo.system.api.sys_plan_schedule;
|
||||
|
||||
/**
|
||||
* @Author dimengzhe
|
||||
* @Date 2023/4/24 14:25
|
||||
* @Description
|
||||
*/
|
||||
public interface SysPlanScheduleFeign {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.yxt.demo.system.api.sys_resources;
|
||||
|
||||
/**
|
||||
* @Author dimengzhe
|
||||
* @Date 2023/4/24 14:26
|
||||
* @Description
|
||||
*/
|
||||
public interface SysResourcesFeign {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.yxt.demo.system.api.sys_role;
|
||||
|
||||
/**
|
||||
* @Author dimengzhe
|
||||
* @Date 2023/4/24 14:27
|
||||
* @Description
|
||||
*/
|
||||
public interface SysRoleFeign {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.yxt.demo.system.api.sys_score;
|
||||
|
||||
/**
|
||||
* @Author dimengzhe
|
||||
* @Date 2023/4/24 14:28
|
||||
* @Description
|
||||
*/
|
||||
public interface SysScoreFeign {
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.yxt.demo.system.api.sys_student_score;
|
||||
|
||||
import com.yxt.demo.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -12,21 +13,22 @@ import lombok.Data;
|
||||
public class SysStudentScore extends BaseEntity {
|
||||
private static final long serialVersionUID = -3123378722999542918L;
|
||||
|
||||
@ApiModelProperty("类别")
|
||||
private String type;
|
||||
|
||||
private String typeKey;
|
||||
|
||||
@ApiModelProperty("学号")
|
||||
private String studentNo;
|
||||
|
||||
@ApiModelProperty("四级")
|
||||
private String fourScore;
|
||||
|
||||
@ApiModelProperty("六级")
|
||||
private String sixScore;
|
||||
|
||||
@ApiModelProperty("计算机成绩")
|
||||
private String computerScore;
|
||||
|
||||
@ApiModelProperty("是否就业:1是,0否")
|
||||
private int employment;
|
||||
|
||||
@ApiModelProperty("是否升学")
|
||||
private int enterSchool;
|
||||
|
||||
@ApiModelProperty("是否考公通过")
|
||||
private int kaoGong;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.yxt.demo.system.api.sys_student_score;
|
||||
|
||||
/**
|
||||
* @Author dimengzhe
|
||||
* @Date 2023/4/24 14:29
|
||||
* @Description
|
||||
*/
|
||||
public interface SysStudentScoreFeign {
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.yxt.demo.system.api.sys_user;
|
||||
|
||||
import com.yxt.demo.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -11,15 +12,18 @@ import lombok.Data;
|
||||
@Data
|
||||
public class SysUser extends BaseEntity {
|
||||
private static final long serialVersionUID = -4151693504419808527L;
|
||||
|
||||
@ApiModelProperty("用户名工号")
|
||||
private String userName;
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
private String name;
|
||||
@ApiModelProperty("昵称")
|
||||
private String nickName;
|
||||
|
||||
@ApiModelProperty("密码")
|
||||
private String password;
|
||||
|
||||
@ApiModelProperty("基础信息sid")
|
||||
private String infoSid;
|
||||
|
||||
@ApiModelProperty("类型:0学生、1教师、2管理员")
|
||||
private int type;
|
||||
@ApiModelProperty("是否已激活:0未激活,1已激活")
|
||||
private int hasActivated;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.yxt.demo.system.api.sys_user;
|
||||
|
||||
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 SysUserDto implements Dto {
|
||||
private static final long serialVersionUID = 2068661415449582838L;
|
||||
|
||||
@ApiModelProperty("学号")
|
||||
@NotBlank(message = "学号不能为空")
|
||||
private String userName;
|
||||
@ApiModelProperty("姓名")
|
||||
@NotBlank(message = "姓名不能为空")
|
||||
private String name;
|
||||
@ApiModelProperty("密码")
|
||||
@NotBlank(message = "密码不能为空")
|
||||
private String password;
|
||||
@ApiModelProperty("确认密码")
|
||||
@NotBlank(message = "确认密码不能为空")
|
||||
private String confirmPassword;
|
||||
@ApiModelProperty("手机号")
|
||||
@NotBlank(message = "手机号不能为空")
|
||||
private String mobile;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.yxt.demo.system.api.sys_user;
|
||||
|
||||
import com.yxt.demo.common.core.result.ResultBean;
|
||||
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;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
/**
|
||||
* @Author dimengzhe
|
||||
* @Date 2023/4/24 11:26
|
||||
* @Description
|
||||
*/
|
||||
@Api(tags = "用户表")
|
||||
@FeignClient(
|
||||
contextId = "demo-system-SysUser",
|
||||
name = "demo-system",
|
||||
path = "v1/sysuser",
|
||||
fallback = SysUserFeignFallback.class)
|
||||
public interface SysUserFeign {
|
||||
|
||||
@ApiOperation(value = "学生注册")
|
||||
@PostMapping("/register")
|
||||
ResultBean register(@RequestBody SysUserDto dto);
|
||||
|
||||
|
||||
@ApiOperation(value = "登录")
|
||||
@PostMapping("/login")
|
||||
ResultBean login(@RequestBody SysUserLoginQuery query);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.yxt.demo.system.api.sys_user;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @Author dimengzhe
|
||||
* @Date 2023/4/24 11:28
|
||||
* @Description
|
||||
*/
|
||||
@Component
|
||||
public class SysUserFeignFallback {
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.yxt.demo.system.api.sys_user;
|
||||
|
||||
import com.yxt.demo.common.core.query.Query;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author dimengzhe
|
||||
* @Date 2023/4/24 13:36
|
||||
* @Description
|
||||
*/
|
||||
@Data
|
||||
public class SysUserLoginQuery implements Query {
|
||||
private static final long serialVersionUID = 4963834204184842445L;
|
||||
|
||||
@ApiModelProperty("工号")
|
||||
private String userName;
|
||||
@ApiModelProperty("密码")
|
||||
private String password;
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.yxt.demo.system.api.sys_user_role;
|
||||
|
||||
import com.yxt.demo.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -11,8 +12,8 @@ import lombok.Data;
|
||||
@Data
|
||||
public class SysUserRole extends BaseEntity {
|
||||
private static final long serialVersionUID = 1275775509946006356L;
|
||||
|
||||
@ApiModelProperty("用户sid")
|
||||
private String userSid;
|
||||
|
||||
@ApiModelProperty("角色sid")
|
||||
private String roleSid;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user