Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pms-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
pms-ci-test
Commits
642dfd27
提交
642dfd27
authored
8月 19, 2023
作者:
zhenjie
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop'
上级
fc0879f5
a0a77fed
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
105 行增加
和
19 行删除
+105
-19
kustomization.yaml
kustomization/overlays/dev/kustomization.yaml
+1
-1
LeaseGoodsController.java
...va/com/mmc/pms/controller/lease/LeaseGoodsController.java
+2
-4
LeaseGoodsDao.java
src/main/java/com/mmc/pms/dao/lease/LeaseGoodsDao.java
+5
-1
LeaseGoodsService.java
...ain/java/com/mmc/pms/service/lease/LeaseGoodsService.java
+1
-1
LeaseGoodsServiceImpl.java
...com/mmc/pms/service/lease/impl/LeaseGoodsServiceImpl.java
+23
-11
LeaseGoodsDao.xml
src/main/resources/mapper/lease/LeaseGoodsDao.xml
+73
-1
没有找到文件。
kustomization/overlays/dev/kustomization.yaml
浏览文件 @
642dfd27
...
@@ -18,4 +18,4 @@ patches:
...
@@ -18,4 +18,4 @@ patches:
images
:
images
:
-
name
:
REGISTRY/NAMESPACE/IMAGE:TAG
-
name
:
REGISTRY/NAMESPACE/IMAGE:TAG
newName
:
mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/pms
newName
:
mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/pms
newTag
:
ca19a936c153a8b533fbfe359cd6ae36e37ad991
newTag
:
16203e068976be09d2b4a8e92d31218ba49b7e64
src/main/java/com/mmc/pms/controller/lease/LeaseGoodsController.java
浏览文件 @
642dfd27
...
@@ -17,7 +17,6 @@ import com.mmc.pms.service.lease.LeaseGoodsService;
...
@@ -17,7 +17,6 @@ import com.mmc.pms.service.lease.LeaseGoodsService;
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
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
...
@@ -87,9 +86,8 @@ public class LeaseGoodsController extends BaseController {
...
@@ -87,9 +86,8 @@ public class LeaseGoodsController extends BaseController {
@ApiOperation
(
value
=
"feign-根据地址id查询是否有商品绑定"
)
@ApiOperation
(
value
=
"feign-根据地址id查询是否有商品绑定"
)
@GetMapping
(
"feignLeaseGoodsInfoByAddressId"
)
@GetMapping
(
"feignLeaseGoodsInfoByAddressId"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
LeaseGoodsVO
.
class
)})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@ApiIgnore
public
ResultBody
feignLeaseGoodsInfoByAddressId
(
@RequestParam
Integer
id
)
{
public
Integer
feignLeaseGoodsInfoByAddressId
(
@RequestParam
Integer
id
)
{
return
leaseGoodsService
.
feignLeaseGoodsInfoByAddressId
(
id
);
return
leaseGoodsService
.
feignLeaseGoodsInfoByAddressId
(
id
);
}
}
}
}
src/main/java/com/mmc/pms/dao/lease/LeaseGoodsDao.java
浏览文件 @
642dfd27
...
@@ -71,5 +71,9 @@ public interface LeaseGoodsDao {
...
@@ -71,5 +71,9 @@ public interface LeaseGoodsDao {
void
removeWareInfo
(
List
<
Integer
>
list
);
void
removeWareInfo
(
List
<
Integer
>
list
);
Integer
feignLeaseGoodsInfoByAddressId
(
Integer
id
);
int
feignLeaseGoodsInfoByAddressId
(
Integer
id
);
int
countLeaseGoodsByApp
(
LeaseGoodsQO
param
);
List
<
LeaseGoodsDO
>
listLeaseGoodsByApp
(
LeaseGoodsQO
param
);
}
}
src/main/java/com/mmc/pms/service/lease/LeaseGoodsService.java
浏览文件 @
642dfd27
...
@@ -27,5 +27,5 @@ public interface LeaseGoodsService {
...
@@ -27,5 +27,5 @@ public interface LeaseGoodsService {
ResultBody
batchRemoveWareInfo
(
List
<
Integer
>
list
);
ResultBody
batchRemoveWareInfo
(
List
<
Integer
>
list
);
Integer
feignLeaseGoodsInfoByAddressId
(
Integer
id
);
ResultBody
feignLeaseGoodsInfoByAddressId
(
Integer
id
);
}
}
src/main/java/com/mmc/pms/service/lease/impl/LeaseGoodsServiceImpl.java
浏览文件 @
642dfd27
...
@@ -121,24 +121,36 @@ public class LeaseGoodsServiceImpl implements LeaseGoodsService {
...
@@ -121,24 +121,36 @@ public class LeaseGoodsServiceImpl implements LeaseGoodsService {
@Override
@Override
public
ResultBody
leaseGoodsList
(
LeaseGoodsQO
param
,
LoginSuccessDTO
loginSuccessDTO
)
{
public
ResultBody
leaseGoodsList
(
LeaseGoodsQO
param
,
LoginSuccessDTO
loginSuccessDTO
)
{
if
(
loginSuccessDTO
==
null
||
loginSuccessDTO
.
getRoleInfo
().
getSuperAdmin
().
equals
(
1
))
{
if
(
loginSuccessDTO
!=
null
&&
loginSuccessDTO
.
getRoleInfo
().
getSuperAdmin
().
equals
(
1
))
{
//
小程序和
超级管理员获取所有商品信息
// 超级管理员获取所有商品信息
return
ResultBody
.
success
(
getLeaseGoodsInfo
(
param
));
return
ResultBody
.
success
(
getLeaseGoodsInfo
(
param
,
1
));
}
else
{
}
else
if
(
loginSuccessDTO
!=
null
&&
!
loginSuccessDTO
.
getRoleInfo
().
getSuperAdmin
().
equals
(
1
))
{
// 非超级管理员获取自家的商品信息
// 非超级管理员获取自家的商品信息
param
.
setUserAccountId
(
loginSuccessDTO
.
getUserAccountId
());
param
.
setUserAccountId
(
loginSuccessDTO
.
getUserAccountId
());
return
ResultBody
.
success
(
getLeaseGoodsInfo
(
param
));
return
ResultBody
.
success
(
getLeaseGoodsInfo
(
param
,
1
));
}
else
{
return
ResultBody
.
success
(
getLeaseGoodsInfo
(
param
,
0
));
}
}
}
}
private
PageResult
getLeaseGoodsInfo
(
LeaseGoodsQO
param
)
{
private
PageResult
getLeaseGoodsInfo
(
LeaseGoodsQO
param
,
Integer
type
)
{
int
count
=
leaseGoodsDao
.
countLeaseGoods
(
param
);
int
count
;
if
(
type
.
equals
(
1
))
{
count
=
leaseGoodsDao
.
countLeaseGoods
(
param
);
}
else
{
count
=
leaseGoodsDao
.
countLeaseGoodsByApp
(
param
);
}
if
(
count
==
0
)
{
if
(
count
==
0
)
{
return
PageResult
.
buildPage
(
param
.
getPageNo
(),
param
.
getPageSize
(),
count
);
return
PageResult
.
buildPage
(
param
.
getPageNo
(),
param
.
getPageSize
(),
count
);
}
}
Integer
pageNo
=
param
.
getPageNo
();
Integer
pageNo
=
param
.
getPageNo
();
param
.
buildCurrentPage
();
param
.
buildCurrentPage
();
List
<
LeaseGoodsDO
>
leaseGoodsDOList
=
leaseGoodsDao
.
listLeaseGoods
(
param
);
List
<
LeaseGoodsDO
>
leaseGoodsDOList
;
if
(
type
.
equals
(
1
))
{
leaseGoodsDOList
=
leaseGoodsDao
.
listLeaseGoods
(
param
);
}
else
{
leaseGoodsDOList
=
leaseGoodsDao
.
listLeaseGoodsByApp
(
param
);
}
// 转成vo
// 转成vo
List
<
LeaseGoodsVO
>
leaseGoodsVOList
=
leaseGoodsDOList
.
stream
().
map
(
LeaseGoodsDO:
:
buildLeaseGoodsVO
)
List
<
LeaseGoodsVO
>
leaseGoodsVOList
=
leaseGoodsDOList
.
stream
().
map
(
LeaseGoodsDO:
:
buildLeaseGoodsVO
)
.
skip
(
param
.
getPageNo
()).
limit
(
param
.
getPageSize
()).
collect
(
Collectors
.
toList
());
.
skip
(
param
.
getPageNo
()).
limit
(
param
.
getPageSize
()).
collect
(
Collectors
.
toList
());
...
@@ -147,7 +159,7 @@ public class LeaseGoodsServiceImpl implements LeaseGoodsService {
...
@@ -147,7 +159,7 @@ public class LeaseGoodsServiceImpl implements LeaseGoodsService {
List
<
CompanyInfoVO
>
companyInfoVOS
=
userAppApi
.
listCompanyInfoByBUIds
(
userIds
);
List
<
CompanyInfoVO
>
companyInfoVOS
=
userAppApi
.
listCompanyInfoByBUIds
(
userIds
);
leaseGoodsVOList
=
leaseGoodsVOList
.
stream
().
peek
(
d
->
{
leaseGoodsVOList
=
leaseGoodsVOList
.
stream
().
peek
(
d
->
{
for
(
CompanyInfoVO
companyInfoVO
:
companyInfoVOS
)
{
for
(
CompanyInfoVO
companyInfoVO
:
companyInfoVOS
)
{
if
(
companyInfoVO
.
getBackUserAccountId
().
equals
(
d
.
getUserAccountId
())){
if
(
companyInfoVO
.
getBackUserAccountId
().
equals
(
d
.
getUserAccountId
()))
{
d
.
setCompanyName
(
companyInfoVO
.
getCompanyName
());
d
.
setCompanyName
(
companyInfoVO
.
getCompanyName
());
break
;
break
;
}
}
...
@@ -190,7 +202,7 @@ public class LeaseGoodsServiceImpl implements LeaseGoodsService {
...
@@ -190,7 +202,7 @@ public class LeaseGoodsServiceImpl implements LeaseGoodsService {
}
}
@Override
@Override
public
Integer
feignLeaseGoodsInfoByAddressId
(
Integer
id
)
{
public
ResultBody
feignLeaseGoodsInfoByAddressId
(
Integer
id
)
{
return
leaseGoodsDao
.
feignLeaseGoodsInfoByAddressId
(
id
);
return
ResultBody
.
success
(
leaseGoodsDao
.
feignLeaseGoodsInfoByAddressId
(
id
)
);
}
}
}
}
src/main/resources/mapper/lease/LeaseGoodsDao.xml
浏览文件 @
642dfd27
...
@@ -141,7 +141,10 @@
...
@@ -141,7 +141,10 @@
logistics_company = #{logisticsCompany},
logistics_company = #{logisticsCompany},
</if>
</if>
<if
test=
"modeOfDelivery != null"
>
<if
test=
"modeOfDelivery != null"
>
mode_of_delivery = #{modeOfDelivery}
mode_of_delivery = #{modeOfDelivery},
</if>
<if
test=
"showPrice != null"
>
show_price = #{showPrice}
</if>
</if>
</set>
</set>
where id = #{id}
where id = #{id}
...
@@ -416,4 +419,72 @@
...
@@ -416,4 +419,72 @@
where ship_address = #{id}
where ship_address = #{id}
or return_address = #{id}
or return_address = #{id}
</select>
</select>
<select
id=
"countLeaseGoodsByApp"
resultType=
"java.lang.Integer"
>
select count(*) from lease_goods
<where>
shelf_status = 1
<if
test=
"tradeName != null and tradeName != ''"
>
and (trade_name LIKE CONCAT('%',#{tradeName},'%'))
</if>
<if
test=
"productTypeId != null"
>
and product_type_id = #{productTypeId}
</if>
<if
test=
"brandInfoId != null"
>
and brand_info_id = #{brandInfoId}
</if>
<if
test=
"userAccountId != null"
>
and user_account_id = #{userAccountId}
</if>
<if
test=
"districtCode != null and districtCode != ''"
>
and district_code = #{districtCode}
</if>
</where>
</select>
<select
id=
"listLeaseGoodsByApp"
resultMap=
"leaseGoodsMap"
>
SELECT
lg.id,
lg.trade_name,
lg.product_type_id,
lg.shelf_status,
lg.selling_point,
lg.product_param,
lg.user_account_id,
lg.show_price,
lg.min_lease_term,
lg.max_lease_term,
lg.create_time,
lgr.id resourceId,
lgr.type,
lgr.url,
lps.cash_pledge,
lps.three_days_rental,
lps.seven_days_rental,
lps.thirty_days_rental,
lps.ninety_days_rental,
lps.max_days_rental,
lps.stock
FROM
lease_goods lg
LEFT JOIN lease_goods_resources lgr ON lgr.lease_goods_id = lg.id
LEFT JOIN lease_price_stock lps ON lps.lease_goods_id = lg.id
<where>
shelf_status = 1
<if
test=
"tradeName != null and tradeName != ''"
>
and (lg.trade_name LIKE CONCAT('%',#{tradeName},'%'))
</if>
<if
test=
"productTypeId != null"
>
and lg.product_type_id = #{productTypeId}
</if>
<if
test=
"brandInfoId != null"
>
and lg.brand_info_id = #{brandInfoId}
</if>
<if
test=
"userAccountId != null"
>
and lg.user_account_id = #{userAccountId}
</if>
<if
test=
"districtCode != null and districtCode != ''"
>
and district_code = #{districtCode}
</if>
</where>
order by lg.shelf_status DESC, lg.sort DESC
</select>
</mapper>
</mapper>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论