parent
17adb9ba0f
commit
58fa00199e
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,79 @@
|
||||
package com.ruoyi.common.core.utils.uuid.snowflake;
|
||||
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.ScheduledThreadPoolExecutor;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
/**
|
||||
* System Clock
|
||||
* <p>
|
||||
* 利用ScheduledExecutorService实现高并发场景下System.currentTimeMillis()的性能问题的优化.
|
||||
*
|
||||
* @author lry
|
||||
*/
|
||||
enum SystemClock {
|
||||
|
||||
// ====
|
||||
|
||||
INSTANCE(1);
|
||||
|
||||
private final long period;
|
||||
private final AtomicLong nowTime;
|
||||
private boolean started = false;
|
||||
private ScheduledExecutorService executorService;
|
||||
|
||||
SystemClock(long period) {
|
||||
this.period = period;
|
||||
this.nowTime = new AtomicLong(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
/**
|
||||
* The initialize scheduled executor service
|
||||
*/
|
||||
public void initialize() {
|
||||
if (started) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.executorService = new ScheduledThreadPoolExecutor(1, r -> {
|
||||
Thread thread = new Thread(r, "system-clock");
|
||||
thread.setDaemon(true);
|
||||
return thread;
|
||||
});
|
||||
executorService.scheduleAtFixedRate(() -> nowTime.set(System.currentTimeMillis()),
|
||||
this.period, this.period, TimeUnit.MILLISECONDS);
|
||||
Runtime.getRuntime().addShutdownHook(new Thread(this::destroy));
|
||||
started = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* The get current time milliseconds
|
||||
*
|
||||
* @return long time
|
||||
*/
|
||||
public long currentTimeMillis() {
|
||||
return started ? nowTime.get() : System.currentTimeMillis();
|
||||
}
|
||||
|
||||
/**
|
||||
* The get string current time
|
||||
*
|
||||
* @return string time
|
||||
*/
|
||||
public String currentTime() {
|
||||
return new Timestamp(currentTimeMillis()).toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* The destroy of executor service
|
||||
*/
|
||||
public void destroy() {
|
||||
if (executorService != null) {
|
||||
executorService.shutdown();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,79 +1,80 @@
|
||||
package com.ruoyi.common.core.web.domain;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Tree基类
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class TreeEntity extends BaseEntity
|
||||
{
|
||||
public class TreeEntity extends BaseEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 父菜单名称 */
|
||||
/**
|
||||
* 父菜单名称
|
||||
*/
|
||||
private String parentName;
|
||||
|
||||
/** 父菜单ID */
|
||||
/**
|
||||
* 父菜单ID
|
||||
*/
|
||||
private Long parentId;
|
||||
|
||||
/** 显示顺序 */
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
private Integer orderNum;
|
||||
|
||||
/** 祖级列表 */
|
||||
/**
|
||||
* 祖级列表
|
||||
*/
|
||||
private String ancestors;
|
||||
|
||||
/** 子部门 */
|
||||
/**
|
||||
* 子部门
|
||||
*/
|
||||
private List<?> children = new ArrayList<>();
|
||||
|
||||
public String getParentName()
|
||||
{
|
||||
public String getParentName() {
|
||||
return parentName;
|
||||
}
|
||||
|
||||
public void setParentName(String parentName)
|
||||
{
|
||||
public void setParentName(String parentName) {
|
||||
this.parentName = parentName;
|
||||
}
|
||||
|
||||
public Long getParentId()
|
||||
{
|
||||
public Long getParentId() {
|
||||
return parentId;
|
||||
}
|
||||
|
||||
public void setParentId(Long parentId)
|
||||
{
|
||||
public void setParentId(Long parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public Integer getOrderNum()
|
||||
{
|
||||
public Integer getOrderNum() {
|
||||
return orderNum;
|
||||
}
|
||||
|
||||
public void setOrderNum(Integer orderNum)
|
||||
{
|
||||
public void setOrderNum(Integer orderNum) {
|
||||
this.orderNum = orderNum;
|
||||
}
|
||||
|
||||
public String getAncestors()
|
||||
{
|
||||
public String getAncestors() {
|
||||
return ancestors;
|
||||
}
|
||||
|
||||
public void setAncestors(String ancestors)
|
||||
{
|
||||
public void setAncestors(String ancestors) {
|
||||
this.ancestors = ancestors;
|
||||
}
|
||||
|
||||
public List<?> getChildren()
|
||||
{
|
||||
public List<?> getChildren() {
|
||||
return children;
|
||||
}
|
||||
|
||||
public void setChildren(List<?> children)
|
||||
{
|
||||
public void setChildren(List<?> children) {
|
||||
this.children = children;
|
||||
}
|
||||
}
|
||||
|
@ -1,85 +1,84 @@
|
||||
package com.ruoyi.common.core.web.page;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 表格分页数据对象
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class TableDataInfo implements Serializable
|
||||
{
|
||||
public class TableDataInfo implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 总记录数 */
|
||||
/**
|
||||
* 总记录数
|
||||
*/
|
||||
private long total;
|
||||
|
||||
/** 列表数据 */
|
||||
/**
|
||||
* 列表数据
|
||||
*/
|
||||
private List<?> rows;
|
||||
|
||||
/** 消息状态码 */
|
||||
/**
|
||||
* 消息状态码
|
||||
*/
|
||||
private int code;
|
||||
|
||||
/** 消息内容 */
|
||||
/**
|
||||
* 消息内容
|
||||
*/
|
||||
private String msg;
|
||||
|
||||
/**
|
||||
* 表格数据对象
|
||||
*/
|
||||
public TableDataInfo()
|
||||
{
|
||||
public TableDataInfo() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*
|
||||
* @param list 列表数据
|
||||
*
|
||||
* @param list 列表数据
|
||||
* @param total 总记录数
|
||||
*/
|
||||
public TableDataInfo(List<?> list, int total)
|
||||
{
|
||||
public TableDataInfo(List<?> list, int total) {
|
||||
this.rows = list;
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
public long getTotal()
|
||||
{
|
||||
public long getTotal() {
|
||||
return total;
|
||||
}
|
||||
|
||||
public void setTotal(long total)
|
||||
{
|
||||
public void setTotal(long total) {
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
public List<?> getRows()
|
||||
{
|
||||
public List<?> getRows() {
|
||||
return rows;
|
||||
}
|
||||
|
||||
public void setRows(List<?> rows)
|
||||
{
|
||||
public void setRows(List<?> rows) {
|
||||
this.rows = rows;
|
||||
}
|
||||
|
||||
public int getCode()
|
||||
{
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code)
|
||||
{
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMsg()
|
||||
{
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg)
|
||||
{
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
}
|
@ -0,0 +1,141 @@
|
||||
package com.ruoyi.wms.domain;
|
||||
|
||||
import com.ruoyi.common.core.web.domain.ExtBaseEntity;
|
||||
import jakarta.annotation.Generated;
|
||||
|
||||
/**
|
||||
*
|
||||
* This class was generated by MyBatis Generator.
|
||||
* This class corresponds to the database table SF_WMS_M_UNIT_INFO
|
||||
*/
|
||||
public class UnitInfo extends ExtBaseEntity {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.ORG_CD")
|
||||
private String orgCd;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.UNIT")
|
||||
private String unit;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.UNIT_NAME")
|
||||
private String unitName;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.UNIT_CONV_RATE")
|
||||
private String unitConvRate;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.SRC_CONV_UNIT")
|
||||
private String srcConvUnit;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.REMARK_1")
|
||||
private String remark1;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.REMARK_2")
|
||||
private String remark2;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.REMARK_3")
|
||||
private String remark3;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.REMARK_4")
|
||||
private String remark4;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.REMARK_5")
|
||||
private String remark5;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.ORG_CD")
|
||||
public String getOrgCd() {
|
||||
return orgCd;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.ORG_CD")
|
||||
public void setOrgCd(String orgCd) {
|
||||
this.orgCd = orgCd == null ? null : orgCd.trim();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.UNIT")
|
||||
public String getUnit() {
|
||||
return unit;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.UNIT")
|
||||
public void setUnit(String unit) {
|
||||
this.unit = unit == null ? null : unit.trim();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.UNIT_NAME")
|
||||
public String getUnitName() {
|
||||
return unitName;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.UNIT_NAME")
|
||||
public void setUnitName(String unitName) {
|
||||
this.unitName = unitName == null ? null : unitName.trim();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.UNIT_CONV_RATE")
|
||||
public String getUnitConvRate() {
|
||||
return unitConvRate;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.UNIT_CONV_RATE")
|
||||
public void setUnitConvRate(String unitConvRate) {
|
||||
this.unitConvRate = unitConvRate == null ? null : unitConvRate.trim();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.SRC_CONV_UNIT")
|
||||
public String getSrcConvUnit() {
|
||||
return srcConvUnit;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.SRC_CONV_UNIT")
|
||||
public void setSrcConvUnit(String srcConvUnit) {
|
||||
this.srcConvUnit = srcConvUnit == null ? null : srcConvUnit.trim();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.REMARK_1")
|
||||
public String getRemark1() {
|
||||
return remark1;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.REMARK_1")
|
||||
public void setRemark1(String remark1) {
|
||||
this.remark1 = remark1 == null ? null : remark1.trim();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.REMARK_2")
|
||||
public String getRemark2() {
|
||||
return remark2;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.REMARK_2")
|
||||
public void setRemark2(String remark2) {
|
||||
this.remark2 = remark2 == null ? null : remark2.trim();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.REMARK_3")
|
||||
public String getRemark3() {
|
||||
return remark3;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.REMARK_3")
|
||||
public void setRemark3(String remark3) {
|
||||
this.remark3 = remark3 == null ? null : remark3.trim();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.REMARK_4")
|
||||
public String getRemark4() {
|
||||
return remark4;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.REMARK_4")
|
||||
public void setRemark4(String remark4) {
|
||||
this.remark4 = remark4 == null ? null : remark4.trim();
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.REMARK_5")
|
||||
public String getRemark5() {
|
||||
return remark5;
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.REMARK_5")
|
||||
public void setRemark5(String remark5) {
|
||||
this.remark5 = remark5 == null ? null : remark5.trim();
|
||||
}
|
||||
}
|
@ -0,0 +1,124 @@
|
||||
package com.ruoyi.wms.mapper;
|
||||
|
||||
import jakarta.annotation.Generated;
|
||||
import java.sql.JDBCType;
|
||||
import java.util.Date;
|
||||
import org.mybatis.dynamic.sql.AliasableSqlTable;
|
||||
import org.mybatis.dynamic.sql.SqlColumn;
|
||||
|
||||
public final class UnitInfoDynamicSqlSupport {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: SF_WMS_M_UNIT_INFO")
|
||||
public static final UnitInfo unitInfo = new UnitInfo();
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.ORG_CD")
|
||||
public static final SqlColumn<String> orgCd = unitInfo.orgCd;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.UNIT")
|
||||
public static final SqlColumn<String> unit = unitInfo.unit;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.UNIT_NAME")
|
||||
public static final SqlColumn<String> unitName = unitInfo.unitName;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.UNIT_CONV_RATE")
|
||||
public static final SqlColumn<String> unitConvRate = unitInfo.unitConvRate;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.SRC_CONV_UNIT")
|
||||
public static final SqlColumn<String> srcConvUnit = unitInfo.srcConvUnit;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.REMARK_1")
|
||||
public static final SqlColumn<String> remark1 = unitInfo.remark1;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.REMARK_2")
|
||||
public static final SqlColumn<String> remark2 = unitInfo.remark2;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.REMARK_3")
|
||||
public static final SqlColumn<String> remark3 = unitInfo.remark3;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.REMARK_4")
|
||||
public static final SqlColumn<String> remark4 = unitInfo.remark4;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.REMARK_5")
|
||||
public static final SqlColumn<String> remark5 = unitInfo.remark5;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.UPDATE_COUNT")
|
||||
public static final SqlColumn<Integer> updateCount = unitInfo.updateCount;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.DELETE_FLAG")
|
||||
public static final SqlColumn<Integer> deleteFlag = unitInfo.deleteFlag;
|
||||
|
||||
/**
|
||||
* Database Column Remarks:
|
||||
* 创建者
|
||||
*/
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.create_by")
|
||||
public static final SqlColumn<String> createBy = unitInfo.createBy;
|
||||
|
||||
/**
|
||||
* Database Column Remarks:
|
||||
* 创建时间
|
||||
*/
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.create_time")
|
||||
public static final SqlColumn<Date> createTime = unitInfo.createTime;
|
||||
|
||||
/**
|
||||
* Database Column Remarks:
|
||||
* 更新者
|
||||
*/
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.update_by")
|
||||
public static final SqlColumn<String> updateBy = unitInfo.updateBy;
|
||||
|
||||
/**
|
||||
* Database Column Remarks:
|
||||
* 更新时间
|
||||
*/
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.update_time")
|
||||
public static final SqlColumn<Date> updateTime = unitInfo.updateTime;
|
||||
|
||||
/**
|
||||
* Database Column Remarks:
|
||||
* 备注
|
||||
*/
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source field: SF_WMS_M_UNIT_INFO.remark")
|
||||
public static final SqlColumn<String> remark = unitInfo.remark;
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: SF_WMS_M_UNIT_INFO")
|
||||
public static final class UnitInfo extends AliasableSqlTable<UnitInfo> {
|
||||
public final SqlColumn<String> orgCd = column("ORG_CD", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> unit = column("UNIT", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> unitName = column("UNIT_NAME", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> unitConvRate = column("UNIT_CONV_RATE", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> srcConvUnit = column("SRC_CONV_UNIT", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> remark1 = column("REMARK_1", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> remark2 = column("REMARK_2", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> remark3 = column("REMARK_3", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> remark4 = column("REMARK_4", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<String> remark5 = column("REMARK_5", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<Integer> updateCount = column("UPDATE_COUNT", JDBCType.INTEGER);
|
||||
|
||||
public final SqlColumn<Integer> deleteFlag = column("DELETE_FLAG", JDBCType.INTEGER);
|
||||
|
||||
public final SqlColumn<String> createBy = column("create_by", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<Date> createTime = column("create_time", JDBCType.TIMESTAMP);
|
||||
|
||||
public final SqlColumn<String> updateBy = column("update_by", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<Date> updateTime = column("update_time", JDBCType.TIMESTAMP);
|
||||
|
||||
public final SqlColumn<String> remark = column("remark", JDBCType.VARCHAR);
|
||||
|
||||
public UnitInfo() {
|
||||
super("SF_WMS_M_UNIT_INFO", UnitInfo::new);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,267 @@
|
||||
package com.ruoyi.wms.mapper;
|
||||
|
||||
import static com.ruoyi.wms.mapper.UnitInfoDynamicSqlSupport.*;
|
||||
import static org.mybatis.dynamic.sql.SqlBuilder.isEqualTo;
|
||||
|
||||
import com.ruoyi.wms.domain.UnitInfo;
|
||||
import jakarta.annotation.Generated;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Result;
|
||||
import org.apache.ibatis.annotations.ResultMap;
|
||||
import org.apache.ibatis.annotations.Results;
|
||||
import org.apache.ibatis.annotations.SelectProvider;
|
||||
import org.apache.ibatis.type.JdbcType;
|
||||
import org.mybatis.dynamic.sql.BasicColumn;
|
||||
import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter;
|
||||
import org.mybatis.dynamic.sql.select.CountDSLCompleter;
|
||||
import org.mybatis.dynamic.sql.select.SelectDSLCompleter;
|
||||
import org.mybatis.dynamic.sql.select.render.SelectStatementProvider;
|
||||
import org.mybatis.dynamic.sql.update.UpdateDSL;
|
||||
import org.mybatis.dynamic.sql.update.UpdateDSLCompleter;
|
||||
import org.mybatis.dynamic.sql.update.UpdateModel;
|
||||
import org.mybatis.dynamic.sql.util.SqlProviderAdapter;
|
||||
import org.mybatis.dynamic.sql.util.mybatis3.CommonCountMapper;
|
||||
import org.mybatis.dynamic.sql.util.mybatis3.CommonDeleteMapper;
|
||||
import org.mybatis.dynamic.sql.util.mybatis3.CommonInsertMapper;
|
||||
import org.mybatis.dynamic.sql.util.mybatis3.CommonUpdateMapper;
|
||||
import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils;
|
||||
|
||||
@Mapper
|
||||
public interface UnitInfoMapper extends CommonCountMapper, CommonDeleteMapper, CommonInsertMapper<UnitInfo>, CommonUpdateMapper {
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: SF_WMS_M_UNIT_INFO")
|
||||
BasicColumn[] selectList = BasicColumn.columnList(orgCd, unit, unitName, unitConvRate, srcConvUnit, remark1, remark2, remark3, remark4, remark5, updateCount, deleteFlag, createBy, createTime, updateBy, updateTime, remark);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: SF_WMS_M_UNIT_INFO")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
@Results(id="UnitInfoResult", value = {
|
||||
@Result(column="ORG_CD", property="orgCd", jdbcType=JdbcType.VARCHAR, id=true),
|
||||
@Result(column="UNIT", property="unit", jdbcType=JdbcType.VARCHAR, id=true),
|
||||
@Result(column="UNIT_NAME", property="unitName", jdbcType=JdbcType.VARCHAR),
|
||||
@Result(column="UNIT_CONV_RATE", property="unitConvRate", jdbcType=JdbcType.VARCHAR),
|
||||
@Result(column="SRC_CONV_UNIT", property="srcConvUnit", jdbcType=JdbcType.VARCHAR),
|
||||
@Result(column="REMARK_1", property="remark1", jdbcType=JdbcType.VARCHAR),
|
||||
@Result(column="REMARK_2", property="remark2", jdbcType=JdbcType.VARCHAR),
|
||||
@Result(column="REMARK_3", property="remark3", jdbcType=JdbcType.VARCHAR),
|
||||
@Result(column="REMARK_4", property="remark4", jdbcType=JdbcType.VARCHAR),
|
||||
@Result(column="REMARK_5", property="remark5", jdbcType=JdbcType.VARCHAR),
|
||||
@Result(column="UPDATE_COUNT", property="updateCount", jdbcType=JdbcType.INTEGER),
|
||||
@Result(column="DELETE_FLAG", property="deleteFlag", jdbcType=JdbcType.INTEGER),
|
||||
@Result(column="create_by", property="createBy", jdbcType=JdbcType.VARCHAR),
|
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
|
||||
@Result(column="update_by", property="updateBy", jdbcType=JdbcType.VARCHAR),
|
||||
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
|
||||
@Result(column="remark", property="remark", jdbcType=JdbcType.VARCHAR)
|
||||
})
|
||||
List<UnitInfo> selectMany(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: SF_WMS_M_UNIT_INFO")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
@ResultMap("UnitInfoResult")
|
||||
Optional<UnitInfo> selectOne(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: SF_WMS_M_UNIT_INFO")
|
||||
default long count(CountDSLCompleter completer) {
|
||||
return MyBatis3Utils.countFrom(this::count, unitInfo, completer);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: SF_WMS_M_UNIT_INFO")
|
||||
default int delete(DeleteDSLCompleter completer) {
|
||||
return MyBatis3Utils.deleteFrom(this::delete, unitInfo, completer);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: SF_WMS_M_UNIT_INFO")
|
||||
default int deleteByPrimaryKey(String orgCd_, String unit_) {
|
||||
return delete(c ->
|
||||
c.where(orgCd, isEqualTo(orgCd_))
|
||||
.and(unit, isEqualTo(unit_))
|
||||
);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: SF_WMS_M_UNIT_INFO")
|
||||
default int insert(UnitInfo row) {
|
||||
return MyBatis3Utils.insert(this::insert, row, unitInfo, c ->
|
||||
c.map(orgCd).toProperty("orgCd")
|
||||
.map(unit).toProperty("unit")
|
||||
.map(unitName).toProperty("unitName")
|
||||
.map(unitConvRate).toProperty("unitConvRate")
|
||||
.map(srcConvUnit).toProperty("srcConvUnit")
|
||||
.map(remark1).toProperty("remark1")
|
||||
.map(remark2).toProperty("remark2")
|
||||
.map(remark3).toProperty("remark3")
|
||||
.map(remark4).toProperty("remark4")
|
||||
.map(remark5).toProperty("remark5")
|
||||
.map(updateCount).toProperty("updateCount")
|
||||
.map(deleteFlag).toProperty("deleteFlag")
|
||||
.map(createBy).toProperty("createBy")
|
||||
.map(createTime).toProperty("createTime")
|
||||
.map(updateBy).toProperty("updateBy")
|
||||
.map(updateTime).toProperty("updateTime")
|
||||
.map(remark).toProperty("remark")
|
||||
);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: SF_WMS_M_UNIT_INFO")
|
||||
default int insertMultiple(Collection<UnitInfo> records) {
|
||||
return MyBatis3Utils.insertMultiple(this::insertMultiple, records, unitInfo, c ->
|
||||
c.map(orgCd).toProperty("orgCd")
|
||||
.map(unit).toProperty("unit")
|
||||
.map(unitName).toProperty("unitName")
|
||||
.map(unitConvRate).toProperty("unitConvRate")
|
||||
.map(srcConvUnit).toProperty("srcConvUnit")
|
||||
.map(remark1).toProperty("remark1")
|
||||
.map(remark2).toProperty("remark2")
|
||||
.map(remark3).toProperty("remark3")
|
||||
.map(remark4).toProperty("remark4")
|
||||
.map(remark5).toProperty("remark5")
|
||||
.map(updateCount).toProperty("updateCount")
|
||||
.map(deleteFlag).toProperty("deleteFlag")
|
||||
.map(createBy).toProperty("createBy")
|
||||
.map(createTime).toProperty("createTime")
|
||||
.map(updateBy).toProperty("updateBy")
|
||||
.map(updateTime).toProperty("updateTime")
|
||||
.map(remark).toProperty("remark")
|
||||
);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: SF_WMS_M_UNIT_INFO")
|
||||
default int insertSelective(UnitInfo row) {
|
||||
return MyBatis3Utils.insert(this::insert, row, unitInfo, c ->
|
||||
c.map(orgCd).toPropertyWhenPresent("orgCd", row::getOrgCd)
|
||||
.map(unit).toPropertyWhenPresent("unit", row::getUnit)
|
||||
.map(unitName).toPropertyWhenPresent("unitName", row::getUnitName)
|
||||
.map(unitConvRate).toPropertyWhenPresent("unitConvRate", row::getUnitConvRate)
|
||||
.map(srcConvUnit).toPropertyWhenPresent("srcConvUnit", row::getSrcConvUnit)
|
||||
.map(remark1).toPropertyWhenPresent("remark1", row::getRemark1)
|
||||
.map(remark2).toPropertyWhenPresent("remark2", row::getRemark2)
|
||||
.map(remark3).toPropertyWhenPresent("remark3", row::getRemark3)
|
||||
.map(remark4).toPropertyWhenPresent("remark4", row::getRemark4)
|
||||
.map(remark5).toPropertyWhenPresent("remark5", row::getRemark5)
|
||||
.map(updateCount).toPropertyWhenPresent("updateCount", row::getUpdateCount)
|
||||
.map(deleteFlag).toPropertyWhenPresent("deleteFlag", row::getDeleteFlag)
|
||||
.map(createBy).toPropertyWhenPresent("createBy", row::getCreateBy)
|
||||
.map(createTime).toPropertyWhenPresent("createTime", row::getCreateTime)
|
||||
.map(updateBy).toPropertyWhenPresent("updateBy", row::getUpdateBy)
|
||||
.map(updateTime).toPropertyWhenPresent("updateTime", row::getUpdateTime)
|
||||
.map(remark).toPropertyWhenPresent("remark", row::getRemark)
|
||||
);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: SF_WMS_M_UNIT_INFO")
|
||||
default Optional<UnitInfo> selectOne(SelectDSLCompleter completer) {
|
||||
return MyBatis3Utils.selectOne(this::selectOne, selectList, unitInfo, completer);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: SF_WMS_M_UNIT_INFO")
|
||||
default List<UnitInfo> select(SelectDSLCompleter completer) {
|
||||
return MyBatis3Utils.selectList(this::selectMany, selectList, unitInfo, completer);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: SF_WMS_M_UNIT_INFO")
|
||||
default List<UnitInfo> selectDistinct(SelectDSLCompleter completer) {
|
||||
return MyBatis3Utils.selectDistinct(this::selectMany, selectList, unitInfo, completer);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: SF_WMS_M_UNIT_INFO")
|
||||
default Optional<UnitInfo> selectByPrimaryKey(String orgCd_, String unit_) {
|
||||
return selectOne(c ->
|
||||
c.where(orgCd, isEqualTo(orgCd_))
|
||||
.and(unit, isEqualTo(unit_))
|
||||
);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: SF_WMS_M_UNIT_INFO")
|
||||
default int update(UpdateDSLCompleter completer) {
|
||||
return MyBatis3Utils.update(this::update, unitInfo, completer);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: SF_WMS_M_UNIT_INFO")
|
||||
static UpdateDSL<UpdateModel> updateAllColumns(UnitInfo row, UpdateDSL<UpdateModel> dsl) {
|
||||
return dsl.set(orgCd).equalTo(row::getOrgCd)
|
||||
.set(unit).equalTo(row::getUnit)
|
||||
.set(unitName).equalTo(row::getUnitName)
|
||||
.set(unitConvRate).equalTo(row::getUnitConvRate)
|
||||
.set(srcConvUnit).equalTo(row::getSrcConvUnit)
|
||||
.set(remark1).equalTo(row::getRemark1)
|
||||
.set(remark2).equalTo(row::getRemark2)
|
||||
.set(remark3).equalTo(row::getRemark3)
|
||||
.set(remark4).equalTo(row::getRemark4)
|
||||
.set(remark5).equalTo(row::getRemark5)
|
||||
.set(updateCount).equalTo(row::getUpdateCount)
|
||||
.set(deleteFlag).equalTo(row::getDeleteFlag)
|
||||
.set(createBy).equalTo(row::getCreateBy)
|
||||
.set(createTime).equalTo(row::getCreateTime)
|
||||
.set(updateBy).equalTo(row::getUpdateBy)
|
||||
.set(updateTime).equalTo(row::getUpdateTime)
|
||||
.set(remark).equalTo(row::getRemark);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: SF_WMS_M_UNIT_INFO")
|
||||
static UpdateDSL<UpdateModel> updateSelectiveColumns(UnitInfo row, UpdateDSL<UpdateModel> dsl) {
|
||||
return dsl.set(orgCd).equalToWhenPresent(row::getOrgCd)
|
||||
.set(unit).equalToWhenPresent(row::getUnit)
|
||||
.set(unitName).equalToWhenPresent(row::getUnitName)
|
||||
.set(unitConvRate).equalToWhenPresent(row::getUnitConvRate)
|
||||
.set(srcConvUnit).equalToWhenPresent(row::getSrcConvUnit)
|
||||
.set(remark1).equalToWhenPresent(row::getRemark1)
|
||||
.set(remark2).equalToWhenPresent(row::getRemark2)
|
||||
.set(remark3).equalToWhenPresent(row::getRemark3)
|
||||
.set(remark4).equalToWhenPresent(row::getRemark4)
|
||||
.set(remark5).equalToWhenPresent(row::getRemark5)
|
||||
.set(updateCount).equalToWhenPresent(row::getUpdateCount)
|
||||
.set(deleteFlag).equalToWhenPresent(row::getDeleteFlag)
|
||||
.set(createBy).equalToWhenPresent(row::getCreateBy)
|
||||
.set(createTime).equalToWhenPresent(row::getCreateTime)
|
||||
.set(updateBy).equalToWhenPresent(row::getUpdateBy)
|
||||
.set(updateTime).equalToWhenPresent(row::getUpdateTime)
|
||||
.set(remark).equalToWhenPresent(row::getRemark);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: SF_WMS_M_UNIT_INFO")
|
||||
default int updateByPrimaryKey(UnitInfo row) {
|
||||
return update(c ->
|
||||
c.set(unitName).equalTo(row::getUnitName)
|
||||
.set(unitConvRate).equalTo(row::getUnitConvRate)
|
||||
.set(srcConvUnit).equalTo(row::getSrcConvUnit)
|
||||
.set(remark1).equalTo(row::getRemark1)
|
||||
.set(remark2).equalTo(row::getRemark2)
|
||||
.set(remark3).equalTo(row::getRemark3)
|
||||
.set(remark4).equalTo(row::getRemark4)
|
||||
.set(remark5).equalTo(row::getRemark5)
|
||||
.set(updateCount).equalTo(row::getUpdateCount)
|
||||
.set(deleteFlag).equalTo(row::getDeleteFlag)
|
||||
.set(createBy).equalTo(row::getCreateBy)
|
||||
.set(createTime).equalTo(row::getCreateTime)
|
||||
.set(updateBy).equalTo(row::getUpdateBy)
|
||||
.set(updateTime).equalTo(row::getUpdateTime)
|
||||
.set(remark).equalTo(row::getRemark)
|
||||
.where(orgCd, isEqualTo(row::getOrgCd))
|
||||
.and(unit, isEqualTo(row::getUnit))
|
||||
);
|
||||
}
|
||||
|
||||
@Generated(value="org.mybatis.generator.api.MyBatisGenerator", comments="Source Table: SF_WMS_M_UNIT_INFO")
|
||||
default int updateByPrimaryKeySelective(UnitInfo row) {
|
||||
return update(c ->
|
||||
c.set(unitName).equalToWhenPresent(row::getUnitName)
|
||||
.set(unitConvRate).equalToWhenPresent(row::getUnitConvRate)
|
||||
.set(srcConvUnit).equalToWhenPresent(row::getSrcConvUnit)
|
||||
.set(remark1).equalToWhenPresent(row::getRemark1)
|
||||
.set(remark2).equalToWhenPresent(row::getRemark2)
|
||||
.set(remark3).equalToWhenPresent(row::getRemark3)
|
||||
.set(remark4).equalToWhenPresent(row::getRemark4)
|
||||
.set(remark5).equalToWhenPresent(row::getRemark5)
|
||||
.set(updateCount).equalToWhenPresent(row::getUpdateCount)
|
||||
.set(deleteFlag).equalToWhenPresent(row::getDeleteFlag)
|
||||
.set(createBy).equalToWhenPresent(row::getCreateBy)
|
||||
.set(createTime).equalToWhenPresent(row::getCreateTime)
|
||||
.set(updateBy).equalToWhenPresent(row::getUpdateBy)
|
||||
.set(updateTime).equalToWhenPresent(row::getUpdateTime)
|
||||
.set(remark).equalToWhenPresent(row::getRemark)
|
||||
.where(orgCd, isEqualTo(row::getOrgCd))
|
||||
.and(unit, isEqualTo(row::getUnit))
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in new issue