Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pms
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
pms
Commits
4da63557
提交
4da63557
authored
8月 15, 2023
作者:
xiaowang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
小程序列表
上级
4cf87630
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
63 行增加
和
14 行删除
+63
-14
LeaseGoodsController.java
...va/com/mmc/pms/controller/lease/LeaseGoodsController.java
+0
-2
LeaseGoodsDO.java
src/main/java/com/mmc/pms/entity/lease/LeaseGoodsDO.java
+4
-1
UserTypeEnums.java
src/main/java/com/mmc/pms/enums/UserTypeEnums.java
+25
-0
LeaseGoodsQO.java
src/main/java/com/mmc/pms/model/lease/qo/LeaseGoodsQO.java
+3
-0
LeaseGoodsVO.java
src/main/java/com/mmc/pms/model/lease/vo/LeaseGoodsVO.java
+4
-1
LeaseGoodsServiceImpl.java
...com/mmc/pms/service/lease/impl/LeaseGoodsServiceImpl.java
+8
-4
LeaseGoodsDao.xml
src/main/resources/mapper/lease/LeaseGoodsDao.xml
+19
-6
没有找到文件。
src/main/java/com/mmc/pms/controller/lease/LeaseGoodsController.java
浏览文件 @
4da63557
...
@@ -40,7 +40,6 @@ public class LeaseGoodsController extends BaseController {
...
@@ -40,7 +40,6 @@ public class LeaseGoodsController extends BaseController {
return
leaseGoodsService
.
addLeaseGoods
(
leaseGoodsVO
,
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
());
return
leaseGoodsService
.
addLeaseGoods
(
leaseGoodsVO
,
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
());
}
}
@ApiOperation
(
value
=
"获取租期信息"
)
@ApiOperation
(
value
=
"获取租期信息"
)
@PostMapping
(
"getLeaseTermInfo"
)
@PostMapping
(
"getLeaseTermInfo"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
...
@@ -84,5 +83,4 @@ public class LeaseGoodsController extends BaseController {
...
@@ -84,5 +83,4 @@ public class LeaseGoodsController extends BaseController {
@ApiParam
(
value
=
"商品id数组"
,
required
=
true
)
@RequestBody
List
<
Integer
>
list
)
{
@ApiParam
(
value
=
"商品id数组"
,
required
=
true
)
@RequestBody
List
<
Integer
>
list
)
{
return
leaseGoodsService
.
batchRemoveWareInfo
(
list
);
return
leaseGoodsService
.
batchRemoveWareInfo
(
list
);
}
}
}
}
src/main/java/com/mmc/pms/entity/lease/LeaseGoodsDO.java
浏览文件 @
4da63557
...
@@ -79,7 +79,7 @@ public class LeaseGoodsDO implements Serializable {
...
@@ -79,7 +79,7 @@ public class LeaseGoodsDO implements Serializable {
/**
/**
* 寄出物流
* 寄出物流
*/
*/
private
Integer
logisticsCompany
;
private
String
logisticsCompany
;
/**
/**
* 配送方式
* 配送方式
*/
*/
...
@@ -95,6 +95,8 @@ public class LeaseGoodsDO implements Serializable {
...
@@ -95,6 +95,8 @@ public class LeaseGoodsDO implements Serializable {
private
Integer
sort
;
private
Integer
sort
;
private
String
districtCode
;
/**
/**
* 辅助字段 begin
* 辅助字段 begin
*/
*/
...
@@ -124,6 +126,7 @@ public class LeaseGoodsDO implements Serializable {
...
@@ -124,6 +126,7 @@ public class LeaseGoodsDO implements Serializable {
this
.
returnAddress
=
leaseGoodsVO
.
getReturnAddress
();
this
.
returnAddress
=
leaseGoodsVO
.
getReturnAddress
();
this
.
logisticsCompany
=
leaseGoodsVO
.
getLogisticsCompany
();
this
.
logisticsCompany
=
leaseGoodsVO
.
getLogisticsCompany
();
this
.
modeOfDelivery
=
leaseGoodsVO
.
getModeOfDelivery
();
this
.
modeOfDelivery
=
leaseGoodsVO
.
getModeOfDelivery
();
this
.
districtCode
=
leaseGoodsVO
.
getDistrictCode
();
}
}
public
LeaseGoodsVO
buildLeaseGoodsVO
()
{
public
LeaseGoodsVO
buildLeaseGoodsVO
()
{
...
...
src/main/java/com/mmc/pms/enums/UserTypeEnums.java
0 → 100644
浏览文件 @
4da63557
package
com
.
mmc
.
pms
.
enums
;
/**
* @author: zj
* @Date: 2023/8/14 16:52
*/
public
enum
UserTypeEnums
{
PC
(
0
,
"后台用户"
),
APP
(
100
,
"小程序用户"
);
UserTypeEnums
(
Integer
type
,
String
typeName
)
{
this
.
type
=
type
;
this
.
typeName
=
typeName
;
}
public
Integer
getType
()
{
return
type
;
}
public
String
getTypeName
()
{
return
typeName
;
}
private
Integer
type
;
private
String
typeName
;
}
src/main/java/com/mmc/pms/model/lease/qo/LeaseGoodsQO.java
浏览文件 @
4da63557
...
@@ -37,6 +37,9 @@ public class LeaseGoodsQO implements Serializable {
...
@@ -37,6 +37,9 @@ public class LeaseGoodsQO implements Serializable {
@ApiModelProperty
(
value
=
"用户id"
,
hidden
=
true
)
@ApiModelProperty
(
value
=
"用户id"
,
hidden
=
true
)
private
Integer
userAccountId
;
private
Integer
userAccountId
;
@ApiModelProperty
(
value
=
"发货地"
)
private
String
districtCode
;
@ApiModelProperty
(
value
=
"页码"
,
required
=
true
)
@ApiModelProperty
(
value
=
"页码"
,
required
=
true
)
@NotNull
(
message
=
"页码不能为空"
,
groups
=
Page
.
class
)
@NotNull
(
message
=
"页码不能为空"
,
groups
=
Page
.
class
)
...
...
src/main/java/com/mmc/pms/model/lease/vo/LeaseGoodsVO.java
浏览文件 @
4da63557
...
@@ -91,7 +91,7 @@ public class LeaseGoodsVO implements Serializable {
...
@@ -91,7 +91,7 @@ public class LeaseGoodsVO implements Serializable {
private
Integer
returnAddress
;
private
Integer
returnAddress
;
@ApiModelProperty
(
value
=
"寄出物流"
)
@ApiModelProperty
(
value
=
"寄出物流"
)
private
Integer
logisticsCompany
;
private
String
logisticsCompany
;
@ApiModelProperty
(
value
=
"配送方式"
)
@ApiModelProperty
(
value
=
"配送方式"
)
private
Integer
modeOfDelivery
;
private
Integer
modeOfDelivery
;
...
@@ -110,4 +110,7 @@ public class LeaseGoodsVO implements Serializable {
...
@@ -110,4 +110,7 @@ public class LeaseGoodsVO implements Serializable {
@ApiModelProperty
(
value
=
"库存"
,
hidden
=
true
)
@ApiModelProperty
(
value
=
"库存"
,
hidden
=
true
)
private
Integer
stock
;
private
Integer
stock
;
@ApiModelProperty
(
value
=
"市code编码"
)
private
String
districtCode
;
}
}
src/main/java/com/mmc/pms/service/lease/impl/LeaseGoodsServiceImpl.java
浏览文件 @
4da63557
...
@@ -4,6 +4,7 @@ import com.mmc.pms.auth.dto.LoginSuccessDTO;
...
@@ -4,6 +4,7 @@ import com.mmc.pms.auth.dto.LoginSuccessDTO;
import
com.mmc.pms.common.ResultBody
;
import
com.mmc.pms.common.ResultBody
;
import
com.mmc.pms.dao.lease.LeaseGoodsDao
;
import
com.mmc.pms.dao.lease.LeaseGoodsDao
;
import
com.mmc.pms.entity.lease.*
;
import
com.mmc.pms.entity.lease.*
;
import
com.mmc.pms.enums.UserTypeEnums
;
import
com.mmc.pms.model.lease.qo.LeaseGoodsQO
;
import
com.mmc.pms.model.lease.qo.LeaseGoodsQO
;
import
com.mmc.pms.model.lease.vo.LeaseGoodsVO
;
import
com.mmc.pms.model.lease.vo.LeaseGoodsVO
;
import
com.mmc.pms.model.lease.vo.LeasePartsListVO
;
import
com.mmc.pms.model.lease.vo.LeasePartsListVO
;
...
@@ -119,15 +120,18 @@ public class LeaseGoodsServiceImpl implements LeaseGoodsService {
...
@@ -119,15 +120,18 @@ public class LeaseGoodsServiceImpl implements LeaseGoodsService {
public
ResultBody
leaseGoodsList
(
LeaseGoodsQO
param
,
LoginSuccessDTO
loginSuccessDTO
)
{
public
ResultBody
leaseGoodsList
(
LeaseGoodsQO
param
,
LoginSuccessDTO
loginSuccessDTO
)
{
if
(
loginSuccessDTO
.
getRoleInfo
().
getSuperAdmin
().
equals
(
1
))
{
if
(
loginSuccessDTO
.
getRoleInfo
().
getSuperAdmin
().
equals
(
1
))
{
// 超级管理员获取所有商品信息
// 超级管理员获取所有商品信息
return
ResultBody
.
success
(
get
Mall
GoodsInfo
(
param
));
return
ResultBody
.
success
(
get
Lease
GoodsInfo
(
param
));
}
else
{
}
else
if
(!
loginSuccessDTO
.
getRoleInfo
().
getSuperAdmin
().
equals
(
1
))
{
// 非超级管理员获取自家的商品信息
// 非超级管理员获取自家的商品信息
param
.
setUserAccountId
(
loginSuccessDTO
.
getUserAccountId
());
param
.
setUserAccountId
(
loginSuccessDTO
.
getUserAccountId
());
return
ResultBody
.
success
(
getMallGoodsInfo
(
param
));
return
ResultBody
.
success
(
getLeaseGoodsInfo
(
param
));
}
else
if
(
loginSuccessDTO
.
getPortType
().
equals
(
UserTypeEnums
.
APP
.
getType
()))
{
return
ResultBody
.
success
(
getLeaseGoodsInfo
(
param
));
}
}
return
ResultBody
.
success
();
}
}
private
PageResult
get
Mall
GoodsInfo
(
LeaseGoodsQO
param
)
{
private
PageResult
get
Lease
GoodsInfo
(
LeaseGoodsQO
param
)
{
int
count
=
leaseGoodsDao
.
countLeaseGoods
(
param
);
int
count
=
leaseGoodsDao
.
countLeaseGoods
(
param
);
if
(
count
==
0
)
{
if
(
count
==
0
)
{
return
PageResult
.
buildPage
(
param
.
getPageNo
(),
param
.
getPageSize
(),
count
);
return
PageResult
.
buildPage
(
param
.
getPageNo
(),
param
.
getPageSize
(),
count
);
...
...
src/main/resources/mapper/lease/LeaseGoodsDao.xml
浏览文件 @
4da63557
...
@@ -32,10 +32,11 @@
...
@@ -32,10 +32,11 @@
logistics_company,
logistics_company,
mode_of_delivery,
mode_of_delivery,
user_account_id,
user_account_id,
district_code,
sort)
sort)
values (#{tradeName}, #{sellingPoint}, #{level}, #{shelfStatus}, #{productTypeId}, #{brandInfoId},
values (#{tradeName}, #{sellingPoint}, #{level}, #{shelfStatus}, #{productTypeId}, #{brandInfoId},
#{deviceModeId}, #{productParam}, #{productDetails}, #{minLeaseTerm}, #{maxLeaseTerm}, #{shipAddress},
#{deviceModeId}, #{productParam}, #{productDetails}, #{minLeaseTerm}, #{maxLeaseTerm}, #{shipAddress},
#{returnAddress}, #{logisticsCompany}, #{modeOfDelivery}, #{userAccountId}, #{sort})
#{returnAddress}, #{logisticsCompany}, #{modeOfDelivery}, #{userAccountId}, #{
districtCode}, #{
sort})
</insert>
</insert>
<insert
id=
"batchInsertLeaseGoodsResources"
>
<insert
id=
"batchInsertLeaseGoodsResources"
>
insert into lease_goods_resources (lease_goods_id,
insert into lease_goods_resources (lease_goods_id,
...
@@ -317,6 +318,9 @@
...
@@ -317,6 +318,9 @@
<if
test=
"userAccountId != null"
>
<if
test=
"userAccountId != null"
>
and user_account_id = #{userAccountId}
and user_account_id = #{userAccountId}
</if>
</if>
<if
test=
"districtCode != null and districtCode != ''"
>
and district_code = #{districtCode}
</if>
</where>
</where>
</select>
</select>
<resultMap
id=
"leaseGoodsMap"
type=
"com.mmc.pms.entity.lease.LeaseGoodsDO"
>
<resultMap
id=
"leaseGoodsMap"
type=
"com.mmc.pms.entity.lease.LeaseGoodsDO"
>
...
@@ -324,6 +328,9 @@
...
@@ -324,6 +328,9 @@
<result
column=
"trade_name"
property=
"tradeName"
/>
<result
column=
"trade_name"
property=
"tradeName"
/>
<result
column=
"product_type_id"
property=
"productTypeId"
/>
<result
column=
"product_type_id"
property=
"productTypeId"
/>
<result
column=
"shelf_status"
property=
"shelfStatus"
/>
<result
column=
"shelf_status"
property=
"shelfStatus"
/>
<result
column=
"selling_point"
property=
"sellingPoint"
/>
<result
column=
"product_param"
property=
"productParam"
/>
<result
column=
"user_account_id"
property=
"userAccountId"
/>
<collection
property=
"leaseGoodsResources"
javaType=
"java.util.List"
<collection
property=
"leaseGoodsResources"
javaType=
"java.util.List"
ofType=
"com.mmc.pms.entity.lease.LeaseGoodsResourcesDO"
>
ofType=
"com.mmc.pms.entity.lease.LeaseGoodsResourcesDO"
>
<id
column=
"resourceId"
property=
"id"
/>
<id
column=
"resourceId"
property=
"id"
/>
...
@@ -347,6 +354,9 @@
...
@@ -347,6 +354,9 @@
lg.trade_name,
lg.trade_name,
lg.product_type_id,
lg.product_type_id,
lg.shelf_status,
lg.shelf_status,
lg.selling_point,
lg.product_param,
lg.user_account_id,
lg.create_time,
lg.create_time,
lgr.id resourceId,
lgr.id resourceId,
lgr.type,
lgr.type,
...
@@ -364,19 +374,22 @@
...
@@ -364,19 +374,22 @@
LEFT JOIN lease_price_stock lps ON lps.lease_goods_id = lg.id
LEFT JOIN lease_price_stock lps ON lps.lease_goods_id = lg.id
<where>
<where>
<if
test=
"shelfStatus != null"
>
<if
test=
"shelfStatus != null"
>
and shelf_status = #{shelfStatus}
and
lg.
shelf_status = #{shelfStatus}
</if>
</if>
<if
test=
"tradeName != null and tradeName != ''"
>
<if
test=
"tradeName != null and tradeName != ''"
>
and (trade_name LIKE CONCAT('%',#{tradeName},'%'))
and (
lg.
trade_name LIKE CONCAT('%',#{tradeName},'%'))
</if>
</if>
<if
test=
"productTypeId != null"
>
<if
test=
"productTypeId != null"
>
and product_type_id = #{productTypeId}
and
lg.
product_type_id = #{productTypeId}
</if>
</if>
<if
test=
"brandInfoId != null"
>
<if
test=
"brandInfoId != null"
>
and brand_info_id = #{brandInfoId}
and
lg.
brand_info_id = #{brandInfoId}
</if>
</if>
<if
test=
"userAccountId != null"
>
<if
test=
"userAccountId != null"
>
and user_account_id = #{userAccountId}
and lg.user_account_id = #{userAccountId}
</if>
<if
test=
"districtCode != null and districtCode != ''"
>
and district_code = #{districtCode}
</if>
</if>
</where>
</where>
order by lg.shelf_status DESC, lg.sort DESC
order by lg.shelf_status DESC, lg.sort DESC
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论