提交 262bfee5 作者: xiaowang

新增:租赁设备列表条件查询

上级 e15f88ea
package com.mmc.pms.controller.mini;
package com.mmc.pms.controller.common;
import com.mmc.pms.common.Page;
import com.mmc.pms.common.ResultBody;
import com.mmc.pms.constant.TokenConstant;
import com.mmc.pms.controller.BaseController;
import com.mmc.pms.model.lease.dto.LeaseGoodsInfoDTO;
import com.mmc.pms.model.qo.WareInfoQO;
......@@ -21,20 +22,24 @@ import javax.servlet.http.HttpServletRequest;
/**
* @Author LW
* @date 2023/6/8 17:16
* 概要:
*
* @date 2023/6/8 17:16 概要:
*/
@Api(tags = {"v1.0.1-设备租赁-相关接口"})
@RestController
@RequestMapping("/lease/goods")
public class MiniLeaseGoodsController extends BaseController {
@Autowired
private WebDeviceService webDeviceService;
public class LeaseGoodsController extends BaseController {
@Autowired private WebDeviceService webDeviceService;
@ApiOperation(value = "设备列表筛选")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = LeaseGoodsInfoDTO.class)})
@PostMapping("/deviceList")
public ResultBody listWareInfoPage(@RequestBody @Validated(Page.class) WareInfoQO param, HttpServletRequest request) {
return webDeviceService.listWareInfoPage(param, request, this.getUserLoginInfoFromRedis(request).getUserAccountId());
@ApiOperation(value = "设备列表筛选")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = LeaseGoodsInfoDTO.class)})
@PostMapping("/deviceList")
public ResultBody listWareInfoPage(
@RequestBody @Validated(Page.class) WareInfoQO param, HttpServletRequest request) {
if (request.getHeader(TokenConstant.TOKEN) == null) {
return webDeviceService.listWareInfoPage(param, null, null);
}
return webDeviceService.listWareInfoPage(
param, request, this.getUserLoginInfoFromRedis(request).getUserAccountId());
}
}
......@@ -19,102 +19,101 @@ import java.util.Set;
/**
* @author 23214
* @description 针对表【product_sku(产品sku表)】的数据库操作Mapper
* @createDate 2023-05-25 14:55:56
* @Entity com.mmc.pms.entity.ProductSku
* @createDate 2023-05-25 14:55:56 @Entity com.mmc.pms.entity.ProductSku
*/
@Mapper
public interface ProductDao {
int countSkuName(ProductSkuVO param);
int countSkuName(ProductSkuVO param);
int insertProductSku(ProductSkuDO productSkuDO);
int insertProductSku(ProductSkuDO productSkuDO);
int countSkuIsExist(Integer id);
int countSkuIsExist(Integer id);
ProductSkuDO getProductSkuDetail(Integer id);
ProductSkuDO getProductSkuDetail(Integer id);
int updateProductSku(ProductSkuDO productSkuDO);
int updateProductSku(ProductSkuDO productSkuDO);
int countListPageProductSku(ProductSkuQO productSkuQO);
int countListPageProductSku(ProductSkuQO productSkuQO);
List<ProductSkuDO> listPageProductSku(ProductSkuQO productSkuQO);
List<ProductSkuDO> listPageProductSku(ProductSkuQO productSkuQO);
int countSpecName(ProductSpecVO param);
int countSpecName(ProductSpecVO param);
int insertProductSpec(ProductSpecDO productSpecDO);
int insertProductSpec(ProductSpecDO productSpecDO);
int updateProductSpec(ProductSpecDO productSpecDO);
int updateProductSpec(ProductSpecDO productSpecDO);
int countSpecIsExist(Integer id);
int countSpecIsExist(Integer id);
ProductSpecDO getProductSpecDetail(Integer id);
ProductSpecDO getProductSpecDetail(Integer id);
int countListPageProductSpec(Integer productSkuId);
int countListPageProductSpec(@Param("id") Integer id, @Param("keyword") String keyword);
List<ProductSpecDO> listPageProductSpec(int pageNo, Integer pageSize, Integer productSkuId);
List<ProductSpecDO> listPageProductSpec(
@Param(value = "pageNo") Integer pageNo,
@Param(value = "pageSize") Integer pageSize,
@Param(value = "productSkuId") Integer productSkuId,
@Param(value = "keyword") String keyword);
int batchInsertSpecPrice(List<ProductSpecPriceDO> list);
int batchInsertSpecPrice(List<ProductSpecPriceDO> list);
void batchInsertLeaseSpecPrice(List<ProductSpecPriceDO> list);
void batchInsertLeaseSpecPrice(List<ProductSpecPriceDO> list);
void removeProductSpecCPQ(ProductSpecCPQVO productSpecCPQVO);
void removeProductSpecCPQ(ProductSpecCPQVO productSpecCPQVO);
List<ProductSpecPriceDO> getProductSpecPrice(ProductSpecCPQVO productSpecCPQVO);
List<ProductSpecPriceDO> getProductSpecPrice(ProductSpecCPQVO productSpecCPQVO);
void insertMallProdSkuInfo(MallProdInfoDO mallProdInfoDO);
void insertMallProdSkuInfo(MallProdInfoDO mallProdInfoDO);
List<ProductSpecDO> listProductSpec(Integer id);
List<ProductSpecDO> listProductSpec(Integer id);
List<ProductSkuDO> listProductSkuDO(List<Integer> productSkuId);
List<ProductSkuDO> listProductSkuDO(List<Integer> productSkuId);
List<InventorySpecDO> listInventorySpecInfo(List<Integer> industryProductInventoryIds);
List<InventorySpecDO> listInventorySpecInfo(List<Integer> industryProductInventoryIds);
List<ProductSpecDO> listProductSpecInfo(List<Integer> productSpecIds);
List<ProductSpecDO> listProductSpecInfo(List<Integer> productSpecIds);
void batchUpdateMallProdSpec(List<Integer> delProductSpecId);
void batchUpdateMallProdSpec(List<Integer> delProductSpecId);
int countProductSpecByBrandId(Integer id);
int countProductSpecByBrandId(Integer id);
int countSpecByProdSkuId(Integer id);
int countSpecByProdSkuId(Integer id);
void removeProductSku(Integer id);
void removeProductSku(Integer id);
List<MallProdInfoDO> listMallProdInfo(String id);
List<MallProdInfoDO> listMallProdInfo(String id);
void removeProductSpec(Integer id);
void removeProductSpec(Integer id);
List<IndustrySpecDO> listIndustrySpec(@Param("industrySpecIds") Set<Integer> industrySpecIds);
List<IndustrySpecDO> listIndustrySpec(@Param("industrySpecIds") Set<Integer> industrySpecIds);
List<InventorySpecDO> listInventorySpec(Integer id);
List<InventorySpecDO> listInventorySpec(Integer id);
BigDecimal feignGetUnitPriceByTag(PriceAcquisition priceAcquisition);
BigDecimal feignGetUnitPriceByTag(PriceAcquisition priceAcquisition);
List<MallGoodsSpecInfoDO> listProdSpecInfo(@Param("prodIds") Set<Integer> prodIds);
List<MallGoodsSpecInfoDO> listProdSpecInfo(@Param("prodIds") Set<Integer> prodIds);
/**
* 根据渠道等级、商品specId获取price信息
*
* @param tagInfoId
* @param prodSkuSpecIds
* @return
*/
List<ProductSpecPriceDO> listProductSpecPrice(Integer tagInfoId, Set<Integer> prodSkuSpecIds);
/**
* 根据渠道等级、商品specId获取price信息
*
* @param tagInfoId
* @param prodSkuSpecIds
* @return
*/
List<ProductSpecPriceDO> listProductSpecPrice(Integer tagInfoId, Set<Integer> prodSkuSpecIds);
ProductSpecPriceDTO feignGetUnitPrice(Integer id, Integer tagId);
ProductSpecPriceDTO feignGetUnitPrice(Integer id, Integer tagId);
List<ProductSpecDO> getProductSpecList(List<Integer> productSkuIds);
List<ProductSpecDO> getProductSpecList(List<Integer> productSkuIds);
List<MallProdSkuInfoSpecDO> getProductSpecByIds(List<Integer> delProductSpecId);
List<MallProdSkuInfoSpecDO> getProductSpecByIds(List<Integer> delProductSpecId);
Set<Integer> listProductSpecIds(@Param("mallProdSkuSpecIds") Set<Integer> mallProdSkuSpecIds);
Set<Integer> listProductSpecIds(@Param("mallProdSkuSpecIds") Set<Integer> mallProdSkuSpecIds);
List<OrderGoodsProdDTO> listProdGoodsSkuInfo(MallOrderGoodsInfoQO mallOrderGoodsInfoQO);
List<OrderGoodsProdDTO> listProdGoodsSkuInfo(MallOrderGoodsInfoQO mallOrderGoodsInfoQO);
List<MallProdSkuInfoSpecDO> listMallProductSpec(Integer id);
List<MallProdSkuInfoSpecDO> listMallProductSpec(Integer id);
List<ProductSpecPriceDO> getProductSpecPriceList(List<Integer> specIds);
}
package com.mmc.pms.model.lease.dto;
import com.mmc.pms.model.sale.dto.GoodsDetailInfoDTO;
import com.mmc.pms.model.sale.dto.GoodsImgDTO;
import com.mmc.pms.model.sale.dto.GoodsOtherServiceDTO;
import com.mmc.pms.model.sale.dto.GoodsSpecDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.List;
/**
* @Author LW
*
* @date 2022/11/8 15:57 概要:
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class LeaseGoodsDetailDTO implements Serializable {
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "pid")
private Integer pid;
@ApiModelProperty(value = "商品名称")
private String goodsName;
@ApiModelProperty(value = "云享飞服务id")
private Integer shareFlyServiceId;
@ApiModelProperty(value = "云仓配件id")
private Integer repoId;
@ApiModelProperty(value = "规格信息")
private List<GoodsSpecDTO> goodsSpec;
@ApiModelProperty(value = "商品图片")
private List<GoodsImgDTO> images;
@ApiModelProperty(value = "商品视频")
private String goodsVideo;
@ApiModelProperty(value = "商品视频id")
private Integer goodsVideoId;
@ApiModelProperty(value = "商品详情")
private GoodsDetailInfoDTO goodsDetail;
@ApiModelProperty(value = "所属目录")
private Integer sortTypeId;
@ApiModelProperty(value = "一级分类id")
private Integer categoryByOne;
@ApiModelProperty(value = "二级分类id")
private Integer categoryByTwo;
@ApiModelProperty(value = "商品标签")
private String tag;
@ApiModelProperty(value = "其他服务: 1:免费配送,2:专业飞手培训2日, 3:半年保修, 4:一年保修 ")
private List<GoodsOtherServiceDTO> otherService;
}
......@@ -9,6 +9,7 @@ import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* @Author small @Date 2023/5/16 15:30 @Version 1.0
......@@ -19,26 +20,29 @@ import java.util.Date;
@Builder
@Accessors
public class ProductSpecDTO implements Serializable {
private static final long serialVersionUID = -2681122778843398310L;
private static final long serialVersionUID = -2681122778843398310L;
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "productSkuId")
private Integer productSkuId;
@ApiModelProperty(value = "productSkuId")
private Integer productSkuId;
@ApiModelProperty(value = "规格名称")
private String specName;
@ApiModelProperty(value = "规格名称")
private String specName;
@ApiModelProperty(value = "规格图片")
private String specImage;
@ApiModelProperty(value = "规格图片")
private String specImage;
@ApiModelProperty(value = "料号")
private String partNo;
@ApiModelProperty(value = "料号")
private String partNo;
@ApiModelProperty(value = "版本描述")
private String versionDesc;
@ApiModelProperty(value = "版本描述")
private String versionDesc;
@ApiModelProperty(value = "创建时间")
private Date createTime;
@ApiModelProperty(value = "创建时间")
private Date createTime;
@ApiModelProperty(value = "价格配置")
private List<ProductSpecPriceDTO> priceList;
}
......@@ -18,32 +18,32 @@ import java.util.List;
*/
public interface ProductSkuService {
ResultBody addProductSku(ProductSkuVO param);
ResultBody addProductSku(ProductSkuVO param);
ResultBody getProductSkuDetail(Integer id);
ResultBody getProductSkuDetail(Integer id);
ResultBody editProductSku(ProductSkuVO param);
ResultBody editProductSku(ProductSkuVO param);
ResultBody listPageProductSku(ProductSkuQO productSkuQO);
ResultBody listPageProductSku(ProductSkuQO productSkuQO);
ResultBody addOrEditProductSpec(ProductSpecVO param);
ResultBody addOrEditProductSpec(ProductSpecVO param);
ResultBody getProductSpecDetail(Integer id);
ResultBody getProductSpecDetail(Integer id);
ResultBody listPageProductSpec(Integer pageNo, Integer pageSize, Integer productSkuId);
ResultBody listPageProductSpec(
Integer pageNo, Integer pageSize, Integer productSkuId, String keyword);
ResultBody productSpecCPQ(ProductSpecCPQVO productSpecCPQVO);
ResultBody productSpecCPQ(ProductSpecCPQVO productSpecCPQVO);
List<ProductSpecPriceDO> getProductSpecPriceDOS(ProductSpecCPQVO productSpecCPQVO);
List<ProductSpecPriceDO> getProductSpecPriceDOS(ProductSpecCPQVO productSpecCPQVO);
ResultBody updateProductSpecCPQ(ProductSpecCPQVO productSpecCPQVO);
ResultBody updateProductSpecCPQ(ProductSpecCPQVO productSpecCPQVO);
ResultBody getProductSpecCPQ(ProductSpecCPQVO productSpecCPQVO);
ResultBody getProductSpecCPQ(ProductSpecCPQVO productSpecCPQVO);
ResultBody removeProductSku(Integer id);
ResultBody removeProductSku(Integer id);
ResultBody removeProductSpec(Integer id);
BigDecimal feignGetUnitPriceByTag(PriceAcquisition priceAcquisition);
ResultBody removeProductSpec(Integer id);
BigDecimal feignGetUnitPriceByTag(PriceAcquisition priceAcquisition);
}
......@@ -111,7 +111,7 @@
and product_name like CONCAT ('%',#{productName},'%')
</if>
<if test="categoryId != null">
and categories = #{categoryId}
and categories_id = #{categoryId}
</if>
<if test="directoryId != null">
and directory_id = #{directoryId}
......@@ -178,22 +178,32 @@
<select id="countListPageProductSpec" resultType="java.lang.Integer">
select count(*)
from product_spec
where is_deleted = 0
and product_id = #{id}
<where>
is_deleted = 0
and product_sku_id = #{id}
<if test="keyword != null and keyword != ''">
and spec_name like CONCAT('%',#{keyword},'%')
</if>
</where>
</select>
<select id="listPageProductSpec" resultType="com.mmc.pms.entity.ProductSpecDO">
select id,
product_id productSkuId,
spec_name specName,
spec_image specImage,
part_no partNo,
version_desc versionDesc,
create_time createTime
product_id productSkuId,
spec_name specName,
spec_image specImage,
part_no partNo,
version_desc versionDesc,
create_time createTime
from product_spec
where is_deleted = 0
and product_id = #{productSkuId}
<where>
is_deleted = 0
and product_id = #{productSkuId}
<if test="keyword != null and keyword != ''">
and spec_name like CONCAT('%',#{keyword},'%')
</if>
</where>
order by create_time desc
limit #{pageNo}, #{pageSize}
limit #{pageNo}, #{pageSize}
</select>
<select id="getProductSpecPrice" resultType="com.mmc.pms.entity.ProductSpecPriceDO">
select id,
......@@ -479,4 +489,17 @@
AND mp.is_deleted = 0
AND gi.is_deleted = 0
</select>
<select id="getProductSpecPriceList" resultType="com.mmc.pms.entity.ProductSpecPriceDO">
SELECT
id,
product_spec_id productSpecId,
tag_info_id tagInfoId,
price
FROM
product_spec_price
WHERE product_spec_id in (
<foreach collection="list" separator="," index="index" item="d">
#{d}
</foreach>)
</select>
</mapper>
......@@ -153,14 +153,12 @@
</select>
<select id="countListWareInfoPage" parameterType="com.mmc.pms.entity.GoodsInfo" resultType="int">
SELECT
count(*)
FROM
goods_info gi
SELECT count(*)
FROM goods_info gi
INNER JOIN goods_img img ON gi.id = img.goods_info_id
<where>
gi.is_deleted = 0 and gi.shelf_status = 0
<if test="categoryIds != null">
<if test="categoryIds != null and categoryIds.size != 0">
<foreach collection="categoryIds" item="item" index="index" open="and gi.category_by_one IN (" close=")"
separator=",">
#{item}
......
......@@ -7,3 +7,5 @@ data-filter:
- /pms/swagger-resources/**
- /pms/webjars/**
- /pms/product/spec/feignGetSpecLeaseUnitPrice
- /pms//lease/goods/deviceList
- /pms/classify/queryCategoryInfoByType
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论