This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
package jnpf.model.storecertificatephoto.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import jnpf.base.entity.SuperEntity;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 门店证件照实体
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName(value = "ftb_store_certificate_photo")
|
||||
public class StoreCertificatePhotoEntity extends SuperEntity.SuperCUBaseEntity<String> implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 证照名称
|
||||
*/
|
||||
@TableField(value = "F_CertificateName")
|
||||
private String certificateName;
|
||||
|
||||
/**
|
||||
* 证照图片数量
|
||||
*/
|
||||
@TableField(value = "F_ImageCount")
|
||||
private Integer imageCount;
|
||||
|
||||
/**
|
||||
* 是否必须全部上传
|
||||
*/
|
||||
@TableField(value = "F_RequireAllUpload")
|
||||
private Integer requireAllUpload;
|
||||
|
||||
/**
|
||||
* 是否增加到期日期
|
||||
*/
|
||||
@TableField(value = "F_ExpireDateEnabled")
|
||||
private Integer expireDateEnabled;
|
||||
|
||||
/**
|
||||
* 到期日期名称
|
||||
*/
|
||||
@TableField(value = "F_ExpireDateName")
|
||||
private String expireDateName;
|
||||
|
||||
/**
|
||||
* 临期提醒时间
|
||||
*/
|
||||
@TableField(value = "F_ExpiryReminderDays")
|
||||
private Integer expiryReminderDays;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@TableField(value = "F_Status")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 有效标识
|
||||
*/
|
||||
@TableField(value = "F_EnabledMark")
|
||||
private Integer enabledMark;
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package jnpf.model.storecertificatephoto.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import jnpf.base.entity.SuperEntity;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 门店证件照子项实体
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName(value = "ftb_store_certificate_photo_item")
|
||||
public class StoreCertificatePhotoItemEntity extends SuperEntity.SuperCUBaseEntity<String> implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 门店证件照ID
|
||||
*/
|
||||
@TableField(value = "F_PhotoId")
|
||||
private String photoId;
|
||||
|
||||
/**
|
||||
* 子项类型
|
||||
*/
|
||||
@TableField(value = "F_ItemType")
|
||||
private Integer itemType;
|
||||
|
||||
/**
|
||||
* 子项名称
|
||||
*/
|
||||
@TableField(value = "F_ItemName")
|
||||
private String itemName;
|
||||
|
||||
/**
|
||||
* 文本提示
|
||||
*/
|
||||
@TableField(value = "F_TextPrompt")
|
||||
private String textPrompt;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@TableField(value = "F_Sorts")
|
||||
private Long sorts;
|
||||
|
||||
/**
|
||||
* 有效标识
|
||||
*/
|
||||
@TableField(value = "F_EnabledMark")
|
||||
private Integer enabledMark;
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
package jnpf.model.storecertificatephoto.req;
|
||||
|
||||
import jnpf.model.storecertificatephoto.po.StoreCertificatePhotoEntity;
|
||||
import jnpf.util.FtbUtil;
|
||||
import jnpf.util.RandomUtil;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 门店证件照新增请求参数
|
||||
*/
|
||||
@Data
|
||||
public class StoreCertificatePhotoAddReq implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 证照名称
|
||||
*/
|
||||
@NotBlank(message = "证照名称不能为空")
|
||||
@Length(max = 100, message = "证照名称长度不能超过100")
|
||||
private String certificateName;
|
||||
|
||||
/**
|
||||
* 证照图片数量
|
||||
*/
|
||||
@NotNull(message = "证照图片数量不能为空")
|
||||
@Min(value = 0, message = "证照图片数量最少为0")
|
||||
@Max(value = 9, message = "证照图片数量最多为9")
|
||||
private Integer imageCount;
|
||||
|
||||
/**
|
||||
* 是否必须全部上传
|
||||
*/
|
||||
@NotNull(message = "必须全部上传不能为空")
|
||||
@Min(value = 0, message = "必须全部上传只能为0或1")
|
||||
@Max(value = 1, message = "必须全部上传只能为0或1")
|
||||
private Integer requireAllUpload;
|
||||
|
||||
/**
|
||||
* 是否增加到期日期
|
||||
*/
|
||||
@NotNull(message = "增加到期日期不能为空")
|
||||
@Min(value = 0, message = "增加到期日期只能为0或1")
|
||||
@Max(value = 1, message = "增加到期日期只能为0或1")
|
||||
private Integer expireDateEnabled;
|
||||
|
||||
/**
|
||||
* 到期日期名称
|
||||
*/
|
||||
@Length(max = 100, message = "到期日期名称长度不能超过100")
|
||||
private String expireDateName;
|
||||
|
||||
/**
|
||||
* 临期提醒时间
|
||||
*/
|
||||
private Integer expiryReminderDays;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@NotNull(message = "状态不能为空")
|
||||
@Min(value = 0, message = "状态只能为0或1")
|
||||
@Max(value = 1, message = "状态只能为0或1")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 图片名称列表
|
||||
*/
|
||||
@Valid
|
||||
private List<StoreCertificatePhotoItemReq> imageItemList = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* 文本名称列表
|
||||
*/
|
||||
@Valid
|
||||
private List<StoreCertificatePhotoItemReq> textItemList = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* 转换为实体
|
||||
*
|
||||
* @return 门店证件照实体
|
||||
*/
|
||||
public StoreCertificatePhotoEntity convert() {
|
||||
StoreCertificatePhotoEntity entity = new StoreCertificatePhotoEntity();
|
||||
entity.setId(FtbUtil.getId());
|
||||
entity.setCertificateName(this.certificateName == null ? null : this.certificateName.trim());
|
||||
entity.setImageCount(this.imageCount);
|
||||
entity.setRequireAllUpload(this.requireAllUpload);
|
||||
entity.setExpireDateEnabled(this.expireDateEnabled);
|
||||
entity.setExpireDateName(this.expireDateName == null ? null : this.expireDateName.trim());
|
||||
entity.setExpiryReminderDays(this.expiryReminderDays);
|
||||
entity.setStatus(this.status);
|
||||
entity.setEnabledMark(0);
|
||||
return entity;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package jnpf.model.storecertificatephoto.req;
|
||||
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 门店证件照子项请求参数。
|
||||
*/
|
||||
@Data
|
||||
public class StoreCertificatePhotoItemReq implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 子项ID(更新时传,有值则更新;无值则新增)。
|
||||
*/
|
||||
@Length(max = 50, message = "子项ID长度不能超过50")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 子项名称。
|
||||
*/
|
||||
@NotBlank(message = "名称不能为空")
|
||||
@Length(max = 20, message = "名称长度不能超过20")
|
||||
private String itemName;
|
||||
|
||||
/**
|
||||
* 文本提示。
|
||||
*/
|
||||
@Length(max = 40, message = "文本提示长度不能超过40")
|
||||
private String textPrompt;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package jnpf.model.storecertificatephoto.req;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* 门店证件照编辑请求参数
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class StoreCertificatePhotoUpdateReq extends StoreCertificatePhotoAddReq {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@NotBlank(message = "主键ID不能为空")
|
||||
private String id;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package jnpf.model.storecertificatephoto.vo;
|
||||
|
||||
import jnpf.model.storecertificatephoto.po.StoreCertificatePhotoEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 门店证件照返回参数
|
||||
*/
|
||||
@Data
|
||||
public class StoreCertificatePhotoIdNameVO {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 证照名称
|
||||
*/
|
||||
private String certificateName;
|
||||
|
||||
/**
|
||||
* 转换为返回对象
|
||||
*
|
||||
* @param entity 门店证件照实体
|
||||
* @return 返回对象
|
||||
*/
|
||||
public static StoreCertificatePhotoIdNameVO convert(StoreCertificatePhotoEntity entity) {
|
||||
if (entity == null) {
|
||||
return null;
|
||||
}
|
||||
StoreCertificatePhotoIdNameVO vo = new StoreCertificatePhotoIdNameVO();
|
||||
vo.setId(entity.getId());
|
||||
vo.setCertificateName(entity.getCertificateName());
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package jnpf.model.storecertificatephoto.vo;
|
||||
|
||||
import jnpf.model.storecertificatephoto.po.StoreCertificatePhotoItemEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 门店证件照子项返回参数
|
||||
*/
|
||||
@Data
|
||||
public class StoreCertificatePhotoItemVO {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 子项名称
|
||||
*/
|
||||
private String itemName;
|
||||
|
||||
/**
|
||||
* 文本提示
|
||||
*/
|
||||
private String textPrompt;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Long sorts;
|
||||
|
||||
/**
|
||||
* 转换为返回对象
|
||||
*
|
||||
* @param entity 门店证件照子项实体
|
||||
* @return 返回对象
|
||||
*/
|
||||
public static StoreCertificatePhotoItemVO convert(StoreCertificatePhotoItemEntity entity) {
|
||||
if (entity == null) {
|
||||
return null;
|
||||
}
|
||||
StoreCertificatePhotoItemVO vo = new StoreCertificatePhotoItemVO();
|
||||
vo.setId(entity.getId());
|
||||
vo.setItemName(entity.getItemName());
|
||||
vo.setTextPrompt(entity.getTextPrompt());
|
||||
vo.setSorts(entity.getSorts());
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package jnpf.model.storecertificatephoto.vo;
|
||||
|
||||
import jnpf.model.storecertificatephoto.po.StoreCertificatePhotoEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 门店证件照返回参数
|
||||
*/
|
||||
@Data
|
||||
public class StoreCertificatePhotoVO {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 证照名称
|
||||
*/
|
||||
private String certificateName;
|
||||
|
||||
/**
|
||||
* 证照图片数量
|
||||
*/
|
||||
private Integer imageCount;
|
||||
|
||||
/**
|
||||
* 是否必须全部上传
|
||||
*/
|
||||
private Integer requireAllUpload;
|
||||
|
||||
/**
|
||||
* 是否增加到期日期
|
||||
*/
|
||||
private Integer expireDateEnabled;
|
||||
|
||||
/**
|
||||
* 到期日期名称
|
||||
*/
|
||||
private String expireDateName;
|
||||
|
||||
/**
|
||||
* 临期提醒时间
|
||||
*/
|
||||
private Integer expiryReminderDays;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 图片名称列表
|
||||
*/
|
||||
private List<StoreCertificatePhotoItemVO> imageItemList = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* 文本名称列表
|
||||
*/
|
||||
private List<StoreCertificatePhotoItemVO> textItemList = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* 转换为返回对象
|
||||
*
|
||||
* @param entity 门店证件照实体
|
||||
* @return 返回对象
|
||||
*/
|
||||
public static StoreCertificatePhotoVO convert(StoreCertificatePhotoEntity entity) {
|
||||
if (entity == null) {
|
||||
return null;
|
||||
}
|
||||
StoreCertificatePhotoVO vo = new StoreCertificatePhotoVO();
|
||||
vo.setId(entity.getId());
|
||||
vo.setCertificateName(entity.getCertificateName());
|
||||
vo.setImageCount(entity.getImageCount());
|
||||
vo.setRequireAllUpload(entity.getRequireAllUpload());
|
||||
vo.setExpireDateEnabled(entity.getExpireDateEnabled());
|
||||
vo.setExpireDateName(entity.getExpireDateName());
|
||||
vo.setExpiryReminderDays(entity.getExpiryReminderDays());
|
||||
vo.setStatus(entity.getStatus());
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user