|
@@ -0,0 +1,195 @@
|
|
|
+package com.persagy.account.pojo.dto;
|
|
|
+
|
|
|
+import java.util.Date;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
|
|
+import com.baomidou.mybatisplus.annotation.TableField;
|
|
|
+import com.baomidou.mybatisplus.annotation.TableName;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
+import com.persagy.common.model.BaseEntity;
|
|
|
+import com.persagy.common.utils.StringUtil;
|
|
|
+
|
|
|
+import lombok.EqualsAndHashCode;
|
|
|
+import lombok.Getter;
|
|
|
+import lombok.Setter;
|
|
|
+import lombok.ToString;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 产品信息
|
|
|
+ *
|
|
|
+ * @version 1.0.0
|
|
|
+ * @company persagy
|
|
|
+ * @author zhangqiankun
|
|
|
+ * @date 2021-04-26 15:45:41
|
|
|
+ */
|
|
|
+@Getter
|
|
|
+@Setter
|
|
|
+@ToString
|
|
|
+@EqualsAndHashCode(callSuper = false)
|
|
|
+@TableName("saas_product")
|
|
|
+public class SaasProduct extends BaseEntity<SaasProduct> {
|
|
|
+ private static final long serialVersionUID = -7374882065014346250L;
|
|
|
+
|
|
|
+ @TableField(updateStrategy = FieldStrategy.NOT_EMPTY)
|
|
|
+ private String productCode; // 产品编码
|
|
|
+
|
|
|
+ @TableField(updateStrategy = FieldStrategy.NOT_EMPTY)
|
|
|
+ private String productName; // 产品名称
|
|
|
+
|
|
|
+ @TableField(updateStrategy = FieldStrategy.NOT_EMPTY)
|
|
|
+ private String productIcon; // 产品图标
|
|
|
+
|
|
|
+ @TableField(updateStrategy = FieldStrategy.NOT_EMPTY)
|
|
|
+ private String productState; // 产品状态,0-建设中,1-已完成,2-已关联
|
|
|
+
|
|
|
+ @TableField(updateStrategy = FieldStrategy.NOT_EMPTY)
|
|
|
+ private String productMenu; // 产品是否关联菜单,0-未关联,1-已关联
|
|
|
+
|
|
|
+ @TableField(updateStrategy = FieldStrategy.NOT_EMPTY)
|
|
|
+ private Date createTime; // 创建时间
|
|
|
+
|
|
|
+ @TableField(updateStrategy = FieldStrategy.NOT_EMPTY)
|
|
|
+ private Date updateTime; // 更新时间
|
|
|
+
|
|
|
+ @TableField(updateStrategy = FieldStrategy.NOT_EMPTY)
|
|
|
+ private String updateUser; // 最后一次操作者ID
|
|
|
+
|
|
|
+ @TableField(updateStrategy = FieldStrategy.NOT_EMPTY)
|
|
|
+ private String remark; // 备注
|
|
|
+
|
|
|
+ public static class Builder {
|
|
|
+
|
|
|
+ private LambdaQueryWrapper<SaasProduct> queryWrapper = null;
|
|
|
+
|
|
|
+ private LambdaUpdateWrapper<SaasProduct> updateWrapper = null;
|
|
|
+
|
|
|
+ public Builder createQueryWrapper() {
|
|
|
+ queryWrapper = new LambdaQueryWrapper<SaasProduct>();
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Builder createUpdateWrapper() {
|
|
|
+ updateWrapper = new LambdaUpdateWrapper<SaasProduct>();
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Builder idEq(String id) {
|
|
|
+ if (StringUtil.isNotBlank(id)) {
|
|
|
+ if (updateWrapper != null) {
|
|
|
+ updateWrapper.eq(SaasProduct::getId, id);
|
|
|
+ } else {
|
|
|
+ queryWrapper.eq(SaasProduct::getId, id);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Builder productCodeEq(String productCode) {
|
|
|
+ if (StringUtil.isNotBlank(productCode)) {
|
|
|
+ if (updateWrapper != null) {
|
|
|
+ updateWrapper.eq(SaasProduct::getProductCode, productCode);
|
|
|
+ } else {
|
|
|
+ queryWrapper.eq(SaasProduct::getProductCode, productCode);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Builder productNameEq(String productName) {
|
|
|
+ if (StringUtil.isNotBlank(productName)) {
|
|
|
+ if (updateWrapper != null) {
|
|
|
+ updateWrapper.eq(SaasProduct::getProductName, productName);
|
|
|
+ } else {
|
|
|
+ queryWrapper.eq(SaasProduct::getProductName, productName);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Builder productIconEq(String productIcon) {
|
|
|
+ if (StringUtil.isNotBlank(productIcon)) {
|
|
|
+ if (updateWrapper != null) {
|
|
|
+ updateWrapper.eq(SaasProduct::getProductIcon, productIcon);
|
|
|
+ } else {
|
|
|
+ queryWrapper.eq(SaasProduct::getProductIcon, productIcon);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Builder productStateEq(String productState) {
|
|
|
+ if (StringUtil.isNotBlank(productState)) {
|
|
|
+ if (updateWrapper != null) {
|
|
|
+ updateWrapper.eq(SaasProduct::getProductState, productState);
|
|
|
+ } else {
|
|
|
+ queryWrapper.eq(SaasProduct::getProductState, productState);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Builder productMenuEq(String productMenu) {
|
|
|
+ if (StringUtil.isNotBlank(productMenu)) {
|
|
|
+ if (updateWrapper != null) {
|
|
|
+ updateWrapper.eq(SaasProduct::getProductMenu, productMenu);
|
|
|
+ } else {
|
|
|
+ queryWrapper.eq(SaasProduct::getProductMenu, productMenu);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Builder createTimeEq(Date createTime) {
|
|
|
+ if (null != createTime) {
|
|
|
+ if (updateWrapper != null) {
|
|
|
+ updateWrapper.eq(SaasProduct::getCreateTime, createTime);
|
|
|
+ } else {
|
|
|
+ queryWrapper.eq(SaasProduct::getCreateTime, createTime);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Builder updateTimeEq(Date updateTime) {
|
|
|
+ if (null != updateTime) {
|
|
|
+ if (updateWrapper != null) {
|
|
|
+ updateWrapper.eq(SaasProduct::getUpdateTime, updateTime);
|
|
|
+ } else {
|
|
|
+ queryWrapper.eq(SaasProduct::getUpdateTime, updateTime);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Builder updateUserEq(String updateUser) {
|
|
|
+ if (StringUtil.isNotBlank(updateUser)) {
|
|
|
+ if (updateWrapper != null) {
|
|
|
+ updateWrapper.eq(SaasProduct::getUpdateUser, updateUser);
|
|
|
+ } else {
|
|
|
+ queryWrapper.eq(SaasProduct::getUpdateUser, updateUser);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Builder remarkEq(String remark) {
|
|
|
+ if (StringUtil.isNotBlank(remark)) {
|
|
|
+ if (updateWrapper != null) {
|
|
|
+ updateWrapper.eq(SaasProduct::getRemark, remark);
|
|
|
+ } else {
|
|
|
+ queryWrapper.eq(SaasProduct::getRemark, remark);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public LambdaQueryWrapper<SaasProduct> builderQueryWrapper() {
|
|
|
+ return queryWrapper;
|
|
|
+ }
|
|
|
+
|
|
|
+ public LambdaUpdateWrapper<SaasProduct> builderUpdateWrapper() {
|
|
|
+ return updateWrapper;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|