mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-08 20:49:00 +08:00
♻️ Refactoring code.进行部分兼容性操作
This commit is contained in:
1 parent
01f34937a5
commit
251e6a8b0b
3 files changed
+108
-7
No files matched your search
+101
@@ -0,0 +1,101 @@
|
||||
package com.anji.plus.gaea.curd.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 基础数据库实体
|
||||
*
|
||||
* @author lr
|
||||
* @since 2021-01-12
|
||||
*/
|
||||
public class GaeaBaseEntity extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 数据ID
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
* @Version:乐观锁,,需要添加mybatis plus插件optimisticLockerInterceptor
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE, update = "%s+1")
|
||||
@Version
|
||||
private Integer version;
|
||||
|
||||
public String getCreateBy() {
|
||||
return createBy;
|
||||
}
|
||||
|
||||
public void setCreateBy(String createBy) {
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getUpdateBy() {
|
||||
return updateBy;
|
||||
}
|
||||
|
||||
public void setUpdateBy(String updateBy) {
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public Integer getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(Integer version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
}
|
||||
+5
-5
@@ -60,7 +60,7 @@ public class GaeaDictItem extends GaeaBaseEntity implements Serializable {
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
private Integer sortOrder;
|
||||
|
||||
public String getDictCode() {
|
||||
return dictCode;
|
||||
@@ -102,12 +102,12 @@ public class GaeaDictItem extends GaeaBaseEntity implements Serializable {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public Integer getSort() {
|
||||
return sort;
|
||||
public Integer getSortOrder() {
|
||||
return sortOrder;
|
||||
}
|
||||
|
||||
public void setSort(Integer sort) {
|
||||
this.sort = sort;
|
||||
public void setSortOrder(Integer sortOrder) {
|
||||
this.sortOrder = sortOrder;
|
||||
}
|
||||
|
||||
public Integer getEnabled() {
|
||||
|
||||
+2
-2
@@ -86,7 +86,7 @@ public class GaeaDictServiceImpl implements GaeaDictService {
|
||||
if (CollectionUtils.isEmpty(dictMap)) {
|
||||
LambdaQueryWrapper<GaeaDictItem> wrapper = Wrappers.lambdaQuery();
|
||||
wrapper.eq(GaeaDictItem::getDictCode, dictCode).eq(GaeaDictItem::getEnabled, Enabled.YES.getValue())
|
||||
.eq(GaeaDictItem::getLocale, language).orderByAsc(GaeaDictItem::getSort);
|
||||
.eq(GaeaDictItem::getLocale, language).orderByAsc(GaeaDictItem::getSortOrder);
|
||||
|
||||
List<GaeaDictItem> list = gaeaDictItemMapper.selectList(wrapper);
|
||||
|
||||
@@ -154,7 +154,7 @@ public class GaeaDictServiceImpl implements GaeaDictService {
|
||||
public Map<String, List<KeyValue>> all(String language) {
|
||||
LambdaQueryWrapper<GaeaDictItem> wrapper = Wrappers.lambdaQuery();
|
||||
wrapper.eq(GaeaDictItem::getEnabled, Enabled.YES.getValue()).eq(GaeaDictItem::getLocale, language)
|
||||
.orderByAsc(GaeaDictItem::getSort);
|
||||
.orderByAsc(GaeaDictItem::getSortOrder);
|
||||
|
||||
List<GaeaDictItem> list = gaeaDictItemMapper.selectList(wrapper);
|
||||
Map<String, List<KeyValue>> all = list.stream()
|
||||
|
||||
Reference in new issue
Block a user