Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pms-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
pms-ci-test
Commits
73fb185a
提交
73fb185a
authored
8月 17, 2023
作者:
xiaowang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bug修复
上级
1fcda567
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
105 行增加
和
36 行删除
+105
-36
AppGoodsController.java
...java/com/mmc/pms/controller/lease/AppGoodsController.java
+46
-0
LeaseGoodsDO.java
src/main/java/com/mmc/pms/entity/lease/LeaseGoodsDO.java
+8
-4
LeaseGoodsVO.java
src/main/java/com/mmc/pms/model/lease/vo/LeaseGoodsVO.java
+13
-0
LeaseGoodsServiceImpl.java
...com/mmc/pms/service/lease/impl/LeaseGoodsServiceImpl.java
+5
-8
LeaseGoodsDao.xml
src/main/resources/mapper/lease/LeaseGoodsDao.xml
+30
-24
not-check.yml
src/main/resources/not-check.yml
+3
-0
没有找到文件。
src/main/java/com/mmc/pms/controller/lease/AppGoodsController.java
0 → 100644
浏览文件 @
73fb185a
package
com
.
mmc
.
pms
.
controller
.
lease
;
/**
* @Author LW
* @date 2023/8/4 10:35
* 概要:
*/
import
com.mmc.pms.common.ResultBody
;
import
com.mmc.pms.controller.BaseController
;
import
com.mmc.pms.model.lease.qo.LeaseGoodsQO
;
import
com.mmc.pms.model.lease.vo.LeaseGoodsVO
;
import
com.mmc.pms.service.lease.LeaseGoodsService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiResponse
;
import
io.swagger.annotations.ApiResponses
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
/**
* @Author LW
* @date 2023/7/24 16:56 概要:
*/
@RestController
@RequestMapping
(
"/app/lease/"
)
@Api
(
tags
=
{
"V1.0.3-小程序-租赁商品-相关接口"
})
public
class
AppGoodsController
extends
BaseController
{
@Resource
LeaseGoodsService
leaseGoodsService
;
@ApiOperation
(
value
=
"租赁商品详情"
)
@GetMapping
(
"leaseGoodsDetails"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
LeaseGoodsVO
.
class
)})
public
ResultBody
<
LeaseGoodsVO
>
leaseGoodsDetails
(
@RequestParam
Integer
id
)
{
return
leaseGoodsService
.
leaseGoodsDetails
(
id
);
}
@ApiOperation
(
value
=
"租赁商品列表"
)
@PostMapping
(
"leaseGoodsList"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
LeaseGoodsVO
.
class
)})
public
ResultBody
leaseGoodsList
(
@RequestBody
LeaseGoodsQO
param
)
{
return
leaseGoodsService
.
leaseGoodsList
(
param
,
null
);
}
}
src/main/java/com/mmc/pms/entity/lease/LeaseGoodsDO.java
浏览文件 @
73fb185a
...
@@ -107,6 +107,10 @@ public class LeaseGoodsDO implements Serializable {
...
@@ -107,6 +107,10 @@ public class LeaseGoodsDO implements Serializable {
private
List
<
LeaseGoodsResourcesDO
>
leaseGoodsResources
;
private
List
<
LeaseGoodsResourcesDO
>
leaseGoodsResources
;
// 规格排列组合
// 规格排列组合
private
List
<
LeasePriceStockDO
>
priceStockList
;
private
List
<
LeasePriceStockDO
>
priceStockList
;
private
String
modeOfDeliveryInfo
;
private
String
brandName
;
private
String
productTypeName
;
private
String
deviceModeName
;
/**
/**
* 辅助字段end
* 辅助字段end
...
@@ -134,10 +138,10 @@ public class LeaseGoodsDO implements Serializable {
...
@@ -134,10 +138,10 @@ public class LeaseGoodsDO implements Serializable {
}
}
public
LeaseGoodsVO
buildLeaseGoodsVO
()
{
public
LeaseGoodsVO
buildLeaseGoodsVO
()
{
return
LeaseGoodsVO
.
builder
().
id
(
id
).
tradeName
(
tradeName
).
showPrice
(
showPrice
)
return
LeaseGoodsVO
.
builder
().
id
(
id
).
tradeName
(
tradeName
).
showPrice
(
showPrice
)
.
deviceModeName
(
deviceModeName
)
.
sellingPoint
(
sellingPoint
).
level
(
level
).
shelfStatus
(
shelfStatus
)
.
sellingPoint
(
sellingPoint
).
level
(
level
).
shelfStatus
(
shelfStatus
)
.
modeOfDeliveryInfo
(
modeOfDeliveryInfo
)
.
productTypeId
(
productTypeId
).
brandInfoId
(
brandInfoId
).
deviceModeId
(
deviceModeId
)
.
productTypeId
(
productTypeId
).
brandInfoId
(
brandInfoId
).
deviceModeId
(
deviceModeId
)
.
brandName
(
brandName
)
.
productParam
(
productParam
).
productDetails
(
productDetails
).
minLeaseTerm
(
minLeaseTerm
)
.
productParam
(
productParam
).
productDetails
(
productDetails
).
minLeaseTerm
(
minLeaseTerm
)
.
productTypeName
(
productTypeName
)
.
maxLeaseTerm
(
maxLeaseTerm
).
shipAddress
(
shipAddress
).
returnAddress
(
returnAddress
)
.
maxLeaseTerm
(
maxLeaseTerm
).
shipAddress
(
shipAddress
).
returnAddress
(
returnAddress
)
.
logisticsCompany
(
logisticsCompany
).
modeOfDelivery
(
modeOfDelivery
).
createTime
(
createTime
)
.
logisticsCompany
(
logisticsCompany
).
modeOfDelivery
(
modeOfDelivery
).
createTime
(
createTime
)
.
userAccountId
(
userAccountId
).
resourcesList
(
CollectionUtils
.
isEmpty
(
leaseGoodsResources
)
.
userAccountId
(
userAccountId
).
resourcesList
(
CollectionUtils
.
isEmpty
(
leaseGoodsResources
)
...
...
src/main/java/com/mmc/pms/model/lease/vo/LeaseGoodsVO.java
浏览文件 @
73fb185a
...
@@ -117,4 +117,17 @@ public class LeaseGoodsVO implements Serializable {
...
@@ -117,4 +117,17 @@ public class LeaseGoodsVO implements Serializable {
@ApiModelProperty
(
value
=
"市code编码"
)
@ApiModelProperty
(
value
=
"市code编码"
)
private
String
districtCode
;
private
String
districtCode
;
@ApiModelProperty
(
value
=
"类型名称"
,
hidden
=
true
)
private
String
productTypeName
;
@ApiModelProperty
(
value
=
"品牌名称"
,
hidden
=
true
)
private
String
brandName
;
@ApiModelProperty
(
value
=
"型号名称"
,
hidden
=
true
)
private
String
deviceModeName
;
@ApiModelProperty
(
value
=
"配送方式信息"
,
hidden
=
true
)
private
String
modeOfDeliveryInfo
;
}
}
src/main/java/com/mmc/pms/service/lease/impl/LeaseGoodsServiceImpl.java
浏览文件 @
73fb185a
...
@@ -4,7 +4,6 @@ import com.mmc.pms.auth.dto.LoginSuccessDTO;
...
@@ -4,7 +4,6 @@ import com.mmc.pms.auth.dto.LoginSuccessDTO;
import
com.mmc.pms.common.ResultBody
;
import
com.mmc.pms.common.ResultBody
;
import
com.mmc.pms.dao.lease.LeaseGoodsDao
;
import
com.mmc.pms.dao.lease.LeaseGoodsDao
;
import
com.mmc.pms.entity.lease.*
;
import
com.mmc.pms.entity.lease.*
;
import
com.mmc.pms.enums.UserTypeEnums
;
import
com.mmc.pms.model.lease.qo.LeaseGoodsQO
;
import
com.mmc.pms.model.lease.qo.LeaseGoodsQO
;
import
com.mmc.pms.model.lease.vo.LeaseGoodsVO
;
import
com.mmc.pms.model.lease.vo.LeaseGoodsVO
;
import
com.mmc.pms.model.lease.vo.LeasePartsListVO
;
import
com.mmc.pms.model.lease.vo.LeasePartsListVO
;
...
@@ -118,17 +117,14 @@ public class LeaseGoodsServiceImpl implements LeaseGoodsService {
...
@@ -118,17 +117,14 @@ public class LeaseGoodsServiceImpl implements LeaseGoodsService {
@Override
@Override
public
ResultBody
leaseGoodsList
(
LeaseGoodsQO
param
,
LoginSuccessDTO
loginSuccessDTO
)
{
public
ResultBody
leaseGoodsList
(
LeaseGoodsQO
param
,
LoginSuccessDTO
loginSuccessDTO
)
{
if
(
loginSuccessDTO
.
getRoleInfo
().
getSuperAdmin
().
equals
(
1
))
{
if
(
loginSuccessDTO
==
null
||
loginSuccessDTO
.
getRoleInfo
().
getSuperAdmin
().
equals
(
1
))
{
// 超级管理员获取所有商品信息
//
小程序和
超级管理员获取所有商品信息
return
ResultBody
.
success
(
getLeaseGoodsInfo
(
param
));
return
ResultBody
.
success
(
getLeaseGoodsInfo
(
param
));
}
else
if
(!
loginSuccessDTO
.
getRoleInfo
().
getSuperAdmin
().
equals
(
1
))
{
}
else
{
// 非超级管理员获取自家的商品信息
// 非超级管理员获取自家的商品信息
param
.
setUserAccountId
(
loginSuccessDTO
.
getUserAccountId
());
param
.
setUserAccountId
(
loginSuccessDTO
.
getUserAccountId
());
return
ResultBody
.
success
(
getLeaseGoodsInfo
(
param
));
return
ResultBody
.
success
(
getLeaseGoodsInfo
(
param
));
}
else
if
(
loginSuccessDTO
.
getPortType
().
equals
(
UserTypeEnums
.
APP
.
getType
()))
{
return
ResultBody
.
success
(
getLeaseGoodsInfo
(
param
));
}
}
return
ResultBody
.
success
();
}
}
private
PageResult
getLeaseGoodsInfo
(
LeaseGoodsQO
param
)
{
private
PageResult
getLeaseGoodsInfo
(
LeaseGoodsQO
param
)
{
...
@@ -140,7 +136,8 @@ public class LeaseGoodsServiceImpl implements LeaseGoodsService {
...
@@ -140,7 +136,8 @@ public class LeaseGoodsServiceImpl implements LeaseGoodsService {
param
.
buildCurrentPage
();
param
.
buildCurrentPage
();
List
<
LeaseGoodsDO
>
leaseGoodsDOList
=
leaseGoodsDao
.
listLeaseGoods
(
param
);
List
<
LeaseGoodsDO
>
leaseGoodsDOList
=
leaseGoodsDao
.
listLeaseGoods
(
param
);
// 转成vo
// 转成vo
List
<
LeaseGoodsVO
>
leaseGoodsVOList
=
leaseGoodsDOList
.
stream
().
map
(
LeaseGoodsDO:
:
buildLeaseGoodsVO
).
collect
(
Collectors
.
toList
());
List
<
LeaseGoodsVO
>
leaseGoodsVOList
=
leaseGoodsDOList
.
stream
().
map
(
LeaseGoodsDO:
:
buildLeaseGoodsVO
)
.
skip
(
param
.
getPageNo
()).
limit
(
param
.
getPageSize
()).
collect
(
Collectors
.
toList
());
leaseGoodsVOList
=
leaseGoodsVOList
.
stream
().
peek
(
d
->
{
leaseGoodsVOList
=
leaseGoodsVOList
.
stream
().
peek
(
d
->
{
// 获取最低押金及最高押金
// 获取最低押金及最高押金
List
<
LeasePriceStockVO
>
list
=
d
.
getPriceStock
().
stream
().
sorted
(
Comparator
.
comparing
(
LeasePriceStockVO:
:
getCashPledge
)).
collect
(
Collectors
.
toList
());
List
<
LeasePriceStockVO
>
list
=
d
.
getPriceStock
().
stream
().
sorted
(
Comparator
.
comparing
(
LeasePriceStockVO:
:
getCashPledge
)).
collect
(
Collectors
.
toList
());
...
...
src/main/resources/mapper/lease/LeaseGoodsDao.xml
浏览文件 @
73fb185a
...
@@ -218,28 +218,36 @@
...
@@ -218,28 +218,36 @@
from lease_term_info
from lease_term_info
</select>
</select>
<select
id=
"getLeaseGoodsBaseInfo"
resultType=
"com.mmc.pms.entity.lease.LeaseGoodsDO"
>
<select
id=
"getLeaseGoodsBaseInfo"
resultType=
"com.mmc.pms.entity.lease.LeaseGoodsDO"
>
select id,
SELECT lg.id,
trade_name,
lg.trade_name,
selling_point,
lg.selling_point,
`level`,
lg.`level`,
shelf_status,
lg.shelf_status,
product_type_id,
lg.product_type_id,
brand_info_id,
lg.brand_info_id,
device_mode_id,
lg.device_mode_id,
product_param,
lg.product_param,
product_details,
lg.product_details,
min_lease_term,
lg.min_lease_term,
max_lease_term,
lg.max_lease_term,
ship_address,
lg.ship_address,
return_address,
lg.return_address,
logistics_company,
lg.logistics_company,
mode_of_delivery,
lg.mode_of_delivery,
user_account_id,
lg.user_account_id,
create_time,
lg.create_time,
show_price,
lg.show_price,
sort
lg.sort,
from lease_goods
bi.brand_name brandName,
where id = #{id}
pt.`name` productTypeName,
dm.model_name deviceModeName,
ss.service_name modeOfDeliveryInfo
FROM lease_goods lg
LEFT JOIN sale_service ss ON lg.mode_of_delivery = ss.id
LEFT JOIN brand_info bi ON bi.id = lg.brand_info_id
LEFT JOIN product_type pt ON pt.id = lg.product_type_id
LEFT JOIN device_mode dm ON dm.id = lg.device_mode_id
WHERE lg.id = #{id}
</select>
</select>
<select
id=
"getLeaseGoodsResources"
resultType=
"com.mmc.pms.entity.lease.LeaseGoodsResourcesDO"
>
<select
id=
"getLeaseGoodsResources"
resultType=
"com.mmc.pms.entity.lease.LeaseGoodsResourcesDO"
>
SELECT id,
SELECT id,
...
@@ -397,6 +405,5 @@
...
@@ -397,6 +405,5 @@
</if>
</if>
</where>
</where>
order by lg.shelf_status DESC, lg.sort DESC
order by lg.shelf_status DESC, lg.sort DESC
limit #{pageNo},#{pageSize}
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
src/main/resources/not-check.yml
浏览文件 @
73fb185a
...
@@ -23,3 +23,5 @@ data-filter:
...
@@ -23,3 +23,5 @@ data-filter:
-
/pms/app/goods/queryBrandGoods
-
/pms/app/goods/queryBrandGoods
-
/pms/app/goods/queryGoodsInfoByCategorySub
-
/pms/app/goods/queryGoodsInfoByCategorySub
-
/pms/mall/goods/feignRemoveGoodsByBackUserAccountId
-
/pms/mall/goods/feignRemoveGoodsByBackUserAccountId
-
/pms/app/lease/leaseGoodsDetails
-
/pms/app/lease/leaseGoodsList
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论