Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pms-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
pms-ci-test
Commits
3885e9f9
提交
3885e9f9
authored
6月 08, 2023
作者:
xiaowang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
代码格式化
上级
eb53ada3
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
60 个修改的文件
包含
1236 行增加
和
789 行删除
+1236
-789
PmsApplication.java
src/main/java/com/mmc/pms/PmsApplication.java
+1
-1
MvcConfiguration.java
src/main/java/com/mmc/pms/auth/MvcConfiguration.java
+7
-9
NotCheckUriConfig.java
src/main/java/com/mmc/pms/auth/NotCheckUriConfig.java
+5
-6
TokenCheckHandleInterceptor.java
...in/java/com/mmc/pms/auth/TokenCheckHandleInterceptor.java
+71
-67
BUserAccountQO.java
src/main/java/com/mmc/pms/auth/dto/BUserAccountQO.java
+69
-0
LoginSuccessDTO.java
src/main/java/com/mmc/pms/auth/dto/LoginSuccessDTO.java
+15
-15
UserAccountSimpleDTO.java
src/main/java/com/mmc/pms/auth/dto/UserAccountSimpleDTO.java
+52
-0
TokenConstant.java
src/main/java/com/mmc/pms/constant/TokenConstant.java
+9
-0
BackstageCategoriesController.java
...com/mmc/pms/controller/BackstageCategoriesController.java
+8
-0
BackstageTaskServiceController.java
...om/mmc/pms/controller/BackstageTaskServiceController.java
+37
-35
BaseController.java
src/main/java/com/mmc/pms/controller/BaseController.java
+38
-38
MiniProgramDeviceController.java
...a/com/mmc/pms/controller/MiniProgramDeviceController.java
+7
-11
PartUploadController.java
...ain/java/com/mmc/pms/controller/PartUploadController.java
+0
-0
UploadController.java
src/main/java/com/mmc/pms/controller/UploadController.java
+0
-0
WebAndMiniProgramCategoryController.java
...c/pms/controller/WebAndMiniProgramCategoryController.java
+0
-26
WebDeviceController.java
...main/java/com/mmc/pms/controller/WebDeviceController.java
+8
-12
MiniLeaseGoodsController.java
...com/mmc/pms/controller/mini/MiniLeaseGoodsController.java
+40
-0
WebLeaseGoodsController.java
...a/com/mmc/pms/controller/web/WebLeaseGoodsController.java
+5
-0
BackstageTaskServiceDao.java
src/main/java/com/mmc/pms/dao/BackstageTaskServiceDao.java
+8
-8
CategoriesDao.java
src/main/java/com/mmc/pms/dao/CategoriesDao.java
+3
-0
GoodsInfoDao.java
src/main/java/com/mmc/pms/dao/GoodsInfoDao.java
+2
-0
ProductDao.java
src/main/java/com/mmc/pms/dao/ProductDao.java
+1
-0
WebDeviceDao.java
src/main/java/com/mmc/pms/dao/WebDeviceDao.java
+4
-3
Categories.java
src/main/java/com/mmc/pms/entity/Categories.java
+6
-0
DirectoryDO.java
src/main/java/com/mmc/pms/entity/DirectoryDO.java
+6
-0
GoodsInfo.java
src/main/java/com/mmc/pms/entity/GoodsInfo.java
+6
-0
MallProdSkuInfoSpecDO.java
src/main/java/com/mmc/pms/entity/MallProdSkuInfoSpecDO.java
+12
-10
RepoCashDO.java
src/main/java/com/mmc/pms/entity/RepoCashDO.java
+48
-48
ServiceDO.java
src/main/java/com/mmc/pms/entity/ServiceDO.java
+47
-55
UserAppApi.java
src/main/java/com/mmc/pms/feign/UserAppApi.java
+49
-0
FeignConfiguration.java
...ain/java/com/mmc/pms/feign/config/FeignConfiguration.java
+20
-0
UserAppApiHystrix.java
...ain/java/com/mmc/pms/feign/hystrix/UserAppApiHystrix.java
+33
-0
JsonUtil.java
src/main/java/com/mmc/pms/json/JsonUtil.java
+95
-95
AllCategoryDTO.java
...java/com/mmc/pms/model/categories/dto/AllCategoryDTO.java
+28
-0
CategoriesInfoListDTO.java
...m/mmc/pms/model/categories/dto/CategoriesInfoListDTO.java
+27
-0
LeaseGoodsInfoDTO.java
...n/java/com/mmc/pms/model/lease/dto/LeaseGoodsInfoDTO.java
+29
-0
GoodsInfoQO.java
src/main/java/com/mmc/pms/model/qo/GoodsInfoQO.java
+1
-1
IndustrySkuQO.java
src/main/java/com/mmc/pms/model/qo/IndustrySkuQO.java
+1
-1
ProductSkuQO.java
src/main/java/com/mmc/pms/model/qo/ProductSkuQO.java
+1
-1
ServiceQO.java
src/main/java/com/mmc/pms/model/qo/ServiceQO.java
+29
-26
WareInfoQO.java
src/main/java/com/mmc/pms/model/qo/WareInfoQO.java
+18
-37
QueryClassifyVO.java
src/main/java/com/mmc/pms/model/sale/vo/QueryClassifyVO.java
+1
-1
ServiceVO.java
src/main/java/com/mmc/pms/model/work/vo/ServiceVO.java
+36
-26
Page.java
src/main/java/com/mmc/pms/page/Page.java
+0
-6
BackstageTaskService.java
src/main/java/com/mmc/pms/service/BackstageTaskService.java
+7
-8
CategoriesService.java
src/main/java/com/mmc/pms/service/CategoriesService.java
+2
-0
BackstageTaskServiceImpl.java
...va/com/mmc/pms/service/Impl/BackstageTaskServiceImpl.java
+73
-70
CategoriesServiceImpl.java
.../java/com/mmc/pms/service/Impl/CategoriesServiceImpl.java
+38
-4
ProductServiceImpl.java
...ain/java/com/mmc/pms/service/Impl/ProductServiceImpl.java
+4
-4
WebDeviceServiceImpl.java
...n/java/com/mmc/pms/service/Impl/WebDeviceServiceImpl.java
+33
-16
WebDeviceService.java
src/main/java/com/mmc/pms/service/WebDeviceService.java
+2
-1
BizException.java
src/main/java/com/mmc/pms/util/BizException.java
+72
-77
PathUtil.java
src/main/java/com/mmc/pms/util/PathUtil.java
+4
-4
application-dev.yml
src/main/resources/application-dev.yml
+4
-0
application-local.yml
src/main/resources/application-local.yml
+4
-0
application-prod.yml
src/main/resources/application-prod.yml
+4
-0
CategoriesDao.xml
src/main/resources/mapper/CategoriesDao.xml
+10
-0
GoodsInfoDao.xml
src/main/resources/mapper/GoodsInfoDao.xml
+18
-0
ProductDao.xml
src/main/resources/mapper/ProductDao.xml
+1
-1
WebDeviceDao.xml
src/main/resources/mapper/WebDeviceDao.xml
+77
-66
没有找到文件。
src/main/java/com/mmc/pms/PmsApplication.java
浏览文件 @
3885e9f9
...
...
@@ -5,7 +5,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
@SpringBootApplication
@EnableFeignClients
@EnableFeignClients
(
basePackages
=
"com.mmc.pms.feign"
)
public
class
PmsApplication
{
public
static
void
main
(
String
[]
args
)
{
...
...
src/main/java/com/mmc/pms/auth/MvcConfiguration.java
浏览文件 @
3885e9f9
...
...
@@ -6,18 +6,16 @@ import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
;
/**
* @author: zj
* @Date: 2023/5/28 10:52
* @author: zj @Date: 2023/5/28 10:52
*/
@Configuration
public
class
MvcConfiguration
implements
WebMvcConfigurer
{
@Autowired
private
TokenCheckHandleInterceptor
tokenCheckHandleInterceptor
;
@Autowired
private
TokenCheckHandleInterceptor
tokenCheckHandleInterceptor
;
@Override
public
void
addInterceptors
(
InterceptorRegistry
registry
)
{
registry
.
addInterceptor
(
tokenCheckHandleInterceptor
);
WebMvcConfigurer
.
super
.
addInterceptors
(
registry
);
}
@Override
public
void
addInterceptors
(
InterceptorRegistry
registry
)
{
registry
.
addInterceptor
(
tokenCheckHandleInterceptor
);
WebMvcConfigurer
.
super
.
addInterceptors
(
registry
);
}
}
src/main/java/com/mmc/pms/auth/NotCheckUriConfig.java
浏览文件 @
3885e9f9
...
...
@@ -8,16 +8,15 @@ import org.springframework.context.annotation.PropertySource;
import
java.util.List
;
/**
* @author: zj
* @Date: 2023/5/28 13:54
* @author: zj @Date: 2023/5/28 13:54
*/
@Data
@Configuration
@ConfigurationProperties
(
prefix
=
"data-filter"
,
ignoreUnknownFields
=
false
)
@PropertySource
(
"classpath:not-check.yml"
)
public
class
NotCheckUriConfig
{
// 不需要验证token的请求地址
private
List
<
String
>
notAuthPath
;
// 不需要验证token的请求地址;// 不需要验证token的请求地址
private
List
<
String
>
uploadPath
;
// 不需要验证token的请求地址
private
List
<
String
>
notAuthPath
;
// 不需要验证token的请求地址;// 不需要验证token的请求地址
private
List
<
String
>
uploadPath
;
}
src/main/java/com/mmc/pms/auth/TokenCheckHandleInterceptor.java
浏览文件 @
3885e9f9
...
...
@@ -16,84 +16,88 @@ import javax.servlet.http.HttpServletResponse;
import
java.io.PrintWriter
;
/**
* @author: zj
* @Date: 2023/5/28 10:46
* @author: zj @Date: 2023/5/28 10:46
*/
@Slf4j
@Component
public
class
TokenCheckHandleInterceptor
implements
HandlerInterceptor
{
@Autowired
private
StringRedisTemplate
stringRedisTemplate
;
@Autowired
private
StringRedisTemplate
stringRedisTemplate
;
@Autowired
private
NotCheckUriConfig
notCheckUriConfig
;
@Autowired
private
NotCheckUriConfig
notCheckUriConfig
;
@Override
public
boolean
preHandle
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
)
throws
Exception
{
String
requestURI
=
request
.
getRequestURI
();
// //根据uri确认是否要拦截
if
(!
shouldFilter
(
requestURI
))
{
return
true
;
}
String
token
=
request
.
getHeader
(
"token"
);
if
(
StringUtils
.
isBlank
(
token
))
{
exceptionProcess
(
response
);
return
false
;
}
String
tokenJson
=
stringRedisTemplate
.
opsForValue
().
get
(
token
);
if
(
StringUtils
.
isBlank
(
tokenJson
))
{
exceptionProcess
(
response
);
return
false
;
}
//
// String serverName = request.getServerName();
// String remoteHost = request.getRemoteHost();
// log.info("hostName: {}", hostName);
// log.info("serverName: {}", serverName);
// log.info("remoteHost: {}", remoteHost);
// log.info("forwardedFor: {}", forwardedFor);
// log.info("forwardedHost: {}", forwardedHost);
// if (hostName.equals("iuav.mmcuav.cn") || hostName.equals("test.iuav.mmcuav.cn") || hostName.equals("www.iuav.shop") || hostName.equals("test.iuav.shop")){
// String token = request.getHeader("token");
// if (StringUtils.isBlank(token)){
// exceptionProcess(response);
// return false;
// }
// String tokenJson = stringRedisTemplate.opsForValue().get(token);
// if (StringUtils.isBlank(tokenJson)){
// exceptionProcess(response);
// return false;
// }
// return true;
// }
//测试-打印请求信息
return
true
;
@Override
public
boolean
preHandle
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
)
throws
Exception
{
String
requestURI
=
request
.
getRequestURI
();
// //根据uri确认是否要拦截
if
(!
shouldFilter
(
requestURI
))
{
return
true
;
}
@Override
public
void
postHandle
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
,
ModelAndView
modelAndView
)
throws
Exception
{
String
token
=
request
.
getHeader
(
"token"
);
if
(
StringUtils
.
isBlank
(
token
))
{
exceptionProcess
(
response
);
return
false
;
}
@Override
public
void
afterCompletion
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
,
Exception
ex
)
throws
Exception
{
String
tokenJson
=
stringRedisTemplate
.
opsForValue
().
get
(
token
);
if
(
StringUtils
.
isBlank
(
tokenJson
))
{
exceptionProcess
(
response
);
return
false
;
}
//
// String serverName = request.getServerName();
// String remoteHost = request.getRemoteHost();
// log.info("hostName: {}", hostName);
// log.info("serverName: {}", serverName);
// log.info("remoteHost: {}", remoteHost);
// log.info("forwardedFor: {}", forwardedFor);
// log.info("forwardedHost: {}", forwardedHost);
// if (hostName.equals("iuav.mmcuav.cn") || hostName.equals("test.iuav.mmcuav.cn") ||
// hostName.equals("www.iuav.shop") || hostName.equals("test.iuav.shop")){
// String token = request.getHeader("token");
// if (StringUtils.isBlank(token)){
// exceptionProcess(response);
// return false;
// }
// String tokenJson = stringRedisTemplate.opsForValue().get(token);
// if (StringUtils.isBlank(tokenJson)){
// exceptionProcess(response);
// return false;
// }
// return true;
// }
// 测试-打印请求信息
return
true
;
}
public
void
exceptionProcess
(
HttpServletResponse
response
)
throws
Exception
{
response
.
setContentType
(
"application/json;charset=utf-8"
);
PrintWriter
writer
=
response
.
getWriter
();
writer
.
write
(
ResultBody
.
error
(
ResultEnum
.
LOGIN_ACCOUNT_STATUS_ERROR
).
toString
());
writer
.
close
();
}
@Override
public
void
postHandle
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
,
ModelAndView
modelAndView
)
throws
Exception
{}
@Override
public
void
afterCompletion
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
,
Exception
ex
)
throws
Exception
{}
public
void
exceptionProcess
(
HttpServletResponse
response
)
throws
Exception
{
response
.
setContentType
(
"application/json;charset=utf-8"
);
PrintWriter
writer
=
response
.
getWriter
();
writer
.
write
(
ResultBody
.
error
(
ResultEnum
.
LOGIN_ACCOUNT_STATUS_ERROR
).
toString
());
writer
.
close
();
}
private
boolean
shouldFilter
(
String
path
)
{
// 路径与配置的相匹配,则执行过滤
for
(
String
pathPattern
:
notCheckUriConfig
.
getNotAuthPath
())
{
if
(
PathUtil
.
isPathMatch
(
pathPattern
,
path
))
{
// 如果匹配
return
false
;
}
}
return
true
;
private
boolean
shouldFilter
(
String
path
)
{
// 路径与配置的相匹配,则执行过滤
for
(
String
pathPattern
:
notCheckUriConfig
.
getNotAuthPath
())
{
if
(
PathUtil
.
isPathMatch
(
pathPattern
,
path
))
{
// 如果匹配
return
false
;
}
}
return
true
;
}
}
src/main/java/com/mmc/pms/auth/dto/BUserAccountQO.java
0 → 100644
浏览文件 @
3885e9f9
package
com
.
mmc
.
pms
.
auth
.
dto
;
import
com.mmc.pms.common.Page
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.validation.constraints.Min
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* @author: zj
* @Date: 2023/5/25 13:32
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
BUserAccountQO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"关键字"
,
required
=
false
)
private
String
keyword
;
@ApiModelProperty
(
value
=
"地区"
,
required
=
false
)
private
String
area
;
@ApiModelProperty
(
value
=
"省份编码"
,
required
=
false
)
private
Integer
provinceCode
;
@ApiModelProperty
(
value
=
"城市编码"
,
required
=
false
)
private
Integer
cityCode
;
@ApiModelProperty
(
value
=
"县区编码"
,
required
=
false
)
private
Integer
districtCode
;
@ApiModelProperty
(
value
=
"角色id"
,
required
=
false
)
private
Integer
roleId
;
@ApiModelProperty
(
value
=
"账号状态:0禁用 1可用"
)
private
Integer
accountStatus
;
@ApiModelProperty
(
value
=
"账号状态:0合伙人 1员工"
)
private
Integer
userType
;
@ApiModelProperty
(
value
=
"用户id集合"
)
private
List
<
Integer
>
userIds
;
@ApiModelProperty
(
value
=
"推荐单位id"
)
private
Integer
rcdCompanyId
;
@ApiModelProperty
(
value
=
"单位集合"
,
hidden
=
true
)
private
List
<
Integer
>
companys
;
@ApiModelProperty
(
value
=
"页码"
,
required
=
true
)
@NotNull
(
message
=
"页码不能为空"
,
groups
=
Page
.
class
)
@Min
(
value
=
1
,
groups
=
Page
.
class
)
private
Integer
pageNo
;
@ApiModelProperty
(
value
=
"每页显示数"
,
required
=
true
)
@NotNull
(
message
=
"每页显示数不能为空"
,
groups
=
Page
.
class
)
@Min
(
value
=
1
,
groups
=
Page
.
class
)
private
Integer
pageSize
;
public
void
buildCurrentPage
()
{
this
.
pageNo
=
(
pageNo
-
1
)
*
pageSize
;
}
}
src/main/java/com/mmc/pms/auth/dto/LoginSuccessDTO.java
浏览文件 @
3885e9f9
...
...
@@ -7,24 +7,24 @@ import lombok.NoArgsConstructor;
import
java.io.Serializable
;
/**
* @author 作者 geDuo
* @version 创建时间:2021年8月31日 下午8:06:14
* @explain 类说明
*/
/**
* @author 作者 geDuo
* @version 创建时间:2021年8月31日 下午8:06:14
* @explain 类说明
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
LoginSuccessDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
1200834589953161925L
;
private
String
token
;
private
Integer
userAccountId
;
private
String
accountNo
;
private
Integer
portType
;
private
String
uid
;
private
String
phoneNum
;
private
String
userName
;
private
String
nickName
;
// private RoleInfoDTO roleInfo;
private
static
final
long
serialVersionUID
=
-
1200834589953161925L
;
private
String
token
;
private
Integer
userAccountId
;
private
String
accountNo
;
private
Integer
portType
;
private
String
uid
;
private
String
phoneNum
;
private
String
userName
;
private
String
nickName
;
// private RoleInfoDTO roleInfo;
}
src/main/java/com/mmc/pms/auth/dto/UserAccountSimpleDTO.java
0 → 100644
浏览文件 @
3885e9f9
package
com
.
mmc
.
pms
.
auth
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
/**
* @author: zj
* @Date: 2023/5/18 17:28
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public
class
UserAccountSimpleDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
3451336520607073343L
;
@ApiModelProperty
(
value
=
"用户id"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"用户类型"
)
private
Integer
accountType
;
@ApiModelProperty
(
value
=
"用户账号"
)
private
String
accountNo
;
@ApiModelProperty
(
value
=
"用户uid"
)
private
String
uid
;
@ApiModelProperty
(
value
=
"手机号"
)
private
String
phoneNum
;
@ApiModelProperty
(
value
=
"用户名称"
)
private
String
userName
;
@ApiModelProperty
(
value
=
"用户昵称"
)
private
String
nickName
;
@ApiModelProperty
(
value
=
"用户头像"
)
private
String
userImg
;
@ApiModelProperty
(
value
=
"用户性别:0未知、1男、2女"
)
private
Integer
userSex
;
@ApiModelProperty
(
value
=
"用户邮箱"
)
private
String
email
;
@ApiModelProperty
(
value
=
"用户来源,0自然流、1海报、2抖音、3公众号、4社群、5招投标、6官网"
)
private
Integer
source
;
@ApiModelProperty
(
value
=
"用户可用状态:0禁用、1可用"
)
private
Integer
accountStatus
;
@ApiModelProperty
(
value
=
"账号类型:0后台管理账号 ; 100云享飞-客户端;"
)
private
Integer
portType
;
@ApiModelProperty
(
value
=
"企业认证状态, 0未通过,1通过"
)
private
Integer
companyAuthStatus
;
@ApiModelProperty
(
value
=
"合作标签id"
)
private
Integer
cooperationTagId
;
}
\ No newline at end of file
src/main/java/com/mmc/pms/constant/TokenConstant.java
0 → 100644
浏览文件 @
3885e9f9
package
com
.
mmc
.
pms
.
constant
;
/**
* @author: zj
* @Date: 2023/5/31 20:07
*/
public
class
TokenConstant
{
public
static
final
String
TOKEN
=
"token"
;
}
src/main/java/com/mmc/pms/controller/BackstageCategoriesController.java
浏览文件 @
3885e9f9
...
...
@@ -2,6 +2,7 @@ package com.mmc.pms.controller;
import
com.mmc.pms.common.ResultBody
;
import
com.mmc.pms.entity.Categories
;
import
com.mmc.pms.model.categories.dto.AllCategoryDTO
;
import
com.mmc.pms.model.categories.dto.ClassifyDetailsDTO
;
import
com.mmc.pms.model.categories.dto.ClassifyInfoDTO
;
import
com.mmc.pms.model.categories.vo.CategoriesInfoVO
;
...
...
@@ -113,4 +114,11 @@ public class BackstageCategoriesController {
return
categoriesService
.
getDirectoryList
(
type
);
}
@ApiOperation
(
value
=
"根据类型获取各个目录及分类信息"
)
@GetMapping
(
"queryCategoryInfoByType"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
AllCategoryDTO
.
class
)})
public
ResultBody
queryCategoryInfoByType
(
@ApiParam
(
value
=
"类型:1:作业服务 2:设备 3:培训 4:产品商城"
,
required
=
true
)
@RequestParam
(
value
=
"type"
)
Integer
type
)
{
return
categoriesService
.
queryCategoryInfoByType
(
type
);
}
}
src/main/java/com/mmc/pms/controller/BackstageTaskServiceController.java
浏览文件 @
3885e9f9
package
com
.
mmc
.
pms
.
controller
;
import
com.mmc.pms.common.ResultBody
;
import
com.mmc.pms.model.group.Create
;
import
com.mmc.pms.model.group.Update
;
...
...
@@ -18,48 +17,51 @@ import javax.servlet.http.HttpServletRequest;
/**
* @Author LW
*
@date 2023/6/6 10:41
* 概要:
*
*
@date 2023/6/6 10:41
概要:
*/
@Api
(
tags
=
{
"后台-服务管理-模块"
})
@RestController
@RequestMapping
(
"/backstage/work"
)
public
class
BackstageTaskServiceController
extends
BaseController
{
@Resource
private
BackstageTaskService
backstageTaskService
;
@Resource
private
BackstageTaskService
backstageTaskService
;
@ApiOperation
(
value
=
"新增作业服务"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@PostMapping
(
"addWorkService"
)
public
ResultBody
addWorkService
(
@Validated
(
Create
.
class
)
@RequestBody
ServiceVO
param
,
HttpServletRequest
request
)
{
return
backstageTaskService
.
addWorkService
(
param
,
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
());
}
@ApiOperation
(
value
=
"新增作业服务"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@PostMapping
(
"addWorkService"
)
public
ResultBody
addWorkService
(
@Validated
(
Create
.
class
)
@RequestBody
ServiceVO
param
,
HttpServletRequest
request
)
{
return
backstageTaskService
.
addWorkService
(
param
,
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
());
}
@ApiOperation
(
value
=
"修改作业服务"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@PostMapping
(
"updateWorkService"
)
public
ResultBody
updateWorkService
(
@Validated
(
Update
.
class
)
@RequestBody
ServiceVO
param
)
{
return
backstageTaskService
.
updateById
(
param
);
}
@ApiOperation
(
value
=
"修改作业服务"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@PostMapping
(
"updateWorkService"
)
public
ResultBody
updateWorkService
(
@Validated
(
Update
.
class
)
@RequestBody
ServiceVO
param
)
{
return
backstageTaskService
.
updateById
(
param
);
}
@ApiOperation
(
value
=
"删除作业服务"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@GetMapping
(
"deleteWorkService"
)
public
ResultBody
deleteWorkService
(
@ApiParam
(
"作业服务id"
)
@RequestParam
(
value
=
"id"
)
Integer
id
)
{
return
backstageTaskService
.
deleteById
(
id
);
}
@ApiOperation
(
value
=
"删除作业服务"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@GetMapping
(
"deleteWorkService"
)
public
ResultBody
deleteWorkService
(
@ApiParam
(
"作业服务id"
)
@RequestParam
(
value
=
"id"
)
Integer
id
)
{
return
backstageTaskService
.
deleteById
(
id
);
}
@ApiOperation
(
value
=
"查询作业服务"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ServiceDTO
.
class
)})
@GetMapping
(
"queryWorkService"
)
public
ResultBody
queryWorkService
(
@ApiParam
(
"作业服务id"
)
@RequestParam
(
value
=
"id"
)
Integer
id
)
{
return
backstageTaskService
.
queryById
(
id
);
}
@ApiOperation
(
value
=
"查询作业服务"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ServiceDTO
.
class
)})
@GetMapping
(
"queryWorkService"
)
public
ResultBody
queryWorkService
(
@ApiParam
(
"作业服务id"
)
@RequestParam
(
value
=
"id"
)
Integer
id
)
{
return
backstageTaskService
.
queryById
(
id
);
}
@ApiOperation
(
value
=
"查询工作服务列表"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ServiceDTO
.
class
)})
@PostMapping
(
"queryWorkServiceList"
)
public
PageResult
queryWorkServiceList
(
@Validated
(
Create
.
class
)
@RequestBody
ServiceQO
param
,
HttpServletRequest
request
)
{
return
backstageTaskService
.
queryWorkServiceList
(
param
,
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
());
}
@ApiOperation
(
value
=
"查询工作服务列表"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ServiceDTO
.
class
)})
@PostMapping
(
"queryWorkServiceList"
)
public
PageResult
queryWorkServiceList
(
@Validated
(
Create
.
class
)
@RequestBody
ServiceQO
param
,
HttpServletRequest
request
)
{
return
backstageTaskService
.
queryWorkServiceList
(
param
,
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
());
}
}
src/main/java/com/mmc/pms/controller/BaseController.java
浏览文件 @
3885e9f9
...
...
@@ -11,48 +11,48 @@ import org.springframework.data.redis.core.StringRedisTemplate;
import
javax.servlet.http.HttpServletRequest
;
/**
* @author: zj
* @Date: 2023/5/25 18:11
* @author: zj @Date: 2023/5/25 18:11
*/
public
abstract
class
BaseController
{
@Autowired
private
StringRedisTemplate
stringRedisTemplate
;
@Autowired
private
StringRedisTemplate
stringRedisTemplate
;
/**
* 解析token,获取用户信息
* @param request
* @return
*/
// public BaseAccountDTO getUserLoginInfo(HttpServletRequest request) {
// String token = request.getHeader("token");
// try {
// Claims claims = JwtUtil.parseJwt(token);
// String userId = claims.get(JwtConstant.USER_ACCOUNT_ID).toString();
//// String roleId = claims.get("").toString();
// String tokenType = claims.get(JwtConstant.TOKEN_TYPE).toString();
// return BaseAccountDTO.builder().id(Integer.parseInt(userId)).tokenPort(tokenType).build();
// }catch (Exception e){
// throw new BizException("Invalid token");
// }
// }
/**
* 解析token,获取用户信息
*
* @param request
* @return
*/
// public BaseAccountDTO getUserLoginInfo(HttpServletRequest request) {
// String token = request.getHeader("token");
// try {
// Claims claims = JwtUtil.parseJwt(token);
// String userId = claims.get(JwtConstant.USER_ACCOUNT_ID).toString();
//// String roleId = claims.get("").toString();
// String tokenType = claims.get(JwtConstant.TOKEN_TYPE).toString();
// return
// BaseAccountDTO.builder().id(Integer.parseInt(userId)).tokenPort(tokenType).build();
// }catch (Exception e){
// throw new BizException("Invalid token");
// }
// }
/**
* 使用token从redis获取用户信息
*
* @param request
* @return
*/
public
LoginSuccessDTO
getUserLoginInfoFromRedis
(
HttpServletRequest
request
)
{
String
token
=
request
.
getHeader
(
"token"
);
if
(
StringUtils
.
isBlank
(
token
))
{
throw
new
BizException
(
ResultEnum
.
LOGIN_ACCOUNT_STATUS_ERROR
);
}
String
json
=
stringRedisTemplate
.
opsForValue
().
get
(
token
);
if
(
StringUtils
.
isBlank
(
json
))
{
throw
new
BizException
(
ResultEnum
.
LOGIN_ACCOUNT_STATUS_ERROR
);
}
LoginSuccessDTO
loginSuccessDTO
=
JSONObject
.
parseObject
(
json
,
LoginSuccessDTO
.
class
);
return
loginSuccessDTO
;
/**
* 使用token从redis获取用户信息
*
* @param request
* @return
*/
public
LoginSuccessDTO
getUserLoginInfoFromRedis
(
HttpServletRequest
request
)
{
String
token
=
request
.
getHeader
(
"token"
);
if
(
StringUtils
.
isBlank
(
token
))
{
throw
new
BizException
(
ResultEnum
.
LOGIN_ACCOUNT_STATUS_ERROR
);
}
String
json
=
stringRedisTemplate
.
opsForValue
().
get
(
token
);
if
(
StringUtils
.
isBlank
(
json
))
{
throw
new
BizException
(
ResultEnum
.
LOGIN_ACCOUNT_STATUS_ERROR
);
}
LoginSuccessDTO
loginSuccessDTO
=
JSONObject
.
parseObject
(
json
,
LoginSuccessDTO
.
class
);
return
loginSuccessDTO
;
}
}
src/main/java/com/mmc/pms/controller/MiniProgramDeviceController.java
浏览文件 @
3885e9f9
...
...
@@ -5,20 +5,16 @@ import com.mmc.pms.common.ResultEnum;
import
com.mmc.pms.model.lease.dto.BrandDTO
;
import
com.mmc.pms.model.lease.dto.DeviceCategoryDTO
;
import
com.mmc.pms.model.lease.dto.WareInfoDTO
;
import
com.mmc.pms.model.lease.dto.WareInfoItemDTO
;
import
com.mmc.pms.model.lease.vo.LeaseVo
;
import
com.mmc.pms.model.other.dto.DistrictInfoDTO
;
import
com.mmc.pms.model.other.dto.ModelDTO
;
import
com.mmc.pms.model.qo.WareInfoQO
;
import
com.mmc.pms.model.sale.dto.SkuInfoDTO
;
import
com.mmc.pms.page.Page
;
import
com.mmc.pms.service.WebDeviceService
;
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.*
;
/**
...
...
@@ -57,13 +53,13 @@ public class MiniProgramDeviceController {
return
webDeviceService
.
model
();
}
@ApiOperation
(
value
=
"设备列表筛选"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
WareInfoItemDTO
.
class
)})
@PostMapping
(
"/deviceList"
)
public
ResultBody
<
WareInfoItemDTO
>
listWareInfoPage
(
@RequestBody
@Validated
(
Page
.
class
)
WareInfoQO
param
)
{
return
webDeviceService
.
listWareInfoPage
(
param
);
}
//
@ApiOperation(value = "设备列表筛选")
//
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = WareInfoItemDTO.class)})
//
@PostMapping("/deviceList")
//
public ResultBody<WareInfoItemDTO> listWareInfoPage(
//
@RequestBody @Validated(Page.class) WareInfoQO param) {
// return webDeviceService.listWareInfoPage(param, request
);
//
}
@ApiOperation
(
value
=
"设备详情"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
...
...
src/main/java/com/mmc/pms/controller/PartUploadController.java
浏览文件 @
3885e9f9
差异被折叠。
点击展开。
src/main/java/com/mmc/pms/controller/UploadController.java
浏览文件 @
3885e9f9
差异被折叠。
点击展开。
src/main/java/com/mmc/pms/controller/WebAndMiniProgramCategoryController.java
deleted
100644 → 0
浏览文件 @
eb53ada3
package
com
.
mmc
.
pms
.
controller
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* @Author LW
* @date 2023/6/7 13:33
* 概要:
*/
@Api
(
tags
=
{
"分类信息"
})
@RestController
@RequestMapping
(
"/category"
)
public
class
WebAndMiniProgramCategoryController
{
// @ApiOperation(value = "web-分类信息")
// @PostMapping("queryCategoryByType")
// @ApiResponses({@ApiResponse(code = 200, message = "OK", response = GoodsInfoListDTO.class)})
// public ResultBody<GoodsInfoListDTO> listPageGoodsInfo(
// @ApiParam("商品查询条件QO") @RequestBody GoodsInfoQO param) {
// return ResultBody.success(webProductMallService.listPageGoodsInfo(param));
// }
}
src/main/java/com/mmc/pms/controller/WebDeviceController.java
浏览文件 @
3885e9f9
...
...
@@ -5,20 +5,16 @@ import com.mmc.pms.common.ResultEnum;
import
com.mmc.pms.model.lease.dto.BrandDTO
;
import
com.mmc.pms.model.lease.dto.DeviceCategoryDTO
;
import
com.mmc.pms.model.lease.dto.WareInfoDTO
;
import
com.mmc.pms.model.lease.dto.WareInfoItemDTO
;
import
com.mmc.pms.model.lease.vo.LeaseVo
;
import
com.mmc.pms.model.other.dto.AdDTO
;
import
com.mmc.pms.model.other.dto.DistrictInfoDTO
;
import
com.mmc.pms.model.other.dto.ModelDTO
;
import
com.mmc.pms.model.qo.WareInfoQO
;
import
com.mmc.pms.page.Page
;
import
com.mmc.pms.service.WebDeviceService
;
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.*
;
/**
...
...
@@ -91,13 +87,13 @@ public class WebDeviceController {
public
ResultBody
<
AdDTO
>
ad
()
{
return
webDeviceService
.
ad
();
}
@ApiOperation
(
value
=
"设备列表筛选"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
WareInfoItemDTO
.
class
)})
@PostMapping
(
"/deviceList"
)
public
ResultBody
<
WareInfoItemDTO
>
listWareInfoPage
(
@RequestBody
@Validated
(
Page
.
class
)
WareInfoQO
param
)
{
return
webDeviceService
.
listWareInfoPage
(
param
);
}
//
//
@ApiOperation(value = "设备列表筛选")
//
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = WareInfoItemDTO.class)})
//
@PostMapping("/deviceList")
//
public ResultBody<WareInfoItemDTO> listWareInfoPage(
//
@RequestBody @Validated(Page.class) WareInfoQO param) {
// return webDeviceService.listWareInfoPage(param, request
);
//
}
}
src/main/java/com/mmc/pms/controller/mini/MiniLeaseGoodsController.java
0 → 100644
浏览文件 @
3885e9f9
package
com
.
mmc
.
pms
.
controller
.
mini
;
import
com.mmc.pms.common.Page
;
import
com.mmc.pms.common.ResultBody
;
import
com.mmc.pms.controller.BaseController
;
import
com.mmc.pms.model.lease.dto.LeaseGoodsInfoDTO
;
import
com.mmc.pms.model.qo.WareInfoQO
;
import
com.mmc.pms.service.WebDeviceService
;
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.PostMapping
;
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
;
/**
* @Author LW
* @date 2023/6/8 17:16
* 概要:
*/
@Api
(
tags
=
{
"v1.0.1-设备租赁-相关接口"
})
@RestController
@RequestMapping
(
"/lease/goods"
)
public
class
MiniLeaseGoodsController
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
());
}
}
src/main/java/com/mmc/pms/controller/web/WebLeaseGoodsController.java
浏览文件 @
3885e9f9
package
com
.
mmc
.
pms
.
controller
.
web
;
import
com.mmc.pms.service.WebDeviceService
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
/**
* @Author LW
* @date 2023/6/8 15:19
...
...
@@ -13,6 +16,8 @@ import org.springframework.web.bind.annotation.RestController;
@RequestMapping
(
"/lease/goods"
)
@Api
(
tags
=
{
"web端-设备租赁-相关接口"
})
public
class
WebLeaseGoodsController
{
@Resource
WebDeviceService
webDeviceService
;
}
src/main/java/com/mmc/pms/dao/BackstageTaskServiceDao.java
浏览文件 @
3885e9f9
...
...
@@ -8,20 +8,20 @@ import java.util.List;
/**
* @Author LW
*
@date 2023/6/6 10:48
* 概要:
*
*
@date 2023/6/6 10:48
概要:
*/
@Mapper
public
interface
BackstageTaskServiceDao
{
Integer
insert
(
ServiceDO
serviceDO
);
Integer
insert
(
ServiceDO
serviceDO
);
Integer
update
(
ServiceDO
serviceDO
);
Integer
update
(
ServiceDO
serviceDO
);
Integer
deleteById
(
Integer
id
);
Integer
deleteById
(
Integer
id
);
ServiceDO
queryById
(
Integer
id
);
ServiceDO
queryById
(
Integer
id
);
List
<
ServiceDO
>
queryAllByLimit
(
ServiceQO
param
);
List
<
ServiceDO
>
queryAllByLimit
(
ServiceQO
param
);
Integer
count
(
ServiceQO
param
);
Integer
count
(
ServiceQO
param
);
}
src/main/java/com/mmc/pms/dao/CategoriesDao.java
浏览文件 @
3885e9f9
...
...
@@ -59,6 +59,9 @@ public interface CategoriesDao {
List
<
Categories
>
getCategoriesByDirectoryId
(
Integer
directoryId
);
List
<
Categories
>
getCategoriesListByIds
(
@Param
(
"ids"
)
Set
<
Integer
>
ids
);
List
<
Categories
>
selectCategoryByDirectoryId
(
List
<
Integer
>
directoryIds
);
}
...
...
src/main/java/com/mmc/pms/dao/GoodsInfoDao.java
浏览文件 @
3885e9f9
...
...
@@ -92,6 +92,8 @@ public interface GoodsInfoDao {
List
<
GoodsInfo
>
ListGoodsInfoByCategoryId
(
Integer
id
);
List
<
MallProdSkuInfoSpecDO
>
getMallProSkuInfoSpec
(
Integer
goodsInfoId
);
List
<
MallProdSkuInfoSpecDO
>
listMallprodSpecById
(
List
<
Integer
>
goodsIds
);
}
...
...
src/main/java/com/mmc/pms/dao/ProductDao.java
浏览文件 @
3885e9f9
...
...
@@ -112,6 +112,7 @@ public interface ProductDao {
List
<
OrderGoodsProdDTO
>
listProdGoodsSkuInfo
(
MallOrderGoodsInfoQO
mallOrderGoodsInfoQO
);
List
<
MallProdSkuInfoSpecDO
>
listMallProductSpec
(
Integer
id
);
}
...
...
src/main/java/com/mmc/pms/dao/WebDeviceDao.java
浏览文件 @
3885e9f9
...
...
@@ -2,8 +2,8 @@ package com.mmc.pms.dao;
import
com.mmc.pms.entity.*
;
import
com.mmc.pms.model.lease.vo.LeaseVo
;
import
com.mmc.pms.model.qo.WareInfoQO
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
@@ -33,9 +33,10 @@ public interface WebDeviceDao {
List
<
WareInfoDO
>
detail
(
Integer
id
);
int
countListWareInfoPage
(
WareInfoQO
param
);
int
countListWareInfoPage
(
@Param
(
"categoryIds"
)
List
<
Integer
>
categoryIds
,
@Param
(
"userIds"
)
List
<
Integer
>
userIds
);
List
<
WareInfoDO
>
listWareInfoPage
(
WareInfoQO
param
);
List
<
GoodsInfo
>
listWareInfoPage
(
@Param
(
"categoryIds"
)
List
<
Integer
>
categoryIds
,
@Param
(
"userIds"
)
List
<
Integer
>
userId
,
@Param
(
"pageNo"
)
Integer
pageNo
,
@Param
(
"pageSize"
)
Integer
pageSize
);
WareInfoDO
getWareInfoById
(
Integer
id
);
...
...
src/main/java/com/mmc/pms/entity/Categories.java
浏览文件 @
3885e9f9
package
com
.
mmc
.
pms
.
entity
;
import
com.mmc.pms.model.categories.dto.CategoriesInfoListDTO
;
import
com.mmc.pms.model.categories.dto.ClassifyDetailsDTO
;
import
com.mmc.pms.model.categories.dto.ClassifyInfoDTO
;
import
com.mmc.pms.model.categories.vo.ClassifyInfoVO
;
...
...
@@ -65,4 +66,8 @@ public class Categories implements Serializable {
.
icon
(
icon
).
classifyName
(
name
)
.
remark
(
remark
).
build
();
}
public
CategoriesInfoListDTO
buildCategoriesInfoListDTO
()
{
return
CategoriesInfoListDTO
.
builder
().
id
(
id
).
icon
(
icon
).
directoryId
(
directoryId
).
name
(
name
).
build
();
}
}
\ No newline at end of file
src/main/java/com/mmc/pms/entity/DirectoryDO.java
浏览文件 @
3885e9f9
package
com
.
mmc
.
pms
.
entity
;
import
com.mmc.pms.model.categories.dto.AllCategoryDTO
;
import
com.mmc.pms.model.categories.vo.DirectoryInfoVO
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
...
...
@@ -60,5 +61,10 @@ public class DirectoryDO implements Serializable {
public
DirectoryInfoVO
buildDirectoryInfoVO
()
{
return
DirectoryInfoVO
.
builder
().
id
(
id
).
directoryName
(
directoryName
).
pid
(
pid
).
relevanceName
(
relevanceName
).
type
(
type
).
build
();
}
public
AllCategoryDTO
buildAllCategoryDTO
()
{
return
AllCategoryDTO
.
builder
().
directoryId
(
id
).
name
(
directoryName
).
build
();
}
}
src/main/java/com/mmc/pms/entity/GoodsInfo.java
浏览文件 @
3885e9f9
package
com
.
mmc
.
pms
.
entity
;
import
com.mmc.pms.model.categories.vo.RelevanceGoodsInfoVO
;
import
com.mmc.pms.model.lease.dto.LeaseGoodsInfoDTO
;
import
com.mmc.pms.model.sale.vo.GoodsAddVO
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
...
...
@@ -75,4 +76,8 @@ public class GoodsInfo implements Serializable {
public
RelevanceGoodsInfoVO
buildRelevanceGoodsInfoVO
()
{
return
RelevanceGoodsInfoVO
.
builder
().
id
(
id
).
goodsName
(
goodsName
).
shelf
(
shelfStatus
).
mainImage
(
mainImg
).
build
();
}
public
LeaseGoodsInfoDTO
buildLeaseGoodsInfoDTO
()
{
return
LeaseGoodsInfoDTO
.
builder
().
id
(
id
).
goodsName
(
goodsName
).
images
(
mainImg
).
build
();
}
}
\ No newline at end of file
src/main/java/com/mmc/pms/entity/MallProdSkuInfoSpecDO.java
浏览文件 @
3885e9f9
...
...
@@ -6,6 +6,7 @@ import lombok.NoArgsConstructor;
import
lombok.experimental.Accessors
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
...
...
@@ -16,16 +17,17 @@ import java.util.Date;
@AllArgsConstructor
@Accessors
(
chain
=
true
)
public
class
MallProdSkuInfoSpecDO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
8247363408322497387L
;
private
Integer
id
;
private
Integer
mallProdSkuInfoId
;
private
Integer
goodsInfoId
;
private
Integer
productSpecId
;
private
Integer
deleted
;
private
Date
createTime
;
private
Date
updateTime
;
private
static
final
long
serialVersionUID
=
-
8247363408322497387L
;
private
Integer
id
;
private
Integer
mallProdSkuInfoId
;
private
Integer
goodsInfoId
;
private
Integer
productSpecId
;
private
Integer
deleted
;
private
Date
createTime
;
private
Date
updateTime
;
private
String
goodsName
;
private
String
goodsName
;
private
BigDecimal
price
;
private
ProductSpecDO
productSpecDO
;
private
ProductSpecDO
productSpecDO
;
}
src/main/java/com/mmc/pms/entity/RepoCashDO.java
浏览文件 @
3885e9f9
...
...
@@ -20,53 +20,53 @@ import java.util.Date;
@AllArgsConstructor
@NoArgsConstructor
public
class
RepoCashDO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
7930603317037474755L
;
private
Integer
id
;
private
Integer
repoAccountId
;
private
String
uid
;
private
String
accountName
;
private
Integer
orderInfoId
;
private
String
orderNo
;
private
Integer
skuInfoId
;
private
String
skuTitle
;
private
Integer
wareInfoId
;
private
String
wareNo
;
private
String
wareTitle
;
private
String
payNo
;
private
Integer
payMethod
;
private
BigDecimal
amtPaid
;
private
BigDecimal
cashAmt
;
private
Date
payTime
;
private
String
refundNo
;
private
String
voucher
;
private
String
remark
;
private
Integer
createUser
;
private
Date
createTime
;
private
Integer
updateUser
;
private
Date
updateTime
;
private
static
final
long
serialVersionUID
=
-
7930603317037474755L
;
private
Integer
id
;
private
Integer
repoAccountId
;
private
String
uid
;
private
String
accountName
;
private
Integer
orderInfoId
;
private
String
orderNo
;
private
Integer
skuInfoId
;
private
String
skuTitle
;
private
Integer
wareInfoId
;
private
String
wareNo
;
private
String
wareTitle
;
private
String
payNo
;
private
Integer
payMethod
;
private
BigDecimal
amtPaid
;
private
BigDecimal
cashAmt
;
private
Date
payTime
;
private
String
refundNo
;
private
String
voucher
;
private
String
remark
;
private
Integer
createUser
;
private
Date
createTime
;
private
Integer
updateUser
;
private
Date
updateTime
;
public
RepoCashDTO
buildRepoCashDTO
()
{
return
RepoCashDTO
.
builder
()
.
id
(
this
.
id
)
.
repoAccountId
(
this
.
repoAccountId
)
.
uid
(
this
.
uid
)
.
accountName
(
this
.
accountName
)
.
orderInfoId
(
this
.
orderInfoId
)
.
orderNo
(
this
.
orderNo
)
.
skuInfoId
(
this
.
skuInfoId
)
.
skuTitle
(
this
.
skuTitle
)
.
wareInfoId
(
this
.
wareInfoId
)
.
wareNo
(
this
.
wareNo
)
.
wareTitle
(
this
.
wareTitle
)
.
payNo
(
this
.
payNo
)
.
payMethod
(
this
.
payMethod
)
.
amtPaid
(
this
.
amtPaid
)
.
refundNo
(
this
.
refundNo
)
.
createUser
(
this
.
createUser
)
.
voucher
(
StringUtils
.
isBlank
(
this
.
voucher
)
?
null
:
Arrays
.
asList
(
this
.
voucher
.
split
(
","
)))
.
cashAmt
(
this
.
cashAmt
)
.
payTime
(
this
.
payTime
)
.
remark
(
this
.
remark
)
.
build
();
}
public
RepoCashDTO
buildRepoCashDTO
()
{
return
RepoCashDTO
.
builder
()
.
id
(
this
.
id
)
.
repoAccountId
(
this
.
repoAccountId
)
.
uid
(
this
.
uid
)
.
accountName
(
this
.
accountName
)
.
orderInfoId
(
this
.
orderInfoId
)
.
orderNo
(
this
.
orderNo
)
.
skuInfoId
(
this
.
skuInfoId
)
.
skuTitle
(
this
.
skuTitle
)
.
wareInfoId
(
this
.
wareInfoId
)
.
wareNo
(
this
.
wareNo
)
.
wareTitle
(
this
.
wareTitle
)
.
payNo
(
this
.
payNo
)
.
payMethod
(
this
.
payMethod
)
.
amtPaid
(
this
.
amtPaid
)
.
refundNo
(
this
.
refundNo
)
.
createUser
(
this
.
createUser
)
.
voucher
(
StringUtils
.
isBlank
(
this
.
voucher
)
?
null
:
Arrays
.
asList
(
this
.
voucher
.
split
(
","
)))
.
cashAmt
(
this
.
cashAmt
)
.
payTime
(
this
.
payTime
)
.
remark
(
this
.
remark
)
.
build
();
}
}
src/main/java/com/mmc/pms/entity/ServiceDO.java
浏览文件 @
3885e9f9
...
...
@@ -12,8 +12,8 @@ import java.util.Date;
/**
* @Author LW
*
@date 2023/6/8 10:33
* 概要:
*
*
@date 2023/6/8 10:33
概要:
*/
@Data
@AllArgsConstructor
...
...
@@ -21,73 +21,65 @@ import java.util.Date;
@Builder
public
class
ServiceDO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
private
Integer
id
;
private
Integer
id
;
@ApiModelProperty
(
value
=
"服务名称"
)
private
String
serviceName
;
@ApiModelProperty
(
value
=
"服务名称"
)
private
String
serviceName
;
@ApiModelProperty
(
value
=
"应用"
)
private
Integer
applicationId
;
@ApiModelProperty
(
value
=
"应用"
)
private
Integer
applicationId
;
@ApiModelProperty
(
value
=
"行业"
)
private
Integer
industryId
;
@ApiModelProperty
(
value
=
"行业"
)
private
Integer
industryId
;
@ApiModelProperty
(
value
=
"展示状态"
)
private
Integer
displayState
;
@ApiModelProperty
(
value
=
"展示状态"
)
private
Integer
displayState
;
@ApiModelProperty
(
value
=
"封面图"
)
private
String
coverPlan
;
@ApiModelProperty
(
value
=
"封面图"
)
private
String
coverPlan
;
@ApiModelProperty
(
value
=
"分享卡片"
)
private
String
shareCard
;
@ApiModelProperty
(
value
=
"分享卡片"
)
private
String
shareCard
;
@ApiModelProperty
(
value
=
"视频"
)
private
String
video
;
@ApiModelProperty
(
value
=
"视频"
)
private
String
video
;
@ApiModelProperty
(
value
=
"服务介绍"
)
private
String
serviceIntroduction
;
@ApiModelProperty
(
value
=
"服务介绍"
)
private
String
serviceIntroduction
;
@ApiModelProperty
(
value
=
"创建人id"
)
private
Integer
accountId
;
@ApiModelProperty
(
value
=
"创建人id"
)
private
Integer
accountId
;
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createTime
;
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createTime
;
@ApiModelProperty
(
value
=
"修改时间"
)
private
Date
updateTime
;
@ApiModelProperty
(
value
=
"修改时间"
)
private
Date
updateTime
;
@ApiModelProperty
(
value
=
"逻辑删除字段"
)
private
Integer
isDeleted
;
@ApiModelProperty
(
value
=
"逻辑删除字段"
)
private
Integer
isDeleted
;
public
ServiceDO
(
ServiceVO
param
,
Integer
accountId
)
{
this
.
id
=
param
.
getId
();
this
.
serviceName
=
param
.
getServiceName
();
this
.
applicationId
=
param
.
getApplicationId
();
this
.
industryId
=
param
.
getIndustryId
();
this
.
displayState
=
param
.
getDisplayState
();
this
.
coverPlan
=
param
.
getCoverPlan
();
this
.
shareCard
=
param
.
getShareCard
();
this
.
video
=
param
.
getVideo
();
this
.
serviceIntroduction
=
param
.
getServiceIntroduction
();
this
.
accountId
=
accountId
;
}
public
ServiceDO
(
ServiceVO
param
,
Integer
accountId
)
{
this
(
param
);
this
.
accountId
=
accountId
;
}
public
ServiceDO
(
ServiceVO
param
)
{
this
.
id
=
param
.
getId
();
this
.
serviceName
=
param
.
getServiceName
();
this
.
applicationId
=
param
.
getApplicationId
();
this
.
industryId
=
param
.
getIndustryId
();
this
.
displayState
=
param
.
getDisplayState
();
this
.
coverPlan
=
param
.
getCoverPlan
();
this
.
shareCard
=
param
.
getShareCard
();
this
.
video
=
param
.
getVideo
();
this
.
serviceIntroduction
=
param
.
getServiceIntroduction
();
}
public
ServiceDO
(
ServiceVO
param
)
{
this
.
id
=
param
.
getId
();
this
.
serviceName
=
param
.
getServiceName
();
this
.
applicationId
=
param
.
getApplicationId
();
this
.
industryId
=
param
.
getIndustryId
();
this
.
displayState
=
param
.
getDisplayState
();
this
.
coverPlan
=
param
.
getCoverPlan
();
this
.
shareCard
=
param
.
getShareCard
();
this
.
video
=
param
.
getVideo
();
this
.
serviceIntroduction
=
param
.
getServiceIntroduction
();
}
public
ServiceDO
(
Integer
id
,
Integer
accountId
)
{
this
.
id
=
id
;
this
.
accountId
=
accountId
;
}
public
ServiceDO
(
Integer
id
,
Integer
accountId
)
{
this
.
id
=
id
;
this
.
accountId
=
accountId
;
}
}
src/main/java/com/mmc/pms/feign/UserAppApi.java
0 → 100644
浏览文件 @
3885e9f9
package
com
.
mmc
.
pms
.
feign
;
import
com.mmc.pms.auth.dto.BUserAccountQO
;
import
com.mmc.pms.auth.dto.UserAccountSimpleDTO
;
import
com.mmc.pms.feign.hystrix.UserAppApiHystrix
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
* @author: zj
* @Date: 2023/5/18 17:06
*/
//@FeignClient(name = "cms-svc", fallback = UserAppApiHystrix.class)
@FeignClient
(
url
=
"${iuav.userapp.url}"
,
name
=
"cms-svc"
,
fallback
=
UserAppApiHystrix
.
class
)
public
interface
UserAppApi
{
/**
* 根据用户id获取基本信息
*
* @param userAccountId
* @return
*/
@RequestMapping
(
value
=
"/userapp/user-account/feignGetUserSimpleInfo"
,
method
=
RequestMethod
.
GET
)
public
UserAccountSimpleDTO
feignGetUserSimpleInfo
(
@RequestParam
Integer
userAccountId
,
@RequestHeader
(
"token"
)
String
token
);
/**
* 根据地区信息查询用户id
*
* @param provinceCode
* @param cityCode
* @param districtCode
* @return
*/
@GetMapping
(
"/userapp/user-account/feignListUserAccountIds"
)
List
<
Integer
>
feignListUserAccountIds
(
@RequestParam
Integer
provinceCode
,
@RequestParam
(
required
=
false
)
Integer
cityCode
,
@RequestParam
(
required
=
false
)
Integer
districtCode
,
@RequestHeader
(
value
=
"token"
,
required
=
false
)
String
token
);
/**
* 获取用户集合列表页面
*
* @param bUserAccountQO 问:b用户帐户
* @return {@link List}<{@link UserAccountSimpleDTO}>
*/
@PostMapping
(
"/userapp/back-user/feignListBAccountPage"
)
List
<
UserAccountSimpleDTO
>
feignListBAccountPage
(
@ApiParam
(
value
=
"账号查询QO"
,
required
=
true
)
@RequestBody
BUserAccountQO
bUserAccountQO
,
@RequestHeader
(
"token"
)
String
token
);
}
src/main/java/com/mmc/pms/feign/config/FeignConfiguration.java
0 → 100644
浏览文件 @
3885e9f9
package
com
.
mmc
.
pms
.
feign
.
config
;
import
com.mmc.pms.feign.hystrix.UserAppApiHystrix
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.Configuration
;
/**
* @author: zj
* @Date: 2023/5/18 18:21
*/
@ComponentScan
(
basePackages
=
"com.mmc.pms.feign"
)
@Configuration
public
class
FeignConfiguration
{
@Bean
(
name
=
"userAppApiHystrix"
)
public
UserAppApiHystrix
userAppApi
()
{
return
new
UserAppApiHystrix
();
}
}
src/main/java/com/mmc/pms/feign/hystrix/UserAppApiHystrix.java
0 → 100644
浏览文件 @
3885e9f9
package
com
.
mmc
.
pms
.
feign
.
hystrix
;
import
com.mmc.pms.auth.dto.BUserAccountQO
;
import
com.mmc.pms.auth.dto.UserAccountSimpleDTO
;
import
com.mmc.pms.feign.UserAppApi
;
import
lombok.extern.slf4j.Slf4j
;
import
java.util.List
;
/**
* @author: zj
* @Date: 2023/5/18 17:08
*/
@Slf4j
public
class
UserAppApiHystrix
implements
UserAppApi
{
@Override
public
UserAccountSimpleDTO
feignGetUserSimpleInfo
(
Integer
userAccountId
,
String
token
)
{
log
.
error
(
"熔断:feignGetUserSimpleInfo:{}"
,
userAccountId
);
return
null
;
}
@Override
public
List
<
Integer
>
feignListUserAccountIds
(
Integer
provinceCode
,
Integer
cityCode
,
Integer
districtCode
,
String
token
)
{
log
.
error
(
"熔断:feignListUserAccountIds:{}, {}, {}"
,
provinceCode
,
cityCode
,
districtCode
);
return
null
;
}
@Override
public
List
<
UserAccountSimpleDTO
>
feignListBAccountPage
(
BUserAccountQO
bUserAccountQO
,
String
token
)
{
log
.
error
(
"熔断:feignListBAccountPage:{}"
,
bUserAccountQO
);
return
null
;
}
}
src/main/java/com/mmc/pms/json/JsonUtil.java
浏览文件 @
3885e9f9
...
...
@@ -13,107 +13,107 @@ import java.util.List;
*/
public
class
JsonUtil
{
public
static
void
main
(
String
[]
args
)
{
String
array
=
"[1,24,23]"
;
List
<
Integer
>
list
=
JSONArray
.
parseArray
(
array
,
Integer
.
class
);
System
.
out
.
println
(
list
.
get
(
2
));
}
public
static
void
main
(
String
[]
args
)
{
String
array
=
"[1,24,23]"
;
List
<
Integer
>
list
=
JSONArray
.
parseArray
(
array
,
Integer
.
class
);
System
.
out
.
println
(
list
.
get
(
2
));
}
/**
* 把Java对象转换成json字符串
*
* @param object 待转化为JSON字符串的Java对象
* @return json 串 or null
*/
public
static
String
parseObjToJson
(
Object
object
)
{
String
string
=
null
;
try
{
string
=
JSONObject
.
toJSONString
(
object
);
}
catch
(
Exception
e
)
{
// LOGGER.error(e.getMessage());
}
return
string
;
/**
* 把Java对象转换成json字符串
*
* @param object 待转化为JSON字符串的Java对象
* @return json 串 or null
*/
public
static
String
parseObjToJson
(
Object
object
)
{
String
string
=
null
;
try
{
string
=
JSONObject
.
toJSONString
(
object
);
}
catch
(
Exception
e
)
{
// LOGGER.error(e.getMessage());
}
return
string
;
}
/**
* 将Json字符串信息转换成对应的Java对象
*
* @param json json字符串对象
* @param c 对应的类型
*/
public
static
<
T
>
T
parseJsonToObj
(
String
json
,
Class
<
T
>
c
)
{
try
{
JSONObject
jsonObject
=
JSON
.
parseObject
(
json
);
return
JSON
.
toJavaObject
(
jsonObject
,
c
);
}
catch
(
Exception
e
)
{
// LOGGER.error(e.getMessage());
}
return
null
;
/**
* 将Json字符串信息转换成对应的Java对象
*
* @param json json字符串对象
* @param c 对应的类型
*/
public
static
<
T
>
T
parseJsonToObj
(
String
json
,
Class
<
T
>
c
)
{
try
{
JSONObject
jsonObject
=
JSON
.
parseObject
(
json
);
return
JSON
.
toJavaObject
(
jsonObject
,
c
);
}
catch
(
Exception
e
)
{
// LOGGER.error(e.getMessage());
}
return
null
;
}
/**
* 读取json文件
*
* @param fileName
* @return
*/
public
static
String
readJsonFile
(
String
fileName
)
{
String
jsonStr
=
""
;
try
{
File
jsonFile
=
new
File
(
fileName
);
FileReader
fileReader
=
new
FileReader
(
jsonFile
);
Reader
reader
=
new
InputStreamReader
(
new
FileInputStream
(
jsonFile
),
"utf-8"
);
int
ch
=
0
;
StringBuffer
sb
=
new
StringBuffer
();
while
((
ch
=
reader
.
read
())
!=
-
1
)
{
sb
.
append
((
char
)
ch
);
}
fileReader
.
close
();
reader
.
close
();
jsonStr
=
sb
.
toString
();
return
jsonStr
;
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
return
null
;
}
/**
* 读取json文件
*
* @param fileName
* @return
*/
public
static
String
readJsonFile
(
String
fileName
)
{
String
jsonStr
=
""
;
try
{
File
jsonFile
=
new
File
(
fileName
);
FileReader
fileReader
=
new
FileReader
(
jsonFile
);
Reader
reader
=
new
InputStreamReader
(
new
FileInputStream
(
jsonFile
),
"utf-8"
);
int
ch
=
0
;
StringBuffer
sb
=
new
StringBuffer
();
while
((
ch
=
reader
.
read
())
!=
-
1
)
{
sb
.
append
((
char
)
ch
);
}
fileReader
.
close
();
reader
.
close
();
jsonStr
=
sb
.
toString
();
return
jsonStr
;
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
return
null
;
}
}
/**
* 将JSON数据格式化并保存到文件中
*
* @param jsonData 需要输出的json数
* @param filePath 输出的文件地址
* @return
*/
public
static
boolean
createJsonFile
(
Object
jsonData
,
String
filePath
)
{
String
content
=
JSON
.
toJSONString
(
jsonData
,
SerializerFeature
.
PrettyFormat
,
SerializerFeature
.
WriteMapNullValue
,
SerializerFeature
.
WriteDateUseDateFormat
);
// 标记文件生成是否成功
boolean
flag
=
true
;
// 生成json格式文件
try
{
// 保证创建一个新文件
File
file
=
new
File
(
filePath
);
if
(!
file
.
getParentFile
().
exists
())
{
// 如果父目录不存在,创建父目录
file
.
getParentFile
().
mkdirs
();
}
if
(
file
.
exists
())
{
// 如果已存在,删除旧文件
file
.
delete
();
}
file
.
createNewFile
();
// 将格式化后的字符串写入文件
Writer
write
=
new
OutputStreamWriter
(
new
FileOutputStream
(
file
),
"UTF-8"
);
write
.
write
(
content
);
write
.
flush
();
write
.
close
();
}
catch
(
Exception
e
)
{
flag
=
false
;
e
.
printStackTrace
();
}
return
flag
;
/**
* 将JSON数据格式化并保存到文件中
*
* @param jsonData 需要输出的json数
* @param filePath 输出的文件地址
* @return
*/
public
static
boolean
createJsonFile
(
Object
jsonData
,
String
filePath
)
{
String
content
=
JSON
.
toJSONString
(
jsonData
,
SerializerFeature
.
PrettyFormat
,
SerializerFeature
.
WriteMapNullValue
,
SerializerFeature
.
WriteDateUseDateFormat
);
// 标记文件生成是否成功
boolean
flag
=
true
;
// 生成json格式文件
try
{
// 保证创建一个新文件
File
file
=
new
File
(
filePath
);
if
(!
file
.
getParentFile
().
exists
())
{
// 如果父目录不存在,创建父目录
file
.
getParentFile
().
mkdirs
();
}
if
(
file
.
exists
())
{
// 如果已存在,删除旧文件
file
.
delete
();
}
file
.
createNewFile
();
// 将格式化后的字符串写入文件
Writer
write
=
new
OutputStreamWriter
(
new
FileOutputStream
(
file
),
"UTF-8"
);
write
.
write
(
content
);
write
.
flush
();
write
.
close
();
}
catch
(
Exception
e
)
{
flag
=
false
;
e
.
printStackTrace
();
}
return
flag
;
}
}
src/main/java/com/mmc/pms/model/categories/dto/AllCategoryDTO.java
0 → 100644
浏览文件 @
3885e9f9
/**
* Copyright 2023 bejson.com
*/
package
com
.
mmc
.
pms
.
model
.
categories
.
dto
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.List
;
/**
* Auto-generated: 2023-06-08 16:2:43
*
* @author 23214
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public
class
AllCategoryDTO
{
private
Integer
directoryId
;
private
String
name
;
private
List
<
CategoriesInfoListDTO
>
categoriesInfoListDTO
;
}
\ No newline at end of file
src/main/java/com/mmc/pms/model/categories/dto/CategoriesInfoListDTO.java
0 → 100644
浏览文件 @
3885e9f9
/**
* Copyright 2023 bejson.com
*/
package
com
.
mmc
.
pms
.
model
.
categories
.
dto
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* Auto-generated: 2023-06-08 16:2:43
*
* @author bejson.com (i@bejson.com)
* @website http://www.bejson.com/java2pojo/
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public
class
CategoriesInfoListDTO
{
private
Integer
id
;
private
Integer
directoryId
;
private
String
name
;
private
String
icon
;
}
\ No newline at end of file
src/main/java/com/mmc/pms/model/lease/dto/LeaseGoodsInfoDTO.java
0 → 100644
浏览文件 @
3885e9f9
package
com
.
mmc
.
pms
.
model
.
lease
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
/**
* @Author small @Date 2023/5/16 9:53 @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
LeaseGoodsInfoDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
4354269497656808831L
;
@ApiModelProperty
(
value
=
"id"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"商品名称"
)
private
String
goodsName
;
@ApiModelProperty
(
value
=
"商品图片"
)
private
String
images
;
@ApiModelProperty
(
value
=
"价格"
)
private
BigDecimal
price
;
}
src/main/java/com/mmc/pms/model/qo/GoodsInfoQO.java
浏览文件 @
3885e9f9
package
com
.
mmc
.
pms
.
model
.
qo
;
import
com.mmc.pms.common.Page
;
import
com.mmc.pms.model.group.Freeze
;
import
com.mmc.pms.page.Page
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
...
...
src/main/java/com/mmc/pms/model/qo/IndustrySkuQO.java
浏览文件 @
3885e9f9
package
com
.
mmc
.
pms
.
model
.
qo
;
import
com.mmc.pms.common.Page
;
import
com.mmc.pms.model.group.Freeze
;
import
com.mmc.pms.page.Page
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
...
...
src/main/java/com/mmc/pms/model/qo/ProductSkuQO.java
浏览文件 @
3885e9f9
package
com
.
mmc
.
pms
.
model
.
qo
;
import
com.mmc.pms.common.Page
;
import
com.mmc.pms.model.group.Freeze
;
import
com.mmc.pms.page.Page
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
...
...
src/main/java/com/mmc/pms/model/qo/ServiceQO.java
浏览文件 @
3885e9f9
package
com
.
mmc
.
pms
.
model
.
qo
;
import
com.mmc.pms.common.Page
;
import
com.mmc.pms.model.group.Freeze
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
@@ -16,8 +15,8 @@ import java.io.Serializable;
/**
* @Author LW
*
@date 2023/6/8 10:33
* 概要:
*
*
@date 2023/6/8 10:33
概要:
*/
@Data
@AllArgsConstructor
...
...
@@ -25,34 +24,38 @@ import java.io.Serializable;
@Builder
public
class
ServiceQO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
Integer
id
;
private
static
final
long
serialVersionUID
=
1L
;
private
Integer
id
;
@ApiModelProperty
(
value
=
"服务名称"
,
example
=
"服务名称"
)
@Length
(
message
=
"最大不超过30字"
,
max
=
30
)
private
String
serviceName
;
@ApiModelProperty
(
value
=
"服务名称"
,
example
=
"服务名称"
)
@Length
(
message
=
"最大不超过30字"
,
max
=
30
)
private
String
serviceName
;
@ApiModelProperty
(
value
=
"应用"
,
example
=
"1"
)
private
Integer
applicationId
;
@ApiModelProperty
(
value
=
"应用"
,
example
=
"1"
)
private
Integer
applicationId
;
@ApiModelProperty
(
value
=
"行业"
,
example
=
"2"
)
private
Integer
industryId
;
@ApiModelProperty
(
value
=
"行业"
,
example
=
"2"
)
private
Integer
industryId
;
@ApiModelProperty
(
value
=
"账号id"
)
private
Integer
accountId
;
@ApiModelProperty
(
value
=
"账号id"
)
private
Integer
accountId
;
@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
pageNo
;
@ApiModelProperty
(
value
=
"每页显示数"
,
required
=
true
)
@NotNull
(
message
=
"每页显示数不能为空"
,
groups
=
{
Page
.
class
,
Freeze
.
class
})
@Min
(
value
=
1
,
groups
=
Page
.
class
)
private
Integer
pageSize
;
@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
;
}
public
void
buildCurrentPage
()
{
this
.
pageNo
=
(
pageNo
-
1
)
*
pageSize
;
}
}
src/main/java/com/mmc/pms/model/qo/WareInfoQO.java
浏览文件 @
3885e9f9
package
com
.
mmc
.
pms
.
model
.
qo
;
import
com.mmc.pms.
page
.Page
;
import
com.mmc.pms.
common
.Page
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
...
...
@@ -9,6 +9,7 @@ import lombok.NoArgsConstructor;
import
javax.validation.constraints.Min
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* @Author small @Date 2023/5/16 9:55 @Version 1.0
...
...
@@ -18,45 +19,25 @@ import java.io.Serializable;
@NoArgsConstructor
// @ApiModel(value = "com.mmc.csf.model.qo.WareInfoQO", description = "model")
public
class
WareInfoQO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
2953141525621912414L
;
private
static
final
long
serialVersionUID
=
-
2953141525621912414L
;
@ApiModelProperty
(
name
=
"id"
,
value
=
"设备
id"
,
example
=
"1"
,
required
=
false
)
private
Integer
i
d
;
@ApiModelProperty
(
name
=
"districtId"
,
value
=
"地域
id"
,
example
=
"1"
,
required
=
false
)
private
Integer
provinceI
d
;
@ApiModelProperty
(
name
=
"districtId"
,
value
=
"地域id"
,
example
=
"1"
,
required
=
false
)
private
Integer
district
Id
;
@ApiModelProperty
(
name
=
"categoryId"
,
value
=
"分类id"
)
private
List
<
Integer
>
category
Id
;
@ApiModelProperty
(
name
=
"categoryId"
,
value
=
"类目id"
,
example
=
"类目id"
)
private
Integer
categoryId
;
@ApiModelProperty
(
value
=
"页码"
,
required
=
true
)
@NotNull
(
message
=
"页码不能为空"
,
groups
=
Page
.
class
)
@Min
(
value
=
1
,
groups
=
Page
.
class
)
private
Integer
pageNo
;
@ApiModelProperty
(
name
=
"brandIdl"
,
value
=
"品牌id"
,
example
=
"品牌id"
)
private
Integer
brandId
;
@ApiModelProperty
(
value
=
"每页显示数"
,
required
=
true
)
@NotNull
(
message
=
"每页显示数不能为空"
,
groups
=
Page
.
class
)
@Min
(
value
=
1
,
groups
=
Page
.
class
)
private
Integer
pageSize
;
@ApiModelProperty
(
name
=
"modelId"
,
value
=
"型号id"
,
example
=
"型号id"
)
private
Integer
modelId
;
/*@ApiModelProperty(value = "关键字")
private String keyword;
@ApiModelProperty(value = "商品状态,出租中或仓库中")
private Integer wareStatus;
@ApiModelProperty(value = "商品类型")
private Integer wareTypeId;
@ApiModelProperty(value = "活动属性")
private Integer propInfoId;*/
@ApiModelProperty
(
value
=
"页码"
,
required
=
true
)
@NotNull
(
message
=
"页码不能为空"
,
groups
=
Page
.
class
)
@Min
(
value
=
1
,
groups
=
Page
.
class
)
private
Integer
pageNo
;
@ApiModelProperty
(
value
=
"每页显示数"
,
required
=
true
)
@NotNull
(
message
=
"每页显示数不能为空"
,
groups
=
Page
.
class
)
@Min
(
value
=
1
,
groups
=
Page
.
class
)
private
Integer
pageSize
;
public
void
buildCurrentPage
()
{
this
.
pageNo
=
(
pageNo
-
1
)
*
pageSize
;
}
public
void
buildCurrentPage
()
{
this
.
pageNo
=
(
pageNo
-
1
)
*
pageSize
;
}
}
src/main/java/com/mmc/pms/model/sale/vo/QueryClassifyVO.java
浏览文件 @
3885e9f9
package
com
.
mmc
.
pms
.
model
.
sale
.
vo
;
import
com.mmc.pms.common.Page
;
import
com.mmc.pms.model.group.Create
;
import
com.mmc.pms.model.group.Freeze
;
import
com.mmc.pms.model.group.Update
;
import
com.mmc.pms.page.Page
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
...
...
src/main/java/com/mmc/pms/model/work/vo/ServiceVO.java
浏览文件 @
3885e9f9
...
...
@@ -15,8 +15,8 @@ import java.io.Serializable;
/**
* @Author LW
*
@date 2023/6/8 10:33
* 概要:
*
*
@date 2023/6/8 10:33
概要:
*/
@Data
@AllArgsConstructor
...
...
@@ -24,37 +24,47 @@ import java.io.Serializable;
@Builder
public
class
ServiceVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@NotNull
(
message
=
"修改服务id不能为空"
,
groups
=
{
Update
.
class
})
private
Integer
id
;
@NotNull
(
message
=
"修改服务id不能为空"
,
groups
=
{
Update
.
class
})
private
Integer
id
;
@ApiModelProperty
(
value
=
"服务名称"
,
example
=
"服务名称"
)
@NotBlank
(
message
=
"服务名称不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
@Length
(
message
=
"最大不超过30字"
,
max
=
30
)
private
String
serviceName
;
@ApiModelProperty
(
value
=
"服务名称"
,
example
=
"服务名称"
)
@NotBlank
(
message
=
"服务名称不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
@Length
(
message
=
"最大不超过30字"
,
max
=
30
)
private
String
serviceName
;
@ApiModelProperty
(
value
=
"应用"
,
example
=
"1"
)
private
Integer
applicationId
;
@ApiModelProperty
(
value
=
"应用"
,
example
=
"1"
)
private
Integer
applicationId
;
@ApiModelProperty
(
value
=
"行业"
,
example
=
"2"
)
@NotNull
(
message
=
"行业id不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
Integer
industryId
;
@ApiModelProperty
(
value
=
"行业"
,
example
=
"2"
)
@NotNull
(
message
=
"行业id不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
Integer
industryId
;
@ApiModelProperty
(
value
=
"展示状态,0为上架,1下架"
,
example
=
"0"
)
@NotNull
(
message
=
"展示状态不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
Integer
displayState
;
@ApiModelProperty
(
value
=
"展示状态,0为上架,1下架"
,
example
=
"0"
)
@NotNull
(
message
=
"展示状态不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
Integer
displayState
;
@ApiModelProperty
(
value
=
"封面图"
)
@NotBlank
(
message
=
"封面图不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
coverPlan
;
@ApiModelProperty
(
value
=
"封面图"
)
@NotBlank
(
message
=
"封面图不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
coverPlan
;
@ApiModelProperty
(
value
=
"分享卡片"
)
private
String
shareCard
;
@ApiModelProperty
(
value
=
"分享卡片"
)
private
String
shareCard
;
@ApiModelProperty
(
value
=
"视频"
)
private
String
video
;
@ApiModelProperty
(
value
=
"视频"
)
private
String
video
;
@ApiModelProperty
(
value
=
"服务介绍"
)
private
String
serviceIntroduction
;
@ApiModelProperty
(
value
=
"服务介绍"
)
private
String
serviceIntroduction
;
}
src/main/java/com/mmc/pms/page/Page.java
deleted
100644 → 0
浏览文件 @
eb53ada3
package
com
.
mmc
.
pms
.
page
;
/**
* @Author small @Date 2023/5/16 10:09 @Version 1.0
*/
public
interface
Page
{}
src/main/java/com/mmc/pms/service/BackstageTaskService.java
浏览文件 @
3885e9f9
package
com
.
mmc
.
pms
.
service
;
import
com.mmc.pms.common.ResultBody
;
import
com.mmc.pms.model.qo.ServiceQO
;
import
com.mmc.pms.model.work.vo.ServiceVO
;
...
...
@@ -8,17 +7,17 @@ import com.mmc.pms.page.PageResult;
/**
* @Author LW
*
@date 2023/6/6 10:46
* 概要:
*
*
@date 2023/6/6 10:46
概要:
*/
public
interface
BackstageTaskService
{
ResultBody
addWorkService
(
ServiceVO
param
,
Integer
userAccountId
);
ResultBody
addWorkService
(
ServiceVO
param
,
Integer
userAccountId
);
ResultBody
updateById
(
ServiceVO
param
);
ResultBody
updateById
(
ServiceVO
param
);
ResultBody
deleteById
(
Integer
id
);
ResultBody
deleteById
(
Integer
id
);
ResultBody
queryById
(
Integer
id
);
ResultBody
queryById
(
Integer
id
);
PageResult
queryWorkServiceList
(
ServiceQO
param
,
Integer
userAccountId
);
PageResult
queryWorkServiceList
(
ServiceQO
param
,
Integer
userAccountId
);
}
src/main/java/com/mmc/pms/service/CategoriesService.java
浏览文件 @
3885e9f9
...
...
@@ -42,6 +42,8 @@ public interface CategoriesService {
ResultBody
getDirectoryList
(
Integer
type
);
ResultBody
queryCategoryInfoByType
(
Integer
type
);
List
<
Categories
>
getCategoriesListByDirectoryName
(
String
directoryName
);
ResultBody
getApplicationList
(
String
directoryName
);
...
...
src/main/java/com/mmc/pms/service/Impl/BackstageTaskServiceImpl.java
浏览文件 @
3885e9f9
package
com
.
mmc
.
pms
.
service
.
Impl
;
import
com.google.common.collect.Lists
;
import
com.mmc.pms.common.ResultBody
;
import
com.mmc.pms.dao.BackstageTaskServiceDao
;
import
com.mmc.pms.dao.CategoriesDao
;
...
...
@@ -11,7 +10,6 @@ import com.mmc.pms.model.work.dto.ServiceDTO;
import
com.mmc.pms.model.work.vo.ServiceVO
;
import
com.mmc.pms.page.PageResult
;
import
com.mmc.pms.service.BackstageTaskService
;
import
com.mmc.pms.service.CategoriesService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
...
...
@@ -21,86 +19,91 @@ import java.util.stream.Collectors;
/**
* @Author LW
*
@date 2023/6/8 9:59
* 概要:
*
*
@date 2023/6/8 9:59
概要:
*/
@Service
public
class
BackstageTaskServiceImpl
implements
BackstageTaskService
{
@Autowired
private
BackstageTaskServiceDao
backstageTaskServiceDao
;
@Autowired
private
BackstageTaskServiceDao
backstageTaskServiceDao
;
@Autowired
private
CategoriesDao
categoriesDao
;
@Autowired
private
CategoriesDao
categoriesDao
;
@Override
public
ResultBody
addWorkService
(
ServiceVO
param
,
Integer
userAccountId
)
{
ServiceDO
serviceDO
=
new
ServiceDO
(
param
,
userAccountId
);
backstageTaskServiceDao
.
insert
(
serviceDO
);
return
ResultBody
.
success
();
}
@Override
public
ResultBody
addWorkService
(
ServiceVO
param
,
Integer
userAccountId
)
{
ServiceDO
serviceDO
=
new
ServiceDO
(
param
,
userAccountId
);
backstageTaskServiceDao
.
insert
(
serviceDO
);
return
ResultBody
.
success
();
}
@Override
public
ResultBody
updateById
(
ServiceVO
param
)
{
ServiceDO
serviceDO
=
new
ServiceDO
(
param
);
backstageTaskServiceDao
.
update
(
serviceDO
);
return
ResultBody
.
success
();
}
@Override
public
ResultBody
updateById
(
ServiceVO
param
)
{
ServiceDO
serviceDO
=
new
ServiceDO
(
param
);
backstageTaskServiceDao
.
update
(
serviceDO
);
return
ResultBody
.
success
();
}
@Override
public
ResultBody
deleteById
(
Integer
id
)
{
backstageTaskServiceDao
.
deleteById
(
id
);
return
ResultBody
.
success
();
}
@Override
public
ResultBody
deleteById
(
Integer
id
)
{
backstageTaskServiceDao
.
deleteById
(
id
);
return
ResultBody
.
success
();
}
@Override
public
ResultBody
queryById
(
Integer
id
)
{
ServiceDO
serviceDO
=
backstageTaskServiceDao
.
queryById
(
id
);
ServiceDTO
serviceDTO
=
new
ServiceDTO
(
serviceDO
);
Map
<
Integer
,
String
>
categoriesNameMap
=
getCategoriesNameByIds
(
Arrays
.
asList
(
serviceDTO
.
getApplicationId
(),
serviceDTO
.
getIndustryId
()));
if
(!
CollectionUtils
.
isEmpty
(
categoriesNameMap
)){
serviceDTO
.
setApplicationName
(
categoriesNameMap
.
get
(
serviceDTO
.
getApplication
Id
()));
serviceDTO
.
setIndustryName
(
categoriesNameMap
.
get
(
serviceDTO
.
getIndustryId
()));
}
return
ResultBody
.
success
(
serviceDTO
);
@Override
public
ResultBody
queryById
(
Integer
id
)
{
ServiceDO
serviceDO
=
backstageTaskServiceDao
.
queryById
(
id
);
ServiceDTO
serviceDTO
=
new
ServiceDTO
(
serviceDO
);
Map
<
Integer
,
String
>
categoriesNameMap
=
getCategoriesNameByIds
(
Arrays
.
asList
(
serviceDTO
.
getApplicationId
(),
serviceDTO
.
getIndustry
Id
()));
if
(!
CollectionUtils
.
isEmpty
(
categoriesNameMap
))
{
serviceDTO
.
setApplicationName
(
categoriesNameMap
.
get
(
serviceDTO
.
getApplicationId
()));
serviceDTO
.
setIndustryName
(
categoriesNameMap
.
get
(
serviceDTO
.
getIndustryId
())
);
}
return
ResultBody
.
success
(
serviceDTO
);
}
private
Map
<
Integer
,
String
>
getCategoriesNameByIds
(
List
<
Integer
>
ids
){
if
(
CollectionUtils
.
isEmpty
(
ids
)){
return
new
HashMap
<>();
}
Set
<
Integer
>
idSet
=
new
HashSet
<>();
for
(
Integer
id
:
ids
)
{
idSet
.
add
(
id
);
}
List
<
Categories
>
categories
=
categoriesDao
.
getCategoriesListByIds
(
idSet
);
if
(
CollectionUtils
.
isEmpty
(
categories
)){
return
new
HashMap
<>();
}
return
categories
.
stream
().
collect
(
Collectors
.
toMap
(
Categories:
:
getId
,
d
->
d
.
getName
(),
(
k1
,
k2
)
->
k1
));
private
Map
<
Integer
,
String
>
getCategoriesNameByIds
(
List
<
Integer
>
ids
)
{
if
(
CollectionUtils
.
isEmpty
(
ids
))
{
return
new
HashMap
<>();
}
Set
<
Integer
>
idSet
=
new
HashSet
<>();
for
(
Integer
id
:
ids
)
{
idSet
.
add
(
id
);
}
List
<
Categories
>
categories
=
categoriesDao
.
getCategoriesListByIds
(
idSet
);
if
(
CollectionUtils
.
isEmpty
(
categories
))
{
return
new
HashMap
<>();
}
return
categories
.
stream
()
.
collect
(
Collectors
.
toMap
(
Categories:
:
getId
,
d
->
d
.
getName
(),
(
k1
,
k2
)
->
k1
));
}
@Override
public
PageResult
queryWorkServiceList
(
ServiceQO
param
,
Integer
userAccountId
)
{
int
count
=
backstageTaskServiceDao
.
count
(
param
);
if
(
count
==
0
){
return
PageResult
.
buildPage
(
param
.
getPageNo
(),
param
.
getPageSize
(),
count
);
}
Integer
pageNo
=
param
.
getPageNo
();
param
.
buildCurrentPage
();
List
<
ServiceDO
>
services
=
backstageTaskServiceDao
.
queryAllByLimit
(
param
);
List
<
Integer
>
list
=
new
ArrayList
<>();
for
(
ServiceDO
service
:
services
)
{
list
.
add
(
service
.
getApplicationId
());
list
.
add
(
service
.
getIndustryId
());
}
Map
<
Integer
,
String
>
categoriesNameMap
=
getCategoriesNameByIds
(
list
);
List
<
ServiceDTO
>
pageList
=
services
.
stream
().
map
(
d
->{
ServiceDTO
serviceDTO
=
new
ServiceDTO
(
d
);
serviceDTO
.
setApplicationName
(
categoriesNameMap
.
get
(
d
.
getApplicationId
()));
serviceDTO
.
setIndustryName
(
categoriesNameMap
.
get
(
d
.
getIndustryId
()));
return
serviceDTO
;
}).
collect
(
Collectors
.
toList
());
return
PageResult
.
buildPage
(
pageNo
,
param
.
getPageSize
(),
count
,
pageList
);
@Override
public
PageResult
queryWorkServiceList
(
ServiceQO
param
,
Integer
userAccountId
)
{
int
count
=
backstageTaskServiceDao
.
count
(
param
);
if
(
count
==
0
)
{
return
PageResult
.
buildPage
(
param
.
getPageNo
(),
param
.
getPageSize
(),
count
);
}
Integer
pageNo
=
param
.
getPageNo
();
param
.
buildCurrentPage
();
List
<
ServiceDO
>
services
=
backstageTaskServiceDao
.
queryAllByLimit
(
param
);
List
<
Integer
>
list
=
new
ArrayList
<>();
for
(
ServiceDO
service
:
services
)
{
list
.
add
(
service
.
getApplicationId
());
list
.
add
(
service
.
getIndustryId
());
}
Map
<
Integer
,
String
>
categoriesNameMap
=
getCategoriesNameByIds
(
list
);
List
<
ServiceDTO
>
pageList
=
services
.
stream
()
.
map
(
d
->
{
ServiceDTO
serviceDTO
=
new
ServiceDTO
(
d
);
serviceDTO
.
setApplicationName
(
categoriesNameMap
.
get
(
d
.
getApplicationId
()));
serviceDTO
.
setIndustryName
(
categoriesNameMap
.
get
(
d
.
getIndustryId
()));
return
serviceDTO
;
})
.
collect
(
Collectors
.
toList
());
return
PageResult
.
buildPage
(
pageNo
,
param
.
getPageSize
(),
count
,
pageList
);
}
}
src/main/java/com/mmc/pms/service/Impl/CategoriesServiceImpl.java
浏览文件 @
3885e9f9
package
com
.
mmc
.
pms
.
service
.
Impl
;
import
com.google.common.collect.Lists
;
import
com.mmc.pms.common.ResultBody
;
import
com.mmc.pms.common.ResultEnum
;
import
com.mmc.pms.dao.CategoriesDao
;
...
...
@@ -9,9 +8,10 @@ import com.mmc.pms.dao.GoodsInfoDao;
import
com.mmc.pms.entity.Categories
;
import
com.mmc.pms.entity.DirectoryDO
;
import
com.mmc.pms.entity.GoodsInfo
;
import
com.mmc.pms.model.categories.dto.AllCategoryDTO
;
import
com.mmc.pms.model.categories.dto.CategoriesDTO
;
import
com.mmc.pms.model.categories.dto.CategoriesInfoListDTO
;
import
com.mmc.pms.model.categories.dto.ClassifyInfoDTO
;
import
com.mmc.pms.model.categories.vo.CategoriesInfoVO
;
import
com.mmc.pms.model.categories.vo.ClassifyInfoVO
;
import
com.mmc.pms.model.categories.vo.DirectoryInfoVO
;
import
com.mmc.pms.model.categories.vo.RelevantBusinessVO
;
...
...
@@ -211,7 +211,7 @@ public class CategoriesServiceImpl implements CategoriesService {
@Override
public
ResultBody
getApplicationList
(
String
directoryName
)
{
List
<
Categories
>
categories
=
getCategoriesListByDirectoryName
(
directoryName
);
if
(
org
.
springframework
.
util
.
CollectionUtils
.
isEmpty
(
categories
))
{
if
(
org
.
springframework
.
util
.
CollectionUtils
.
isEmpty
(
categories
))
{
return
ResultBody
.
success
();
}
List
<
CategoriesDTO
>
collect
=
categories
.
stream
().
map
(
CategoriesDTO:
:
new
).
collect
(
Collectors
.
toList
());
...
...
@@ -220,7 +220,7 @@ public class CategoriesServiceImpl implements CategoriesService {
@Override
public
List
<
Categories
>
getCategoriesListByIds
(
Set
<
Integer
>
ids
)
{
if
(
CollectionUtils
.
isEmpty
(
ids
))
{
if
(
CollectionUtils
.
isEmpty
(
ids
))
{
return
null
;
}
return
categoriesDao
.
getCategoriesListByIds
(
ids
);
...
...
@@ -233,7 +233,41 @@ public class CategoriesServiceImpl implements CategoriesService {
return
ResultBody
.
success
();
}
@Override
public
ResultBody
queryCategoryInfoByType
(
Integer
type
)
{
List
<
DirectoryDO
>
categoryDirectoryList
=
getCategoryDirectoryList
(
type
);
if
(
CollectionUtils
.
isNotEmpty
(
categoryDirectoryList
))
{
List
<
AllCategoryDTO
>
allCategoryDTOList
=
categoryDirectoryList
.
stream
()
.
map
(
DirectoryDO:
:
buildAllCategoryDTO
)
.
collect
(
Collectors
.
toList
());
Map
<
Integer
,
List
<
CategoriesInfoListDTO
>>
categoryMap
=
getCategoryMap
(
allCategoryDTOList
);
addSubCategories
(
allCategoryDTOList
,
categoryMap
);
return
ResultBody
.
success
(
allCategoryDTOList
);
}
return
ResultBody
.
success
();
}
private
List
<
DirectoryDO
>
getCategoryDirectoryList
(
Integer
type
)
{
return
categoriesDao
.
getDirectoryList
(
type
);
}
private
Map
<
Integer
,
List
<
CategoriesInfoListDTO
>>
getCategoryMap
(
List
<
AllCategoryDTO
>
allCategoryDTOList
)
{
List
<
Integer
>
directoryIdIds
=
allCategoryDTOList
.
stream
()
.
map
(
AllCategoryDTO:
:
getDirectoryId
)
.
collect
(
Collectors
.
toList
());
List
<
Categories
>
categoriesList
=
categoriesDao
.
selectCategoryByDirectoryId
(
directoryIdIds
);
return
categoriesList
.
stream
()
.
map
(
Categories:
:
buildCategoriesInfoListDTO
)
.
collect
(
Collectors
.
groupingBy
(
CategoriesInfoListDTO:
:
getDirectoryId
));
}
private
void
addSubCategories
(
List
<
AllCategoryDTO
>
allCategoryDTOList
,
Map
<
Integer
,
List
<
CategoriesInfoListDTO
>>
categoryMap
)
{
for
(
AllCategoryDTO
allCategoryDTO
:
allCategoryDTOList
)
{
Optional
.
ofNullable
(
categoryMap
.
get
(
allCategoryDTO
.
getDirectoryId
()))
.
ifPresent
(
allCategoryDTO:
:
setCategoriesInfoListDTO
);
}
}
}
...
...
src/main/java/com/mmc/pms/service/Impl/ProductServiceImpl.java
浏览文件 @
3885e9f9
...
...
@@ -184,12 +184,12 @@ public class ProductServiceImpl implements ProductSkuService {
@NotNull
public
ResultBody
insertSpecPrice
(
ProductSpecCPQVO
productSpecCPQVO
)
{
List
<
ProductSpecPriceDO
>
list
=
getProductSpecPriceDOS
(
productSpecCPQVO
);
if
(
productSpecCPQVO
.
getType
().
equals
(
1
)
&&
productSpecCPQVO
.
getLeaseTerm
()
==
null
)
{
return
ResultBody
.
error
(
"租赁期限不能为空!"
);
}
// 批量插入规格销售价格
if
(
productSpecCPQVO
.
getType
().
equals
(
0
))
{
int
status
=
productDao
.
batchInsertSpecPrice
(
list
);
if
(
status
<=
0
)
{
return
ResultBody
.
error
(
ResultEnum
.
FAILED_TO_ADD_DATA
);
}
productDao
.
batchInsertSpecPrice
(
list
);
}
else
{
// 批量插入租赁价格
productDao
.
batchInsertLeaseSpecPrice
(
list
);
...
...
src/main/java/com/mmc/pms/service/Impl/WebDeviceServiceImpl.java
浏览文件 @
3885e9f9
package
com
.
mmc
.
pms
.
service
.
Impl
;
import
com.mmc.pms.auth.dto.UserAccountSimpleDTO
;
import
com.mmc.pms.common.ResultBody
;
import
com.mmc.pms.constant.TokenConstant
;
import
com.mmc.pms.dao.GoodsInfoDao
;
import
com.mmc.pms.dao.ProductDao
;
import
com.mmc.pms.dao.WebDeviceDao
;
import
com.mmc.pms.entity.*
;
import
com.mmc.pms.feign.UserAppApi
;
import
com.mmc.pms.model.lease.dto.*
;
import
com.mmc.pms.model.lease.vo.LeaseVo
;
import
com.mmc.pms.model.other.dto.AdDTO
;
...
...
@@ -15,7 +20,9 @@ import com.mmc.pms.service.WebDeviceService;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -27,16 +34,20 @@ public class WebDeviceServiceImpl implements WebDeviceService {
@Autowired
WebDeviceDao
webDeviceDao
;
@Autowired
UserAppApi
userAppApi
;
@Autowired
ProductDao
productDao
;
@Autowired
GoodsInfoDao
goodsInfoDao
;
@Override
public
ResultBody
listSecondDistrict
()
{
List
<
DistrictDO
>
list
=
webDeviceDao
.
listSecondDistrict
();
List
<
DistrictInfoDTO
>
dtoList
=
list
.
stream
()
.
map
(
d
->
{
return
d
.
builderDistrictInfoDTO
();
})
.
collect
(
Collectors
.
toList
());
list
.
stream
().
map
(
DistrictDO:
:
builderDistrictInfoDTO
).
collect
(
Collectors
.
toList
());
return
ResultBody
.
success
(
dtoList
);
}
...
...
@@ -144,22 +155,28 @@ public class WebDeviceServiceImpl implements WebDeviceService {
}
@Override
public
ResultBody
listWareInfoPage
(
WareInfoQO
param
)
{
int
count
=
webDeviceDao
.
countListWareInfoPage
(
param
);
public
ResultBody
listWareInfoPage
(
WareInfoQO
param
,
HttpServletRequest
request
,
Integer
userAccountId
)
{
UserAccountSimpleDTO
userAccountSimpleDTO
=
userAppApi
.
feignGetUserSimpleInfo
(
userAccountId
,
request
.
getHeader
(
TokenConstant
.
TOKEN
));
List
<
Integer
>
userIds
=
userAppApi
.
feignListUserAccountIds
(
param
.
getProvinceId
(),
null
,
null
,
request
.
getHeader
(
TokenConstant
.
TOKEN
));
int
count
=
webDeviceDao
.
countListWareInfoPage
(
param
.
getCategoryId
(),
userIds
);
if
(
count
==
0
)
{
return
ResultBody
.
success
(
PageResult
.
buildPage
(
param
.
getPageNo
(),
param
.
getPageSize
(),
count
));
}
int
pageNo
=
param
.
getPageNo
();
param
.
buildCurrentPage
();
List
<
WareInfoDO
>
list
=
webDeviceDao
.
listWareInfoPage
(
param
);
List
<
WareInfoItemDTO
>
pageList
=
list
.
stream
()
.
map
(
d
->
{
return
d
.
buildWareInfoItemDTO
();
})
.
collect
(
Collectors
.
toList
());
List
<
GoodsInfo
>
list
=
webDeviceDao
.
listWareInfoPage
(
param
.
getCategoryId
(),
userIds
,
param
.
getPageNo
(),
param
.
getPageSize
());
List
<
LeaseGoodsInfoDTO
>
pageList
=
list
.
stream
().
map
(
GoodsInfo:
:
buildLeaseGoodsInfoDTO
).
collect
(
Collectors
.
toList
());
if
(
userAccountSimpleDTO
.
getCooperationTagId
()
==
null
)
{
return
ResultBody
.
success
(
PageResult
.
buildPage
(
pageNo
,
param
.
getPageSize
(),
count
,
pageList
));
}
List
<
Integer
>
goodsId
=
pageList
.
stream
().
map
(
LeaseGoodsInfoDTO:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
MallProdSkuInfoSpecDO
>
mallProSkuInfoSpec
=
goodsInfoDao
.
listMallprodSpecById
(
goodsId
);
Map
<
Integer
,
MallProdSkuInfoSpecDO
>
specMap
=
mallProSkuInfoSpec
.
stream
().
collect
(
Collectors
.
toMap
(
MallProdSkuInfoSpecDO:
:
getGoodsInfoId
,
d
->
d
,
(
k1
,
k2
)
->
k1
));
pageList
.
stream
().
peek
(
d
->
{
MallProdSkuInfoSpecDO
mallProdSkuInfoSpecDO
=
specMap
.
get
(
d
.
getId
());
d
.
setPrice
(
mallProdSkuInfoSpecDO
.
getPrice
());
}).
collect
(
Collectors
.
toList
());
return
ResultBody
.
success
(
PageResult
.
buildPage
(
pageNo
,
param
.
getPageSize
(),
count
,
pageList
));
}
...
...
src/main/java/com/mmc/pms/service/WebDeviceService.java
浏览文件 @
3885e9f9
...
...
@@ -7,6 +7,7 @@ import com.mmc.pms.model.other.dto.AdDTO;
import
com.mmc.pms.model.qo.WareInfoQO
;
import
com.mmc.pms.model.sale.dto.SkuInfoDTO
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
/**
...
...
@@ -31,7 +32,7 @@ public interface WebDeviceService {
ResultBody
detail
(
Integer
id
);
ResultBody
listWareInfoPage
(
WareInfoQO
param
);
ResultBody
listWareInfoPage
(
WareInfoQO
param
,
HttpServletRequest
request
,
Integer
userAccountId
);
WareInfoDTO
getWareInfoById
(
Integer
id
);
...
...
src/main/java/com/mmc/pms/util/BizException.java
浏览文件 @
3885e9f9
...
...
@@ -3,7 +3,6 @@ package com.mmc.pms.util;
import
com.mmc.pms.common.BaseErrorInfoInterface
;
import
com.mmc.pms.common.ResultEnum
;
/**
* @author 作者 geDuo
* @version 创建时间:2021年8月13日 上午9:25:43
...
...
@@ -11,80 +10,76 @@ import com.mmc.pms.common.ResultEnum;
*/
public
class
BizException
extends
RuntimeException
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 错误码
*/
protected
String
errorCode
;
/**
* 错误信息
*/
protected
String
errorMsg
;
public
BizException
()
{
super
();
}
public
BizException
(
BaseErrorInfoInterface
errorInfoInterface
)
{
super
(
errorInfoInterface
.
getResultCode
());
this
.
errorCode
=
errorInfoInterface
.
getResultCode
();
this
.
errorMsg
=
errorInfoInterface
.
getResultMsg
();
}
public
BizException
(
BaseErrorInfoInterface
errorInfoInterface
,
Throwable
cause
)
{
super
(
errorInfoInterface
.
getResultCode
(),
cause
);
this
.
errorCode
=
errorInfoInterface
.
getResultCode
();
this
.
errorMsg
=
errorInfoInterface
.
getResultMsg
();
}
public
BizException
(
ResultEnum
enums
)
{
super
(
enums
.
getResultCode
());
this
.
errorCode
=
enums
.
getResultCode
();
this
.
errorMsg
=
enums
.
getResultMsg
();
}
public
BizException
(
String
errorMsg
)
{
super
(
errorMsg
);
this
.
errorCode
=
"-1"
;
this
.
errorMsg
=
errorMsg
;
}
public
BizException
(
String
errorCode
,
String
errorMsg
)
{
super
(
errorCode
);
this
.
errorCode
=
errorCode
;
this
.
errorMsg
=
errorMsg
;
}
public
BizException
(
String
errorCode
,
String
errorMsg
,
Throwable
cause
)
{
super
(
errorCode
,
cause
);
this
.
errorCode
=
errorCode
;
this
.
errorMsg
=
errorMsg
;
}
public
String
getErrorCode
()
{
return
errorCode
;
}
public
void
setErrorCode
(
String
errorCode
)
{
this
.
errorCode
=
errorCode
;
}
public
String
getErrorMsg
()
{
return
errorMsg
;
}
public
void
setErrorMsg
(
String
errorMsg
)
{
this
.
errorMsg
=
errorMsg
;
}
@Override
public
String
getMessage
()
{
return
errorMsg
;
}
@Override
public
Throwable
fillInStackTrace
()
{
return
this
;
}
private
static
final
long
serialVersionUID
=
1L
;
/** 错误码 */
protected
String
errorCode
;
/** 错误信息 */
protected
String
errorMsg
;
public
BizException
()
{
super
();
}
public
BizException
(
BaseErrorInfoInterface
errorInfoInterface
)
{
super
(
errorInfoInterface
.
getResultCode
());
this
.
errorCode
=
errorInfoInterface
.
getResultCode
();
this
.
errorMsg
=
errorInfoInterface
.
getResultMsg
();
}
public
BizException
(
BaseErrorInfoInterface
errorInfoInterface
,
Throwable
cause
)
{
super
(
errorInfoInterface
.
getResultCode
(),
cause
);
this
.
errorCode
=
errorInfoInterface
.
getResultCode
();
this
.
errorMsg
=
errorInfoInterface
.
getResultMsg
();
}
public
BizException
(
ResultEnum
enums
)
{
super
(
enums
.
getResultCode
());
this
.
errorCode
=
enums
.
getResultCode
();
this
.
errorMsg
=
enums
.
getResultMsg
();
}
public
BizException
(
String
errorMsg
)
{
super
(
errorMsg
);
this
.
errorCode
=
"-1"
;
this
.
errorMsg
=
errorMsg
;
}
public
BizException
(
String
errorCode
,
String
errorMsg
)
{
super
(
errorCode
);
this
.
errorCode
=
errorCode
;
this
.
errorMsg
=
errorMsg
;
}
public
BizException
(
String
errorCode
,
String
errorMsg
,
Throwable
cause
)
{
super
(
errorCode
,
cause
);
this
.
errorCode
=
errorCode
;
this
.
errorMsg
=
errorMsg
;
}
public
String
getErrorCode
()
{
return
errorCode
;
}
public
void
setErrorCode
(
String
errorCode
)
{
this
.
errorCode
=
errorCode
;
}
public
String
getErrorMsg
()
{
return
errorMsg
;
}
public
void
setErrorMsg
(
String
errorMsg
)
{
this
.
errorMsg
=
errorMsg
;
}
@Override
public
String
getMessage
()
{
return
errorMsg
;
}
@Override
public
Throwable
fillInStackTrace
()
{
return
this
;
}
}
src/main/java/com/mmc/pms/util/PathUtil.java
浏览文件 @
3885e9f9
...
...
@@ -8,9 +8,9 @@ import org.springframework.util.AntPathMatcher;
* @explain 解析地址类
*/
public
class
PathUtil
{
private
static
AntPathMatcher
matcher
=
new
AntPathMatcher
();
private
static
AntPathMatcher
matcher
=
new
AntPathMatcher
();
public
static
boolean
isPathMatch
(
String
pattern
,
String
path
)
{
return
matcher
.
match
(
pattern
,
path
);
}
public
static
boolean
isPathMatch
(
String
pattern
,
String
path
)
{
return
matcher
.
match
(
pattern
,
path
);
}
}
src/main/resources/application-dev.yml
浏览文件 @
3885e9f9
...
...
@@ -37,4 +37,8 @@ mmcflying:
mount
:
directory
:
D:@javaVolume@
iuav
:
userapp
:
url
:
http://cms-svc:35150
src/main/resources/application-local.yml
浏览文件 @
3885e9f9
...
...
@@ -54,4 +54,8 @@ mmcflying:
mount
:
directory
:
D:@javaVolume@
iuav
:
userapp
:
url
:
http://127.0.0.1:35150
src/main/resources/application-prod.yml
浏览文件 @
3885e9f9
...
...
@@ -36,3 +36,7 @@ mmcflying:
path
:
/ossservlet/upload/download/
mount
:
directory
:
D:@javaVolume@
iuav
:
userapp
:
url
:
http://cms-svc:35150
src/main/resources/mapper/CategoriesDao.xml
浏览文件 @
3885e9f9
...
...
@@ -181,6 +181,16 @@
AND d.pid IS NULL
ORDER BY create_time DESC
</select>
<select
id=
"selectCategoryByDirectoryId"
resultType=
"com.mmc.pms.entity.Categories"
>
select id, `name`, icon,directory_id
from categories
<where>
is_deleted = 0
<foreach
collection=
"list"
separator=
","
open=
"and directory_id in("
close=
")"
index=
"index"
item=
"d"
>
#{d}
</foreach>
</where>
</select>
<select
id=
"getCategoriesByDirectoryId"
resultType=
"com.mmc.pms.entity.Categories"
parameterType=
"java.lang.Integer"
>
SELECT id,`name` from categories where directory_id = #{directoryId} and is_deleted = 0 order by create_time desc
...
...
src/main/resources/mapper/GoodsInfoDao.xml
浏览文件 @
3885e9f9
...
...
@@ -453,4 +453,22 @@
WHERE mp.goods_info_id = #{id}
AND mp.is_deleted = 0
</select>
<select
id=
"listMallprodSpecById"
resultType=
"com.mmc.pms.entity.MallProdSkuInfoSpecDO"
>
SELECT
mp.id,
mp.goods_info_id,
mp.product_spec_id,
psp.price price
FROM
mall_prod_info_spec mp
LEFT JOIN product_spec_price psp ON mp.product_spec_id = psp.product_spec_id
AND psp.cooperation_tag = 0
AND psp.type = 0
<where>
mp.is_deleted = 0
<foreach
collection=
"list"
separator=
","
open=
" and mp.goods_info_id in ("
close=
")"
index=
"index"
item=
"d"
>
#{d}
</foreach>
</where>
</select>
</mapper>
src/main/resources/mapper/ProductDao.xml
浏览文件 @
3885e9f9
...
...
@@ -71,7 +71,7 @@
<delete
id=
"removeProductSpecCPQ"
>
DELETE
FROM product_spec_price
WHERE product_spec_id = #{
i
d}
WHERE product_spec_id = #{
productSpecI
d}
and `type` = #{type}
</delete>
...
...
src/main/resources/mapper/WebDeviceDao.xml
浏览文件 @
3885e9f9
...
...
@@ -152,51 +152,51 @@
order by wi.create_time DESC
</select>
<select
id=
"countListWareInfoPage"
parameterType=
"com.mmc.pms.model.qo.WareInfoQO"
resultType=
"int"
>
select count(*)
from ware_info wi INNER JOIN ware_img img ON wi.id=img.ware_info_id LEFT JOIN ware_prop wp on
wi.id=wp.ware_info_id
where wi.is_deleted = 0 and img.img_type = 0
<if
test=
"districtId != null "
>
and wi.district_id = #{districtId}
</if>
<if
test=
"categoryId != null "
>
and wi.ware_type_id = #{categoryId}
</if>
<if
test=
"brandId != null "
>
and wi.brand_id = #{brandId}
</if>
<if
test=
"modelId != null and modelId != '' "
>
and wi.model_id = #{modelId}
</if>
<select
id=
"countListWareInfoPage"
parameterType=
"com.mmc.pms.entity.GoodsInfo"
resultType=
"int"
>
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"
>
<foreach
collection=
"categoryIds"
item=
"item"
index=
"index"
open=
"and gi.category_by_one IN ("
close=
")"
separator=
","
>
#{item}
</foreach>
</if>
<if
test=
"userIds != null"
>
<foreach
collection=
"userIds"
item=
"user"
index=
"index"
open=
"and gi.add_goods_user_id IN ("
close=
")"
separator=
","
>
#{user}
</foreach>
</if>
</where>
</select>
<select
id=
"listWareInfoPage"
parameterType=
"com.mmc.pms.model.qo.WareInfoQO"
resultMap=
"wareInfoResultMap"
>
select
wi.id,wi.ware_no,wi.ware_type_id,wi.ware_title,wi.ware_status,wi.pay_status,wi.min_deposit,wi.max_deposit,wi.min_rent,
wi.max_rent,wi.total_stock,wi.total_sale,wi.sku_num,wi.tags,wi.district_id,
wi.brand_id,
wi.model_id,wi.create_time,wi.update_time,img.id as
ware_img_id,img.ware_info_id,img.img_url,img.img_type,wp.prop_info_id
from ware_info wi INNER JOIN ware_img img ON wi.id=img.ware_info_id LEFT JOIN ware_prop wp on
wi.id=wp.ware_info_id
where wi.is_deleted = 0 and img.img_type = 0
<if
test=
"id != null "
>
and wi.id = #{id}
</if>
<if
test=
"districtId != null "
>
and wi.district_id = #{districtId}
</if>
<if
test=
"categoryId != null "
>
and wi.ware_type_id = #{categoryId}
</if>
<if
test=
"brandId != null "
>
and wi.brand_id = #{brandId}
</if>
<if
test=
"modelId != null and modelId != '' "
>
and wi.model_id = #{modelId}
</if>
order by wi.create_time DESC
<select
id=
"listWareInfoPage"
resultType=
"com.mmc.pms.entity.GoodsInfo"
>
SELECT
gi.id,gi.goods_name,img.img_url mainImg
FROM
goods_info gi
INNER JOIN goods_img img ON gi.id = img.goods_info_id and img.img_type = 0
<where>
gi.is_deleted = 0 and gi.shelf_status = 0
<if
test=
"categoryIds != null"
>
<foreach
collection=
"categoryIds"
item=
"item"
index=
"index"
open=
"and gi.category_by_one IN ("
close=
")"
separator=
","
>
#{item}
</foreach>
</if>
<if
test=
"userIds != null"
>
<foreach
collection=
"userIds"
item=
"user"
index=
"index"
open=
"and gi.add_goods_user_id IN ("
close=
")"
separator=
","
>
#{user}
</foreach>
</if>
</where>
order by gi.create_time DESC
limit #{pageNo},#{pageSize}
</select>
<select
id=
"getWareInfoById"
resultMap=
"wareInfoResultMap"
parameterType=
"java.lang.Integer"
>
...
...
@@ -243,37 +243,48 @@
where ware_info_id = #{wareInfoId}
</select>
<select
id=
"ad"
resultType=
"com.mmc.pms.entity.AdDO"
>
SELECT
id,
image_url AS imageUrl
FROM
device_ad
SELECT id,
image_url AS imageUrl
FROM device_ad
</select>
<resultMap
type=
"com.mmc.pms.entity.SkuInfoDO"
id=
"skuInfoDoResultMap"
>
<id
property=
"id"
column=
"sku_info_id"
/>
<result
property=
"wareInfoId"
column=
"ware_info_id"
/>
<result
property=
"skuTitle"
column=
"sku_title"
/>
<result
property=
"rentDeposit"
column=
"rent_deposit"
/>
<result
property=
"stockNum"
column=
"stock_num"
/>
<result
property=
"saleNum"
column=
"sale_num"
/>
<result
property=
"rentDeposit"
column=
"rent_deposit"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<id
property=
"id"
column=
"sku_info_id"
/>
<result
property=
"wareInfoId"
column=
"ware_info_id"
/>
<result
property=
"skuTitle"
column=
"sku_title"
/>
<result
property=
"rentDeposit"
column=
"rent_deposit"
/>
<result
property=
"stockNum"
column=
"stock_num"
/>
<result
property=
"saleNum"
column=
"sale_num"
/>
<result
property=
"rentDeposit"
column=
"rent_deposit"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<collection
property=
"skuPriceDOList"
javaType=
"java.util.List"
ofType=
"com.mmc.pms.entity.SkuPriceDO"
>
<id
property=
"id"
column=
"sku_price_id"
/>
<result
property=
"wareInfoId"
column=
"ware_info_id"
/>
<result
property=
"skuInfoId"
column=
"sku_info_id"
/>
<result
property=
"rentPrice"
column=
"rent_price"
/>
<result
property=
"minDay"
column=
"min_day"
/>
<result
property=
"maxDay"
column=
"max_day"
/>
<id
property=
"id"
column=
"sku_price_id"
/>
<result
property=
"wareInfoId"
column=
"ware_info_id"
/>
<result
property=
"skuInfoId"
column=
"sku_info_id"
/>
<result
property=
"rentPrice"
column=
"rent_price"
/>
<result
property=
"minDay"
column=
"min_day"
/>
<result
property=
"maxDay"
column=
"max_day"
/>
</collection>
</resultMap>
<select
id=
"listSkuInfo"
resultMap=
"skuInfoDoResultMap"
parameterType=
"java.lang.Integer"
>
select si.id as sku_info_id,si.ware_info_id,si.sku_title,si.rent_deposit,si.stock_num,si.sale_num,
si.create_time,si.update_time,sp.id as sku_price_id,sp.rent_price,sp.min_day,sp.max_day
from sku_info si INNER JOIN sku_price sp ON si.id=sp.sku_info_id where si.ware_info_id = #{id} and si.is_deleted = 0
select si.id as sku_info_id,
si.ware_info_id,
si.sku_title,
si.rent_deposit,
si.stock_num,
si.sale_num,
si.create_time,
si.update_time,
sp.id as sku_price_id,
sp.rent_price,
sp.min_day,
sp.max_day
from sku_info si
INNER JOIN sku_price sp ON si.id = sp.sku_info_id
where si.ware_info_id = #{id}
and si.is_deleted = 0
</select>
</mapper>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论