package com.oying.modules.pc.store.domain.dto; import cn.hutool.core.collection.CollUtil; import cn.hutool.json.JSONUtil; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import javax.validation.constraints.NotBlank; import java.util.ArrayList; import java.util.List; @Data public class StoreCreateRequest { @NotBlank @ApiModelProperty(value = "店铺全称", example = "重庆永辉超市新纪元店") private String storeName; /*@NotBlank @ApiModelProperty(value = "店铺简称", example = "永辉超市(新纪元店)") private String storeShortName;*/ @NotBlank @ApiModelProperty(value = "店铺LOGO文件ID", example = "14567785444763247876234") private Long logoUploadFileId; /*@NotBlank @ApiModelProperty(value = "店铺门户图片ID", example = "276409837458893793939") private Long coverUploadFileId;*/ @NotBlank @ApiModelProperty(value = "平台类目ID", example = "29784639387324848347230") private Long platformCategoryId; //private String businessCategory; @NotBlank @ApiModelProperty(value = "简介", example = "") private String description; @NotBlank @ApiModelProperty(value = "店铺联系电话", example = "13800000001") private String contactPhone; @NotBlank @ApiModelProperty(value = "店铺地址", example = "276409837458893793939") private String address; @NotBlank @ApiModelProperty(value = "店铺坐标经度", example = "121.505978") private Double longitude; @NotBlank @ApiModelProperty(value = "店铺坐标纬度", example = "31.144515") private Double latitude; @ApiModelProperty(value = "店铺资质", example = "") private List qualificationList; public boolean hasQualificationList() { return CollUtil.isNotEmpty(this.qualificationList); } public static void main(String[] args) { StoreCreateRequest request = new StoreCreateRequest(); request.setStoreName("上海三林小学"); request.setLogoUploadFileId(1L); request.setDescription(""); // request.setCoverUploadFileId(1L); request.setPlatformCategoryId(1L); request.setContactPhone("13599873421"); request.setAddress("上海"); request.setLongitude(121.505978D); request.setLatitude(31.144515D); List qualificationList = new ArrayList<>(); StoreQualificationCreateRequest sq1 = new StoreQualificationCreateRequest(); sq1.setType(10001); // sq1.setName("营业执照"); sq1.setImageUploadFileId(""); qualificationList.add(sq1); StoreQualificationCreateRequest sq2 = new StoreQualificationCreateRequest(); sq2.setType(10002); // sq2.setName("许可证"); sq2.setImageUploadFileId(""); qualificationList.add(sq2); request.setQualificationList(qualificationList); System.out.println(JSONUtil.toJsonStr(request)); } }