提交 1f2b28f2 作者: xiaowang

后台:产品管理、商品管理、行业管理、品牌管理新增

上级 aa69692c
...@@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.RestController;
*/ */
@RestController @RestController
@RequestMapping("/brand") @RequestMapping("/brand")
@Api(tags = {"品牌管理-相关接口"}) @Api(tags = {"后台-品牌管理-相关接口"})
public class BackstageBrandManageController { public class BackstageBrandManageController {
@Autowired @Autowired
...@@ -37,12 +37,12 @@ public class BackstageBrandManageController { ...@@ -37,12 +37,12 @@ public class BackstageBrandManageController {
return ResultBody.success(brandManageService.listBrandInfo(pageNo, pageSize)); return ResultBody.success(brandManageService.listBrandInfo(pageNo, pageSize));
} }
// @ApiOperation(value = "删除品牌") @ApiOperation(value = "删除品牌")
// @GetMapping("deleteBrandInfo") @GetMapping("deleteBrandInfo")
// @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
// public ResultBody deleteBrandInfo(Integer id) { public ResultBody deleteBrandInfo(Integer id) {
// return brandManageService.deleteBrandInfo(id); return brandManageService.deleteBrandInfo(id);
// } }
@ApiOperation(value = "编辑品牌") @ApiOperation(value = "编辑品牌")
@GetMapping("editBrandInfo") @GetMapping("editBrandInfo")
......
...@@ -21,7 +21,7 @@ import javax.annotation.Resource; ...@@ -21,7 +21,7 @@ import javax.annotation.Resource;
*/ */
@RestController @RestController
@RequestMapping("/goods") @RequestMapping("/goods")
@Api(tags = {"商品管理-相关接口"}) @Api(tags = {"后台-商品管理-相关接口"})
public class BackstageGoodsManageController { public class BackstageGoodsManageController {
@Resource @Resource
private GoodsInfoService goodsInfoService; private GoodsInfoService goodsInfoService;
......
package com.mmc.pms.controller;
import com.mmc.pms.common.ResultBody;
import com.mmc.pms.model.dto.*;
import com.mmc.pms.model.qo.IndustrySkuQO;
import com.mmc.pms.model.vo.Create;
import com.mmc.pms.model.vo.IndustrySkuVO;
import com.mmc.pms.model.vo.IndustrySpecVO;
import com.mmc.pms.model.vo.Update;
import com.mmc.pms.service.IndustrySpecService;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
/**
* @Author LW
* @date 2022/10/8 10:57
* 概要:
*/
@RestController
@RequestMapping("/industry/spec/")
@Api(tags = {"后台-行业管理-相关接口"})
public class BackstageIndustrySpecController {
@Autowired
IndustrySpecService industrySpecService;
@ApiOperation(value = "新增行业sku")
@PostMapping("addIndustrySku")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
public ResultBody addIndustrySku(@Validated(Create.class) @ApiParam("行业skuVO") @RequestBody IndustrySkuVO param) {
return industrySpecService.addIndustrySku(param);
}
@ApiOperation(value = "行业sku详情")
@GetMapping("getIndustrySkuDetail")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = IndustrySkuVO.class)})
public ResultBody getIndustrySkuDetail(@ApiParam("id") @RequestParam(value = "id") Integer id) {
return industrySpecService.getIndustrySkuDetail(id);
}
@ApiOperation(value = "行业sku管理---编辑行业sku")
@PostMapping("editIndustrySku")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
public ResultBody editIndustrySku(@Validated(Update.class) @ApiParam("行业skuVO") @RequestBody IndustrySkuVO param) {
return industrySpecService.editIndustrySku(param);
}
@ApiOperation(value = "行业sku管理---分页列表")
@PostMapping("listPageIndustrySku")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = IndustrySkuDTO.class)})
public ResultBody listPageIndustrySku(@ApiParam("条件参数") @RequestBody IndustrySkuQO param) {
return industrySpecService.listPageIndustrySku(param);
}
@ApiOperation(value = "新增方案规格")
@PostMapping("addIndustrySpec")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
public ResultBody addIndustrySpec(@Validated(Create.class) @ApiParam("条件参数") @RequestBody IndustrySpecVO param) {
return industrySpecService.addIndustrySpec(param);
}
@ApiOperation(value = "方案规格回显")
@GetMapping("getIndustrySpecDetail")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = IndustrySpecDTO.class)})
public ResultBody getIndustrySpecDetail(@ApiParam("行业规格id") @RequestParam(value = "industrySpecId") Integer industrySpecId) {
return industrySpecService.getIndustrySpecDetail(industrySpecId);
}
@ApiOperation(value = "编辑方案规格")
@PostMapping("editIndustrySpec")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
public ResultBody editIndustrySpec(@Validated(Update.class) @ApiParam("行业skuVO") @RequestBody IndustrySpecVO param) {
return industrySpecService.editIndustrySpec(param);
}
@ApiOperation(value = "行业sku管理---方案规格管理---分页列表")
@GetMapping("listPageIndustrySpec")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = IndustrySpecDTO.class)})
public ResultBody listPageIndustrySpec(@ApiParam(value = "页码") @RequestParam(value = "pageNo") Integer pageNo,
@ApiParam(value = "每页显示数") @RequestParam(value = "pageSize") Integer pageSize,
@ApiParam(value = "产品skuId") @RequestParam(value = "productSkuId") Integer industrySkuId,
@ApiParam(value = "关键字") @RequestParam(value = "keyword", required = false) String keyword) {
return industrySpecService.listPageIndustrySpec(pageNo, pageSize, industrySkuId, keyword);
}
@ApiOperation(value = "行业方案规格-价格配置")
@PostMapping("industrySpecCPQ")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
public ResultBody industrySpecCPQ(@RequestBody IndustrySpecCPQVO industrySpecCPQQ) {
return industrySpecService.industrySpecCPQ(industrySpecCPQQ);
}
@ApiOperation(value = "行业方案规格管理-价格配置信息的修改")
@PostMapping("updateIndustrySpecCPQ")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
public ResultBody updateIndustrySpecCPQ(@RequestBody IndustrySpecCPQVO industrySpecCPQQ) {
return industrySpecService.updateIndustrySpecCPQ(industrySpecCPQQ);
}
@ApiOperation(value = "行业sku管理---方案规格管理---获取价格配置信息")
@PostMapping("getIndustrySpecCPQ")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = IndustrySpecPriceDTO.class)})
public ResultBody getIndustrySpecCPQ(@RequestBody IndustrySpecCPQVO industrySpecCPQQ) {
return industrySpecService.getIndustrySpecCPQ(industrySpecCPQQ);
}
@ApiOperation(value = "行业sku管理---删除行业sku")
@GetMapping("removeIndustrySku")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
public ResultBody removeIndustrySku(@ApiParam("id") @RequestParam(value = "id") Integer id) {
return industrySpecService.removeIndustrySku(id);
}
@ApiOperation(value = "行业sku管理---方案规格管理---删除行业规格")
@GetMapping("removeIndustrySpec")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = RemoveSkuDTO.class)})
public ResultBody removeIndustrySpec(@ApiParam("id") @RequestParam(value = "id") Integer id) {
return industrySpecService.removeIndustrySpec(id);
}
}
\ No newline at end of file
...@@ -52,13 +52,13 @@ public class BackstageProductSpecController { ...@@ -52,13 +52,13 @@ public class BackstageProductSpecController {
return productSkuService.listPageProductSku(productSkuQO); return productSkuService.listPageProductSku(productSkuQO);
} }
// @ApiOperation(value = "产品sku管理---删除产品sku") @ApiOperation(value = "删除产品sku")
// @GetMapping("removeProductSku") @GetMapping("removeProductSku")
// @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
// public ResultBody removeProductSku(@ApiParam("id") @RequestParam(value = "id") Integer id) { public ResultBody removeProductSku(@ApiParam("id") @RequestParam(value = "id") Integer id) {
// return productSpecService.removeProductSku(id); return productSkuService.removeProductSku(id);
// } }
//
@ApiOperation(value = "新增or修改产品规格") @ApiOperation(value = "新增or修改产品规格")
@PostMapping("addOrEditProductSpec") @PostMapping("addOrEditProductSpec")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
...@@ -112,12 +112,12 @@ public class BackstageProductSpecController { ...@@ -112,12 +112,12 @@ public class BackstageProductSpecController {
// return productSpecService.getDefaultSettings(productSpecId); // return productSpecService.getDefaultSettings(productSpecId);
// } // }
// //
// @ApiOperation(value = "产品规格管理---删除规格") @ApiOperation(value = "产品规格管理---删除规格")
// @GetMapping("removeProductSpec") @GetMapping("removeProductSpec")
// @ApiResponses({@ApiResponse(code = 200, message = "OK", response = RemoveSkuDTO.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = RemoveSkuDTO.class)})
// public ResultBody removeProductSpec(@ApiParam("id") @RequestParam(value = "id") Integer id) { public ResultBody removeProductSpec(@ApiParam("id") @RequestParam(value = "id") Integer id) {
// return productSpecService.removeProductSpec(id); return productSkuService.removeProductSpec(id);
// } }
// //
// @ApiOperation(value = "feign根据渠道等级获取单价信息") // @ApiOperation(value = "feign根据渠道等级获取单价信息")
// @GetMapping("feignGetUnitPriceByTag") // @GetMapping("feignGetUnitPriceByTag")
......
...@@ -42,6 +42,18 @@ public interface GoodsInfoDao { ...@@ -42,6 +42,18 @@ public interface GoodsInfoDao {
void deleteGoodsVideoById(Integer id); void deleteGoodsVideoById(Integer id);
void deleteGoodsServiceByGoodsId(Integer id); void deleteGoodsServiceByGoodsId(Integer id);
void insertMallIndustrySkuInfo(MallIndustrySkuInfoDO mallIndustrySkuInfoDO);
void insertMallIndustrySkuInfoSpec(MallIndustrySkuInfoSpecDO mallIndustrySkuInfoSpecDO);
List<MallProdInfoDO> getMallProSkuInfo(Integer id);
void batchUpdateMallProductSku(List<Integer> delIds);
void batchUpdateMallProdSkuInfo(List<MallProdInfoDO> mallProdSkuInfoList);
List<MallIndustrySkuInfoDO> getMallIndustrySkuInfo(Integer id);
} }
......
package com.mmc.pms.dao;
import com.mmc.pms.entity.*;
import com.mmc.pms.model.dto.IndustrySpecCPQVO;
import com.mmc.pms.model.qo.IndustrySkuQO;
import com.mmc.pms.model.vo.IndustrySkuVO;
import com.mmc.pms.model.vo.IndustrySpecVO;
import com.mmc.pms.service.Impl.IndustryProductInventoryDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Set;
/**
* @Author LW
* @date 2022/10/8 10:58
* 概要:
*/
@Mapper
public interface IndustrySpecDao {
int countSkuName(IndustrySkuVO param);
int insertIndustrySku(IndustrySku industrySku);
int countIndustrySkuById(Integer id);
IndustrySku getIndustrySkuById(Integer id);
int updateIndustrySku(IndustrySku industrySku);
int countListPageIndustrySku(IndustrySkuQO param);
List<IndustrySku> listPageIndustrySku(IndustrySkuQO param);
int countSpecName(IndustrySpecVO param);
int insertIndustrySpec(IndustrySpecDO industrySpecDO);
void insertIndustryProductInventory(IndustryProductInventoryDO industryProductInventoryDO);
void insertInventorySpec(InventorySpecDO inventorySpecDO);
int countIndustrySpec(Integer industrySpecId);
IndustrySpecDO getIndustrySpecById(Integer industrySpecId);
List<IndustryProductInventoryDO> getIndustryProductInventory(Integer industrySpecId);
int updateIndustrySpec(IndustrySpecDO industrySpecDO);
void batchDeleteInventorySpec(List<Integer> industryProductInventoryIds);
void deleteIndustryProductInventory(Integer id);
int countListPageIndustrySpec(Integer industrySkuId, String keyword);
List<IndustrySpecDO> listPageIndustrySpec(int i, Integer pageSize, Integer industrySkuId, String keyword);
int batchInsertSpecPrice(List<IndustrySpecPriceDO> list);
void removeIndustrySpecCPQ(IndustrySpecCPQVO industrySpecCPQQ);
void batchInsertLeaseSpecPrice(List<IndustrySpecPriceDO> list);
List<IndustrySpecPriceDO> getIndustrySpecCPQ(IndustrySpecCPQVO industrySpecCPQQ);
void batchUpdateMallIndustrySpec(@Param("list") List<Integer> list, @Param("id") Integer id);
void batchUpdateMallIndustrySku(@Param("list") List<Integer> list);
void batchUpdateMallIndustrySkuInfo(List<MallIndustrySkuInfoDO> mallIndustrySkuInfoList);
List<MallIndustrySkuInfoSpecDO> listMallIndustrySpecInfo(List<Integer> mallSkuIds);
void batchUpdateMallIndustSpec(@Param("list") List<Integer> list, @Param("id") Integer id);
List<IndustryProductInventoryDO> listIndustryProdInventory(Set<Integer> inventoryIds);
List<IndustrySpecDO> listIndustrySpec(Set<Integer> industrySpecIds);
int countIndustrySpecBySkuId(Integer id);
void removeIndustrySku(Integer id);
List<MallIndustrySkuInfoSpecDO> listMallIndustrySpec(Integer id);
void removeIndustryProductInventory(List<Integer> collect);
List<InventorySpecDO> listInventorySpec(List<Integer> ids);
void removeInventorySpec(List<Integer> ids);
void removeIndustrySpec(Integer id);
}
...@@ -12,37 +12,37 @@ import java.util.List; ...@@ -12,37 +12,37 @@ import java.util.List;
*/ */
@Mapper @Mapper
public interface MiniProgramProductMallDao { public interface MiniProgramProductMallDao {
GoodsInfoDO getGoodsInfoByGoodsId(Integer goodsId); GoodsInfoDO getGoodsInfoByGoodsId(Integer goodsId);
List<GoodsImgDO> listGoodsInfoByGoodsId(Integer goodsId); List<GoodsImgDO> listGoodsInfoByGoodsId(Integer goodsId);
GoodsDetailDO getGoodsDetailByGoodsId(Integer goodsId); GoodsDetailDO getGoodsDetailByGoodsId(Integer goodsId);
List<GoodsQaDO> listGoodsQaInfoByGoodsId(Integer goodsId); List<GoodsQaDO> listGoodsQaInfoByGoodsId(Integer goodsId);
List<GoodsServiceDO> listGoodsServiceByGoodsId(Integer goodsId); List<GoodsServiceDO> listGoodsServiceByGoodsId(Integer goodsId);
List<MallProdSkuInfoDO> getMallProdInfoByGoodsId(Integer goodsId); List<MallProdInfoDO> getMallProdInfoByGoodsId(Integer goodsId);
List<MallProdSkuInfoSpecDO> listMallProdSkuInfoSpec(Integer goodsId); List<MallProdSkuInfoSpecDO> listMallProdSkuInfoSpec(Integer goodsId);
List<ProductSpecDO> listProductSpecInfo(List<Integer> collect); List<ProductSpecDO> listProductSpecInfo(List<Integer> collect);
List<MallIndustrySkuInfoDO> getMallIndustrySkuInfo(Integer goodsInfoId); List<MallIndustrySkuInfoDO> getMallIndustrySkuInfo(Integer goodsInfoId);
List<MallIndustrySkuInfoSpecDO> getIndustrySkuInfoSpec(Integer goodsInfoId); List<MallIndustrySkuInfoSpecDO> getIndustrySkuInfoSpec(Integer goodsInfoId);
int countListGoodsByQO(GoodsInfoQO param); int countListGoodsByQO(GoodsInfoQO param);
List<GoodsInfoDO> listGoodsByQO(GoodsInfoQO param); List<GoodsInfoDO> listGoodsByQO(GoodsInfoQO param);
List<GoodsTypeDO> listIndustryIdBySort(); List<GoodsTypeDO> listIndustryIdBySort();
List<IndustryProductInventoryDO> getIndustryProductInventory(Integer industrySpecId); List<IndustryProductInventoryDO> getIndustryProductInventory(Integer industrySpecId);
List<InventorySpecDO> listInventorySpec(List<Integer> collect); List<InventorySpecDO> listInventorySpec(List<Integer> collect);
ProductSpecDO getProductSpecDetail(Integer productSpecId); ProductSpecDO getProductSpecDetail(Integer productSpecId);
ProductSkuDO getProductSkuDetail(Integer productSkuId); ProductSkuDO getProductSkuDetail(Integer productSkuId);
} }
package com.mmc.pms.dao; package com.mmc.pms.dao;
import com.mmc.pms.entity.MallProdSkuInfoDO; import com.mmc.pms.entity.*;
import com.mmc.pms.entity.ProductSkuDO;
import com.mmc.pms.entity.ProductSpecDO;
import com.mmc.pms.entity.ProductSpecPriceDO;
import com.mmc.pms.model.dto.ProductSkuVO; import com.mmc.pms.model.dto.ProductSkuVO;
import com.mmc.pms.model.dto.ProductSpecVO; import com.mmc.pms.model.dto.ProductSpecVO;
import com.mmc.pms.model.qo.ProductSkuQO; import com.mmc.pms.model.qo.ProductSkuQO;
import com.mmc.pms.model.vo.ProductSpecCPQVO; import com.mmc.pms.model.vo.ProductSpecCPQVO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
import java.util.Set;
/** /**
* @author 23214 * @author 23214
...@@ -19,7 +18,7 @@ import java.util.List; ...@@ -19,7 +18,7 @@ import java.util.List;
* @Entity com.mmc.pms.entity.ProductSku * @Entity com.mmc.pms.entity.ProductSku
*/ */
@Mapper @Mapper
public interface ProductSkuDao { public interface ProductDao {
int countSkuName(ProductSkuVO param); int countSkuName(ProductSkuVO param);
...@@ -58,7 +57,31 @@ public interface ProductSkuDao { ...@@ -58,7 +57,31 @@ public interface ProductSkuDao {
List<ProductSpecPriceDO> getProductSpecPrice(ProductSpecCPQVO productSpecCPQVO); List<ProductSpecPriceDO> getProductSpecPrice(ProductSpecCPQVO productSpecCPQVO);
void insertMallProdSkuInfo(MallProdSkuInfoDO mallProdSkuInfoDO); void insertMallProdSkuInfo(MallProdInfoDO mallProdInfoDO);
List<ProductSpecDO> listProductSpec(Integer id);
List<ProductSkuDO> listProductSkuDO(List<Integer> productSkuId);
List<InventorySpecDO> listInventorySpecInfo(List<Integer> industryProductInventoryIds);
List<ProductSpecDO> listProductSpecInfo(List<Integer> productSpecIds);
void batchUpdateMallProdSpec(List<Integer> delProductSpecId);
int countProductSpecByBrandId(Integer id);
int countSpecByProdSkuId(Integer id);
void removeProductSku(Integer id);
List<MallProdInfoDO> listMallProdInfo(String id);
void removeProductSpec(Integer id);
List<IndustrySpecDO> listIndustrySpec(@Param("industrySpecIds") Set<Integer> industrySpecIds);
List<InventorySpecDO> listInventorySpec(Integer id);
} }
......
...@@ -60,4 +60,8 @@ public class GoodsInfo implements Serializable { ...@@ -60,4 +60,8 @@ public class GoodsInfo implements Serializable {
this.ecoLabel = goodsAddVO.getTag(); this.ecoLabel = goodsAddVO.getTag();
this.goodsType = goodsAddVO.getGoodsType(); this.goodsType = goodsAddVO.getGoodsType();
} }
public GoodsInfo(Integer id) {
this.id = id;
}
} }
\ No newline at end of file
package com.mmc.pms.entity;
import com.mmc.pms.model.dto.IndustrySkuDTO;
import com.mmc.pms.model.vo.IndustrySkuVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
* 行业sku表(IndustrySku)实体类
*
* @author makejava
* @since 2023-05-30 15:01:54
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class IndustrySku implements Serializable {
private static final long serialVersionUID = 165189738203335092L;
private Integer id;
private String solutionName;
private Integer categoriesId;
private String description;
private Date createTime;
private Date updateTime;
private Integer deleted;
private String typeName;
public IndustrySku(IndustrySkuVO param) {
this.id = param.getId();
this.solutionName = param.getSolutionName();
this.categoriesId = param.getCategoryId();
this.description = param.getDescription();
}
public IndustrySkuVO buildIndustrySku() {
return IndustrySkuVO.builder().id(this.id).description(this.description)
.categoryId(this.categoriesId).solutionName(this.solutionName).build();
}
public IndustrySkuDTO buildIndustrySkuDTO() {
return IndustrySkuDTO.builder().id(this.id).description(this.description)
.createTime(this.createTime).categoryId(this.categoriesId)
.categoryName(this.typeName).solutionName(this.solutionName).build();
}
}
package com.mmc.pms.entity;
import java.io.Serializable;
import java.util.Date;
/**
* 行业规格表
* (IndustrySpec)实体类
*
* @author makejava
* @since 2023-05-30 15:02:08
*/
public class IndustrySpec implements Serializable {
private static final long serialVersionUID = -87945230737895634L;
private Integer id;
/**
* 行业sku id
*/
private Integer industrySkuId;
/**
* 规格名称
*/
private String specName;
/**
* 规格图片
*/
private String specImage;
private Date createTime;
private Date updateTime;
private Integer isDeleted;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getIndustrySkuId() {
return industrySkuId;
}
public void setIndustrySkuId(Integer industrySkuId) {
this.industrySkuId = industrySkuId;
}
public String getSpecName() {
return specName;
}
public void setSpecName(String specName) {
this.specName = specName;
}
public String getSpecImage() {
return specImage;
}
public void setSpecImage(String specImage) {
this.specImage = specImage;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Integer getIsDeleted() {
return isDeleted;
}
public void setIsDeleted(Integer isDeleted) {
this.isDeleted = isDeleted;
}
}
package com.mmc.pms.entity; package com.mmc.pms.entity;
import com.mmc.pms.model.dto.IndustrySpecDTO;
import com.mmc.pms.model.dto.MallIndustrySpecDTO; import com.mmc.pms.model.dto.MallIndustrySpecDTO;
import com.mmc.pms.model.vo.IndustrySpecVO; import com.mmc.pms.model.vo.IndustrySpecVO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
...@@ -16,40 +17,40 @@ import java.util.Date; ...@@ -16,40 +17,40 @@ import java.util.Date;
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
public class IndustrySpecDO implements Serializable { public class IndustrySpecDO implements Serializable {
private static final long serialVersionUID = 8701065950780976397L; private static final long serialVersionUID = 8701065950780976397L;
private Integer id; private Integer id;
private Integer industrySkuId; private Integer industrySkuId;
private String specName; private String specName;
private String specImage; private String specImage;
private Date createTime; private Date createTime;
private Date updateTime; private Date updateTime;
private Integer deleted; private Integer deleted;
private String solutionName; private String solutionName;
public IndustrySpecDO(IndustrySpecVO param) { public IndustrySpecDO(IndustrySpecVO param) {
this.id = param.getId(); this.id = param.getId();
this.industrySkuId = param.getIndustrySkuId(); this.industrySkuId = param.getIndustrySkuId();
this.specName = param.getSpecName(); this.specName = param.getSpecName();
this.specImage = param.getSpecImage(); this.specImage = param.getSpecImage();
} }
/* public IndustrySpecDTO buildIndustrySpecDTO() { public IndustrySpecDTO buildIndustrySpecDTO() {
return IndustrySpecDTO.builder() return IndustrySpecDTO.builder()
.id(this.id) .id(this.id)
.industrySkuId(this.industrySkuId) .industrySkuId(this.industrySkuId)
.specImage(this.specImage) .specImage(this.specImage)
.specName(this.specName) .specName(this.specName)
.createTime(this.createTime) .createTime(this.createTime)
.build(); .build();
}*/ }
public MallIndustrySpecDTO buildMallIndustrySpecDTO() { public MallIndustrySpecDTO buildMallIndustrySpecDTO() {
return MallIndustrySpecDTO.builder() return MallIndustrySpecDTO.builder()
.industrySpecId(this.id) .industrySpecId(this.id)
.industrySkuId(this.industrySkuId) .industrySkuId(this.industrySkuId)
.specImage(this.specImage) .specImage(this.specImage)
.specName(this.specName) .specName(this.specName)
.build(); .build();
} }
} }
package com.mmc.pms.entity;
import com.mmc.pms.model.dto.IndustrySpecPriceDTO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* @Author LW
* @date 2022/10/13 16:10
* 概要:
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class IndustrySpecPriceDO implements Serializable {
private static final long serialVersionUID = -6424007941913778680L;
private Integer id;
private Integer industrySpecId;
private Integer cooperationTag;
private BigDecimal price;
private Date createTime;
private Date updateTime;
private Integer deleted;
private Integer type;
private Integer leaseTerm;
public IndustrySpecPriceDTO buildIndustrySpecPriceDTO() {
return IndustrySpecPriceDTO.builder().id(this.id).industrySpecId(this.industrySpecId)
.cooperationTag(this.cooperationTag).leaseTerm(leaseTerm).price(this.price).createTime(this.createTime).build();
}
}
package com.mmc.pms.entity; package com.mmc.pms.entity;
import com.mmc.pms.model.dto.GoodsSpecDTO; import com.mmc.pms.model.dto.GoodsSpecDTO;
import com.mmc.pms.model.vo.GoodsSpecVO; import com.mmc.pms.model.vo.GoodsProdSpecVO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
...@@ -18,47 +18,51 @@ import java.util.Date; ...@@ -18,47 +18,51 @@ import java.util.Date;
@AllArgsConstructor @AllArgsConstructor
@Accessors(chain = true) @Accessors(chain = true)
public class MallIndustrySkuInfoDO implements Serializable { public class MallIndustrySkuInfoDO implements Serializable {
private static final long serialVersionUID = 1492322282696261487L; private static final long serialVersionUID = 1492322282696261487L;
private Integer id; private Integer id;
private Integer goodsInfoId; private Integer goodsInfoId;
private Integer industrySkuId; private Integer industrySkuId;
private String industrySkuSpecName; private String industrySkuSpecName;
private Integer goodsTypeId; private Integer categoriesId;
private Integer chooseType; private Integer chooseType;
private Integer must; private Integer must;
private Integer skuUnitId; private Integer skuUnitId;
private Integer deleted; private Integer deleted;
private Date createTime; private Date createTime;
private Date updateTime; private Date updateTime;
/** 辅助字段start */ /**
private String typeName; * 辅助字段start
*/
private String typeName;
private String unitName; private String unitName;
private String industrySkuName; private String industrySkuName;
/** 辅助字段end */ /**
public MallIndustrySkuInfoDO(GoodsSpecVO goodsSpecVO) { * 辅助字段end
this.industrySkuId = goodsSpecVO.getSkuId(); */
this.chooseType = goodsSpecVO.getChooseType(); public MallIndustrySkuInfoDO(GoodsProdSpecVO goodsSpecVO) {
this.industrySkuSpecName = goodsSpecVO.getGoodsSpecName(); this.industrySkuId = goodsSpecVO.getSkuId();
this.skuUnitId = goodsSpecVO.getSkuUnitId(); this.chooseType = goodsSpecVO.getChooseType();
this.goodsTypeId = goodsSpecVO.getGoodsTypeId(); this.industrySkuSpecName = goodsSpecVO.getGoodsSpecName();
this.must = goodsSpecVO.getMust(); this.skuUnitId = goodsSpecVO.getSkuUnitId();
} this.categoriesId = goodsSpecVO.getCategoryId();
this.must = goodsSpecVO.getMust();
}
public GoodsSpecDTO buildGoodsSpecDTO() { public GoodsSpecDTO buildGoodsSpecDTO() {
return GoodsSpecDTO.builder() return GoodsSpecDTO.builder()
.id(this.id) .id(this.id)
.goodsSpecName(this.industrySkuSpecName) .goodsSpecName(this.industrySkuSpecName)
.goodsTypeId(this.goodsTypeId) .goodsTypeId(this.categoriesId)
.chooseType(this.chooseType) .chooseType(this.chooseType)
.skuUnitId(skuUnitId) .skuUnitId(skuUnitId)
.unitName(this.unitName) .unitName(this.unitName)
.skuId(this.industrySkuId) .skuId(this.industrySkuId)
.typeName(this.typeName) .typeName(this.typeName)
.skuName(this.industrySkuName) .skuName(this.industrySkuName)
.must(must) .must(must)
.build(); .build();
} }
} }
package com.mmc.pms.entity; package com.mmc.pms.entity;
import com.mmc.pms.model.dto.GoodsSpecDTO; import com.mmc.pms.model.dto.GoodsSpecDTO;
import com.mmc.pms.model.vo.GoodsSpecVO; import com.mmc.pms.model.vo.GoodsProdSpecVO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
...@@ -17,13 +17,13 @@ import java.util.Date; ...@@ -17,13 +17,13 @@ import java.util.Date;
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@Accessors(chain = true) @Accessors(chain = true)
public class MallProdSkuInfoDO implements Serializable { public class MallProdInfoDO implements Serializable {
private static final long serialVersionUID = 3667714765929443857L; private static final long serialVersionUID = 3667714765929443857L;
private Integer id; private Integer id;
private Integer goodsInfoId; private Integer goodsInfoId;
private Integer prodSkuId; private Integer prodSkuId;
private String prodSkuSpecName; private String prodSkuSpecName;
private Integer categoryId; private Integer categoriesId;
private Integer chooseType; private Integer chooseType;
private Integer must; private Integer must;
private Integer skuUnitId; private Integer skuUnitId;
...@@ -37,7 +37,7 @@ public class MallProdSkuInfoDO implements Serializable { ...@@ -37,7 +37,7 @@ public class MallProdSkuInfoDO implements Serializable {
* 辅助字段 start * 辅助字段 start
*/ */
private String typeName; private String typeName;
private String goodsName;
private String unitName; private String unitName;
private String productSkuName; private String productSkuName;
private Integer brandInfoId; private Integer brandInfoId;
...@@ -45,8 +45,8 @@ public class MallProdSkuInfoDO implements Serializable { ...@@ -45,8 +45,8 @@ public class MallProdSkuInfoDO implements Serializable {
/** /**
* 辅助字段 end * 辅助字段 end
*/ */
public MallProdSkuInfoDO(GoodsSpecVO goodsSpecVO) { public MallProdInfoDO(GoodsProdSpecVO goodsSpecVO) {
this.categoryId = goodsSpecVO.getGoodsTypeId(); this.categoriesId = goodsSpecVO.getCategoryId();
this.prodSkuSpecName = goodsSpecVO.getGoodsSpecName(); this.prodSkuSpecName = goodsSpecVO.getGoodsSpecName();
this.chooseType = goodsSpecVO.getChooseType(); this.chooseType = goodsSpecVO.getChooseType();
this.skuUnitId = goodsSpecVO.getSkuUnitId(); this.skuUnitId = goodsSpecVO.getSkuUnitId();
...@@ -58,7 +58,7 @@ public class MallProdSkuInfoDO implements Serializable { ...@@ -58,7 +58,7 @@ public class MallProdSkuInfoDO implements Serializable {
return GoodsSpecDTO.builder() return GoodsSpecDTO.builder()
.id(this.id) .id(this.id)
.goodsSpecName(this.prodSkuSpecName) .goodsSpecName(this.prodSkuSpecName)
.goodsTypeId(this.categoryId) .goodsTypeId(this.categoriesId)
.chooseType(this.chooseType) .chooseType(this.chooseType)
.skuUnitId(skuUnitId) .skuUnitId(skuUnitId)
.unitName(this.unitName) .unitName(this.unitName)
......
package com.mmc.pms.model.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
* @Author LW
* @date 2022/10/9 10:29
* 概要:
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class IndustrySkuDTO implements Serializable {
private static final long serialVersionUID = 6371755036627825948L;
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "方案名称")
private String solutionName;
@ApiModelProperty(value = "所属行业id")
private Integer categoryId;
@ApiModelProperty(value = "行业名称")
private String categoryName;
@ApiModelProperty(value = "描述")
private String description;
@ApiModelProperty(value = "创建时间")
private Date createTime;
}
package com.mmc.pms.model.dto;
import com.mmc.pms.model.vo.SpecPriceVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
/**
* @Author LW
* @date 2022/9/29 17:51
* 概要:
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class IndustrySpecCPQVO implements Serializable {
private static final long serialVersionUID = -1184938705010745010L;
@ApiModelProperty(value = "行业规格id")
private Integer industrySpecId;
@ApiModelProperty(value = "销售:0 租赁:1")
private Integer type;
@ApiModelProperty(value = "租赁时限:(输入0:1-7天、输入1:8-15天、输入2:16-30天、输入3:30天以上)")
private Integer leaseTerm;
@ApiModelProperty(value = "规格价格配置VO")
private List<SpecPriceVO> specPrice;
}
package com.mmc.pms.model.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* @Author LW
* @date 2022/10/11 14:29
* 概要:
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class IndustrySpecDTO implements Serializable {
private static final long serialVersionUID = 5476956071052692714L;
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "行业skuId")
private Integer industrySkuId;
@ApiModelProperty(value = "规格名称")
private String specName;
@ApiModelProperty(value = "规格图片")
private String specImage;
@ApiModelProperty(value = "产品清单")
private List<ProductInventoryVO> productInventoryList;
@ApiModelProperty(value = "创建时间")
private Date createTime;
}
package com.mmc.pms.model.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* @Author LW
* @date 2022/10/8 10:22
* 概要:
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class IndustrySpecPriceDTO implements Serializable {
private static final long serialVersionUID = 2319479581071699519L;
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "规格id")
private Integer industrySpecId;
@ApiModelProperty(value = "等级标签id")
private Integer cooperationTag;
@ApiModelProperty(value = "价格")
private BigDecimal price;
@ApiModelProperty(value = "租赁期限 (0:1-7天,1:8-15天,2:16-30天,3:30天以上)")
private Integer leaseTerm;
@ApiModelProperty(value = "创建时间")
private Date createTime;
}
package com.mmc.pms.model.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
/**
* 删除sku dto
*
* @Author LW
* @date 2022/10/28 15:18
* 概要:
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class RemoveSkuDTO implements Serializable {
private static final long serialVersionUID = 6122488544731063648L;
@ApiModelProperty(value = "关联的商品名称数组")
private List<String> goodsName;
@ApiModelProperty(value = "关联的行业sku名称数组")
private List<SkuAndSpecDTO> industrySkuName;
}
package com.mmc.pms.model.dto;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* @Author LW
* @date 2022/12/6 17:09
* 概要:
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Accessors(chain = true)
public class SkuAndSpecDTO implements Serializable {
private static final long serialVersionUID = -7551846102488434733L;
private String industrySkuName;
private String industrySpecNames;
}
package com.mmc.pms.model.qo;
import com.mmc.pms.model.vo.Freeze;
import com.mmc.pms.page.Page;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* @Author LW
* @date 2022/9/26 11:13
* 概要:
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class IndustrySkuQO implements Serializable {
private static final long serialVersionUID = -3016233395499711687L;
@ApiModelProperty(value = "方案名称")
private String solutionName;
@ApiModelProperty(value = "行业类型id")
private Integer categoryId;
@ApiModelProperty(value = "页码", required = true)
@NotNull(message = "页码不能为空", groups = {Page.class, Freeze.class})
@Min(value = 1, groups = Page.class)
private Integer pageNo;
@ApiModelProperty(value = "每页显示数", required = true)
@NotNull(message = "每页显示数不能为空", groups = {Page.class, Freeze.class})
@Min(value = 1, groups = Page.class)
private Integer pageSize;
public void buildCurrentPage() {
this.pageNo = (pageNo - 1) * pageSize;
}
}
package com.mmc.pms.model.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* @Author LW
* @date 2022/10/8 14:41
* 概要:
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class IndustrySkuVO implements Serializable {
private static final long serialVersionUID = 6388977489810960843L;
@ApiModelProperty(value = "id")
@NotNull(message = "id不能为空", groups = {Update.class})
private Integer id;
@ApiModelProperty(value = "方案名称")
@NotNull(message = "方案名称不能为空", groups = {Create.class, Update.class})
private String solutionName;
@NotNull(message = "行业分类id不能为空", groups = {Create.class, Update.class})
@ApiModelProperty(value = "所属行业分类id")
private Integer categoryId;
@ApiModelProperty(value = "描述")
private String description;
}
...@@ -17,33 +17,33 @@ import java.util.List; ...@@ -17,33 +17,33 @@ import java.util.List;
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
public class IndustrySpecVO implements Serializable { public class IndustrySpecVO implements Serializable {
private static final long serialVersionUID = 5939041792432691119L; private static final long serialVersionUID = 5939041792432691119L;
@ApiModelProperty(value = "id") @ApiModelProperty(value = "id")
@NotNull(message = "修改时id不能为空", groups = Update.class) @NotNull(message = "修改时id不能为空", groups = Update.class)
private Integer id; private Integer id;
@NotNull( @NotNull(
message = "行业sku的id不能为空", message = "行业sku的id不能为空",
groups = {Update.class, Create.class}) groups = {Update.class, Create.class})
@ApiModelProperty(value = "行业sku的id") @ApiModelProperty(value = "行业sku的id")
private Integer industrySkuId; private Integer industrySkuId;
@NotNull( @NotNull(
message = "规格名称不能为空", message = "规格名称不能为空",
groups = {Update.class, Create.class}) groups = {Update.class, Create.class})
@ApiModelProperty(value = "规格名称") @ApiModelProperty(value = "规格名称")
private String specName; private String specName;
@NotNull( @NotNull(
message = "规格图片不能为空", message = "规格图片不能为空",
groups = {Update.class, Create.class}) groups = {Update.class, Create.class})
@ApiModelProperty(value = "规格图片") @ApiModelProperty(value = "规格图片")
private String specImage; private String specImage;
@NotNull( @NotNull(
message = "产品清单不能为空", message = "产品清单不能为空",
groups = {Update.class, Create.class}) groups = {Update.class, Create.class})
@ApiModelProperty(value = "产品清单") @ApiModelProperty(value = "产品清单")
private List<ProductInventoryVO> productInventoryList; private List<ProductInventoryVO> productInventoryList;
} }
...@@ -44,4 +44,6 @@ public interface BrandManageService { ...@@ -44,4 +44,6 @@ public interface BrandManageService {
* @return {@link ResultBody} * @return {@link ResultBody}
*/ */
ResultBody editBrandInfo(Integer id, String name); ResultBody editBrandInfo(Integer id, String name);
ResultBody deleteBrandInfo(Integer id);
} }
...@@ -3,6 +3,7 @@ package com.mmc.pms.service.Impl; ...@@ -3,6 +3,7 @@ package com.mmc.pms.service.Impl;
import com.mmc.pms.common.ResultBody; import com.mmc.pms.common.ResultBody;
import com.mmc.pms.common.ResultEnum; import com.mmc.pms.common.ResultEnum;
import com.mmc.pms.dao.BrandManageDao; import com.mmc.pms.dao.BrandManageDao;
import com.mmc.pms.dao.ProductDao;
import com.mmc.pms.entity.BrandInfoDO; import com.mmc.pms.entity.BrandInfoDO;
import com.mmc.pms.model.dto.BrandInfoDTO; import com.mmc.pms.model.dto.BrandInfoDTO;
import com.mmc.pms.page.PageResult; import com.mmc.pms.page.PageResult;
...@@ -10,6 +11,7 @@ import com.mmc.pms.service.BrandManageService; ...@@ -10,6 +11,7 @@ import com.mmc.pms.service.BrandManageService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -23,6 +25,8 @@ public class BrandManageServiceImpl implements BrandManageService { ...@@ -23,6 +25,8 @@ public class BrandManageServiceImpl implements BrandManageService {
@Autowired @Autowired
private BrandManageDao brandManageDao; private BrandManageDao brandManageDao;
@Resource
private ProductDao productDao;
/** /**
...@@ -62,22 +66,22 @@ public class BrandManageServiceImpl implements BrandManageService { ...@@ -62,22 +66,22 @@ public class BrandManageServiceImpl implements BrandManageService {
return PageResult.buildPage(pageNo, pageSize, count, brandInfoList); return PageResult.buildPage(pageNo, pageSize, count, brandInfoList);
} }
// /** /**
// * 删除品牌信息 * 删除品牌信息
// * *
// * @param id id * @param id id
// * @return {@link ResultBody} * @return {@link ResultBody}
// */ */
// @Override @Override
// public ResultBody deleteBrandInfo(Integer id) { public ResultBody deleteBrandInfo(Integer id) {
// // 判断该品牌是否绑定产品信息 // 判断该品牌是否绑定产品信息
// int count = productSpecDao.countProductSpecByBrandId(id); int count = productDao.countProductSpecByBrandId(id);
// if (count > 0) { if (count > 0) {
// return ResultBody.error(ResultEnum.BRAND_DELETE_FAIL); return ResultBody.error(ResultEnum.BRAND_DELETE_FAIL);
// } }
// brandManageDao.removeBrandInfoById(id); brandManageDao.removeBrandInfoById(id);
// return ResultBody.success(); return ResultBody.success();
// } }
@Override @Override
public ResultBody editBrandInfo(Integer id, String brandName) { public ResultBody editBrandInfo(Integer id, String brandName) {
......
...@@ -72,7 +72,7 @@ public class MiniProgramProductMallServiceImpl implements MiniProgramProductMall ...@@ -72,7 +72,7 @@ public class MiniProgramProductMallServiceImpl implements MiniProgramProductMall
// 判断商品是什么类型 // 判断商品是什么类型
if (!goodsInfoDO.getSortTypeId().equals(2)) { if (!goodsInfoDO.getSortTypeId().equals(2)) {
// 获取该商品绑定的sku信息 // 获取该商品绑定的sku信息
List<MallProdSkuInfoDO> mallProdSkuInfo = goodsInfoDao.getMallProdInfoByGoodsId(goodsId); List<MallProdInfoDO> mallProdSkuInfo = goodsInfoDao.getMallProdInfoByGoodsId(goodsId);
// 获取该商品绑定的规格信息 // 获取该商品绑定的规格信息
List<MallProdSkuInfoSpecDO> mallProdSkuInfoSpecList = List<MallProdSkuInfoSpecDO> mallProdSkuInfoSpecList =
goodsInfoDao.listMallProdSkuInfoSpec(goodsId); goodsInfoDao.listMallProdSkuInfoSpec(goodsId);
...@@ -114,7 +114,7 @@ public class MiniProgramProductMallServiceImpl implements MiniProgramProductMall ...@@ -114,7 +114,7 @@ public class MiniProgramProductMallServiceImpl implements MiniProgramProductMall
.setGoodsSpecName(d.getProdSkuSpecName()) .setGoodsSpecName(d.getProdSkuSpecName())
.setSkuName(d.getProductSkuName()) .setSkuName(d.getProductSkuName())
.setBrandInfoId(d.getBrandInfoId()) .setBrandInfoId(d.getBrandInfoId())
.setGoodsTypeId(d.getCategoryId()) .setGoodsTypeId(d.getCategoriesId())
.setTypeName(d.getTypeName()) .setTypeName(d.getTypeName())
.setChooseType(d.getChooseType()) .setChooseType(d.getChooseType())
.setSkuUnitId(d.getSkuUnitId()) .setSkuUnitId(d.getSkuUnitId())
......
package com.mmc.pms.service;
import com.mmc.pms.common.ResultBody;
import com.mmc.pms.model.dto.IndustrySpecCPQVO;
import com.mmc.pms.model.qo.IndustrySkuQO;
import com.mmc.pms.model.vo.IndustrySkuVO;
import com.mmc.pms.model.vo.IndustrySpecVO;
/**
* @Author LW
* @date 2022/10/8 10:58
* 概要:
*/
public interface IndustrySpecService {
ResultBody addIndustrySku(IndustrySkuVO param);
ResultBody getIndustrySkuDetail(Integer id);
ResultBody editIndustrySku(IndustrySkuVO param);
ResultBody listPageIndustrySku(IndustrySkuQO param);
ResultBody addIndustrySpec(IndustrySpecVO param);
ResultBody getIndustrySpecDetail(Integer industrySpecId);
ResultBody editIndustrySpec(IndustrySpecVO param);
ResultBody listPageIndustrySpec(Integer pageNo, Integer pageSize, Integer industrySkuId, String keyword);
ResultBody industrySpecCPQ(IndustrySpecCPQVO industrySpecCPQQ);
ResultBody updateIndustrySpecCPQ(IndustrySpecCPQVO industrySpecCPQQ);
ResultBody getIndustrySpecCPQ(IndustrySpecCPQVO industrySpecCPQQ);
ResultBody removeIndustrySku(Integer id);
ResultBody removeIndustrySpec(Integer id);
// /**
// * 行业sku分页列表
// *
// * @param param
// * @return
// */
// ResultBody listPageIndustrySku(IndustrySkuQO param);
//
// /**
// * 新增方案规格
// *
// * @param param
// * @return
// */
// ResultBody addIndustrySpec(IndustrySpecVO param);
//
// /**
// * 获取行业规格信息
// *
// * @param industrySpecId
// * @return
// */
// ResultBody getIndustrySpecDetail(Integer industrySpecId);
//
// /**
// * 编辑行业规格信息
// *
// * @param param
// * @return
// */
// ResultBody editIndustrySpec(IndustrySpecVO param);
//
//
// /**
// * 列表页面行业规范
// *
// * @param pageNo 页面没有
// * @param pageSize 页面大小
// * @param industrySkuId 行业sku id
// * @param keyword 关键字
// * @return {@link ResultBody}
// */
// ResultBody listPageIndustrySpec(Integer pageNo, Integer pageSize, Integer industrySkuId, String keyword);
//
// /**
// * 行业规格价格配置
// *
// * @param industrySpecCPQQ
// * @return
// */
// ResultBody industrySpecCPQ(IndustrySpecCPQVO industrySpecCPQQ);
//
// /**
// * 行业规格价格配置修改
// *
// * @param industrySpecCPQQ
// * @return
// */
// ResultBody updateIndustrySpecCPQ(IndustrySpecCPQVO industrySpecCPQQ);
//
// /**
// * 获取配置价格信息
// *
// * @param industrySpecId
// * @return
// */
// ResultBody getIndustrySpecCPQ(Integer industrySpecId);
//
//
// /**
// * 删除行业sku
// *
// * @param id id
// * @return {@link ResultBody}
// */
// ResultBody removeIndustrySku(Integer id);
//
// /**
// * 删除行业规范
// *
// * @param id id
// * @return {@link ResultBody}
// */
// ResultBody removeIndustrySpec(Integer id);
//
// /**
// * 根据商品id和渠道id查询商品价格
// *
// * @param goodsInfoId
// * @param tagInfoId
// * @return
// */
// List<IndustrySpecPriceDTO> listAppGoodsPriceByTagId(Integer goodsInfoId, Integer tagInfoId);
}
...@@ -38,4 +38,7 @@ public interface ProductSkuService { ...@@ -38,4 +38,7 @@ public interface ProductSkuService {
ResultBody getProductSpecCPQ(ProductSpecCPQVO productSpecCPQVO); ResultBody getProductSpecCPQ(ProductSpecCPQVO productSpecCPQVO);
ResultBody removeProductSku(Integer id);
ResultBody removeProductSpec(Integer id);
} }
...@@ -2,7 +2,7 @@ spring: ...@@ -2,7 +2,7 @@ spring:
datasource: datasource:
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://rm-wz9dd796t4j1giz6t2o.mysql.rds.aliyuncs.com:3306/iuav_pms?characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai url: jdbc:mysql://rm-wz9dd796t4j1giz6t2o.mysql.rds.aliyuncs.com:3306/iuav_pms_dev?characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
username: tmj username: tmj
password: MMC@2022&MYSQL password: MMC@2022&MYSQL
redis: redis:
......
...@@ -52,6 +52,17 @@ ...@@ -52,6 +52,17 @@
) )
</foreach> </foreach>
</insert> </insert>
<insert id="insertMallIndustrySkuInfo" useGeneratedKeys="true"
keyProperty="id" parameterType="com.mmc.pms.entity.MallIndustrySkuInfoDO">
insert into mall_industry_sku_info(goods_info_id, industry_sku_id, industry_sku_spec_name, choose_type,
sku_unit_id, categories_id, is_must)
values (#{goodsInfoId}, #{industrySkuId}, #{industrySkuSpecName}, #{chooseType}, #{skuUnitId}, #{categoriesId},
#{must})
</insert>
<insert id="insertMallIndustrySkuInfoSpec">
insert into mall_industry_sku_info_spec(mall_industry_sku_info_id, industry_spec_id, goods_info_id)
values (#{mallIndustrySkuInfoId}, #{industrySpecId}, #{goodsInfoId})
</insert>
<update id="updateGoodsInfo"> <update id="updateGoodsInfo">
update goods_info update goods_info
...@@ -80,6 +91,32 @@ ...@@ -80,6 +91,32 @@
set is_deleted = 1 set is_deleted = 1
where goods_info_id = #{goodsId} where goods_info_id = #{goodsId}
</update> </update>
<update id="batchUpdateMallProductSku">
<foreach collection="list" item="d" separator=";">
update mall_prod_info
set is_deleted = 1
where id = #{d}
and is_deleted = 0
</foreach>
</update>
<update id="batchUpdateMallProdSkuInfo">
<foreach collection="list" item="d" separator=";">
update mall_prod_info
<set>
prod_sku_id = #{d.prodSkuId},
categories_id = #{d.categoriesId},
prod_spec_name = #{d.prodSkuSpecName},
choose_type = #{d.chooseType},
sku_unit_id = #{d.skuUnitId},
is_must = #{d.must},
product_spec_id_list = #{d.productSpecIdList},
before_update_spec = #{d.beforeUpdateSpec}
</set>
<where>
id = #{d.id}
</where>
</foreach>
</update>
<delete id="deleteGoodsServiceByGoodsId"> <delete id="deleteGoodsServiceByGoodsId">
delete delete
from goods_service from goods_service
...@@ -113,4 +150,46 @@ ...@@ -113,4 +150,46 @@
WHERE is_deleted = 0 WHERE is_deleted = 0
AND goods_info_id = #{id} AND goods_info_id = #{id}
</select> </select>
<select id="getMallProSkuInfo" resultType="com.mmc.pms.entity.MallProdInfoDO">
SELECT mi.id,
mi.goods_info_id,
mi.prod_sku_id,
mi.prod_spec_name,
mi.categories_id,
mi.choose_type,
mi.sku_unit_id,
mi.is_must,
mi.product_spec_id_list,
mi.before_update_spec,
mi.flag,
mi.create_time createTime,
c.type_name typeName,
su.id skuUnitId,
su.unit_name unitName,
ps.product_name productSkuName
FROM mall_prod_info mi
INNER JOIN categories c ON c.id = mi.categories_id
INNER JOIN sku_unit su ON mi.sku_unit_id = su.id
INNER JOIN product ps ON ps.id = mi.prod_sku_id
WHERE mi.goods_info_id = #{id}
AND mi.is_deleted = 0
</select>
<select id="getMallIndustrySkuInfo" resultType="com.mmc.pms.entity.MallIndustrySkuInfoDO">
SELECT mi.id,
mi.industry_sku_id industrySkuId,
mi.industry_sku_spec_name industrySkuSpecName,
mi.choose_type chooseType,
mi.sku_unit_id skuUnitId,
mi.categories_id categoriesId,
mi.is_must must,
gt.type_name typeName,
su.unit_name unitName,
ins.solution_name industrySkuName
FROM mall_industry_sku_info mi
INNER JOIN categories gt ON gt.id = mi.categories_id
INNER JOIN sku_unit su ON su.id = mi.sku_unit_id
INNER JOIN industry_sku ins ON mi.industry_sku_id = ins.id
WHERE mi.goods_info_id = #{id}
AND mi.is_deleted = 0
</select>
</mapper> </mapper>
...@@ -121,21 +121,21 @@ ...@@ -121,21 +121,21 @@
AND is_deleted = 0 AND is_deleted = 0
</select> </select>
<select id="getMallProdInfoByGoodsId" resultType="com.mmc.pms.entity.MallProdSkuInfoDO"> <select id="getMallProdInfoByGoodsId" resultType="com.mmc.pms.entity.MallProdInfoDO">
SELECT mp.id, SELECT mp.id,
mp.prod_sku_id prodSkuId, mp.prod_sku_id prodSkuId,
mp.prod_sku_spec_name prodSkuSpecName, mp.prod_spec_name prodSkuSpecName,
mp.goods_type_id goodsTypeId, mp.goods_type_id goodsTypeId,
mp.choose_type chooseType, mp.choose_type chooseType,
mp.is_must must, mp.is_must must,
mp.sku_unit_id skuUnitId, mp.sku_unit_id skuUnitId,
su.unit_name unitName, su.unit_name unitName,
ps.product_name productSkuName, ps.product_name productSkuName,
ps.brand_info_id brandInfoId, ps.brand_info_id brandInfoId,
gt.type_name typeName gt.type_name typeName
FROM mall_prod_sku_info mp FROM mall_prod_info mp
INNER JOIN sku_unit su ON su.id = mp.sku_unit_id INNER JOIN sku_unit su ON su.id = mp.sku_unit_id
INNER JOIN product_sku ps ON ps.id = mp.prod_sku_id INNER JOIN product ps ON ps.id = mp.prod_sku_id
LEFT JOIN goods_type gt ON mp.goods_type_id = gt.id LEFT JOIN goods_type gt ON mp.goods_type_id = gt.id
WHERE mp.goods_info_id = #{goodsId} WHERE mp.goods_info_id = #{goodsId}
AND mp.is_deleted = 0 AND mp.is_deleted = 0
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
<select id="listProductSpecInfo" resultType="com.mmc.pms.entity.ProductSpecDO"> <select id="listProductSpecInfo" resultType="com.mmc.pms.entity.ProductSpecDO">
SELECT SELECT
id, id,
product_sku_id productSkuId, product_id productSkuId,
spec_name specName, spec_name specName,
spec_image specImage, spec_image specImage,
part_no partNo, part_no partNo,
...@@ -318,7 +318,7 @@ ...@@ -318,7 +318,7 @@
<select id="getIndustryProductInventory" resultType="com.mmc.pms.service.Impl.IndustryProductInventoryDO"> <select id="getIndustryProductInventory" resultType="com.mmc.pms.service.Impl.IndustryProductInventoryDO">
SELECT id, SELECT id,
industry_spec_id industrySpecId, industry_spec_id industrySpecId,
product_sku_id productSkuId, product_id productSkuId,
is_selected selected is_selected selected
FROM industry_product_inventory FROM industry_product_inventory
WHERE industry_spec_id = #{industrySpecId} WHERE industry_spec_id = #{industrySpecId}
...@@ -336,12 +336,12 @@ ...@@ -336,12 +336,12 @@
<select id="getProductSpecDetail" resultType="com.mmc.pms.entity.ProductSpecDO"> <select id="getProductSpecDetail" resultType="com.mmc.pms.entity.ProductSpecDO">
select id, select id,
product_sku_id productSkuId, product_id productSkuId,
spec_name specName, spec_name specName,
spec_image specImage, spec_image specImage,
part_no partNo, part_no partNo,
version_desc versionDesc, version_desc versionDesc,
create_time createTime create_time createTime
from product_spec from product_spec
where id = #{id} where id = #{id}
</select> </select>
...@@ -356,7 +356,7 @@ ...@@ -356,7 +356,7 @@
bi.brand_name productBrand, bi.brand_name productBrand,
ps.sort_type_id sortTypeId, ps.sort_type_id sortTypeId,
st.sort_name sortName st.sort_name sortName
FROM product_sku ps FROM product ps
INNER JOIN goods_type gt ON ps.goods_type_id = gt.id INNER JOIN goods_type gt ON ps.goods_type_id = gt.id
LEFT JOIN brand_info bi ON bi.id = ps.brand_info_id LEFT JOIN brand_info bi ON bi.id = ps.brand_info_id
LEFT JOIN sort_type st ON ps.goods_type_id = st.id LEFT JOIN sort_type st ON ps.goods_type_id = st.id
......
...@@ -166,8 +166,8 @@ ...@@ -166,8 +166,8 @@
<select id="findProduct" resultType="java.lang.Integer"> <select id="findProduct" resultType="java.lang.Integer">
SELECT count(1) SELECT count(1)
FROM goods_info gi FROM goods_info gi
INNER JOIN mall_prod_sku_info mpsi ON mpsi.goods_info_id = gi.id INNER JOIN mall_prod_info mpsi ON mpsi.goods_info_id = gi.id
INNER JOIN product_sku ps ON mpsi.prod_sku_id = ps.id INNER JOIN product ps ON mpsi.prod_sku_id = ps.id
AND ps.is_deleted = 0 AND ps.is_deleted = 0
INNER JOIN brand_info bi ON ps.brand_info_id = bi.id INNER JOIN brand_info bi ON ps.brand_info_id = bi.id
AND bi.is_delete = 0 AND bi.is_delete = 0
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论