Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pms
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
pms
Commits
17de01e1
提交
17de01e1
authored
10月 18, 2023
作者:
zhenjie
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop'
上级
c44b3036
101c94c7
显示空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
148 行增加
和
21 行删除
+148
-21
kustomization.yaml
kustomization/overlays/dev/kustomization.yaml
+1
-1
InspectionController.java
...m/mmc/pms/controller/inspection/InspectionController.java
+10
-0
InspectionDao.java
src/main/java/com/mmc/pms/dao/inspection/InspectionDao.java
+7
-0
MallGoodsDO.java
src/main/java/com/mmc/pms/entity/mall/MallGoodsDO.java
+4
-2
MallGoodsVO.java
src/main/java/com/mmc/pms/model/mall/MallGoodsVO.java
+0
-3
InspectionQO.java
src/main/java/com/mmc/pms/model/qo/InspectionQO.java
+39
-0
InspectionService.java
...ava/com/mmc/pms/service/inspection/InspectionService.java
+3
-0
InspectionServiceImpl.java
...mc/pms/service/inspection/impl/InspectionServiceImpl.java
+18
-0
application-local.yml
src/main/resources/application-local.yml
+2
-13
InspectionDao.xml
src/main/resources/mapper/inspection/InspectionDao.xml
+33
-0
MallGoodsDao.xml
src/main/resources/mapper/mall/MallGoodsDao.xml
+30
-2
not-check.yml
src/main/resources/not-check.yml
+1
-0
没有找到文件。
kustomization/overlays/dev/kustomization.yaml
浏览文件 @
17de01e1
...
...
@@ -18,4 +18,4 @@ patches:
images
:
-
name
:
REGISTRY/NAMESPACE/IMAGE:TAG
newName
:
mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/pms
newTag
:
689c742b34953b8aca245a80a0f9e66793ad5389
newTag
:
77b2c8d55b316d0939f1ff0885084e77fce9e8be
src/main/java/com/mmc/pms/controller/inspection/InspectionController.java
浏览文件 @
17de01e1
package
com
.
mmc
.
pms
.
controller
.
inspection
;
import
com.mmc.pms.common.Page
;
import
com.mmc.pms.common.ResultBody
;
import
com.mmc.pms.model.inspection.dto.InspectionDTO
;
import
com.mmc.pms.model.inspection.vo.InspectionVO
;
import
com.mmc.pms.model.qo.InspectionQO
;
import
com.mmc.pms.service.inspection.InspectionService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiResponse
;
import
io.swagger.annotations.ApiResponses
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
/**
...
...
@@ -49,4 +52,11 @@ public class InspectionController {
public
ResultBody
<
InspectionDTO
>
detail
(
@RequestParam
Integer
id
){
return
inspectionService
.
detail
(
id
);
}
@ApiOperation
(
value
=
"服务列表"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
InspectionDTO
.
class
)})
@PostMapping
(
"listInspectionPages"
)
public
ResultBody
<
InspectionDTO
>
listInspectionPages
(
@Validated
(
Page
.
class
)
@RequestBody
InspectionQO
inspectionQO
){
return
inspectionService
.
listInspectionPages
(
inspectionQO
);
}
}
src/main/java/com/mmc/pms/dao/inspection/InspectionDao.java
浏览文件 @
17de01e1
package
com
.
mmc
.
pms
.
dao
.
inspection
;
import
com.mmc.pms.entity.inspection.InspectionDO
;
import
com.mmc.pms.model.qo.InspectionQO
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
/**
* @author: zj
* @Date: 2023/8/4 15:34
...
...
@@ -18,4 +21,8 @@ public interface InspectionDao {
void
remove
(
Integer
id
);
InspectionDO
getInspectionById
(
Integer
id
);
int
countListInspectionPages
(
InspectionQO
inspectionQO
);
List
<
InspectionDO
>
listInspectionPages
(
InspectionQO
inspectionQO
);
}
src/main/java/com/mmc/pms/entity/mall/MallGoodsDO.java
浏览文件 @
17de01e1
...
...
@@ -6,11 +6,13 @@ import com.mmc.pms.model.mall.UavCartDTO;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
org.apache.commons.collections4.CollectionUtils
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* 商品基本信息(MallGoodsDO)实体类
...
...
@@ -103,7 +105,6 @@ public class MallGoodsDO implements Serializable {
this
.
priceShow
=
mallGoodsVO
.
getPriceShow
();
this
.
recommend
=
mallGoodsVO
.
getRecommend
()
==
null
?
0
:
mallGoodsVO
.
getRecommend
();
this
.
goodsDetails
=
mallGoodsVO
.
getGoodsDetails
();
this
.
hot
=
mallGoodsVO
.
getHot
();
}
public
MallGoodsVO
buildMallGoodsVO
()
{
...
...
@@ -122,7 +123,8 @@ public class MallGoodsDO implements Serializable {
resourcesList
.
add
(
goodsResourcesVO
);
return
MallGoodsVO
.
builder
().
id
(
id
).
userAccountId
(
userAccountId
).
recommend
(
recommend
).
tradeName
(
tradeName
).
resourcesList
(
resourcesList
)
.
categoryPrimaryId
(
categoryPrimaryId
).
labelShow
(
labelShow
).
goodsLabel
(
goodsLabel
).
categorySubId
(
categorySubId
)
.
shelfStatus
(
shelfStatus
).
createTime
(
createTime
).
description
(
description
).
priceShow
(
priceShow
).
build
();
.
shelfStatus
(
shelfStatus
).
createTime
(
createTime
).
priceStock
(
CollectionUtils
.
isEmpty
(
priceStockDOS
)
?
null
:
priceStockDOS
.
stream
()
.
map
(
PriceStockDO:
:
buildPriceStockVO
).
collect
(
Collectors
.
toList
())).
description
(
description
).
priceShow
(
priceShow
).
build
();
}
public
UavCartDTO
buildUavCartDTO
()
{
...
...
src/main/java/com/mmc/pms/model/mall/MallGoodsVO.java
浏览文件 @
17de01e1
...
...
@@ -81,7 +81,4 @@ public class MallGoodsVO implements Serializable {
@ApiModelProperty
(
value
=
"店铺id 小程序用"
)
private
Integer
userAccountId
;
@ApiModelProperty
(
value
=
"商品热度"
)
private
Integer
hot
;
}
src/main/java/com/mmc/pms/model/qo/InspectionQO.java
0 → 100644
浏览文件 @
17de01e1
package
com
.
mmc
.
pms
.
model
.
qo
;
import
com.mmc.pms.common.Page
;
import
com.mmc.pms.model.group.Freeze
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.validation.constraints.Min
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
/**
* @author: zj
* @Date: 2023/10/18 14:42
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
InspectionQO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
6272003703156261356L
;
@ApiModelProperty
(
value
=
"关键字"
)
private
String
keyword
;
@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
;
}
}
src/main/java/com/mmc/pms/service/inspection/InspectionService.java
浏览文件 @
17de01e1
...
...
@@ -3,6 +3,7 @@ package com.mmc.pms.service.inspection;
import
com.mmc.pms.common.ResultBody
;
import
com.mmc.pms.model.inspection.dto.InspectionDTO
;
import
com.mmc.pms.model.inspection.vo.InspectionVO
;
import
com.mmc.pms.model.qo.InspectionQO
;
/**
* @author: zj
...
...
@@ -16,4 +17,6 @@ public interface InspectionService {
ResultBody
remove
(
Integer
id
);
ResultBody
<
InspectionDTO
>
detail
(
Integer
id
);
ResultBody
<
InspectionDTO
>
listInspectionPages
(
InspectionQO
inspectionQO
);
}
src/main/java/com/mmc/pms/service/inspection/impl/InspectionServiceImpl.java
浏览文件 @
17de01e1
...
...
@@ -8,11 +8,16 @@ import com.mmc.pms.entity.inspection.InspectionDO;
import
com.mmc.pms.model.inspection.dto.InspectionDTO
;
import
com.mmc.pms.model.inspection.vo.InspectionVO
;
import
com.mmc.pms.model.qo.CompanyInspectionQO
;
import
com.mmc.pms.model.qo.InspectionQO
;
import
com.mmc.pms.page.PageResult
;
import
com.mmc.pms.service.inspection.CompanyInspectionService
;
import
com.mmc.pms.service.inspection.InspectionService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* @author: zj
* @Date: 2023/8/4 16:31
...
...
@@ -68,4 +73,17 @@ public class InspectionServiceImpl implements InspectionService {
}
return
ResultBody
.
success
(
inspectionDO
.
buildInspectionDTO
());
}
@Override
public
ResultBody
<
InspectionDTO
>
listInspectionPages
(
InspectionQO
inspectionQO
)
{
int
count
=
inspectionDao
.
countListInspectionPages
(
inspectionQO
);
if
(
count
==
0
)
{
return
ResultBody
.
success
(
PageResult
.
buildPage
(
inspectionQO
.
getPageNo
(),
inspectionQO
.
getPageSize
(),
count
));
}
int
pageNo
=
inspectionQO
.
getPageNo
();
inspectionQO
.
buildCurrentPage
();
List
<
InspectionDO
>
inspectionDOS
=
inspectionDao
.
listInspectionPages
(
inspectionQO
);
List
<
InspectionDTO
>
inspectionDTOS
=
inspectionDOS
.
stream
().
map
(
InspectionDO:
:
buildInspectionDTO
).
collect
(
Collectors
.
toList
());
return
ResultBody
.
success
(
PageResult
.
buildPage
(
pageNo
,
inspectionQO
.
getPageSize
(),
count
,
inspectionDTOS
));
}
}
src/main/resources/application-local.yml
浏览文件 @
17de01e1
...
...
@@ -7,20 +7,9 @@ spring:
password
:
IUAV_DEV@2023&MYSQL
redis
:
database
:
1
host
:
127.0.0.1
host
:
r-wz9ke310fs684hacn1pd.redis.rds.aliyuncs.com
port
:
6379
#连接池
lettuce
:
shutdown-timeout
:
1000
# 关闭超时时间-ms
pool
:
#最大连接个数
max-active
:
30
#等待时间-ms
max-wait
:
1000ms
#最大空闲
max-idle
:
8
#初始化最小
min-idle
:
1
password
:
MMC@2022&REDIS
servlet
:
multipart
:
max-file-size
:
512MB
...
...
src/main/resources/mapper/inspection/InspectionDao.xml
浏览文件 @
17de01e1
...
...
@@ -77,4 +77,36 @@
where ins.is_deleted = 0
and ins.id = #{id}
</select>
<select
id=
"countListInspectionPages"
resultType=
"java.lang.Integer"
parameterType=
"com.mmc.pms.model.qo.InspectionQO"
>
select count(*) from inspection ins
where ins.is_deleted = 0
<if
test=
"keyword != null"
>
and (ins.inspection_name like concat('%',#{keyword},'%') or
ins.inspection_no like concat('%',#{keyword},'%')
)
</if>
</select>
<select
id=
"listInspectionPages"
resultType=
"com.mmc.pms.entity.inspection.InspectionDO"
parameterType=
"com.mmc.pms.model.qo.InspectionQO"
>
select ins.id,
ins.inspection_no,
ins.inspection_name,
ins.industry_type_id,
ins.inspection_img,
ins.inspection_description,
ins.sale_state,
ins.case_img,
ins.case_video,
ins.create_time
from inspection ins
where ins.is_deleted = 0
<if
test=
"keyword != null"
>
and (ins.inspection_name like concat('%',#{keyword},'%') or
ins.inspection_no like concat('%',#{keyword},'%')
)
</if>
order by ins.id desc
limit #{pageNo}, #{pageSize}
</select>
</mapper>
\ No newline at end of file
src/main/resources/mapper/mall/MallGoodsDao.xml
浏览文件 @
17de01e1
...
...
@@ -277,7 +277,29 @@
FROM mall_goods
WHERE is_deleted = 0
</select>
<select
id=
"recommendMallGoods"
resultType=
"com.mmc.pms.entity.mall.MallGoodsDO"
>
<resultMap
id=
"resultMallGoodsMap"
type=
"com.mmc.pms.entity.mall.MallGoodsDO"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"trade_name"
property=
"tradeName"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"category_primary_id"
property=
"categoryPrimaryId"
/>
<result
column=
"category_sub_id"
property=
"categorySubId"
/>
<result
column=
"description"
property=
"description"
/>
<result
column=
"recommend"
property=
"recommend"
/>
<result
column=
"imgId"
property=
"imgId"
/>
<result
column=
"price_show"
property=
"priceShow"
/>
<result
column=
"user_account_id"
property=
"userAccountId"
/>
<result
column=
"url"
property=
"url"
/>
<result
column=
"is_deleted"
property=
"deleted"
/>
<result
column=
"shelf_status"
property=
"shelfStatus"
/>
<collection
property=
"priceStockDOS"
ofType=
"com.mmc.pms.entity.mall.PriceStockDO"
>
<id
column=
"productSpecId"
property=
"id"
/>
<result
column=
"product_spec"
property=
"productSpec"
/>
<result
column=
"sku_image"
property=
"skuImage"
/>
<result
column=
"sale_price"
property=
"salePrice"
/>
<result
column=
"sku_no"
property=
"skuNo"
/>
</collection>
</resultMap>
<select
id=
"recommendMallGoods"
resultMap=
"resultMallGoodsMap"
>
SELECT mg.id,
mg.trade_name,
mg.shelf_status,
...
...
@@ -290,10 +312,16 @@
mg.recommend,
img.id as imgId,
img.url,
img.type
img.type,
ps.id as productSpecId,
ps.product_spec,
ps.sale_price,
ps.sku_image,
ps.sku_no
FROM mall_goods mg
INNER JOIN mall_goods_resources img ON mg.id = img.mall_goods_id
AND img.type = 0
LEFT JOIN price_stock ps ON ps.mall_goods_id = mg.id
where mg.is_deleted = 0
and mg.recommend = 1
</select>
...
...
src/main/resources/not-check.yml
浏览文件 @
17de01e1
...
...
@@ -30,6 +30,7 @@ data-filter:
-
/pms/industry/listInspectionsByIndustryTypeId
-
/pms/industry/getIndustryTypeById
-
/pms/inspection/detail
-
/pms/inspection/listInspectionPages
-
/pms/inspection-tag/listByInspectionId
-
/pms/company-inspection/listInspectionPriceUnit
-
/pms/company-inspection/listAPPCompanyInspectionPage
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论