feat:添加产品相关字段
parent
36fdf46263
commit
3f0b8e3d31
@ -0,0 +1,22 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.product.vo.product;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 产品关联供应商 Response VO")
|
||||
@Data
|
||||
public class ProductSupplierRespVO {
|
||||
|
||||
@Schema(description = "关联记录 ID", example = "1")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "供应商 ID", example = "1")
|
||||
private Long supplierId;
|
||||
|
||||
@Schema(description = "供应商名称", example = "默认供应商")
|
||||
private String supplierName;
|
||||
|
||||
@Schema(description = "是否默认供应商", example = "1")
|
||||
private Integer defaultStatus;
|
||||
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.product.vo.product;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Schema(description = "管理后台 - 产品关联供应商 Request VO")
|
||||
@Data
|
||||
public class ProductSupplierSaveReqVO {
|
||||
|
||||
@Schema(description = "供应商 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "供应商 ID 不能为空")
|
||||
private Long supplierId;
|
||||
|
||||
@Schema(description = "是否默认供应商", example = "1")
|
||||
private Integer defaultStatus;
|
||||
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
package cn.iocoder.yudao.module.erp.dal.dataobject.productsupplierrel;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
|
||||
@TableName("erp_product_supplier_rel")
|
||||
@KeySequence("erp_product_supplier_rel_seq")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ProductSupplierRelDO extends BaseDO {
|
||||
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
private Long productId;
|
||||
|
||||
private Long supplierId;
|
||||
|
||||
private String supplierName;
|
||||
|
||||
private Integer defaultStatus;
|
||||
|
||||
private Integer sort;
|
||||
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package cn.iocoder.yudao.module.erp.dal.mysql.productsupplierrel;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.erp.dal.dataobject.productsupplierrel.ProductSupplierRelDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface ProductSupplierRelMapper extends BaseMapperX<ProductSupplierRelDO> {
|
||||
|
||||
default List<ProductSupplierRelDO> selectListByProductId(Long productId) {
|
||||
return selectList(ProductSupplierRelDO::getProductId, productId);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue