刘力
3 years ago
3 changed files with 177 additions and 0 deletions
-
132archives/src/main/java/com/storeroom/modules/dictionary/domain/ArchivesDictionary.java
-
27system/src/main/java/com/storeroom/modules/system/controller/TestController.java
-
18system/src/test/java/TestOnlineUserService.java
@ -0,0 +1,132 @@ |
|||
package com.storeroom.modules.dictionary.domain; |
|||
|
|||
import com.storeroom.base.BaseEntity; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Getter; |
|||
import lombok.Setter; |
|||
|
|||
import javax.persistence.*; |
|||
import javax.validation.constraints.NotNull; |
|||
import java.io.Serializable; |
|||
import java.util.Objects; |
|||
|
|||
@Entity |
|||
@Getter |
|||
@Setter |
|||
@Table(name = "archives_dictionary") |
|||
public class ArchivesDictionary extends BaseEntity implements Serializable { |
|||
|
|||
|
|||
@Id |
|||
@Column(name = "id") |
|||
@NotNull(groups = Update.class) |
|||
@GeneratedValue(strategy = GenerationType.IDENTITY) |
|||
@ApiModelProperty(value = "ID", hidden = true) |
|||
private String id; |
|||
|
|||
@ApiModelProperty(value = "字段名称") |
|||
@Column(name = "field_name") |
|||
private String fieldName; |
|||
|
|||
@Column(name = "field_cn_name") |
|||
@ApiModelProperty(value = "字段含义") |
|||
private String fieldCnName; |
|||
|
|||
@Column(name = "is_default_value") |
|||
@ApiModelProperty(value = "默认值") |
|||
private String isDefaultValue; |
|||
|
|||
@Column(name = "is_data_type") |
|||
@ApiModelProperty(value = "数据类型") |
|||
private String isDataType; |
|||
|
|||
@Column(name = "is_column_length") |
|||
@ApiModelProperty(value = "字段长度") |
|||
private Integer isColumnLength; |
|||
|
|||
@Column(name = "is_sequence") |
|||
@ApiModelProperty(value = "排序") |
|||
private Integer isSequence; |
|||
|
|||
@Column(name = "is_type") |
|||
@ApiModelProperty(value = "门类类型") |
|||
private Integer isType; |
|||
|
|||
@Column(name = "is_system") |
|||
@ApiModelProperty(value = "是否为系统字段") |
|||
private Boolean isSystem; |
|||
|
|||
@Column(name = "is_line") |
|||
@ApiModelProperty(value = "是否显示一整行") |
|||
private Boolean isLine; |
|||
|
|||
@Column(name = "is_input") |
|||
@ApiModelProperty(value = "是否输入字段") |
|||
private Boolean isInput; |
|||
|
|||
@Column(name = "is_required") |
|||
@ApiModelProperty(value = "是否必填字段") |
|||
private Boolean isRequired; |
|||
|
|||
@Column(name = "is_automatic") |
|||
@ApiModelProperty(value = "是否自动生成") |
|||
private Boolean isAutomatic; |
|||
|
|||
@Column(name = "is_add") |
|||
@ApiModelProperty(value = "是否自动加一") |
|||
private Boolean isAdd; |
|||
|
|||
@Column(name = "is_search") |
|||
@ApiModelProperty(value = "是否查询") |
|||
private Boolean isSearch; |
|||
|
|||
@Column(name = "is_inherit") |
|||
@ApiModelProperty(value = "是否继承") |
|||
private Boolean isInherit; |
|||
|
|||
@Column(name = "is_filling") |
|||
@ApiModelProperty(value = "是否补零") |
|||
private Boolean isFilling; |
|||
|
|||
@Column(name = "filling_digit") |
|||
@ApiModelProperty(value = "补零位数") |
|||
private Integer fillingDigit; |
|||
|
|||
@Column(name = "is_repeat") |
|||
@ApiModelProperty(value = "是否可重复") |
|||
private Boolean isRepeat; |
|||
|
|||
|
|||
@Column(name = "is_display") |
|||
@ApiModelProperty(value = "是否浏览") |
|||
private Boolean isDisplay; |
|||
|
|||
@Column(name = "is_displayorder") |
|||
@ApiModelProperty(value = "是否浏览排序") |
|||
private Boolean isDisplayorder; |
|||
|
|||
|
|||
@Column(name = "displayorder") |
|||
@ApiModelProperty(value = "浏览排序") |
|||
private Boolean displayorder; |
|||
|
|||
|
|||
@Column(name = "displayorder_type") |
|||
@ApiModelProperty(value = "浏览排序状态") |
|||
private String displayorderType; |
|||
|
|||
@Override |
|||
public boolean equals(Object o) { |
|||
if (this == o) return true; |
|||
if (o == null || getClass() != o.getClass()) return false; |
|||
ArchivesDictionary that = (ArchivesDictionary) o; |
|||
return Objects.equals(id, that.id) && Objects.equals(fieldName, that.fieldName) && Objects.equals(fieldCnName, that.fieldCnName) && Objects.equals(isDefaultValue, that.isDefaultValue) && Objects.equals(isDataType, that.isDataType) && Objects.equals(isColumnLength, that.isColumnLength) && Objects.equals(isSequence, that.isSequence) && Objects.equals(isType, that.isType) && Objects.equals(isSystem, that.isSystem) && Objects.equals(isLine, that.isLine) && Objects.equals(isInput, that.isInput) && Objects.equals(isRequired, that.isRequired) && Objects.equals(isAutomatic, that.isAutomatic) && Objects.equals(isAdd, that.isAdd) && Objects.equals(isSearch, that.isSearch) && Objects.equals(isInherit, that.isInherit) && Objects.equals(isFilling, that.isFilling) && Objects.equals(fillingDigit, that.fillingDigit) && Objects.equals(isRepeat, that.isRepeat) && Objects.equals(isDisplay, that.isDisplay) && Objects.equals(isDisplayorder, that.isDisplayorder) && Objects.equals(displayorder, that.displayorder) && Objects.equals(displayorderType, that.displayorderType); |
|||
} |
|||
|
|||
@Override |
|||
public int hashCode() { |
|||
return Objects.hash(id, fieldName, fieldCnName, isDefaultValue, isDataType, isColumnLength, isSequence, isType, isSystem, isLine, isInput, isRequired, isAutomatic, isAdd, isSearch, isInherit, isFilling, fillingDigit, isRepeat, isDisplay, isDisplayorder, displayorder, displayorderType); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,27 @@ |
|||
package com.storeroom.modules.system.controller; |
|||
|
|||
|
|||
import com.storeroom.annotaion.rest.AnonymousGetMapping; |
|||
import com.storeroom.exception.BaseException; |
|||
import com.storeroom.exception.constant.ResponseStatus; |
|||
import com.storeroom.utils.ApiResponse; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import lombok.RequiredArgsConstructor; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
@Api(tags = "测试接口") |
|||
@RestController |
|||
@RequestMapping("/api/test") |
|||
@RequiredArgsConstructor |
|||
public class TestController { |
|||
|
|||
|
|||
@ApiOperation("测试接口") |
|||
@AnonymousGetMapping(value = "/miss") |
|||
public ApiResponse<Object> me() { |
|||
//return ApiResponse.error(ResponseStatus.SUCCESS.getCode(),ResponseStatus.SUCCESS.getMessage()); |
|||
throw new BaseException("返回异常信息"); |
|||
} |
|||
} |
@ -0,0 +1,18 @@ |
|||
import com.storeroom.modules.security.service.OnlineUserService; |
|||
import org.junit.jupiter.api.Test; |
|||
|
|||
import java.lang.reflect.Constructor; |
|||
|
|||
public class TestOnlineUserService { |
|||
|
|||
@Test |
|||
public void testLogin(){ |
|||
Class c= OnlineUserService.class; |
|||
Constructor[] constructors=c.getConstructors(); |
|||
|
|||
for (Constructor constructor:constructors){ |
|||
System.out.println(constructor.getName()+"==>"+constructor.getParameterCount()); |
|||
} |
|||
|
|||
} |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue