mirror of
https://gitee.com/youlaitech/youlai-mall.git
synced 2024-12-23 05:00:25 +08:00
refacor:系统代码优化,优化字典管理
This commit is contained in:
parent
07233324cc
commit
fcfb9cff0e
@ -9,6 +9,6 @@ import org.springframework.web.bind.annotation.PathVariable;
|
||||
@FeignClient(value = "youlai-admin")
|
||||
public interface UserFeignService {
|
||||
|
||||
@GetMapping("/users/username/{username}")
|
||||
@GetMapping("/api.admin/v1/users/username/{username}")
|
||||
Result<UserDTO> getUserByUsername(@PathVariable String username);
|
||||
}
|
||||
|
@ -4,27 +4,19 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.youlai.common.core.base.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class SysDict extends BaseEntity {
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
private String code;
|
||||
|
||||
private String name;
|
||||
|
||||
private String value;
|
||||
|
||||
private String typeCode;
|
||||
|
||||
private String sort;
|
||||
|
||||
private Integer status;
|
||||
|
||||
private Integer defaulted;
|
||||
|
||||
private String remark;
|
||||
|
||||
}
|
||||
|
@ -4,21 +4,27 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.youlai.common.core.base.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Data
|
||||
public class SysDictType extends BaseEntity {
|
||||
@Accessors(chain = true)
|
||||
public class SysDictItem extends BaseEntity {
|
||||
|
||||
@TableId(type= IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
private String code;
|
||||
|
||||
private String name;
|
||||
|
||||
private String value;
|
||||
|
||||
private String dictCode;
|
||||
|
||||
private String sort;
|
||||
|
||||
private Integer status;
|
||||
|
||||
private Integer defaulted;
|
||||
|
||||
private String remark;
|
||||
|
||||
|
||||
|
||||
}
|
@ -97,6 +97,11 @@
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- spring cloud 2020.0.0内置的openfeign3.0.0和spring cloud alibaba框架nacos、seata冲突临时解决方案-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
|
@ -4,7 +4,6 @@ import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigInteger;
|
||||
|
||||
/**
|
||||
* @author haoxr
|
||||
@ -43,7 +42,7 @@ public class Result<T> implements Serializable {
|
||||
return result(ResultCode.SYSTEM_EXECUTION_ERROR.getCode(), msg, null);
|
||||
}
|
||||
|
||||
public static <T> Result<T> status(boolean status) {
|
||||
public static <T> Result<T> judge(boolean status) {
|
||||
if (status) {
|
||||
return success();
|
||||
} else {
|
||||
|
@ -32,8 +32,9 @@ public enum ResultCode implements IResultCode, Serializable {
|
||||
FORBIDDEN_OPERATION("A0302", "演示环境禁止修改、删除重要数据,请本地部署后测试"),
|
||||
|
||||
|
||||
USER_REQUEST_PARAM_ERROR("A0400","用户请求参数错误"),
|
||||
USER_REQUEST_PARAM_IS_BLANK("A0410","请求必填参数为空"),
|
||||
PARAM_ERROR("A0400", "用户请求参数错误"),
|
||||
PARAM_IS_NULL("A0410", "请求必填参数为空"),
|
||||
QUERY_MODE_IS_NULL("A0411", "查询模式为空"),
|
||||
|
||||
USER_UPLOAD_FILE_ERROR("A0700", "用户上传文件异常"),
|
||||
USER_UPLOAD_FILE_TYPE_NOT_MATCH("A0701", "用户上传文件类型不匹配"),
|
||||
|
Loading…
Reference in New Issue
Block a user