master:调优;
parent
75f785e3db
commit
e7608cbb20
|
|
@ -79,7 +79,7 @@ public class StoreProductController extends XktBaseController {
|
|||
/**
|
||||
* 新增档口商品
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('system:product:add')")
|
||||
@PreAuthorize("@ss.hasPermi('system:product:add')")
|
||||
@Log(title = "档口商品", businessType = BusinessType.INSERT)
|
||||
@ApiOperation(value = "新增档口商品", httpMethod = "POST", response = R.class)
|
||||
@PostMapping
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@ public class StoreProdResVO {
|
|||
|
||||
@ApiModelProperty("档口商品名称")
|
||||
private Long storeProdId;
|
||||
@ApiModelProperty("档口ID")
|
||||
private Long storeId;
|
||||
@ApiModelProperty("档口商品名称")
|
||||
private String prodName;
|
||||
@ApiModelProperty(name = "商品分类ID")
|
||||
|
|
|
|||
|
|
@ -33,6 +33,9 @@ public class StoreProdVO {
|
|||
|
||||
@ApiModelProperty("档口商品名称")
|
||||
private String prodName;
|
||||
@ApiModelProperty(name = "档口ID")
|
||||
@NotNull(message = "档口ID不能为空!")
|
||||
private Long storeId;
|
||||
@ApiModelProperty(name = "商品分类ID")
|
||||
@NotNull(message = "商品分类ID不能为空!")
|
||||
private Long prodCateId;
|
||||
|
|
|
|||
|
|
@ -31,6 +31,11 @@ public class StoreProduct extends XktBaseEntity {
|
|||
@TableId
|
||||
private Long storeProdId;
|
||||
|
||||
/**
|
||||
* 档口ID
|
||||
*/
|
||||
private Long storeId;
|
||||
|
||||
/**
|
||||
* 档口商品名称
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
|
@ -29,6 +30,8 @@ public class StoreProdDTO {
|
|||
|
||||
@ApiModelProperty("档口商品名称")
|
||||
private String prodName;
|
||||
@ApiModelProperty(name = "档口ID")
|
||||
private Long storeId;
|
||||
@ApiModelProperty(name = "商品分类ID")
|
||||
private Long prodCateId;
|
||||
@ApiModelProperty(name = "工厂货号")
|
||||
|
|
|
|||
|
|
@ -25,8 +25,10 @@ import java.util.List;
|
|||
@Data
|
||||
public class StoreProdResDTO {
|
||||
|
||||
@ApiModelProperty("档口商品名称")
|
||||
@ApiModelProperty("档口商品ID")
|
||||
private Long storeProdId;
|
||||
@ApiModelProperty("档口ID")
|
||||
private Long storeId;
|
||||
@ApiModelProperty("档口商品名称")
|
||||
private String prodName;
|
||||
@ApiModelProperty(name = "商品分类ID")
|
||||
|
|
|
|||
|
|
@ -61,6 +61,6 @@ public interface StoreColorMapper extends BaseMapper<StoreColor> {
|
|||
*/
|
||||
public int deleteStoreColorByStoreColorIds(Long[] storeColorIds);
|
||||
|
||||
List<StoreColorDTO> selectListByStoreProdId(Long storeProdId);
|
||||
List<StoreColorDTO> selectListByStoreProdId(Long storeId);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ public class StoreProductServiceImpl implements IStoreProductService {
|
|||
List<StoreProdCateAttrDTO> cateAttrList = this.storeProdCateAttrMapper.selectListByStoreProdId(storeProdId);
|
||||
storeProdResDTO.setCateAttrList(CollectionUtils.isEmpty(cateAttrList) ? new ArrayList<>() : BeanUtil.copyToList(cateAttrList, StoreProdCateAttrDTO.class));
|
||||
// 档口所有颜色列表
|
||||
List<StoreColorDTO> allColorList = this.storeColorMapper.selectListByStoreProdId(storeProdId);
|
||||
List<StoreColorDTO> allColorList = this.storeColorMapper.selectListByStoreProdId(storeProd.getStoreId());
|
||||
storeProdResDTO.setAllColorList(CollectionUtils.isEmpty(allColorList) ? new ArrayList<>() : BeanUtil.copyToList(allColorList, StoreColorDTO.class));
|
||||
// 档口当前商品颜色列表
|
||||
List<StoreProdColorDTO> colorList = this.storeProdColorMapper.selectListByStoreProdId(storeProdId);
|
||||
|
|
@ -74,7 +74,7 @@ public class StoreProductServiceImpl implements IStoreProductService {
|
|||
// 档口颜色价格列表
|
||||
List<StoreProdColorPriceDTO> priceList = this.storeProdColorPriceMapper.selectListByStoreProdId(storeProdId);
|
||||
storeProdResDTO.setPriceList(CollectionUtils.isEmpty(priceList) ? new ArrayList<>() : BeanUtil.copyToList(priceList, StoreProdColorPriceDTO.class));
|
||||
// 档口详情
|
||||
// 档口商品详情
|
||||
StoreProductDetail prodDetail = this.storeProdDetailMapper.selectByStoreProdId(storeProdId);
|
||||
storeProdResDTO.setDetail(ObjectUtils.isEmpty(prodDetail) ? null : BeanUtil.toBean(prodDetail, StoreProdDetailDTO.class));
|
||||
// 档口服务承诺
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
order_num AS orderNum
|
||||
FROM
|
||||
store_color
|
||||
WHERE del_flag = 0 AND store_prod_id = #{storeProdId}
|
||||
WHERE del_flag = 0 AND store_id = #{storeId}
|
||||
</select>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -110,6 +110,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
sf.file_url AS fileUrl,
|
||||
spf.file_type AS fileType,
|
||||
sf.file_name AS fileName,
|
||||
spf.file_size AS fileSize,
|
||||
spf.order_num AS orderNum
|
||||
FROM
|
||||
store_product_file spf
|
||||
|
|
|
|||
Loading…
Reference in New Issue