Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pms
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
pms
Commits
de246e24
提交
de246e24
authored
6月 09, 2023
作者:
xiaowang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新增:租赁设备详情及其他服务接口
上级
f20a6ca6
全部展开
显示空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
197 行增加
和
121 行删除
+197
-121
BackstageGoodsManageController.java
...om/mmc/pms/controller/BackstageGoodsManageController.java
+22
-12
LeaseGoodsController.java
...a/com/mmc/pms/controller/common/LeaseGoodsController.java
+13
-4
GoodsInfoDao.java
src/main/java/com/mmc/pms/dao/GoodsInfoDao.java
+5
-7
ProductDao.java
src/main/java/com/mmc/pms/dao/ProductDao.java
+2
-0
MallProdInfoDO.java
src/main/java/com/mmc/pms/entity/MallProdInfoDO.java
+3
-8
SaleServiceDO.java
src/main/java/com/mmc/pms/entity/SaleServiceDO.java
+32
-0
LeaseGoodsDetailDTO.java
...java/com/mmc/pms/model/lease/dto/LeaseGoodsDetailDTO.java
+0
-70
MallGoodsDetailDTO.java
...n/java/com/mmc/pms/model/sale/dto/MallGoodsDetailDTO.java
+19
-2
SaleServiceDTO.java
src/main/java/com/mmc/pms/model/sale/dto/SaleServiceDTO.java
+25
-0
GoodsInfoService.java
src/main/java/com/mmc/pms/service/GoodsInfoService.java
+3
-1
GoodsInfoServiceImpl.java
...n/java/com/mmc/pms/service/Impl/GoodsInfoServiceImpl.java
+0
-0
WebDeviceServiceImpl.java
...n/java/com/mmc/pms/service/Impl/WebDeviceServiceImpl.java
+26
-0
WebDeviceService.java
src/main/java/com/mmc/pms/service/WebDeviceService.java
+3
-0
GoodsInfoDao.xml
src/main/resources/mapper/GoodsInfoDao.xml
+30
-14
ProductDao.xml
src/main/resources/mapper/ProductDao.xml
+11
-1
WebDeviceDao.xml
src/main/resources/mapper/WebDeviceDao.xml
+2
-2
not-check.yml
src/main/resources/not-check.yml
+1
-0
没有找到文件。
src/main/java/com/mmc/pms/controller/BackstageGoodsManageController.java
浏览文件 @
de246e24
...
@@ -13,34 +13,34 @@ import com.mmc.pms.service.GoodsInfoService;
...
@@ -13,34 +13,34 @@ import com.mmc.pms.service.GoodsInfoService;
import
io.swagger.annotations.*
;
import
io.swagger.annotations.*
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
springfox.documentation.annotations.ApiIgnore
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.List
;
import
java.util.List
;
/**
/**
* @Author LW
* @Author LW
*
@date 2023/3/14 13:22
*
* 概要:
*
@date 2023/3/14 13:22
概要:
*/
*/
@RestController
@RestController
@RequestMapping
(
"/goods"
)
@RequestMapping
(
"/goods"
)
@Api
(
tags
=
{
"后台-商品管理-相关接口"
})
@Api
(
tags
=
{
"后台-商品管理-相关接口"
})
public
class
BackstageGoodsManageController
{
public
class
BackstageGoodsManageController
{
@Resource
@Resource
private
GoodsInfoService
goodsInfoService
;
private
GoodsInfoService
goodsInfoService
;
@ApiOperation
(
value
=
"新增(租赁/销售)商品"
)
@ApiOperation
(
value
=
"新增(租赁/销售)商品"
)
@PostMapping
(
"addGoodsInfo"
)
@PostMapping
(
"addGoodsInfo"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
public
ResultBody
addGoods
(
@ApiParam
(
"商品信息VO"
)
@Validated
(
Create
.
class
)
@RequestBody
GoodsAddVO
goodsAddVO
)
{
public
ResultBody
addGoods
(
@ApiParam
(
"商品信息VO"
)
@Validated
(
Create
.
class
)
@RequestBody
GoodsAddVO
goodsAddVO
)
{
return
goodsInfoService
.
addGoods
(
goodsAddVO
);
return
goodsInfoService
.
addGoods
(
goodsAddVO
);
}
}
@ApiOperation
(
value
=
"修改(租赁/销售)商品"
)
@ApiOperation
(
value
=
"修改(租赁/销售)商品"
)
@PostMapping
(
"editGoodsInfo"
)
@PostMapping
(
"editGoodsInfo"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
public
ResultBody
editGoodsInfo
(
@ApiParam
(
"商品信息VO"
)
@Validated
(
Update
.
class
)
@RequestBody
GoodsAddVO
goodsAddVO
)
{
public
ResultBody
editGoodsInfo
(
@ApiParam
(
"商品信息VO"
)
@Validated
(
Update
.
class
)
@RequestBody
GoodsAddVO
goodsAddVO
)
{
return
goodsInfoService
.
editGoodsInfo
(
goodsAddVO
);
return
goodsInfoService
.
editGoodsInfo
(
goodsAddVO
);
}
}
...
@@ -58,6 +58,13 @@ public class BackstageGoodsManageController {
...
@@ -58,6 +58,13 @@ public class BackstageGoodsManageController {
return
goodsInfoService
.
getSkuUnit
();
return
goodsInfoService
.
getSkuUnit
();
}
}
@ApiOperation
(
value
=
"PC端-其他服务-列表"
)
@GetMapping
(
"listOtherService"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
SaleServiceDTO
.
class
)})
public
ResultBody
listOtherService
()
{
return
goodsInfoService
.
getSaleServiceInfoToList
();
}
@ApiOperation
(
value
=
"feign根据购物车信息填充未知信息"
,
hidden
=
true
)
@ApiOperation
(
value
=
"feign根据购物车信息填充未知信息"
,
hidden
=
true
)
@PostMapping
(
"fillGoodsInfo"
)
@PostMapping
(
"fillGoodsInfo"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
MallGoodsShopCarDTO
.
class
)})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
MallGoodsShopCarDTO
.
class
)})
...
@@ -68,14 +75,16 @@ public class BackstageGoodsManageController {
...
@@ -68,14 +75,16 @@ public class BackstageGoodsManageController {
@ApiOperation
(
value
=
"feign根据渠道等级和产品规格id获取对应价格"
,
hidden
=
true
)
@ApiOperation
(
value
=
"feign根据渠道等级和产品规格id获取对应价格"
,
hidden
=
true
)
@PostMapping
(
"feignListProductSpecPrice"
)
@PostMapping
(
"feignListProductSpecPrice"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
public
List
<
MallProductSpecPriceDTO
>
feignListProductSpecPrice
(
@RequestBody
ProductSpecPriceQO
productSpecPriceQO
)
{
public
List
<
MallProductSpecPriceDTO
>
feignListProductSpecPrice
(
@RequestBody
ProductSpecPriceQO
productSpecPriceQO
)
{
return
goodsInfoService
.
feignListProductSpecPrice
(
productSpecPriceQO
);
return
goodsInfoService
.
feignListProductSpecPrice
(
productSpecPriceQO
);
}
}
@ApiOperation
(
value
=
"feign根据渠道等级获取单价信息"
,
hidden
=
true
)
@ApiOperation
(
value
=
"feign根据渠道等级获取单价信息"
,
hidden
=
true
)
@GetMapping
(
"feignGetUnitPriceByTag"
)
@GetMapping
(
"feignGetUnitPriceByTag"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ProductSpecPriceDTO
.
class
)})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ProductSpecPriceDTO
.
class
)})
public
ProductSpecPriceDTO
feignGetUnitPriceByTag
(
@RequestParam
(
value
=
"specId"
)
Integer
specId
,
public
ProductSpecPriceDTO
feignGetUnitPriceByTag
(
@RequestParam
(
value
=
"specId"
)
Integer
specId
,
@RequestParam
(
value
=
"tagId"
)
Integer
tagId
)
{
@RequestParam
(
value
=
"tagId"
)
Integer
tagId
)
{
return
goodsInfoService
.
feignGetUnitPriceByTag
(
specId
,
tagId
);
return
goodsInfoService
.
feignGetUnitPriceByTag
(
specId
,
tagId
);
}
}
...
@@ -83,15 +92,16 @@ public class BackstageGoodsManageController {
...
@@ -83,15 +92,16 @@ public class BackstageGoodsManageController {
@ApiOperation
(
value
=
"feign根据商品的产品规格id查询商品信息"
,
hidden
=
true
)
@ApiOperation
(
value
=
"feign根据商品的产品规格id查询商品信息"
,
hidden
=
true
)
@PostMapping
(
"feignListProdGoodsSkuInfo"
)
@PostMapping
(
"feignListProdGoodsSkuInfo"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
OrderGoodsProdDTO
.
class
)})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
OrderGoodsProdDTO
.
class
)})
public
List
<
OrderGoodsProdDTO
>
feignListProdGoodsSkuInfo
(
@RequestBody
MallOrderGoodsInfoQO
mallOrderGoodsInfoQO
)
{
public
List
<
OrderGoodsProdDTO
>
feignListProdGoodsSkuInfo
(
@RequestBody
MallOrderGoodsInfoQO
mallOrderGoodsInfoQO
)
{
return
goodsInfoService
.
feignListProdGoodsSkuInfo
(
mallOrderGoodsInfoQO
);
return
goodsInfoService
.
feignListProdGoodsSkuInfo
(
mallOrderGoodsInfoQO
);
}
}
@ApiOperation
(
value
=
"feign根据商品的行业规格id查询商品清单信息"
,
hidden
=
true
)
@ApiOperation
(
value
=
"feign根据商品的行业规格id查询商品清单信息"
,
hidden
=
true
)
@PostMapping
(
"feignListIndstGoodsSkuInfo"
)
@PostMapping
(
"feignListIndstGoodsSkuInfo"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
OrderGoodsProdDTO
.
class
)})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
OrderGoodsProdDTO
.
class
)})
public
List
<
OrderGoodsIndstDTO
>
feignListIndstGoodsSkuInfo
(
@RequestBody
MallOrderGoodsInfoQO
mallOrderGoodsInfoQO
)
{
public
List
<
OrderGoodsIndstDTO
>
feignListIndstGoodsSkuInfo
(
@RequestBody
MallOrderGoodsInfoQO
mallOrderGoodsInfoQO
)
{
return
goodsInfoService
.
feignListIndstGoodsSkuInfo
(
mallOrderGoodsInfoQO
);
return
goodsInfoService
.
feignListIndstGoodsSkuInfo
(
mallOrderGoodsInfoQO
);
}
}
}
}
src/main/java/com/mmc/pms/controller/common/LeaseGoodsController.java
浏览文件 @
de246e24
...
@@ -6,6 +6,7 @@ import com.mmc.pms.constant.TokenConstant;
...
@@ -6,6 +6,7 @@ import com.mmc.pms.constant.TokenConstant;
import
com.mmc.pms.controller.BaseController
;
import
com.mmc.pms.controller.BaseController
;
import
com.mmc.pms.model.lease.dto.LeaseGoodsInfoDTO
;
import
com.mmc.pms.model.lease.dto.LeaseGoodsInfoDTO
;
import
com.mmc.pms.model.qo.WareInfoQO
;
import
com.mmc.pms.model.qo.WareInfoQO
;
import
com.mmc.pms.model.sale.dto.MallGoodsDetailDTO
;
import
com.mmc.pms.service.WebDeviceService
;
import
com.mmc.pms.service.WebDeviceService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -13,10 +14,7 @@ import io.swagger.annotations.ApiResponse;
...
@@ -13,10 +14,7 @@ import io.swagger.annotations.ApiResponse;
import
io.swagger.annotations.ApiResponses
;
import
io.swagger.annotations.ApiResponses
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
...
@@ -42,4 +40,15 @@ public class LeaseGoodsController extends BaseController {
...
@@ -42,4 +40,15 @@ public class LeaseGoodsController extends BaseController {
return
webDeviceService
.
listWareInfoPage
(
return
webDeviceService
.
listWareInfoPage
(
param
,
request
,
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
());
param
,
request
,
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
());
}
}
@ApiOperation
(
value
=
"设备设备详情"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
MallGoodsDetailDTO
.
class
)})
@GetMapping
(
"/getLeaseGoodsDetail"
)
public
ResultBody
listLeaseGoodsDetail
(
Integer
goodsId
,
HttpServletRequest
request
)
{
if
(
request
.
getHeader
(
TokenConstant
.
TOKEN
)
==
null
)
{
return
webDeviceService
.
listLeaseGoodsDetail
(
goodsId
,
null
,
null
);
}
return
webDeviceService
.
listLeaseGoodsDetail
(
goodsId
,
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
(),
request
);
}
}
}
src/main/java/com/mmc/pms/dao/GoodsInfoDao.java
浏览文件 @
de246e24
...
@@ -11,8 +11,7 @@ import java.util.Set;
...
@@ -11,8 +11,7 @@ import java.util.Set;
/**
/**
* @author 23214
* @author 23214
* @description 针对表【goods_info(商品基本信息)】的数据库操作Mapper
* @description 针对表【goods_info(商品基本信息)】的数据库操作Mapper
* @createDate 2023-05-27 14:08:45
* @createDate 2023-05-27 14:08:45 @Entity com.mmc.pms.entity.GoodsInfo
* @Entity com.mmc.pms.entity.GoodsInfo
*/
*/
@Mapper
@Mapper
public
interface
GoodsInfoDao
{
public
interface
GoodsInfoDao
{
...
@@ -83,7 +82,8 @@ public interface GoodsInfoDao {
...
@@ -83,7 +82,8 @@ public interface GoodsInfoDao {
List
<
GoodsServiceDO
>
listGoodsService
(
List
<
Integer
>
goodsIds
);
List
<
GoodsServiceDO
>
listGoodsService
(
List
<
Integer
>
goodsIds
);
List
<
MallGoodsInfoSimpleDO
>
listMallGoodsIndstSimpleInfo
(
@Param
(
"indstSkuSpecIds"
)
Set
<
Integer
>
indstSkuSpecIds
);
List
<
MallGoodsInfoSimpleDO
>
listMallGoodsIndstSimpleInfo
(
@Param
(
"indstSkuSpecIds"
)
Set
<
Integer
>
indstSkuSpecIds
);
List
<
Integer
>
listIndustrySpecIds
(
Set
<
Integer
>
mallIndstSkuSpecIds
);
List
<
Integer
>
listIndustrySpecIds
(
Set
<
Integer
>
mallIndstSkuSpecIds
);
...
@@ -94,8 +94,6 @@ public interface GoodsInfoDao {
...
@@ -94,8 +94,6 @@ public interface GoodsInfoDao {
List
<
MallProdSkuInfoSpecDO
>
getMallProSkuInfoSpec
(
Integer
goodsInfoId
);
List
<
MallProdSkuInfoSpecDO
>
getMallProSkuInfoSpec
(
Integer
goodsInfoId
);
List
<
MallProdSkuInfoSpecDO
>
listMallprodSpecById
(
List
<
Integer
>
goodsIds
);
List
<
MallProdSkuInfoSpecDO
>
listMallprodSpecById
(
List
<
Integer
>
goodsIds
);
}
List
<
SaleServiceDO
>
listSaleServiceInfo
();
}
src/main/java/com/mmc/pms/dao/ProductDao.java
浏览文件 @
de246e24
...
@@ -116,4 +116,6 @@ public interface ProductDao {
...
@@ -116,4 +116,6 @@ public interface ProductDao {
List
<
MallProdSkuInfoSpecDO
>
listMallProductSpec
(
Integer
id
);
List
<
MallProdSkuInfoSpecDO
>
listMallProductSpec
(
Integer
id
);
List
<
ProductSpecPriceDO
>
getProductSpecPriceList
(
List
<
Integer
>
specIds
);
List
<
ProductSpecPriceDO
>
getProductSpecPriceList
(
List
<
Integer
>
specIds
);
ProductSpecPriceDO
getProductSpecPriceById
(
Integer
id
);
}
}
src/main/java/com/mmc/pms/entity/MallProdInfoDO.java
浏览文件 @
de246e24
...
@@ -31,20 +31,15 @@ public class MallProdInfoDO implements Serializable {
...
@@ -31,20 +31,15 @@ public class MallProdInfoDO implements Serializable {
private
Date
createTime
;
private
Date
createTime
;
private
Date
updateTime
;
private
Date
updateTime
;
private
Integer
flag
;
private
Integer
flag
;
private
String
productSpecIdList
;
/** 辅助字段 start */
private
String
beforeUpdateSpec
;
/**
* 辅助字段 start
*/
private
String
typeName
;
private
String
typeName
;
private
String
goodsName
;
private
String
goodsName
;
private
String
unitName
;
private
String
unitName
;
private
String
productSkuName
;
private
String
productSkuName
;
private
Integer
brandInfoId
;
private
Integer
brandInfoId
;
/**
/** 辅助字段 end */
* 辅助字段 end
*/
public
MallProdInfoDO
(
GoodsProdSpecVO
goodsSpecVO
)
{
public
MallProdInfoDO
(
GoodsProdSpecVO
goodsSpecVO
)
{
this
.
categoriesId
=
goodsSpecVO
.
getCategoryId
();
this
.
categoriesId
=
goodsSpecVO
.
getCategoryId
();
this
.
prodSkuSpecName
=
goodsSpecVO
.
getGoodsSpecName
();
this
.
prodSkuSpecName
=
goodsSpecVO
.
getGoodsSpecName
();
...
...
src/main/java/com/mmc/pms/entity/SaleServiceDO.java
0 → 100644
浏览文件 @
de246e24
package
com
.
mmc
.
pms
.
entity
;
import
com.mmc.pms.model.sale.dto.SaleServiceDTO
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* @Author LW
*
* @date 2022/3/28 10:24 概要:
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public
class
SaleServiceDO
implements
Serializable
{
private
Integer
id
;
private
String
serviceName
;
private
String
remark
;
private
Integer
deleted
;
private
Date
updateTime
;
private
Date
createTime
;
public
SaleServiceDTO
buildSaleServiceDTO
()
{
return
SaleServiceDTO
.
builder
().
id
(
this
.
id
).
saleServiceName
(
this
.
serviceName
).
build
();
}
}
src/main/java/com/mmc/pms/model/lease/dto/LeaseGoodsDetailDTO.java
deleted
100644 → 0
浏览文件 @
f20a6ca6
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
;
}
src/main/java/com/mmc/pms/model/sale/dto/MallGoodsDetailDTO.java
浏览文件 @
de246e24
...
@@ -7,12 +7,13 @@ import lombok.NoArgsConstructor;
...
@@ -7,12 +7,13 @@ import lombok.NoArgsConstructor;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
java.util.List
;
/**
/**
* @Author LW
* @Author LW
*
@date 2022/10/14 11:30
*
* 概要:
*
@date 2022/10/14 11:30
概要:
*/
*/
@Data
@Data
@NoArgsConstructor
@NoArgsConstructor
...
@@ -20,30 +21,46 @@ import java.util.List;
...
@@ -20,30 +21,46 @@ import java.util.List;
@Accessors
(
chain
=
true
)
@Accessors
(
chain
=
true
)
public
class
MallGoodsDetailDTO
implements
Serializable
{
public
class
MallGoodsDetailDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
7041502536618388167L
;
private
static
final
long
serialVersionUID
=
7041502536618388167L
;
@ApiModelProperty
(
value
=
"id"
)
@ApiModelProperty
(
value
=
"id"
)
private
Integer
id
;
private
Integer
id
;
@ApiModelProperty
(
value
=
"商品图片"
)
@ApiModelProperty
(
value
=
"商品图片"
)
private
List
<
GoodsImgDTO
>
images
;
private
List
<
GoodsImgDTO
>
images
;
@ApiModelProperty
(
value
=
"商品视频"
)
@ApiModelProperty
(
value
=
"商品视频"
)
private
String
goodsVideo
;
private
String
goodsVideo
;
@ApiModelProperty
(
value
=
"商品视频id"
)
@ApiModelProperty
(
value
=
"商品视频id"
)
private
Integer
goodsVideoId
;
private
Integer
goodsVideoId
;
@ApiModelProperty
(
value
=
"商品名称"
)
@ApiModelProperty
(
value
=
"商品名称"
)
private
String
goodsName
;
private
String
goodsName
;
@ApiModelProperty
(
value
=
"商品详情"
)
@ApiModelProperty
(
value
=
"商品详情"
)
private
GoodsDetailInfoDTO
goodsDetail
;
private
GoodsDetailInfoDTO
goodsDetail
;
@ApiModelProperty
(
value
=
"所属目录"
)
@ApiModelProperty
(
value
=
"所属目录"
)
private
Integer
directoryId
;
private
Integer
directoryId
;
@ApiModelProperty
(
value
=
"一级分类id"
)
@ApiModelProperty
(
value
=
"一级分类id"
)
private
Integer
categoryByOne
;
private
Integer
categoryByOne
;
@ApiModelProperty
(
value
=
"二级分类id"
)
@ApiModelProperty
(
value
=
"二级分类id"
)
private
Integer
categoryByTwo
;
private
Integer
categoryByTwo
;
@ApiModelProperty
(
value
=
"商品标签"
)
@ApiModelProperty
(
value
=
"商品标签"
)
private
String
tag
;
private
String
tag
;
@ApiModelProperty
(
value
=
"商品状态 0:下架 1:上架"
)
@ApiModelProperty
(
value
=
"商品状态 0:下架 1:上架"
)
private
Integer
shelfStatus
;
private
Integer
shelfStatus
;
@ApiModelProperty
(
value
=
"规格信息"
)
@ApiModelProperty
(
value
=
"规格信息"
)
private
List
<
GoodsSpecDTO
>
goodsSpec
;
private
List
<
GoodsSpecDTO
>
goodsSpec
;
@ApiModelProperty
(
value
=
"其他服务: 1:免费配送,2:专业飞手培训2日, 3:半年保修, 4:一年保修 "
)
@ApiModelProperty
(
value
=
"其他服务: 1:免费配送,2:专业飞手培训2日, 3:半年保修, 4:一年保修 "
)
private
List
<
GoodsOtherServiceDTO
>
otherService
;
private
List
<
GoodsOtherServiceDTO
>
otherService
;
@ApiModelProperty
(
value
=
"price(用于租赁商品)"
)
private
BigDecimal
price
;
}
}
src/main/java/com/mmc/pms/model/sale/dto/SaleServiceDTO.java
0 → 100644
浏览文件 @
de246e24
package
com
.
mmc
.
pms
.
model
.
sale
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @Author LW
* @date 2022/3/28 10:48
* 概要:
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
(
value
=
"com.mmc.csf.mall.dto.SaleServiceDTO"
,
description
=
"其他服务信息DTO"
)
public
class
SaleServiceDTO
{
@ApiModelProperty
(
value
=
"id"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"其他服务名称"
)
private
String
saleServiceName
;
}
src/main/java/com/mmc/pms/service/GoodsInfoService.java
浏览文件 @
de246e24
package
com
.
mmc
.
pms
.
service
;
package
com
.
mmc
.
pms
.
service
;
import
com.mmc.pms.common.ResultBody
;
import
com.mmc.pms.common.ResultBody
;
import
com.mmc.pms.model.sale.dto.ProductSpecPriceDTO
;
import
com.mmc.pms.model.order.dto.OrderGoodsIndstDTO
;
import
com.mmc.pms.model.order.dto.OrderGoodsIndstDTO
;
import
com.mmc.pms.model.order.dto.OrderGoodsProdDTO
;
import
com.mmc.pms.model.order.dto.OrderGoodsProdDTO
;
import
com.mmc.pms.model.qo.MallOrderGoodsInfoQO
;
import
com.mmc.pms.model.qo.MallOrderGoodsInfoQO
;
import
com.mmc.pms.model.qo.ProductSpecPriceQO
;
import
com.mmc.pms.model.qo.ProductSpecPriceQO
;
import
com.mmc.pms.model.sale.dto.MallGoodsShopCarDTO
;
import
com.mmc.pms.model.sale.dto.MallGoodsShopCarDTO
;
import
com.mmc.pms.model.sale.dto.MallProductSpecPriceDTO
;
import
com.mmc.pms.model.sale.dto.MallProductSpecPriceDTO
;
import
com.mmc.pms.model.sale.dto.ProductSpecPriceDTO
;
import
com.mmc.pms.model.sale.vo.GoodsAddVO
;
import
com.mmc.pms.model.sale.vo.GoodsAddVO
;
import
java.util.List
;
import
java.util.List
;
...
@@ -27,6 +27,8 @@ public interface GoodsInfoService {
...
@@ -27,6 +27,8 @@ public interface GoodsInfoService {
ResultBody
getSkuUnit
();
ResultBody
getSkuUnit
();
ResultBody
getSaleServiceInfoToList
();
List
<
MallGoodsShopCarDTO
>
fillGoodsInfo
(
List
<
MallGoodsShopCarDTO
>
param
);
List
<
MallGoodsShopCarDTO
>
fillGoodsInfo
(
List
<
MallGoodsShopCarDTO
>
param
);
List
<
MallProductSpecPriceDTO
>
feignListProductSpecPrice
(
ProductSpecPriceQO
productSpecPriceQO
);
List
<
MallProductSpecPriceDTO
>
feignListProductSpecPrice
(
ProductSpecPriceQO
productSpecPriceQO
);
...
...
src/main/java/com/mmc/pms/service/Impl/GoodsInfoServiceImpl.java
浏览文件 @
de246e24
差异被折叠。
点击展开。
src/main/java/com/mmc/pms/service/Impl/WebDeviceServiceImpl.java
浏览文件 @
de246e24
...
@@ -15,6 +15,7 @@ import com.mmc.pms.model.other.dto.AdDTO;
...
@@ -15,6 +15,7 @@ import com.mmc.pms.model.other.dto.AdDTO;
import
com.mmc.pms.model.other.dto.DistrictInfoDTO
;
import
com.mmc.pms.model.other.dto.DistrictInfoDTO
;
import
com.mmc.pms.model.other.dto.ModelDTO
;
import
com.mmc.pms.model.other.dto.ModelDTO
;
import
com.mmc.pms.model.qo.WareInfoQO
;
import
com.mmc.pms.model.qo.WareInfoQO
;
import
com.mmc.pms.model.sale.dto.MallGoodsDetailDTO
;
import
com.mmc.pms.model.sale.dto.SkuInfoDTO
;
import
com.mmc.pms.model.sale.dto.SkuInfoDTO
;
import
com.mmc.pms.page.PageResult
;
import
com.mmc.pms.page.PageResult
;
import
com.mmc.pms.service.WebDeviceService
;
import
com.mmc.pms.service.WebDeviceService
;
...
@@ -40,6 +41,7 @@ public class WebDeviceServiceImpl implements WebDeviceService {
...
@@ -40,6 +41,7 @@ public class WebDeviceServiceImpl implements WebDeviceService {
@Autowired
ProductDao
productDao
;
@Autowired
ProductDao
productDao
;
@Autowired
GoodsInfoDao
goodsInfoDao
;
@Autowired
GoodsInfoDao
goodsInfoDao
;
@Autowired
GoodsInfoServiceImpl
goodsInfoService
;
@Override
@Override
public
ResultBody
listSecondDistrict
()
{
public
ResultBody
listSecondDistrict
()
{
...
@@ -214,6 +216,30 @@ public class WebDeviceServiceImpl implements WebDeviceService {
...
@@ -214,6 +216,30 @@ public class WebDeviceServiceImpl implements WebDeviceService {
}
}
@Override
@Override
public
ResultBody
listLeaseGoodsDetail
(
Integer
goodsInfoId
,
Integer
userAccountId
,
HttpServletRequest
request
)
{
int
count
=
goodsInfoDao
.
countGoodsInfoById
(
goodsInfoId
);
if
(
count
<=
0
)
{
return
ResultBody
.
error
(
ResultEnum
.
GOODS_NOT_EXIST_OR_ALREADY_DOWN_SHELF
);
}
// 初始化商品返回信息的对象
ResultBody
goodsInfoDetail
=
goodsInfoService
.
getGoodsInfoDetail
(
goodsInfoId
);
MallGoodsDetailDTO
result
=
(
MallGoodsDetailDTO
)
goodsInfoDetail
.
getResult
();
if
(
userAccountId
!=
null
)
{
UserAccountSimpleDTO
userAccountSimpleDTO
=
userAppApi
.
feignGetUserSimpleInfo
(
userAccountId
,
request
.
getHeader
(
TokenConstant
.
TOKEN
));
if
(
userAccountSimpleDTO
.
getCooperationTagId
()
!=
null
)
{
if
(!
result
.
getDirectoryId
().
equals
(
2
))
{
Integer
id
=
result
.
getGoodsSpec
().
get
(
0
).
getProductSpecList
().
get
(
0
).
getProductSpec
();
ProductSpecPriceDO
price
=
productDao
.
getProductSpecPriceById
(
id
);
result
.
setPrice
(
price
.
getPrice
());
}
}
}
return
ResultBody
.
success
(
result
);
}
@Override
public
WareInfoDTO
getWareInfoById
(
Integer
id
)
{
public
WareInfoDTO
getWareInfoById
(
Integer
id
)
{
WareInfoDO
wareInfoDO
=
webDeviceDao
.
getWareInfoById
(
id
);
WareInfoDO
wareInfoDO
=
webDeviceDao
.
getWareInfoById
(
id
);
WareDetailDO
wareDetailDO
=
webDeviceDao
.
getWareDetailById
(
id
);
WareDetailDO
wareDetailDO
=
webDeviceDao
.
getWareDetailById
(
id
);
...
...
src/main/java/com/mmc/pms/service/WebDeviceService.java
浏览文件 @
de246e24
...
@@ -39,4 +39,7 @@ public interface WebDeviceService {
...
@@ -39,4 +39,7 @@ public interface WebDeviceService {
ResultBody
<
AdDTO
>
ad
();
ResultBody
<
AdDTO
>
ad
();
List
<
SkuInfoDTO
>
listWareSkuById
(
Integer
id
);
List
<
SkuInfoDTO
>
listWareSkuById
(
Integer
id
);
ResultBody
listLeaseGoodsDetail
(
Integer
goodsId
,
Integer
userAccountId
,
HttpServletRequest
request
);
}
}
src/main/resources/mapper/GoodsInfoDao.xml
浏览文件 @
de246e24
...
@@ -65,10 +65,10 @@
...
@@ -65,10 +65,10 @@
</insert>
</insert>
<insert
id=
"insertMallProdSkuInfo"
parameterType=
"com.mmc.pms.entity.MallProdInfoDO"
useGeneratedKeys=
"true"
<insert
id=
"insertMallProdSkuInfo"
parameterType=
"com.mmc.pms.entity.MallProdInfoDO"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
keyProperty=
"id"
>
insert into mall_prod_
sku_info (goods_info_id, product_id, prod_sku
_spec_name, categories_id, choose_type,
insert into mall_prod_
info (goods_info_id, product_id, prod
_spec_name, categories_id, choose_type,
sku_unit_id, is_must, flag)
sku_unit_id, is_must, flag)
values (#{goodsInfoId}, #{prodSkuId}, #{prodSkuSpecName}, #{categoriesId}, #{chooseType}, #{skuUnitId}, #{must},
values (#{goodsInfoId}, #{prodSkuId}, #{prodSkuSpecName}, #{categoriesId}, #{chooseType}, #{skuUnitId}, #{must},
#{flag})
>
#{flag})
</insert>
</insert>
<insert
id=
"insertMallProdSkuInfoSpec"
>
<insert
id=
"insertMallProdSkuInfoSpec"
>
insert into mall_prod_info_spec (goods_info_id, mall_prod_info_id, product_spec_id)
insert into mall_prod_info_spec (goods_info_id, mall_prod_info_id, product_spec_id)
...
@@ -179,24 +179,22 @@
...
@@ -179,24 +179,22 @@
<select
id=
"getMallProSkuInfo"
resultType=
"com.mmc.pms.entity.MallProdInfoDO"
>
<select
id=
"getMallProSkuInfo"
resultType=
"com.mmc.pms.entity.MallProdInfoDO"
>
SELECT mi.id,
SELECT mi.id,
mi.goods_info_id,
mi.goods_info_id,
mi.prod_sku_id,
mi.product_id prodSkuId,
mi.prod_spec_name,
mi.prod_spec_name prodSkuSpecName,
mi.categories_id,
mi.categories_id categoriesId,
mi.choose_type,
mi.choose_type chooseType,
mi.sku_unit_id,
mi.sku_unit_id skuUnitId,
mi.is_must,
mi.is_must must,
mi.product_spec_id_list,
mi.flag flag,
mi.before_update_spec,
mi.flag,
mi.create_time createTime,
mi.create_time createTime,
c.
type_name
typeName,
c.
name
typeName,
su.id skuUnitId,
su.id skuUnitId,
su.unit_name unitName,
su.unit_name unitName,
ps.product_name productSkuName
ps.product_name productSkuName
FROM mall_prod_info mi
FROM mall_prod_info mi
INNER JOIN categories c ON c.id = mi.categories_id
INNER JOIN categories c ON c.id = mi.categories_id
INNER JOIN sku_unit su ON mi.sku_unit_id = su.id
INNER JOIN sku_unit su ON mi.sku_unit_id = su.id
INNER JOIN product ps ON ps.id = mi.prod
_sku
_id
INNER JOIN product ps ON ps.id = mi.prod
uct
_id
WHERE mi.goods_info_id = #{id}
WHERE mi.goods_info_id = #{id}
AND mi.is_deleted = 0
AND mi.is_deleted = 0
</select>
</select>
...
@@ -440,7 +438,19 @@
...
@@ -440,7 +438,19 @@
AND im.img_type = 0
AND im.img_type = 0
WHERE gi.category_by_one = #{id}
WHERE gi.category_by_one = #{id}
</select>
</select>
<select
id=
"getMallProSkuInfoSpec"
resultType=
"com.mmc.pms.entity.MallProdSkuInfoSpecDO"
>
<resultMap
id=
"resultMallProdSkuInfoSpecMap"
type=
"com.mmc.pms.entity.MallProdSkuInfoSpecDO"
>
<id
property=
"id"
column=
"id"
/>
<result
property=
"mallProdSkuInfoId"
column=
"mall_prod_info_id"
/>
<result
property=
"productSpecId"
column=
"product_spec_id"
/>
<association
property=
"productSpecDO"
resultMap=
"resultProductSpecMap"
/>
</resultMap>
<resultMap
id=
"resultProductSpecMap"
type=
"com.mmc.pms.entity.ProductSpecDO"
>
<result
property=
"specImage"
column=
"spec_image"
/>
<result
property=
"partNo"
column=
"part_no"
/>
<result
property=
"specName"
column=
"spec_name"
/>
<result
property=
"versionDesc"
column=
"version_desc"
/>
</resultMap>
<select
id=
"getMallProSkuInfoSpec"
resultMap=
"resultMallProdSkuInfoSpecMap"
>
SELECT mp.id,
SELECT mp.id,
mp.mall_prod_info_id,
mp.mall_prod_info_id,
mp.product_spec_id,
mp.product_spec_id,
...
@@ -464,6 +474,7 @@
...
@@ -464,6 +474,7 @@
LEFT JOIN product_spec_price psp ON mp.product_spec_id = psp.product_spec_id
LEFT JOIN product_spec_price psp ON mp.product_spec_id = psp.product_spec_id
AND psp.cooperation_tag = 0
AND psp.cooperation_tag = 0
AND psp.type = 0
AND psp.type = 0
and psp.lease_term = 0
<where>
<where>
mp.is_deleted = 0
mp.is_deleted = 0
<foreach
collection=
"list"
separator=
","
open=
" and mp.goods_info_id in ("
close=
")"
index=
"index"
item=
"d"
>
<foreach
collection=
"list"
separator=
","
open=
" and mp.goods_info_id in ("
close=
")"
index=
"index"
item=
"d"
>
...
@@ -471,4 +482,9 @@
...
@@ -471,4 +482,9 @@
</foreach>
</foreach>
</where>
</where>
</select>
</select>
<select
id=
"listSaleServiceInfo"
resultType=
"com.mmc.pms.entity.SaleServiceDO"
>
SELECT id, service_name
FROM sale_service
WHERE is_deleted = 0
</select>
</mapper>
</mapper>
src/main/resources/mapper/ProductDao.xml
浏览文件 @
de246e24
...
@@ -180,7 +180,7 @@
...
@@ -180,7 +180,7 @@
from product_spec
from product_spec
<where>
<where>
is_deleted = 0
is_deleted = 0
and product_
sku_
id = #{id}
and product_id = #{id}
<if
test=
"keyword != null and keyword != ''"
>
<if
test=
"keyword != null and keyword != ''"
>
and spec_name like CONCAT('%',#{keyword},'%')
and spec_name like CONCAT('%',#{keyword},'%')
</if>
</if>
...
@@ -502,4 +502,14 @@
...
@@ -502,4 +502,14 @@
#{d}
#{d}
</foreach>
)
</foreach>
)
</select>
</select>
<select
id=
"getProductSpecPriceById"
resultType=
"com.mmc.pms.entity.ProductSpecPriceDO"
>
SELECT product_spec_id,
cooperation_tag,
price
FROM product_spec_price
WHERE product_spec_id = #{id}
AND cooperation_tag = 0
AND type = 1
and lease_term = 0
</select>
</mapper>
</mapper>
src/main/resources/mapper/WebDeviceDao.xml
浏览文件 @
de246e24
...
@@ -157,7 +157,7 @@
...
@@ -157,7 +157,7 @@
FROM goods_info gi
FROM goods_info gi
INNER JOIN goods_img img ON gi.id = img.goods_info_id
INNER JOIN goods_img img ON gi.id = img.goods_info_id
<where>
<where>
gi.is_deleted = 0 and gi.shelf_status = 0
gi.is_deleted = 0 and gi.shelf_status = 0
and gi.goods_type = 1
<if
test=
"categoryIds != null and categoryIds.size != 0"
>
<if
test=
"categoryIds != null and categoryIds.size != 0"
>
<foreach
collection=
"categoryIds"
item=
"item"
index=
"index"
open=
"and gi.category_by_one IN ("
close=
")"
<foreach
collection=
"categoryIds"
item=
"item"
index=
"index"
open=
"and gi.category_by_one IN ("
close=
")"
separator=
","
>
separator=
","
>
...
@@ -180,7 +180,7 @@
...
@@ -180,7 +180,7 @@
goods_info gi
goods_info gi
INNER JOIN goods_img img ON gi.id = img.goods_info_id and img.img_type = 0
INNER JOIN goods_img img ON gi.id = img.goods_info_id and img.img_type = 0
<where>
<where>
gi.is_deleted = 0 and gi.shelf_status = 0
gi.is_deleted = 0 and gi.shelf_status = 0
and gi.goods_type = 1
<if
test=
"categoryIds != null"
>
<if
test=
"categoryIds != null"
>
<foreach
collection=
"categoryIds"
item=
"item"
index=
"index"
open=
"and gi.category_by_one IN ("
close=
")"
<foreach
collection=
"categoryIds"
item=
"item"
index=
"index"
open=
"and gi.category_by_one IN ("
close=
")"
separator=
","
>
separator=
","
>
...
...
src/main/resources/not-check.yml
浏览文件 @
de246e24
...
@@ -9,3 +9,4 @@ data-filter:
...
@@ -9,3 +9,4 @@ data-filter:
-
/pms/product/spec/feignGetSpecLeaseUnitPrice
-
/pms/product/spec/feignGetSpecLeaseUnitPrice
-
/pms//lease/goods/deviceList
-
/pms//lease/goods/deviceList
-
/pms/classify/queryCategoryInfoByType
-
/pms/classify/queryCategoryInfoByType
-
/pms/lease/goods/getLeaseGoodsDetail
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论