|
@@ -2,6 +2,7 @@ package com.persagy.account.pojo.dto;
|
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.annotation.FieldFill;
|
|
|
import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
|
|
import com.baomidou.mybatisplus.annotation.TableField;
|
|
|
import com.baomidou.mybatisplus.annotation.TableName;
|
|
@@ -23,7 +24,7 @@ import lombok.ToString;
|
|
|
* @version 1.0.0
|
|
|
* @company persagy
|
|
|
* @author zhangqiankun
|
|
|
- * @date 2021-04-26 15:45:41
|
|
|
+ * @date 2021-04-27 16:08:25
|
|
|
*/
|
|
|
@Getter
|
|
|
@Setter
|
|
@@ -49,150 +50,183 @@ public class SaasProduct extends BaseEntity<SaasProduct> {
|
|
|
@TableField(updateStrategy = FieldStrategy.NOT_EMPTY)
|
|
|
private String productMenu; // 产品是否关联菜单,0-未关联,1-已关联
|
|
|
|
|
|
- @TableField(updateStrategy = FieldStrategy.NOT_EMPTY)
|
|
|
+ @TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_EMPTY)
|
|
|
private Date createTime; // 创建时间
|
|
|
|
|
|
- @TableField(updateStrategy = FieldStrategy.NOT_EMPTY)
|
|
|
+ @TableField(fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_EMPTY)
|
|
|
private Date updateTime; // 更新时间
|
|
|
|
|
|
@TableField(updateStrategy = FieldStrategy.NOT_EMPTY)
|
|
|
private String updateUser; // 最后一次操作者ID
|
|
|
|
|
|
@TableField(updateStrategy = FieldStrategy.NOT_EMPTY)
|
|
|
- private String remark; // 备注
|
|
|
+ private String remark; // 备注
|
|
|
+
|
|
|
+ public static class BuilderQueryWrapper {
|
|
|
+
|
|
|
+ private LambdaQueryWrapper<SaasProduct> queryWrapper = new LambdaQueryWrapper<SaasProduct>();
|
|
|
|
|
|
- public static class Builder {
|
|
|
+ public BuilderQueryWrapper idEq(String id) {
|
|
|
+ if (StringUtil.isNotBlank(id)) {
|
|
|
+ queryWrapper.eq(SaasProduct::getId, id);
|
|
|
+ }
|
|
|
+ return this;
|
|
|
+ }
|
|
|
|
|
|
- private LambdaQueryWrapper<SaasProduct> queryWrapper = null;
|
|
|
+ public BuilderQueryWrapper productCodeEq(String productCode) {
|
|
|
+ if (StringUtil.isNotBlank(productCode)) {
|
|
|
+ queryWrapper.eq(SaasProduct::getProductCode, productCode);
|
|
|
+ }
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public BuilderQueryWrapper productNameEq(String productName) {
|
|
|
+ if (StringUtil.isNotBlank(productName)) {
|
|
|
+ queryWrapper.eq(SaasProduct::getProductName, productName);
|
|
|
+ }
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public BuilderQueryWrapper productNameLike(String productName) {
|
|
|
+ if (StringUtil.isNotBlank(productName)) {
|
|
|
+ queryWrapper.like(SaasProduct::getProductName, productName);
|
|
|
+ }
|
|
|
+ return this;
|
|
|
+ }
|
|
|
|
|
|
- private LambdaUpdateWrapper<SaasProduct> updateWrapper = null;
|
|
|
+ public BuilderQueryWrapper productIconEq(String productIcon) {
|
|
|
+ if (StringUtil.isNotBlank(productIcon)) {
|
|
|
+ queryWrapper.eq(SaasProduct::getProductIcon, productIcon);
|
|
|
+ }
|
|
|
+ return this;
|
|
|
+ }
|
|
|
|
|
|
- public Builder createQueryWrapper() {
|
|
|
- queryWrapper = new LambdaQueryWrapper<SaasProduct>();
|
|
|
+ public BuilderQueryWrapper productStateEq(String productState) {
|
|
|
+ if (StringUtil.isNotBlank(productState)) {
|
|
|
+ queryWrapper.eq(SaasProduct::getProductState, productState);
|
|
|
+ }
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
- public Builder createUpdateWrapper() {
|
|
|
- updateWrapper = new LambdaUpdateWrapper<SaasProduct>();
|
|
|
+ public BuilderQueryWrapper productMenuEq(String productMenu) {
|
|
|
+ if (StringUtil.isNotBlank(productMenu)) {
|
|
|
+ queryWrapper.eq(SaasProduct::getProductMenu, productMenu);
|
|
|
+ }
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
- public Builder idEq(String id) {
|
|
|
+ public BuilderQueryWrapper createTimeEq(Date createTime) {
|
|
|
+ if (null != createTime) {
|
|
|
+ queryWrapper.eq(SaasProduct::getCreateTime, createTime);
|
|
|
+ }
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public BuilderQueryWrapper updateTimeEq(Date updateTime) {
|
|
|
+ if (null != updateTime) {
|
|
|
+ queryWrapper.eq(SaasProduct::getUpdateTime, updateTime);
|
|
|
+ }
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public BuilderQueryWrapper updateUserEq(String updateUser) {
|
|
|
+ if (StringUtil.isNotBlank(updateUser)) {
|
|
|
+ queryWrapper.eq(SaasProduct::getUpdateUser, updateUser);
|
|
|
+ }
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public BuilderQueryWrapper remarkEq(String remark) {
|
|
|
+ if (StringUtil.isNotBlank(remark)) {
|
|
|
+ queryWrapper.eq(SaasProduct::getRemark, remark);
|
|
|
+ }
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public LambdaQueryWrapper<SaasProduct> builder() {
|
|
|
+ return queryWrapper;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ public static class BuilderUpdateWrapper {
|
|
|
+
|
|
|
+ private LambdaUpdateWrapper<SaasProduct> updateWrapper = new LambdaUpdateWrapper<SaasProduct>();
|
|
|
+
|
|
|
+ public BuilderUpdateWrapper idEq(String id) {
|
|
|
if (StringUtil.isNotBlank(id)) {
|
|
|
- if (updateWrapper != null) {
|
|
|
- updateWrapper.eq(SaasProduct::getId, id);
|
|
|
- } else {
|
|
|
- queryWrapper.eq(SaasProduct::getId, id);
|
|
|
- }
|
|
|
+ updateWrapper.eq(SaasProduct::getId, id);
|
|
|
}
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
- public Builder productCodeEq(String productCode) {
|
|
|
+ public BuilderUpdateWrapper productCodeEq(String productCode) {
|
|
|
if (StringUtil.isNotBlank(productCode)) {
|
|
|
- if (updateWrapper != null) {
|
|
|
- updateWrapper.eq(SaasProduct::getProductCode, productCode);
|
|
|
- } else {
|
|
|
- queryWrapper.eq(SaasProduct::getProductCode, productCode);
|
|
|
- }
|
|
|
+ updateWrapper.eq(SaasProduct::getProductCode, productCode);
|
|
|
}
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
- public Builder productNameEq(String productName) {
|
|
|
+ public BuilderUpdateWrapper productNameEq(String productName) {
|
|
|
if (StringUtil.isNotBlank(productName)) {
|
|
|
- if (updateWrapper != null) {
|
|
|
- updateWrapper.eq(SaasProduct::getProductName, productName);
|
|
|
- } else {
|
|
|
- queryWrapper.eq(SaasProduct::getProductName, productName);
|
|
|
- }
|
|
|
+ updateWrapper.eq(SaasProduct::getProductName, productName);
|
|
|
}
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
- public Builder productIconEq(String productIcon) {
|
|
|
+ public BuilderUpdateWrapper productIconEq(String productIcon) {
|
|
|
if (StringUtil.isNotBlank(productIcon)) {
|
|
|
- if (updateWrapper != null) {
|
|
|
- updateWrapper.eq(SaasProduct::getProductIcon, productIcon);
|
|
|
- } else {
|
|
|
- queryWrapper.eq(SaasProduct::getProductIcon, productIcon);
|
|
|
- }
|
|
|
+ updateWrapper.eq(SaasProduct::getProductIcon, productIcon);
|
|
|
}
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
- public Builder productStateEq(String productState) {
|
|
|
+ public BuilderUpdateWrapper productStateEq(String productState) {
|
|
|
if (StringUtil.isNotBlank(productState)) {
|
|
|
- if (updateWrapper != null) {
|
|
|
- updateWrapper.eq(SaasProduct::getProductState, productState);
|
|
|
- } else {
|
|
|
- queryWrapper.eq(SaasProduct::getProductState, productState);
|
|
|
- }
|
|
|
+ updateWrapper.eq(SaasProduct::getProductState, productState);
|
|
|
}
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
- public Builder productMenuEq(String productMenu) {
|
|
|
+ public BuilderUpdateWrapper productMenuEq(String productMenu) {
|
|
|
if (StringUtil.isNotBlank(productMenu)) {
|
|
|
- if (updateWrapper != null) {
|
|
|
- updateWrapper.eq(SaasProduct::getProductMenu, productMenu);
|
|
|
- } else {
|
|
|
- queryWrapper.eq(SaasProduct::getProductMenu, productMenu);
|
|
|
- }
|
|
|
+ updateWrapper.eq(SaasProduct::getProductMenu, productMenu);
|
|
|
}
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
- public Builder createTimeEq(Date createTime) {
|
|
|
+ public BuilderUpdateWrapper createTimeEq(Date createTime) {
|
|
|
if (null != createTime) {
|
|
|
- if (updateWrapper != null) {
|
|
|
- updateWrapper.eq(SaasProduct::getCreateTime, createTime);
|
|
|
- } else {
|
|
|
- queryWrapper.eq(SaasProduct::getCreateTime, createTime);
|
|
|
- }
|
|
|
+ updateWrapper.eq(SaasProduct::getCreateTime, createTime);
|
|
|
}
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
- public Builder updateTimeEq(Date updateTime) {
|
|
|
+ public BuilderUpdateWrapper updateTimeEq(Date updateTime) {
|
|
|
if (null != updateTime) {
|
|
|
- if (updateWrapper != null) {
|
|
|
- updateWrapper.eq(SaasProduct::getUpdateTime, updateTime);
|
|
|
- } else {
|
|
|
- queryWrapper.eq(SaasProduct::getUpdateTime, updateTime);
|
|
|
- }
|
|
|
+ updateWrapper.eq(SaasProduct::getUpdateTime, updateTime);
|
|
|
}
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
- public Builder updateUserEq(String updateUser) {
|
|
|
+ public BuilderUpdateWrapper updateUserEq(String updateUser) {
|
|
|
if (StringUtil.isNotBlank(updateUser)) {
|
|
|
- if (updateWrapper != null) {
|
|
|
- updateWrapper.eq(SaasProduct::getUpdateUser, updateUser);
|
|
|
- } else {
|
|
|
- queryWrapper.eq(SaasProduct::getUpdateUser, updateUser);
|
|
|
- }
|
|
|
+ updateWrapper.eq(SaasProduct::getUpdateUser, updateUser);
|
|
|
}
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
- public Builder remarkEq(String remark) {
|
|
|
+ public BuilderUpdateWrapper remarkEq(String remark) {
|
|
|
if (StringUtil.isNotBlank(remark)) {
|
|
|
- if (updateWrapper != null) {
|
|
|
- updateWrapper.eq(SaasProduct::getRemark, remark);
|
|
|
- } else {
|
|
|
- queryWrapper.eq(SaasProduct::getRemark, remark);
|
|
|
- }
|
|
|
+ updateWrapper.eq(SaasProduct::getRemark, remark);
|
|
|
}
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
- public LambdaQueryWrapper<SaasProduct> builderQueryWrapper() {
|
|
|
- return queryWrapper;
|
|
|
- }
|
|
|
-
|
|
|
- public LambdaUpdateWrapper<SaasProduct> builderUpdateWrapper() {
|
|
|
+ public LambdaUpdateWrapper<SaasProduct> builder() {
|
|
|
return updateWrapper;
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
}
|