Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
c4b974a4
Commit
c4b974a4
authored
Apr 26, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
后台订单管理
parent
c197ea72
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
88 additions
and
74 deletions
+88
-74
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/SysDistributionOrderServiceImpl.java
...m/wwdz/ch/admin/impl/SysDistributionOrderServiceImpl.java
+3
-5
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/SysSupplierItemServiceImpl.java
...va/com/wwdz/ch/admin/impl/SysSupplierItemServiceImpl.java
+6
-2
ch-core/src/main/java/com/wwdz/ch/core/consts/SupplierItemEnum.java
...c/main/java/com/wwdz/ch/core/consts/SupplierItemEnum.java
+5
-5
ch-core/src/main/java/com/wwdz/ch/core/entity/SupplierItemVo.java
...src/main/java/com/wwdz/ch/core/entity/SupplierItemVo.java
+7
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/SupplierItem.java
...java/com/wwdz/ch/db/domain/distribution/SupplierItem.java
+5
-5
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/SupplierItemExample.java
...m/wwdz/ch/db/domain/distribution/SupplierItemExample.java
+36
-36
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/distribution/SupplierItemRequestDto.java
...h/db/dto/request/distribution/SupplierItemRequestDto.java
+5
-1
ch-dao/src/main/java/com/wwdz/ch/db/impl/distribution/SupplierItemDaoImpl.java
...com/wwdz/ch/db/impl/distribution/SupplierItemDaoImpl.java
+1
-1
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/distribution/SupplierItemMapper.xml
...com/wwdz/ch/db/mapper/distribution/SupplierItemMapper.xml
+19
-19
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/UserServiceImpl.java
...pi/src/main/java/com/wwdz/ch/wx/impl/UserServiceImpl.java
+1
-0
No files found.
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/SysDistributionOrderServiceImpl.java
View file @
c4b974a4
...
...
@@ -3,6 +3,7 @@ package com.wwdz.ch.admin.impl;
import
com.github.pagehelper.PageInfo
;
import
com.wwdz.ch.admin.entity.vo.SysDistributionOrderVo
;
import
com.wwdz.ch.admin.service.SysDistributionOrderService
;
import
com.wwdz.ch.core.consts.CommConsts
;
import
com.wwdz.ch.core.consts.DistributionEnum
;
import
com.wwdz.ch.core.type.PageSearchResult
;
import
com.wwdz.ch.core.type.Result
;
...
...
@@ -79,12 +80,9 @@ public class SysDistributionOrderServiceImpl implements SysDistributionOrderServ
return
Result
.
success
();
}
}
if
(
dto
.
getType
()
==
DistributionEnum
.
DistributionTypeEnum
.
COLLECT
.
getCode
())
{
dto
.
setType
(
DistributionEnum
.
DistributionTypeEnum
.
COLLECT
.
getCode
());
}
else
{
if
(
dto
.
getType
()
==
null
)
{
dto
.
setTypeList
(
Arrays
.
asList
(
DistributionEnum
.
DistributionTypeEnum
.
FIXED_PRICE
.
getCode
(),
DistributionEnum
.
DistributionTypeEnum
.
AUCTION
.
getCode
()));
}
List
<
DistributionOrder
>
distributionOrderList
=
distributionOrderDao
.
findByPage
(
dto
);
PageInfo
pageInfo
=
new
PageInfo
<>(
distributionOrderList
);
...
...
@@ -100,7 +98,7 @@ public class SysDistributionOrderServiceImpl implements SysDistributionOrderServ
distributionOrderVo
.
setTypeName
(
DistributionEnum
.
DistributionTypeEnum
.
getNameByCode
(
distributionOrder
.
getType
()));
distributionOrderVo
.
setHomePageImage
(
MediaUtil
.
getHomePageImage
(
supplierItem
.
getImages
(),
supplierItem
.
getVideos
()));
distributionOrderVo
.
setBuyerName
(
cacheUtil
.
getAppletUserNameById
(
distributionOrder
.
getBuyerId
()));
distributionOrderVo
.
setSellerName
(
cacheUtil
.
getAppletUserNameById
(
distributionOrder
.
getSellerId
()));
distributionOrderVo
.
setSellerName
(
distributionOrder
.
getSellerId
()
==
CommConsts
.
SYSTEM_ACCOUNT
.
longValue
()?
"系统账号"
:
cacheUtil
.
getAppletUserNameById
(
distributionOrder
.
getSellerId
()));
//支付截止时间,下单后半小时内
Date
date
=
distributionOrder
.
getCreateTime
();
Instant
instant
=
date
.
toInstant
().
plus
(
Duration
.
ofMinutes
(
30
));
...
...
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/SysSupplierItemServiceImpl.java
View file @
c4b974a4
...
...
@@ -31,7 +31,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
org.springframework.util.CollectionUtils
;
import
javax.imageio.ImageIO
;
import
java.awt.image.BufferedImage
;
...
...
@@ -165,6 +164,7 @@ public class SysSupplierItemServiceImpl implements SysSupplierItemService {
supplierItemVo
.
setHomePageImage
(
MediaUtil
.
getHomePageImage
(
supplierItem
.
getImages
(),
supplierItem
.
getVideos
()));
supplierItemVo
.
setTypeName
(
DistributionEnum
.
DistributionTypeEnum
.
getNameByCode
(
supplierItem
.
getType
()));
supplierItemVo
.
setCreatorName
(
cacheUtil
.
getAppletUserById
(
supplierItem
.
getCreatorId
()).
getNickname
());
supplierItemVo
.
setStatusName
(
SupplierItemEnum
.
StatusEnum
.
getNameByCode
(
supplierItem
.
getStatus
()));
if
(
supplierItem
.
getBuyLimitNum
()
==
-
1
)
{
supplierItemVo
.
setIsLimitBuy
(
false
);
}
...
...
@@ -211,6 +211,7 @@ public class SysSupplierItemServiceImpl implements SysSupplierItemService {
supplierItemVo
.
setSupplyPrice
(
PriceUtil
.
convertPriceFenToYuan
(
supplierItem
.
getSupplyPrice
()));
supplierItemVo
.
setDistributionPrice
(
PriceUtil
.
convertPriceFenToYuan
(
supplierItem
.
getDistributionPrice
()));
supplierItemVo
.
setHomePageImage
(
MediaUtil
.
getHomePageImage
(
supplierItem
.
getImages
(),
supplierItem
.
getVideos
()));
supplierItemVo
.
setCreatorName
(
cacheUtil
.
getAppletUserById
(
supplierItem
.
getCreatorId
()).
getNickname
());
//拍卖品需要查询拍卖配置信息
if
(
supplierItem
.
getType
()
==
DistributionEnum
.
DistributionTypeEnum
.
AUCTION
.
getCode
())
{
AuctionConfig
auctionConfig
=
auctionConfigDao
.
findByItemId
(
itemId
);
...
...
@@ -219,6 +220,9 @@ public class SysSupplierItemServiceImpl implements SysSupplierItemService {
supplierItemVo
.
setStartPrice
(
PriceUtil
.
convertPriceFenToYuan
(
auctionConfig
.
getStartPrice
()));
supplierItemVo
.
setAddExtent
(
PriceUtil
.
convertPriceFenToYuan
(
auctionConfig
.
getAddExtent
()));
}
if
(
supplierItem
.
getStock
()
==
0
||
supplierItem
.
getIsOnSale
())
{
supplierItemVo
.
setIsAbleSale
(
true
);
}
return
Result
.
success
(
supplierItemVo
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"商品详情查询失败 error : {}"
,
e
);
...
...
@@ -344,7 +348,7 @@ public class SysSupplierItemServiceImpl implements SysSupplierItemService {
SupplierItem
supplierItem
=
new
SupplierItem
();
supplierItem
.
setId
(
dto
.
getId
());
supplierItem
.
setIsDeleted
(
true
);
supplierItem
.
setStat
e
(
SupplierItemEnum
.
State
Enum
.
IRREGULAR
.
getCode
());
supplierItem
.
setStat
us
(
SupplierItemEnum
.
Status
Enum
.
IRREGULAR
.
getCode
());
supplierItemDao
.
update
(
supplierItem
);
//发送短息通知用户商品违规被下架,跳转到个人藏馆
String
url
=
wxAppletApi
.
getUrlLink
(
"/pages/saleSelf/index"
,
"userId="
+
oldItem
.
getCreatorId
()
+
"&shareRecordId="
);
...
...
ch-core/src/main/java/com/wwdz/ch/core/consts/SupplierItemEnum.java
View file @
c4b974a4
...
...
@@ -5,7 +5,7 @@ public class SupplierItemEnum {
/**
* 商品状态
*/
public
enum
Stat
e
Enum
{
public
enum
Stat
us
Enum
{
COMMON
(
0
,
"正常"
),
IRREGULAR
(
1
,
"违规"
),
;
...
...
@@ -13,15 +13,15 @@ public class SupplierItemEnum {
private
int
code
;
private
String
des
;
Stat
e
Enum
(
int
code
,
String
des
)
{
Stat
us
Enum
(
int
code
,
String
des
)
{
this
.
code
=
code
;
this
.
des
=
des
;
}
public
static
String
getNameByCode
(
int
code
)
{
for
(
S
upplierItemEnum
.
StateEnum
levelEnum
:
SupplierItemEnum
.
State
Enum
.
values
())
{
if
(
code
==
level
Enum
.
getCode
())
{
return
level
Enum
.
getDes
();
for
(
S
tatusEnum
statusEnum
:
Status
Enum
.
values
())
{
if
(
code
==
status
Enum
.
getCode
())
{
return
status
Enum
.
getDes
();
}
}
return
null
;
...
...
ch-core/src/main/java/com/wwdz/ch/core/entity/SupplierItemVo.java
View file @
c4b974a4
...
...
@@ -261,4 +261,11 @@ public class SupplierItemVo implements Entity {
* 是否可以出售
*/
private
Boolean
isAbleSale
;
/**
* 藏品状态
*/
private
Integer
status
;
private
String
statusName
;
}
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/SupplierItem.java
View file @
c4b974a4
...
...
@@ -95,7 +95,7 @@ public class SupplierItem implements Entity {
/**
* 状态0正常1违规
*/
private
Integer
stat
e
;
private
Integer
stat
us
;
/**
* 商品图片,分号分隔
...
...
@@ -136,7 +136,7 @@ public class SupplierItem implements Entity {
sb
.
append
(
", type="
).
append
(
type
);
sb
.
append
(
", rebate="
).
append
(
rebate
);
sb
.
append
(
", creatorId="
).
append
(
creatorId
);
sb
.
append
(
", stat
e="
).
append
(
state
);
sb
.
append
(
", stat
us="
).
append
(
status
);
sb
.
append
(
", images="
).
append
(
images
);
sb
.
append
(
", videos="
).
append
(
videos
);
sb
.
append
(
", description="
).
append
(
description
);
...
...
@@ -173,7 +173,7 @@ public class SupplierItem implements Entity {
&&
(
this
.
getType
()
==
null
?
other
.
getType
()
==
null
:
this
.
getType
().
equals
(
other
.
getType
()))
&&
(
this
.
getRebate
()
==
null
?
other
.
getRebate
()
==
null
:
this
.
getRebate
().
equals
(
other
.
getRebate
()))
&&
(
this
.
getCreatorId
()
==
null
?
other
.
getCreatorId
()
==
null
:
this
.
getCreatorId
().
equals
(
other
.
getCreatorId
()))
&&
(
this
.
getStat
e
()
==
null
?
other
.
getState
()
==
null
:
this
.
getState
().
equals
(
other
.
getState
()))
&&
(
this
.
getStat
us
()
==
null
?
other
.
getStatus
()
==
null
:
this
.
getStatus
().
equals
(
other
.
getStatus
()))
&&
(
this
.
getImages
()
==
null
?
other
.
getImages
()
==
null
:
this
.
getImages
().
equals
(
other
.
getImages
()))
&&
(
this
.
getVideos
()
==
null
?
other
.
getVideos
()
==
null
:
this
.
getVideos
().
equals
(
other
.
getVideos
()))
&&
(
this
.
getDescription
()
==
null
?
other
.
getDescription
()
==
null
:
this
.
getDescription
().
equals
(
other
.
getDescription
()));
...
...
@@ -199,7 +199,7 @@ public class SupplierItem implements Entity {
result
=
prime
*
result
+
((
getType
()
==
null
)
?
0
:
getType
().
hashCode
());
result
=
prime
*
result
+
((
getRebate
()
==
null
)
?
0
:
getRebate
().
hashCode
());
result
=
prime
*
result
+
((
getCreatorId
()
==
null
)
?
0
:
getCreatorId
().
hashCode
());
result
=
prime
*
result
+
((
getStat
e
()
==
null
)
?
0
:
getState
().
hashCode
());
result
=
prime
*
result
+
((
getStat
us
()
==
null
)
?
0
:
getStatus
().
hashCode
());
result
=
prime
*
result
+
((
getImages
()
==
null
)
?
0
:
getImages
().
hashCode
());
result
=
prime
*
result
+
((
getVideos
()
==
null
)
?
0
:
getVideos
().
hashCode
());
result
=
prime
*
result
+
((
getDescription
()
==
null
)
?
0
:
getDescription
().
hashCode
());
...
...
@@ -230,7 +230,7 @@ public class SupplierItem implements Entity {
type
(
"type"
,
"type"
,
"INTEGER"
,
true
),
rebate
(
"rebate"
,
"rebate"
,
"DECIMAL"
,
false
),
creatorId
(
"creator_id"
,
"creatorId"
,
"BIGINT"
,
false
),
stat
e
(
"state"
,
"state
"
,
"INTEGER"
,
true
),
stat
us
(
"status"
,
"status
"
,
"INTEGER"
,
true
),
images
(
"images"
,
"images"
,
"LONGVARCHAR"
,
false
),
videos
(
"videos"
,
"videos"
,
"LONGVARCHAR"
,
false
),
description
(
"description"
,
"description"
,
"LONGVARCHAR"
,
false
);
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/SupplierItemExample.java
View file @
c4b974a4
...
...
@@ -2281,18 +2281,18 @@ public class SupplierItemExample {
return
(
Criteria
)
this
;
}
public
Criteria
andStat
e
IsNull
()
{
addCriterion
(
"`stat
e
` is null"
);
public
Criteria
andStat
us
IsNull
()
{
addCriterion
(
"`stat
us
` is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStat
e
IsNotNull
()
{
addCriterion
(
"`stat
e
` is not null"
);
public
Criteria
andStat
us
IsNotNull
()
{
addCriterion
(
"`stat
us
` is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStat
e
EqualTo
(
Integer
value
)
{
addCriterion
(
"`stat
e` ="
,
value
,
"state
"
);
public
Criteria
andStat
us
EqualTo
(
Integer
value
)
{
addCriterion
(
"`stat
us` ="
,
value
,
"status
"
);
return
(
Criteria
)
this
;
}
...
...
@@ -2303,13 +2303,13 @@ public class SupplierItemExample {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andStat
e
EqualToColumn
(
SupplierItem
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`stat
e
` = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
public
Criteria
andStat
us
EqualToColumn
(
SupplierItem
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`stat
us
` = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andStat
e
NotEqualTo
(
Integer
value
)
{
addCriterion
(
"`stat
e` <>"
,
value
,
"state
"
);
public
Criteria
andStat
us
NotEqualTo
(
Integer
value
)
{
addCriterion
(
"`stat
us` <>"
,
value
,
"status
"
);
return
(
Criteria
)
this
;
}
...
...
@@ -2320,13 +2320,13 @@ public class SupplierItemExample {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andStat
e
NotEqualToColumn
(
SupplierItem
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`stat
e
` <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
public
Criteria
andStat
us
NotEqualToColumn
(
SupplierItem
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`stat
us
` <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andStat
e
GreaterThan
(
Integer
value
)
{
addCriterion
(
"`stat
e` >"
,
value
,
"state
"
);
public
Criteria
andStat
us
GreaterThan
(
Integer
value
)
{
addCriterion
(
"`stat
us` >"
,
value
,
"status
"
);
return
(
Criteria
)
this
;
}
...
...
@@ -2337,13 +2337,13 @@ public class SupplierItemExample {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andStat
e
GreaterThanColumn
(
SupplierItem
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`stat
e
` > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
public
Criteria
andStat
us
GreaterThanColumn
(
SupplierItem
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`stat
us
` > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andStat
e
GreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"`stat
e` >="
,
value
,
"state
"
);
public
Criteria
andStat
us
GreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"`stat
us` >="
,
value
,
"status
"
);
return
(
Criteria
)
this
;
}
...
...
@@ -2354,13 +2354,13 @@ public class SupplierItemExample {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andStat
e
GreaterThanOrEqualToColumn
(
SupplierItem
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`stat
e
` >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
public
Criteria
andStat
us
GreaterThanOrEqualToColumn
(
SupplierItem
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`stat
us
` >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andStat
e
LessThan
(
Integer
value
)
{
addCriterion
(
"`stat
e` <"
,
value
,
"state
"
);
public
Criteria
andStat
us
LessThan
(
Integer
value
)
{
addCriterion
(
"`stat
us` <"
,
value
,
"status
"
);
return
(
Criteria
)
this
;
}
...
...
@@ -2371,13 +2371,13 @@ public class SupplierItemExample {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andStat
e
LessThanColumn
(
SupplierItem
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`stat
e
` < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
public
Criteria
andStat
us
LessThanColumn
(
SupplierItem
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`stat
us
` < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andStat
e
LessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"`stat
e` <="
,
value
,
"state
"
);
public
Criteria
andStat
us
LessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"`stat
us` <="
,
value
,
"status
"
);
return
(
Criteria
)
this
;
}
...
...
@@ -2388,28 +2388,28 @@ public class SupplierItemExample {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andStat
e
LessThanOrEqualToColumn
(
SupplierItem
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`stat
e
` <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
public
Criteria
andStat
us
LessThanOrEqualToColumn
(
SupplierItem
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`stat
us
` <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andStat
e
In
(
List
<
Integer
>
values
)
{
addCriterion
(
"`stat
e` in"
,
values
,
"state
"
);
public
Criteria
andStat
us
In
(
List
<
Integer
>
values
)
{
addCriterion
(
"`stat
us` in"
,
values
,
"status
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStat
e
NotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"`stat
e` not in"
,
values
,
"state
"
);
public
Criteria
andStat
us
NotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"`stat
us` not in"
,
values
,
"status
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStat
e
Between
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"`stat
e` between"
,
value1
,
value2
,
"state
"
);
public
Criteria
andStat
us
Between
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"`stat
us` between"
,
value1
,
value2
,
"status
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStat
e
NotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"`stat
e` not between"
,
value1
,
value2
,
"state
"
);
public
Criteria
andStat
us
NotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"`stat
us` not between"
,
value1
,
value2
,
"status
"
);
return
(
Criteria
)
this
;
}
}
...
...
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/distribution/SupplierItemRequestDto.java
View file @
c4b974a4
...
...
@@ -4,7 +4,6 @@ import com.wwdz.ch.db.dto.request.BaseRequestDto;
import
com.xxdxxs.entity.Entity
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -47,6 +46,11 @@ public class SupplierItemRequestDto extends BaseRequestDto implements Entity {
*/
private
String
name
;
/**
* 状态0正常1违规
*/
private
Integer
status
;
/**
* 置顶图片
*/
...
...
ch-dao/src/main/java/com/wwdz/ch/db/impl/distribution/SupplierItemDaoImpl.java
View file @
c4b974a4
...
...
@@ -14,7 +14,6 @@ import org.springframework.util.CollectionUtils;
import
java.util.Date
;
import
java.util.List
;
import
java.util.concurrent.TimeUnit
;
@Repository
public
class
SupplierItemDaoImpl
implements
SupplierItemDao
{
...
...
@@ -39,6 +38,7 @@ public class SupplierItemDaoImpl implements SupplierItemDao {
}
JdbcHelper
.
ifPresent
(
dto
.
getTypeList
(),
criteria:
:
andTypeIn
);
JdbcHelper
.
ifPresent
(
dto
.
getType
(),
criteria:
:
andTypeEqualTo
);
JdbcHelper
.
ifPresent
(
dto
.
getStatus
(),
criteria:
:
andStatusEqualTo
);
JdbcHelper
.
ifPresent
(
dto
.
getStock
(),
criteria:
:
andStockGreaterThan
);
JdbcHelper
.
ifPresent
(
dto
.
getIsOnSale
(),
criteria:
:
andIsOnSaleEqualTo
);
JdbcHelper
.
ifPresent
(
dto
.
getIsDeleted
(),
criteria:
:
andIsDeletedEqualTo
);
...
...
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/distribution/SupplierItemMapper.xml
View file @
c4b974a4
...
...
@@ -18,7 +18,7 @@
<result
column=
"type"
jdbcType=
"INTEGER"
property=
"type"
/>
<result
column=
"rebate"
jdbcType=
"DECIMAL"
property=
"rebate"
/>
<result
column=
"creator_id"
jdbcType=
"BIGINT"
property=
"creatorId"
/>
<result
column=
"stat
e"
jdbcType=
"INTEGER"
property=
"state
"
/>
<result
column=
"stat
us"
jdbcType=
"INTEGER"
property=
"status
"
/>
</resultMap>
<resultMap
extends=
"BaseResultMap"
id=
"ResultMapWithBLOBs"
type=
"com.wwdz.ch.db.domain.distribution.SupplierItem"
>
<result
column=
"images"
jdbcType=
"LONGVARCHAR"
property=
"images"
/>
...
...
@@ -86,7 +86,7 @@
<sql
id=
"Base_Column_List"
>
id, `name`, supplier_id, is_on_sale, sort, top_image, distribution_price, supply_price,
stock, create_time, update_time, is_deleted, buy_limit_num, `type`, rebate, creator_id,
`stat
e
`
`stat
us
`
</sql>
<sql
id=
"Blob_Column_List"
>
images, videos, description
...
...
@@ -143,7 +143,7 @@
<otherwise>
id, `name`, supplier_id, is_on_sale, sort, top_image, distribution_price, supply_price,
stock, create_time, update_time, is_deleted, buy_limit_num, `type`, rebate, creator_id,
`stat
e
`, images, videos, description
`stat
us
`, images, videos, description
</otherwise>
</choose>
from supplier_item
...
...
@@ -178,7 +178,7 @@
<otherwise>
id, `name`, supplier_id, is_on_sale, sort, top_image, distribution_price, supply_price,
stock, create_time, update_time, is_deleted, buy_limit_num, `type`, rebate, creator_id,
`stat
e
`, images, videos, description
`stat
us
`, images, videos, description
</otherwise>
</choose>
from supplier_item
...
...
@@ -203,14 +203,14 @@
supply_price, stock, create_time,
update_time, is_deleted, buy_limit_num,
`type`, rebate, creator_id,
`stat
e
`, images, videos,
`stat
us
`, images, videos,
description)
values (#{name,jdbcType=VARCHAR}, #{supplierId,jdbcType=BIGINT}, #{isOnSale,jdbcType=BIT},
#{sort,jdbcType=INTEGER}, #{topImage,jdbcType=VARCHAR}, #{distributionPrice,jdbcType=BIGINT},
#{supplyPrice,jdbcType=BIGINT}, #{stock,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{isDeleted,jdbcType=BIT}, #{buyLimitNum,jdbcType=INTEGER},
#{type,jdbcType=INTEGER}, #{rebate,jdbcType=DECIMAL}, #{creatorId,jdbcType=BIGINT},
#{stat
e
,jdbcType=INTEGER}, #{images,jdbcType=LONGVARCHAR}, #{videos,jdbcType=LONGVARCHAR},
#{stat
us
,jdbcType=INTEGER}, #{images,jdbcType=LONGVARCHAR}, #{videos,jdbcType=LONGVARCHAR},
#{description,jdbcType=LONGVARCHAR})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.distribution.SupplierItem"
>
...
...
@@ -264,8 +264,8 @@
<if
test=
"creatorId != null"
>
creator_id,
</if>
<if
test=
"stat
e
!= null"
>
`stat
e
`,
<if
test=
"stat
us
!= null"
>
`stat
us
`,
</if>
<if
test=
"images != null"
>
images,
...
...
@@ -323,8 +323,8 @@
<if
test=
"creatorId != null"
>
#{creatorId,jdbcType=BIGINT},
</if>
<if
test=
"stat
e
!= null"
>
#{stat
e
,jdbcType=INTEGER},
<if
test=
"stat
us
!= null"
>
#{stat
us
,jdbcType=INTEGER},
</if>
<if
test=
"images != null"
>
#{images,jdbcType=LONGVARCHAR},
...
...
@@ -394,8 +394,8 @@
<if
test=
"record.creatorId != null"
>
creator_id = #{record.creatorId,jdbcType=BIGINT},
</if>
<if
test=
"record.stat
e
!= null"
>
`stat
e` = #{record.state
,jdbcType=INTEGER},
<if
test=
"record.stat
us
!= null"
>
`stat
us` = #{record.status
,jdbcType=INTEGER},
</if>
<if
test=
"record.images != null"
>
images = #{record.images,jdbcType=LONGVARCHAR},
...
...
@@ -429,7 +429,7 @@
`type` = #{record.type,jdbcType=INTEGER},
rebate = #{record.rebate,jdbcType=DECIMAL},
creator_id = #{record.creatorId,jdbcType=BIGINT},
`stat
e` = #{record.state
,jdbcType=INTEGER},
`stat
us` = #{record.status
,jdbcType=INTEGER},
images = #{record.images,jdbcType=LONGVARCHAR},
videos = #{record.videos,jdbcType=LONGVARCHAR},
description = #{record.description,jdbcType=LONGVARCHAR}
...
...
@@ -455,7 +455,7 @@
`type` = #{record.type,jdbcType=INTEGER},
rebate = #{record.rebate,jdbcType=DECIMAL},
creator_id = #{record.creatorId,jdbcType=BIGINT},
`stat
e` = #{record.state
,jdbcType=INTEGER}
`stat
us` = #{record.status
,jdbcType=INTEGER}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
...
...
@@ -508,8 +508,8 @@
<if
test=
"creatorId != null"
>
creator_id = #{creatorId,jdbcType=BIGINT},
</if>
<if
test=
"stat
e
!= null"
>
`stat
e` = #{state
,jdbcType=INTEGER},
<if
test=
"stat
us
!= null"
>
`stat
us` = #{status
,jdbcType=INTEGER},
</if>
<if
test=
"images != null"
>
images = #{images,jdbcType=LONGVARCHAR},
...
...
@@ -540,7 +540,7 @@
`type` = #{type,jdbcType=INTEGER},
rebate = #{rebate,jdbcType=DECIMAL},
creator_id = #{creatorId,jdbcType=BIGINT},
`stat
e` = #{state
,jdbcType=INTEGER},
`stat
us` = #{status
,jdbcType=INTEGER},
images = #{images,jdbcType=LONGVARCHAR},
videos = #{videos,jdbcType=LONGVARCHAR},
description = #{description,jdbcType=LONGVARCHAR}
...
...
@@ -563,7 +563,7 @@
`type` = #{type,jdbcType=INTEGER},
rebate = #{rebate,jdbcType=DECIMAL},
creator_id = #{creatorId,jdbcType=BIGINT},
`stat
e` = #{state
,jdbcType=INTEGER}
`stat
us` = #{status
,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
</update>
<select
id=
"selectOneByExample"
parameterType=
"com.wwdz.ch.db.domain.distribution.SupplierItemExample"
resultMap=
"BaseResultMap"
>
...
...
@@ -621,7 +621,7 @@
<otherwise>
id, `name`, supplier_id, is_on_sale, sort, top_image, distribution_price, supply_price,
stock, create_time, update_time, is_deleted, buy_limit_num, `type`, rebate, creator_id,
`stat
e
`, images, videos, description
`stat
us
`, images, videos, description
</otherwise>
</choose>
from supplier_item
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/UserServiceImpl.java
View file @
c4b974a4
...
...
@@ -204,6 +204,7 @@ public class UserServiceImpl implements UserService {
ShopWhiteList
shopWhiteList
=
shopWhiteListDao
.
findByUserId
(
dto
.
getUserId
());
result
.
put
(
"isShop"
,
true
);
result
.
put
(
"shopId"
,
shopWhiteList
.
getShopId
()
==
null
?
dto
.
getUserId
()
:
shopWhiteList
.
getShopId
());
}
else
{
try
{
CloudServerResponse
<
ShopDTO
>
cloudServerResponse
=
shopReadService
.
getShopByUserId
(
dto
.
getUserId
(),
new
ShopQueryOption
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment