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
2b3a4045
Commit
2b3a4045
authored
Mar 20, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上传藏品
parent
37d1cf30
Changes
48
Show whitespace changes
Inline
Side-by-side
Showing
48 changed files
with
5175 additions
and
63 deletions
+5175
-63
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/SysSupplierItemServiceImpl.java
...va/com/wwdz/ch/admin/impl/SysSupplierItemServiceImpl.java
+7
-0
ch-core/src/main/java/com/wwdz/ch/core/consts/CommConsts.java
...ore/src/main/java/com/wwdz/ch/core/consts/CommConsts.java
+3
-0
ch-core/src/main/java/com/wwdz/ch/core/consts/DistributionEnum.java
...c/main/java/com/wwdz/ch/core/consts/DistributionEnum.java
+1
-0
ch-core/src/main/java/com/wwdz/ch/core/entity/SupplierItemVo.java
...src/main/java/com/wwdz/ch/core/entity/SupplierItemVo.java
+31
-2
ch-core/src/main/java/com/wwdz/ch/core/util/PriceUtil.java
ch-core/src/main/java/com/wwdz/ch/core/util/PriceUtil.java
+2
-4
ch-dao/src/main/java/com/wwdz/ch/db/dao/distribution/CollectionBookDao.java
...va/com/wwdz/ch/db/dao/distribution/CollectionBookDao.java
+31
-0
ch-dao/src/main/java/com/wwdz/ch/db/dao/distribution/CollectionItemsRelationDao.java
...dz/ch/db/dao/distribution/CollectionItemsRelationDao.java
+35
-0
ch-dao/src/main/java/com/wwdz/ch/db/dao/distribution/DistributorShareRecordDao.java
...wdz/ch/db/dao/distribution/DistributorShareRecordDao.java
+29
-0
ch-dao/src/main/java/com/wwdz/ch/db/dao/distribution/UserRecentBrowseDao.java
.../com/wwdz/ch/db/dao/distribution/UserRecentBrowseDao.java
+9
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/CollectionBook.java
...va/com/wwdz/ch/db/domain/distribution/CollectionBook.java
+284
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/CollectionBookExample.java
...wwdz/ch/db/domain/distribution/CollectionBookExample.java
+1237
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/CollectionItemsRelation.java
...dz/ch/db/domain/distribution/CollectionItemsRelation.java
+287
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/CollectionItemsRelationExample.java
...b/domain/distribution/CollectionItemsRelationExample.java
+1227
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/SupplierItem.java
...java/com/wwdz/ch/db/domain/distribution/SupplierItem.java
+21
-2
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/SupplierItemExample.java
...m/wwdz/ch/db/domain/distribution/SupplierItemExample.java
+265
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/UserRecentBrowse.java
.../com/wwdz/ch/db/domain/distribution/UserRecentBrowse.java
+4
-5
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/distribution/CollectionBookRequestDto.java
...db/dto/request/distribution/CollectionBookRequestDto.java
+53
-0
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/distribution/CollectionItemsRelationRequestDto.java
...quest/distribution/CollectionItemsRelationRequestDto.java
+53
-0
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/distribution/DistributorShareRecordRequestDto.java
...equest/distribution/DistributorShareRecordRequestDto.java
+16
-0
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/distribution/SupplierItemRequestDto.java
...h/db/dto/request/distribution/SupplierItemRequestDto.java
+14
-0
ch-dao/src/main/java/com/wwdz/ch/db/impl/distribution/CollectionBookDaoImpl.java
...m/wwdz/ch/db/impl/distribution/CollectionBookDaoImpl.java
+57
-0
ch-dao/src/main/java/com/wwdz/ch/db/impl/distribution/CollectionItemsRelationDaoImpl.java
.../db/impl/distribution/CollectionItemsRelationDaoImpl.java
+62
-0
ch-dao/src/main/java/com/wwdz/ch/db/impl/distribution/DistributorShareRecordDaoImpl.java
...h/db/impl/distribution/DistributorShareRecordDaoImpl.java
+47
-0
ch-dao/src/main/java/com/wwdz/ch/db/impl/distribution/UserRecentBrowseDaoImpl.java
...wwdz/ch/db/impl/distribution/UserRecentBrowseDaoImpl.java
+9
-0
ch-dao/src/main/java/com/wwdz/ch/db/mapper/distribution/CollectionBookMapper.java
.../wwdz/ch/db/mapper/distribution/CollectionBookMapper.java
+70
-0
ch-dao/src/main/java/com/wwdz/ch/db/mapper/distribution/CollectionItemsRelationMapper.java
...db/mapper/distribution/CollectionItemsRelationMapper.java
+69
-0
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/distribution/CollectionBookMapper.xml
...m/wwdz/ch/db/mapper/distribution/CollectionBookMapper.xml
+338
-0
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/distribution/CollectionItemsRelationMapper.xml
.../db/mapper/distribution/CollectionItemsRelationMapper.xml
+338
-0
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/distribution/SupplierItemMapper.xml
...com/wwdz/ch/db/mapper/distribution/SupplierItemMapper.xml
+49
-13
ch-dao/src/main/resources/generatorConfig_new.xml
ch-dao/src/main/resources/generatorConfig_new.xml
+1
-1
ch-wx-api/pom.xml
ch-wx-api/pom.xml
+5
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/config/WebMvcConfiguration.java
.../main/java/com/wwdz/ch/wx/config/WebMvcConfiguration.java
+1
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/entity/vo/distribution/CollectionBookVo.java
...m/wwdz/ch/wx/entity/vo/distribution/CollectionBookVo.java
+8
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/entity/vo/distribution/DistributorShareRecordVo.java
...h/wx/entity/vo/distribution/DistributorShareRecordVo.java
+66
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/ItemServiceImpl.java
...pi/src/main/java/com/wwdz/ch/wx/impl/ItemServiceImpl.java
+0
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/CollectionBookServiceImpl.java
...dz/ch/wx/impl/distribution/CollectionBookServiceImpl.java
+72
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/CollectionItemsRelationServiceImpl.java
...impl/distribution/CollectionItemsRelationServiceImpl.java
+50
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/DistributionOrderServiceImpl.java
...ch/wx/impl/distribution/DistributionOrderServiceImpl.java
+4
-5
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/DistributorShareRecordServiceImpl.java
.../impl/distribution/DistributorShareRecordServiceImpl.java
+65
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SelfPageServiceImpl.java
...com/wwdz/ch/wx/impl/distribution/SelfPageServiceImpl.java
+18
-3
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
...wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
+107
-25
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/distribution/CollectionBookService.java
...wdz/ch/wx/service/distribution/CollectionBookService.java
+30
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/distribution/CollectionItemsRelationService.java
.../service/distribution/CollectionItemsRelationService.java
+15
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/distribution/DistributorShareRecordService.java
...x/service/distribution/DistributorShareRecordService.java
+18
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/distribution/SelfPageService.java
.../com/wwdz/ch/wx/service/distribution/SelfPageService.java
+9
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/distribution/SupplierItemService.java
.../wwdz/ch/wx/service/distribution/SupplierItemService.java
+15
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/distribution/DistributorShareRecordController.java
...wx/web/distribution/DistributorShareRecordController.java
+29
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/distribution/SelfPageController.java
...a/com/wwdz/ch/wx/web/distribution/SelfPageController.java
+14
-0
No files found.
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/SysSupplierItemServiceImpl.java
View file @
2b3a4045
...
...
@@ -2,6 +2,7 @@ package com.wwdz.ch.admin.impl;
import
com.github.pagehelper.PageInfo
;
import
com.wwdz.ch.admin.service.SysSupplierItemService
;
import
com.wwdz.ch.core.consts.CommConsts
;
import
com.wwdz.ch.core.consts.DistributionEnum
;
import
com.wwdz.ch.core.entity.SupplierItemVo
;
import
com.wwdz.ch.core.type.PageSearchResult
;
...
...
@@ -25,6 +26,7 @@ import org.springframework.transaction.annotation.Transactional;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
org.springframework.util.CollectionUtils
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -76,6 +78,7 @@ public class SysSupplierItemServiceImpl implements SysSupplierItemService {
}
else
{
supplierItem
.
setSupplyPrice
(
0L
);
}
supplierItem
.
setRebate
(
new
BigDecimal
(
dto
.
getRebate
()));
supplierItem
.
setImages
(
dto
.
getImages
());
supplierItem
.
setVideos
(
dto
.
getVideos
());
supplierItem
.
setSort
(
1
);
...
...
@@ -83,6 +86,8 @@ public class SysSupplierItemServiceImpl implements SysSupplierItemService {
supplierItem
.
setUpdateTime
(
now
);
supplierItem
.
setIsOnSale
(
true
);
supplierItem
.
setIsDeleted
(
false
);
//平台上传商品使用系统默认账号
supplierItem
.
setUserId
(
CommConsts
.
SYSTEM_ACCOUNT
);
long
itemId
=
supplierItemDao
.
insert
(
supplierItem
);
//竞拍商品,维护竞拍配置
if
(
dto
.
getType
()
==
DistributionEnum
.
DistributionTypeEnum
.
AUCTION
.
getCode
())
{
...
...
@@ -152,6 +157,7 @@ public class SysSupplierItemServiceImpl implements SysSupplierItemService {
if
(
supplierItem
.
getBuyLimitNum
()
==
-
1
)
{
supplierItemVo
.
setIsLimitBuy
(
false
);
}
supplierItemVo
.
setRebate
(
supplierItem
.
getRebate
().
toPlainString
());
supplierItemVo
.
setSupplyPrice
(
PriceUtil
.
convertPriceFenToYuan
(
supplierItem
.
getSupplyPrice
()));
supplierItemVo
.
setDistributionPrice
(
PriceUtil
.
convertPriceFenToYuan
(
supplierItem
.
getDistributionPrice
()));
supplierItemVo
.
setHomePageImage
(
MediaUtil
.
getHomePageImage
(
supplierItem
.
getImages
(),
supplierItem
.
getVideos
()));
...
...
@@ -206,6 +212,7 @@ public class SysSupplierItemServiceImpl implements SysSupplierItemService {
}
SupplierItem
supplierItem
=
new
SupplierItem
();
EntityMapper
.
copyAttribute
(
dto
,
supplierItem
);
supplierItem
.
setRebate
(
new
BigDecimal
(
dto
.
getRebate
()));
supplierItem
.
setDistributionPrice
(
PriceUtil
.
convertPriceFromStr
(
dto
.
getDistributionPrice
()));
if
(
StringUtils
.
hasLength
(
dto
.
getSupplyPrice
()))
{
supplierItem
.
setSupplyPrice
(
PriceUtil
.
convertPriceFromStr
(
dto
.
getSupplyPrice
()));
...
...
ch-core/src/main/java/com/wwdz/ch/core/consts/CommConsts.java
View file @
2b3a4045
...
...
@@ -38,5 +38,8 @@ public interface CommConsts {
public
static
final
String
AUCTION_LOCK_KEY_PRE
=
"AUCTION:OFFER:"
;
public
static
final
Long
SYSTEM_ACCOUNT
=
8888888888L
;
}
ch-core/src/main/java/com/wwdz/ch/core/consts/DistributionEnum.java
View file @
2b3a4045
...
...
@@ -89,6 +89,7 @@ public class DistributionEnum {
public
enum
DistributionTypeEnum
{
FIXED_PRICE
(
1
,
"一口价"
),
AUCTION
(
2
,
"竞拍"
),
COLLECT
(
3
,
"藏品"
),
;
private
int
code
;
...
...
ch-core/src/main/java/com/wwdz/ch/core/entity/SupplierItemVo.java
View file @
2b3a4045
...
...
@@ -106,6 +106,11 @@ public class SupplierItemVo implements Entity {
*/
private
Long
selledNum
;
/**
* 返佣比例
*/
private
String
rebate
;
/**
* 是否限购
*/
...
...
@@ -137,6 +142,11 @@ public class SupplierItemVo implements Entity {
*/
private
Date
auctionEndTime
;
/**
* 实际竞拍结束时间
*/
private
Date
realEndTime
;
/**
* 起拍价
* 单位元 需要转为分
...
...
@@ -150,9 +160,22 @@ public class SupplierItemVo implements Entity {
private
String
addExtent
;
/**
*
实际竞拍结束时间
*
竞拍商品的状态
*/
private
Date
realEndTime
;
private
Integer
state
;
/**
* 状态
*/
private
String
stateName
;
/**
* 用户的状态
* 出价、已领先、立即支付、竞拍结束
*/
private
Integer
userState
;
private
String
userStateName
;
/**
* 是否可编辑
...
...
@@ -165,4 +188,10 @@ public class SupplierItemVo implements Entity {
*/
private
String
currentPrice
;
/**
* 预计佣金
*/
private
String
rebateAmount
;
}
ch-core/src/main/java/com/wwdz/ch/core/util/PriceUtil.java
View file @
2b3a4045
...
...
@@ -35,10 +35,8 @@ public class PriceUtil {
}
public
static
String
convertDoubleToString
(
Double
price
){
BigDecimal
bigDecimal
=
new
BigDecimal
(
String
.
valueOf
(
price
/
100
));
DecimalFormat
df
=
new
DecimalFormat
(
"#0.00"
);
String
str
=
df
.
format
(
bigDecimal
);
return
new
BigDecimal
(
str
).
stripTrailingZeros
().
toPlainString
();
BigDecimal
bigDecimal
=
new
BigDecimal
(
String
.
valueOf
(
price
/
100
)).
setScale
(
2
,
BigDecimal
.
ROUND_DOWN
);
return
bigDecimal
.
stripTrailingZeros
().
toPlainString
();
}
...
...
ch-dao/src/main/java/com/wwdz/ch/db/dao/distribution/CollectionBookDao.java
0 → 100644
View file @
2b3a4045
package
com.wwdz.ch.db.dao.distribution
;
import
com.wwdz.ch.db.domain.distribution.CollectionBook
;
import
com.wwdz.ch.db.dto.request.distribution.CollectionBookRequestDto
;
import
java.util.List
;
public
interface
CollectionBookDao
{
/**
* 插入新记录
*
* @param collectionBook
* @return
*/
int
insert
(
CollectionBook
collectionBook
);
/**
* 查询记录
* @param dto
* @return
*/
List
<
CollectionBook
>
find
(
CollectionBookRequestDto
dto
);
List
<
CollectionBook
>
findByUserId
(
long
userId
);
int
delete
(
long
id
);
}
ch-dao/src/main/java/com/wwdz/ch/db/dao/distribution/CollectionItemsRelationDao.java
0 → 100644
View file @
2b3a4045
package
com.wwdz.ch.db.dao.distribution
;
import
com.wwdz.ch.db.domain.distribution.CollectionItemsRelation
;
import
com.wwdz.ch.db.dto.request.distribution.CollectionItemsRelationRequestDto
;
import
java.util.List
;
public
interface
CollectionItemsRelationDao
{
/**
* 插入新记录
*
* @param collectionItemsRelation
* @return
*/
int
insert
(
CollectionItemsRelation
collectionItemsRelation
);
/**
* 查询记录
* @param dto
* @return
*/
List
<
CollectionItemsRelation
>
find
(
CollectionItemsRelationRequestDto
dto
);
/**
*
* @param itemId
* @return
*/
List
<
CollectionItemsRelation
>
findByItemId
(
long
itemId
);
boolean
isExisted
(
long
bookId
,
long
itemId
);
int
delete
(
CollectionItemsRelationRequestDto
dto
);
}
ch-dao/src/main/java/com/wwdz/ch/db/dao/distribution/DistributorShareRecordDao.java
View file @
2b3a4045
...
...
@@ -25,6 +25,14 @@ public interface DistributorShareRecordDao {
DistributorShareRecord
findById
(
String
shareId
);
/**
* 查询列表
* @param dto
* @return
*/
List
<
DistributorShareRecord
>
find
(
DistributorShareRecordRequestDto
dto
);
/**
* 查询最高价格的分享记录
* @param dto
...
...
@@ -39,4 +47,25 @@ public interface DistributorShareRecordDao {
*/
int
updateDisEnabled
(
long
itemId
);
/**
* 删除分销商关于该商品的分销链接
* @param distributorId, itemId
* @return
*/
int
updateDisEnabledForDistributor
(
long
distributorId
,
long
itemId
);
/**
* 根据分销商id查询分享记录
*/
List
<
DistributorShareRecord
>
findByDistributorId
(
DistributorShareRecordRequestDto
dto
);
/**
* 查询分销商是否已经分销过该商品
* @param distributorId
* @param itemId
* @return
*
*/
DistributorShareRecord
findItemShareRecordByDistributorId
(
long
distributorId
,
long
itemId
);
}
ch-dao/src/main/java/com/wwdz/ch/db/dao/distribution/UserRecentBrowseDao.java
View file @
2b3a4045
...
...
@@ -18,6 +18,15 @@ public interface UserRecentBrowseDao {
*/
UserRecentBrowse
findByUserId
(
long
userId
);
/**
* 根据用户id查询最近浏览的记录
* @param userId, distributorId
* @return
*/
boolean
isExisted
(
long
userId
,
long
distributorId
);
/**
* 插入新记录
* @param userRecentBrowse
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/CollectionBook.java
0 → 100644
View file @
2b3a4045
package
com.wwdz.ch.db.domain.distribution
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
com.xxdxxs.entity.Entity
;
import
lombok.Data
;
/**
* @author shiyu
* @date 2024/03/20
*/
@Data
public
class
CollectionBook
implements
Entity
{
private
Long
id
;
/**
* 用户id
*/
private
Long
userId
;
/**
* 标题
*/
private
String
title
;
/**
* 排序
*/
private
Integer
sort
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
/**
* 逻辑删除
*/
private
Boolean
isDeleted
;
private
static
final
long
serialVersionUID
=
1L
;
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
getClass
().
getSimpleName
());
sb
.
append
(
" ["
);
sb
.
append
(
"Hash = "
).
append
(
hashCode
());
sb
.
append
(
", id="
).
append
(
id
);
sb
.
append
(
", userId="
).
append
(
userId
);
sb
.
append
(
", title="
).
append
(
title
);
sb
.
append
(
", sort="
).
append
(
sort
);
sb
.
append
(
", createTime="
).
append
(
createTime
);
sb
.
append
(
", updateTime="
).
append
(
updateTime
);
sb
.
append
(
", isDeleted="
).
append
(
isDeleted
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
}
@Override
public
boolean
equals
(
Object
that
)
{
if
(
this
==
that
)
{
return
true
;
}
if
(
that
==
null
)
{
return
false
;
}
if
(
getClass
()
!=
that
.
getClass
())
{
return
false
;
}
CollectionBook
other
=
(
CollectionBook
)
that
;
return
(
this
.
getId
()
==
null
?
other
.
getId
()
==
null
:
this
.
getId
().
equals
(
other
.
getId
()))
&&
(
this
.
getUserId
()
==
null
?
other
.
getUserId
()
==
null
:
this
.
getUserId
().
equals
(
other
.
getUserId
()))
&&
(
this
.
getTitle
()
==
null
?
other
.
getTitle
()
==
null
:
this
.
getTitle
().
equals
(
other
.
getTitle
()))
&&
(
this
.
getSort
()
==
null
?
other
.
getSort
()
==
null
:
this
.
getSort
().
equals
(
other
.
getSort
()))
&&
(
this
.
getCreateTime
()
==
null
?
other
.
getCreateTime
()
==
null
:
this
.
getCreateTime
().
equals
(
other
.
getCreateTime
()))
&&
(
this
.
getUpdateTime
()
==
null
?
other
.
getUpdateTime
()
==
null
:
this
.
getUpdateTime
().
equals
(
other
.
getUpdateTime
()))
&&
(
this
.
getIsDeleted
()
==
null
?
other
.
getIsDeleted
()
==
null
:
this
.
getIsDeleted
().
equals
(
other
.
getIsDeleted
()));
}
@Override
public
int
hashCode
()
{
final
int
prime
=
31
;
int
result
=
1
;
result
=
prime
*
result
+
((
getId
()
==
null
)
?
0
:
getId
().
hashCode
());
result
=
prime
*
result
+
((
getUserId
()
==
null
)
?
0
:
getUserId
().
hashCode
());
result
=
prime
*
result
+
((
getTitle
()
==
null
)
?
0
:
getTitle
().
hashCode
());
result
=
prime
*
result
+
((
getSort
()
==
null
)
?
0
:
getSort
().
hashCode
());
result
=
prime
*
result
+
((
getCreateTime
()
==
null
)
?
0
:
getCreateTime
().
hashCode
());
result
=
prime
*
result
+
((
getUpdateTime
()
==
null
)
?
0
:
getUpdateTime
().
hashCode
());
result
=
prime
*
result
+
((
getIsDeleted
()
==
null
)
?
0
:
getIsDeleted
().
hashCode
());
return
result
;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
enum
Column
{
id
(
"id"
,
"id"
,
"BIGINT"
,
false
),
userId
(
"user_id"
,
"userId"
,
"BIGINT"
,
false
),
title
(
"title"
,
"title"
,
"VARCHAR"
,
false
),
sort
(
"sort"
,
"sort"
,
"INTEGER"
,
false
),
createTime
(
"create_time"
,
"createTime"
,
"TIMESTAMP"
,
false
),
updateTime
(
"update_time"
,
"updateTime"
,
"TIMESTAMP"
,
false
),
isDeleted
(
"is_deleted"
,
"isDeleted"
,
"BIT"
,
false
);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
static
final
String
BEGINNING_DELIMITER
=
"`"
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
static
final
String
ENDING_DELIMITER
=
"`"
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
column
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
boolean
isColumnNameDelimited
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
javaProperty
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
jdbcType
;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
value
()
{
return
this
.
column
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getValue
()
{
return
this
.
column
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getJavaProperty
()
{
return
this
.
javaProperty
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getJdbcType
()
{
return
this
.
jdbcType
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Column
(
String
column
,
String
javaProperty
,
String
jdbcType
,
boolean
isColumnNameDelimited
)
{
this
.
column
=
column
;
this
.
javaProperty
=
javaProperty
;
this
.
jdbcType
=
jdbcType
;
this
.
isColumnNameDelimited
=
isColumnNameDelimited
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
desc
()
{
return
this
.
getEscapedColumnName
()
+
" DESC"
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
asc
()
{
return
this
.
getEscapedColumnName
()
+
" ASC"
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
static
Column
[]
excludes
(
Column
...
excludes
)
{
ArrayList
<
Column
>
columns
=
new
ArrayList
<>(
Arrays
.
asList
(
Column
.
values
()));
if
(
excludes
!=
null
&&
excludes
.
length
>
0
)
{
columns
.
removeAll
(
new
ArrayList
<>(
Arrays
.
asList
(
excludes
)));
}
return
columns
.
toArray
(
new
Column
[]{});
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getEscapedColumnName
()
{
if
(
this
.
isColumnNameDelimited
)
{
return
new
StringBuilder
().
append
(
BEGINNING_DELIMITER
).
append
(
this
.
column
).
append
(
ENDING_DELIMITER
).
toString
();
}
else
{
return
this
.
column
;
}
}
}
}
\ No newline at end of file
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/CollectionBookExample.java
0 → 100644
View file @
2b3a4045
package
com.wwdz.ch.db.domain.distribution
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
public
class
CollectionBookExample
{
protected
String
orderByClause
;
protected
boolean
distinct
;
protected
List
<
Criteria
>
oredCriteria
;
public
CollectionBookExample
()
{
oredCriteria
=
new
ArrayList
<
Criteria
>();
}
public
void
setOrderByClause
(
String
orderByClause
)
{
this
.
orderByClause
=
orderByClause
;
}
public
String
getOrderByClause
()
{
return
orderByClause
;
}
public
void
setDistinct
(
boolean
distinct
)
{
this
.
distinct
=
distinct
;
}
public
boolean
isDistinct
()
{
return
distinct
;
}
public
List
<
Criteria
>
getOredCriteria
()
{
return
oredCriteria
;
}
public
void
or
(
Criteria
criteria
)
{
oredCriteria
.
add
(
criteria
);
}
public
Criteria
or
()
{
Criteria
criteria
=
createCriteriaInternal
();
oredCriteria
.
add
(
criteria
);
return
criteria
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
CollectionBookExample
orderBy
(
String
orderByClause
)
{
this
.
setOrderByClause
(
orderByClause
);
return
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
CollectionBookExample
orderBy
(
String
...
orderByClauses
)
{
StringBuffer
sb
=
new
StringBuffer
();
for
(
int
i
=
0
;
i
<
orderByClauses
.
length
;
i
++)
{
sb
.
append
(
orderByClauses
[
i
]);
if
(
i
<
orderByClauses
.
length
-
1
)
{
sb
.
append
(
" , "
);
}
}
this
.
setOrderByClause
(
sb
.
toString
());
return
this
;
}
public
Criteria
createCriteria
()
{
Criteria
criteria
=
createCriteriaInternal
();
if
(
oredCriteria
.
size
()
==
0
)
{
oredCriteria
.
add
(
criteria
);
}
return
criteria
;
}
protected
Criteria
createCriteriaInternal
()
{
Criteria
criteria
=
new
Criteria
(
this
);
return
criteria
;
}
public
void
clear
()
{
oredCriteria
.
clear
();
orderByClause
=
null
;
distinct
=
false
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
static
Criteria
newAndCreateCriteria
()
{
CollectionBookExample
example
=
new
CollectionBookExample
();
return
example
.
createCriteria
();
}
protected
abstract
static
class
GeneratedCriteria
{
protected
List
<
Criterion
>
criteria
;
protected
GeneratedCriteria
()
{
super
();
criteria
=
new
ArrayList
<
Criterion
>();
}
public
boolean
isValid
()
{
return
criteria
.
size
()
>
0
;
}
public
List
<
Criterion
>
getAllCriteria
()
{
return
criteria
;
}
public
List
<
Criterion
>
getCriteria
()
{
return
criteria
;
}
protected
void
addCriterion
(
String
condition
)
{
if
(
condition
==
null
)
{
throw
new
RuntimeException
(
"Value for condition cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
));
}
protected
void
addCriterion
(
String
condition
,
Object
value
,
String
property
)
{
if
(
value
==
null
)
{
throw
new
RuntimeException
(
"Value for "
+
property
+
" cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
,
value
));
}
protected
void
addCriterion
(
String
condition
,
Object
value1
,
Object
value2
,
String
property
)
{
if
(
value1
==
null
||
value2
==
null
)
{
throw
new
RuntimeException
(
"Between values for "
+
property
+
" cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
,
value1
,
value2
));
}
public
Criteria
andIdIsNull
()
{
addCriterion
(
"id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdIsNotNull
()
{
addCriterion
(
"id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdEqualTo
(
Long
value
)
{
addCriterion
(
"id ="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdEqualToColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"id <>"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdNotEqualToColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThan
(
Long
value
)
{
addCriterion
(
"id >"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdGreaterThanColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"id >="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdGreaterThanOrEqualToColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThan
(
Long
value
)
{
addCriterion
(
"id <"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdLessThanColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"id <="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdLessThanOrEqualToColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"id in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"id not in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"id between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"id not between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdIsNull
()
{
addCriterion
(
"user_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdIsNotNull
()
{
addCriterion
(
"user_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdEqualTo
(
Long
value
)
{
addCriterion
(
"user_id ="
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdEqualToColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"user_id <>"
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdNotEqualToColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdGreaterThan
(
Long
value
)
{
addCriterion
(
"user_id >"
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdGreaterThanColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"user_id >="
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdGreaterThanOrEqualToColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdLessThan
(
Long
value
)
{
addCriterion
(
"user_id <"
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdLessThanColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"user_id <="
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdLessThanOrEqualToColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"user_id in"
,
values
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"user_id not in"
,
values
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"user_id between"
,
value1
,
value2
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"user_id not between"
,
value1
,
value2
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTitleIsNull
()
{
addCriterion
(
"title is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTitleIsNotNull
()
{
addCriterion
(
"title is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTitleEqualTo
(
String
value
)
{
addCriterion
(
"title ="
,
value
,
"title"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTitleEqualToColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"title = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTitleNotEqualTo
(
String
value
)
{
addCriterion
(
"title <>"
,
value
,
"title"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTitleNotEqualToColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"title <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTitleGreaterThan
(
String
value
)
{
addCriterion
(
"title >"
,
value
,
"title"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTitleGreaterThanColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"title > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTitleGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"title >="
,
value
,
"title"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTitleGreaterThanOrEqualToColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"title >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTitleLessThan
(
String
value
)
{
addCriterion
(
"title <"
,
value
,
"title"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTitleLessThanColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"title < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTitleLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"title <="
,
value
,
"title"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTitleLessThanOrEqualToColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"title <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTitleLike
(
String
value
)
{
addCriterion
(
"title like"
,
value
,
"title"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTitleNotLike
(
String
value
)
{
addCriterion
(
"title not like"
,
value
,
"title"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTitleIn
(
List
<
String
>
values
)
{
addCriterion
(
"title in"
,
values
,
"title"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTitleNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"title not in"
,
values
,
"title"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTitleBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"title between"
,
value1
,
value2
,
"title"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTitleNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"title not between"
,
value1
,
value2
,
"title"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSortIsNull
()
{
addCriterion
(
"sort is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSortIsNotNull
()
{
addCriterion
(
"sort is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSortEqualTo
(
Integer
value
)
{
addCriterion
(
"sort ="
,
value
,
"sort"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSortEqualToColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"sort = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSortNotEqualTo
(
Integer
value
)
{
addCriterion
(
"sort <>"
,
value
,
"sort"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSortNotEqualToColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"sort <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSortGreaterThan
(
Integer
value
)
{
addCriterion
(
"sort >"
,
value
,
"sort"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSortGreaterThanColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"sort > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSortGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"sort >="
,
value
,
"sort"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSortGreaterThanOrEqualToColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"sort >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSortLessThan
(
Integer
value
)
{
addCriterion
(
"sort <"
,
value
,
"sort"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSortLessThanColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"sort < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSortLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"sort <="
,
value
,
"sort"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSortLessThanOrEqualToColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"sort <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSortIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"sort in"
,
values
,
"sort"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSortNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"sort not in"
,
values
,
"sort"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSortBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"sort between"
,
value1
,
value2
,
"sort"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSortNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"sort not between"
,
value1
,
value2
,
"sort"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIsNull
()
{
addCriterion
(
"create_time is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIsNotNull
()
{
addCriterion
(
"create_time is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeEqualTo
(
Date
value
)
{
addCriterion
(
"create_time ="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeEqualToColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"create_time = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotEqualTo
(
Date
value
)
{
addCriterion
(
"create_time <>"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeNotEqualToColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"create_time <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeGreaterThan
(
Date
value
)
{
addCriterion
(
"create_time >"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeGreaterThanColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"create_time > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeGreaterThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"create_time >="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeGreaterThanOrEqualToColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"create_time >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeLessThan
(
Date
value
)
{
addCriterion
(
"create_time <"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeLessThanColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"create_time < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeLessThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"create_time <="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeLessThanOrEqualToColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"create_time <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIn
(
List
<
Date
>
values
)
{
addCriterion
(
"create_time in"
,
values
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotIn
(
List
<
Date
>
values
)
{
addCriterion
(
"create_time not in"
,
values
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"create_time between"
,
value1
,
value2
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"create_time not between"
,
value1
,
value2
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeIsNull
()
{
addCriterion
(
"update_time is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeIsNotNull
()
{
addCriterion
(
"update_time is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeEqualTo
(
Date
value
)
{
addCriterion
(
"update_time ="
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeEqualToColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"update_time = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeNotEqualTo
(
Date
value
)
{
addCriterion
(
"update_time <>"
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeNotEqualToColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"update_time <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeGreaterThan
(
Date
value
)
{
addCriterion
(
"update_time >"
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeGreaterThanColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"update_time > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeGreaterThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"update_time >="
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeGreaterThanOrEqualToColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"update_time >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeLessThan
(
Date
value
)
{
addCriterion
(
"update_time <"
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeLessThanColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"update_time < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeLessThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"update_time <="
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeLessThanOrEqualToColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"update_time <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeIn
(
List
<
Date
>
values
)
{
addCriterion
(
"update_time in"
,
values
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeNotIn
(
List
<
Date
>
values
)
{
addCriterion
(
"update_time not in"
,
values
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"update_time between"
,
value1
,
value2
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeNotBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"update_time not between"
,
value1
,
value2
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsDeletedIsNull
()
{
addCriterion
(
"is_deleted is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsDeletedIsNotNull
()
{
addCriterion
(
"is_deleted is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsDeletedEqualTo
(
Boolean
value
)
{
addCriterion
(
"is_deleted ="
,
value
,
"isDeleted"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIsDeletedEqualToColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"is_deleted = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIsDeletedNotEqualTo
(
Boolean
value
)
{
addCriterion
(
"is_deleted <>"
,
value
,
"isDeleted"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIsDeletedNotEqualToColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"is_deleted <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIsDeletedGreaterThan
(
Boolean
value
)
{
addCriterion
(
"is_deleted >"
,
value
,
"isDeleted"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIsDeletedGreaterThanColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"is_deleted > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIsDeletedGreaterThanOrEqualTo
(
Boolean
value
)
{
addCriterion
(
"is_deleted >="
,
value
,
"isDeleted"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIsDeletedGreaterThanOrEqualToColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"is_deleted >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIsDeletedLessThan
(
Boolean
value
)
{
addCriterion
(
"is_deleted <"
,
value
,
"isDeleted"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIsDeletedLessThanColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"is_deleted < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIsDeletedLessThanOrEqualTo
(
Boolean
value
)
{
addCriterion
(
"is_deleted <="
,
value
,
"isDeleted"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIsDeletedLessThanOrEqualToColumn
(
CollectionBook
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"is_deleted <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIsDeletedIn
(
List
<
Boolean
>
values
)
{
addCriterion
(
"is_deleted in"
,
values
,
"isDeleted"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsDeletedNotIn
(
List
<
Boolean
>
values
)
{
addCriterion
(
"is_deleted not in"
,
values
,
"isDeleted"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsDeletedBetween
(
Boolean
value1
,
Boolean
value2
)
{
addCriterion
(
"is_deleted between"
,
value1
,
value2
,
"isDeleted"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsDeletedNotBetween
(
Boolean
value1
,
Boolean
value2
)
{
addCriterion
(
"is_deleted not between"
,
value1
,
value2
,
"isDeleted"
);
return
(
Criteria
)
this
;
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
CollectionBookExample
example
;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
protected
Criteria
(
CollectionBookExample
example
)
{
super
();
this
.
example
=
example
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
CollectionBookExample
example
()
{
return
this
.
example
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIf
(
boolean
ifAdd
,
ICriteriaAdd
add
)
{
if
(
ifAdd
)
{
add
.
add
(
this
);
}
return
this
;
}
/**
* This interface was generated by MyBatis Generator.
* This interface corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
interface
ICriteriaAdd
{
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Criteria
add
(
Criteria
add
);
}
}
public
static
class
Criterion
{
private
String
condition
;
private
Object
value
;
private
Object
secondValue
;
private
boolean
noValue
;
private
boolean
singleValue
;
private
boolean
betweenValue
;
private
boolean
listValue
;
private
String
typeHandler
;
public
String
getCondition
()
{
return
condition
;
}
public
Object
getValue
()
{
return
value
;
}
public
Object
getSecondValue
()
{
return
secondValue
;
}
public
boolean
isNoValue
()
{
return
noValue
;
}
public
boolean
isSingleValue
()
{
return
singleValue
;
}
public
boolean
isBetweenValue
()
{
return
betweenValue
;
}
public
boolean
isListValue
()
{
return
listValue
;
}
public
String
getTypeHandler
()
{
return
typeHandler
;
}
protected
Criterion
(
String
condition
)
{
super
();
this
.
condition
=
condition
;
this
.
typeHandler
=
null
;
this
.
noValue
=
true
;
}
protected
Criterion
(
String
condition
,
Object
value
,
String
typeHandler
)
{
super
();
this
.
condition
=
condition
;
this
.
value
=
value
;
this
.
typeHandler
=
typeHandler
;
if
(
value
instanceof
List
<?>)
{
this
.
listValue
=
true
;
}
else
{
this
.
singleValue
=
true
;
}
}
protected
Criterion
(
String
condition
,
Object
value
)
{
this
(
condition
,
value
,
null
);
}
protected
Criterion
(
String
condition
,
Object
value
,
Object
secondValue
,
String
typeHandler
)
{
super
();
this
.
condition
=
condition
;
this
.
value
=
value
;
this
.
secondValue
=
secondValue
;
this
.
typeHandler
=
typeHandler
;
this
.
betweenValue
=
true
;
}
protected
Criterion
(
String
condition
,
Object
value
,
Object
secondValue
)
{
this
(
condition
,
value
,
secondValue
,
null
);
}
}
}
\ No newline at end of file
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/CollectionItemsRelation.java
0 → 100644
View file @
2b3a4045
package
com.wwdz.ch.db.domain.distribution
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
com.xxdxxs.entity.Entity
;
import
lombok.Data
;
/**
* @author shiyu
* @date 2024/03/20
*/
@Data
public
class
CollectionItemsRelation
implements
Entity
{
/**
* id
*/
private
Long
id
;
/**
* 收藏册id
*/
private
Long
collectionBookId
;
/**
* 用户id
*/
private
Long
userId
;
/**
* 商品id
*/
private
Long
itemId
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
/**
* 是否删除
*/
private
Boolean
isDeleted
;
private
static
final
long
serialVersionUID
=
1L
;
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
getClass
().
getSimpleName
());
sb
.
append
(
" ["
);
sb
.
append
(
"Hash = "
).
append
(
hashCode
());
sb
.
append
(
", id="
).
append
(
id
);
sb
.
append
(
", collectionBookId="
).
append
(
collectionBookId
);
sb
.
append
(
", userId="
).
append
(
userId
);
sb
.
append
(
", itemId="
).
append
(
itemId
);
sb
.
append
(
", createTime="
).
append
(
createTime
);
sb
.
append
(
", updateTime="
).
append
(
updateTime
);
sb
.
append
(
", isDeleted="
).
append
(
isDeleted
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
}
@Override
public
boolean
equals
(
Object
that
)
{
if
(
this
==
that
)
{
return
true
;
}
if
(
that
==
null
)
{
return
false
;
}
if
(
getClass
()
!=
that
.
getClass
())
{
return
false
;
}
CollectionItemsRelation
other
=
(
CollectionItemsRelation
)
that
;
return
(
this
.
getId
()
==
null
?
other
.
getId
()
==
null
:
this
.
getId
().
equals
(
other
.
getId
()))
&&
(
this
.
getCollectionBookId
()
==
null
?
other
.
getCollectionBookId
()
==
null
:
this
.
getCollectionBookId
().
equals
(
other
.
getCollectionBookId
()))
&&
(
this
.
getUserId
()
==
null
?
other
.
getUserId
()
==
null
:
this
.
getUserId
().
equals
(
other
.
getUserId
()))
&&
(
this
.
getItemId
()
==
null
?
other
.
getItemId
()
==
null
:
this
.
getItemId
().
equals
(
other
.
getItemId
()))
&&
(
this
.
getCreateTime
()
==
null
?
other
.
getCreateTime
()
==
null
:
this
.
getCreateTime
().
equals
(
other
.
getCreateTime
()))
&&
(
this
.
getUpdateTime
()
==
null
?
other
.
getUpdateTime
()
==
null
:
this
.
getUpdateTime
().
equals
(
other
.
getUpdateTime
()))
&&
(
this
.
getIsDeleted
()
==
null
?
other
.
getIsDeleted
()
==
null
:
this
.
getIsDeleted
().
equals
(
other
.
getIsDeleted
()));
}
@Override
public
int
hashCode
()
{
final
int
prime
=
31
;
int
result
=
1
;
result
=
prime
*
result
+
((
getId
()
==
null
)
?
0
:
getId
().
hashCode
());
result
=
prime
*
result
+
((
getCollectionBookId
()
==
null
)
?
0
:
getCollectionBookId
().
hashCode
());
result
=
prime
*
result
+
((
getUserId
()
==
null
)
?
0
:
getUserId
().
hashCode
());
result
=
prime
*
result
+
((
getItemId
()
==
null
)
?
0
:
getItemId
().
hashCode
());
result
=
prime
*
result
+
((
getCreateTime
()
==
null
)
?
0
:
getCreateTime
().
hashCode
());
result
=
prime
*
result
+
((
getUpdateTime
()
==
null
)
?
0
:
getUpdateTime
().
hashCode
());
result
=
prime
*
result
+
((
getIsDeleted
()
==
null
)
?
0
:
getIsDeleted
().
hashCode
());
return
result
;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
enum
Column
{
id
(
"id"
,
"id"
,
"BIGINT"
,
false
),
collectionBookId
(
"collection_book_id"
,
"collectionBookId"
,
"BIGINT"
,
false
),
userId
(
"user_id"
,
"userId"
,
"BIGINT"
,
false
),
itemId
(
"item_id"
,
"itemId"
,
"BIGINT"
,
false
),
createTime
(
"create_time"
,
"createTime"
,
"TIMESTAMP"
,
false
),
updateTime
(
"update_time"
,
"updateTime"
,
"TIMESTAMP"
,
false
),
isDeleted
(
"is_deleted"
,
"isDeleted"
,
"BIT"
,
false
);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
static
final
String
BEGINNING_DELIMITER
=
"`"
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
static
final
String
ENDING_DELIMITER
=
"`"
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
column
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
boolean
isColumnNameDelimited
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
javaProperty
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
jdbcType
;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
value
()
{
return
this
.
column
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getValue
()
{
return
this
.
column
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getJavaProperty
()
{
return
this
.
javaProperty
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getJdbcType
()
{
return
this
.
jdbcType
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Column
(
String
column
,
String
javaProperty
,
String
jdbcType
,
boolean
isColumnNameDelimited
)
{
this
.
column
=
column
;
this
.
javaProperty
=
javaProperty
;
this
.
jdbcType
=
jdbcType
;
this
.
isColumnNameDelimited
=
isColumnNameDelimited
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
desc
()
{
return
this
.
getEscapedColumnName
()
+
" DESC"
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
asc
()
{
return
this
.
getEscapedColumnName
()
+
" ASC"
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
static
Column
[]
excludes
(
Column
...
excludes
)
{
ArrayList
<
Column
>
columns
=
new
ArrayList
<>(
Arrays
.
asList
(
Column
.
values
()));
if
(
excludes
!=
null
&&
excludes
.
length
>
0
)
{
columns
.
removeAll
(
new
ArrayList
<>(
Arrays
.
asList
(
excludes
)));
}
return
columns
.
toArray
(
new
Column
[]{});
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getEscapedColumnName
()
{
if
(
this
.
isColumnNameDelimited
)
{
return
new
StringBuilder
().
append
(
BEGINNING_DELIMITER
).
append
(
this
.
column
).
append
(
ENDING_DELIMITER
).
toString
();
}
else
{
return
this
.
column
;
}
}
}
}
\ No newline at end of file
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/CollectionItemsRelationExample.java
0 → 100644
View file @
2b3a4045
package
com.wwdz.ch.db.domain.distribution
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
public
class
CollectionItemsRelationExample
{
protected
String
orderByClause
;
protected
boolean
distinct
;
protected
List
<
Criteria
>
oredCriteria
;
public
CollectionItemsRelationExample
()
{
oredCriteria
=
new
ArrayList
<
Criteria
>();
}
public
void
setOrderByClause
(
String
orderByClause
)
{
this
.
orderByClause
=
orderByClause
;
}
public
String
getOrderByClause
()
{
return
orderByClause
;
}
public
void
setDistinct
(
boolean
distinct
)
{
this
.
distinct
=
distinct
;
}
public
boolean
isDistinct
()
{
return
distinct
;
}
public
List
<
Criteria
>
getOredCriteria
()
{
return
oredCriteria
;
}
public
void
or
(
Criteria
criteria
)
{
oredCriteria
.
add
(
criteria
);
}
public
Criteria
or
()
{
Criteria
criteria
=
createCriteriaInternal
();
oredCriteria
.
add
(
criteria
);
return
criteria
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
CollectionItemsRelationExample
orderBy
(
String
orderByClause
)
{
this
.
setOrderByClause
(
orderByClause
);
return
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
CollectionItemsRelationExample
orderBy
(
String
...
orderByClauses
)
{
StringBuffer
sb
=
new
StringBuffer
();
for
(
int
i
=
0
;
i
<
orderByClauses
.
length
;
i
++)
{
sb
.
append
(
orderByClauses
[
i
]);
if
(
i
<
orderByClauses
.
length
-
1
)
{
sb
.
append
(
" , "
);
}
}
this
.
setOrderByClause
(
sb
.
toString
());
return
this
;
}
public
Criteria
createCriteria
()
{
Criteria
criteria
=
createCriteriaInternal
();
if
(
oredCriteria
.
size
()
==
0
)
{
oredCriteria
.
add
(
criteria
);
}
return
criteria
;
}
protected
Criteria
createCriteriaInternal
()
{
Criteria
criteria
=
new
Criteria
(
this
);
return
criteria
;
}
public
void
clear
()
{
oredCriteria
.
clear
();
orderByClause
=
null
;
distinct
=
false
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
static
Criteria
newAndCreateCriteria
()
{
CollectionItemsRelationExample
example
=
new
CollectionItemsRelationExample
();
return
example
.
createCriteria
();
}
protected
abstract
static
class
GeneratedCriteria
{
protected
List
<
Criterion
>
criteria
;
protected
GeneratedCriteria
()
{
super
();
criteria
=
new
ArrayList
<
Criterion
>();
}
public
boolean
isValid
()
{
return
criteria
.
size
()
>
0
;
}
public
List
<
Criterion
>
getAllCriteria
()
{
return
criteria
;
}
public
List
<
Criterion
>
getCriteria
()
{
return
criteria
;
}
protected
void
addCriterion
(
String
condition
)
{
if
(
condition
==
null
)
{
throw
new
RuntimeException
(
"Value for condition cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
));
}
protected
void
addCriterion
(
String
condition
,
Object
value
,
String
property
)
{
if
(
value
==
null
)
{
throw
new
RuntimeException
(
"Value for "
+
property
+
" cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
,
value
));
}
protected
void
addCriterion
(
String
condition
,
Object
value1
,
Object
value2
,
String
property
)
{
if
(
value1
==
null
||
value2
==
null
)
{
throw
new
RuntimeException
(
"Between values for "
+
property
+
" cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
,
value1
,
value2
));
}
public
Criteria
andIdIsNull
()
{
addCriterion
(
"id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdIsNotNull
()
{
addCriterion
(
"id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdEqualTo
(
Long
value
)
{
addCriterion
(
"id ="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdEqualToColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"id <>"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdNotEqualToColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThan
(
Long
value
)
{
addCriterion
(
"id >"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdGreaterThanColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"id >="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdGreaterThanOrEqualToColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThan
(
Long
value
)
{
addCriterion
(
"id <"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdLessThanColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"id <="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdLessThanOrEqualToColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"id in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"id not in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"id between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"id not between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCollectionBookIdIsNull
()
{
addCriterion
(
"collection_book_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCollectionBookIdIsNotNull
()
{
addCriterion
(
"collection_book_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCollectionBookIdEqualTo
(
Long
value
)
{
addCriterion
(
"collection_book_id ="
,
value
,
"collectionBookId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCollectionBookIdEqualToColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"collection_book_id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCollectionBookIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"collection_book_id <>"
,
value
,
"collectionBookId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCollectionBookIdNotEqualToColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"collection_book_id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCollectionBookIdGreaterThan
(
Long
value
)
{
addCriterion
(
"collection_book_id >"
,
value
,
"collectionBookId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCollectionBookIdGreaterThanColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"collection_book_id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCollectionBookIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"collection_book_id >="
,
value
,
"collectionBookId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCollectionBookIdGreaterThanOrEqualToColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"collection_book_id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCollectionBookIdLessThan
(
Long
value
)
{
addCriterion
(
"collection_book_id <"
,
value
,
"collectionBookId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCollectionBookIdLessThanColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"collection_book_id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCollectionBookIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"collection_book_id <="
,
value
,
"collectionBookId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCollectionBookIdLessThanOrEqualToColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"collection_book_id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCollectionBookIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"collection_book_id in"
,
values
,
"collectionBookId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCollectionBookIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"collection_book_id not in"
,
values
,
"collectionBookId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCollectionBookIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"collection_book_id between"
,
value1
,
value2
,
"collectionBookId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCollectionBookIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"collection_book_id not between"
,
value1
,
value2
,
"collectionBookId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdIsNull
()
{
addCriterion
(
"user_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdIsNotNull
()
{
addCriterion
(
"user_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdEqualTo
(
Long
value
)
{
addCriterion
(
"user_id ="
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdEqualToColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"user_id <>"
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdNotEqualToColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdGreaterThan
(
Long
value
)
{
addCriterion
(
"user_id >"
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdGreaterThanColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"user_id >="
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdGreaterThanOrEqualToColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdLessThan
(
Long
value
)
{
addCriterion
(
"user_id <"
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdLessThanColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"user_id <="
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdLessThanOrEqualToColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"user_id in"
,
values
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"user_id not in"
,
values
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"user_id between"
,
value1
,
value2
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"user_id not between"
,
value1
,
value2
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdIsNull
()
{
addCriterion
(
"item_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdIsNotNull
()
{
addCriterion
(
"item_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdEqualTo
(
Long
value
)
{
addCriterion
(
"item_id ="
,
value
,
"itemId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andItemIdEqualToColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"item_id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"item_id <>"
,
value
,
"itemId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andItemIdNotEqualToColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"item_id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdGreaterThan
(
Long
value
)
{
addCriterion
(
"item_id >"
,
value
,
"itemId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andItemIdGreaterThanColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"item_id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"item_id >="
,
value
,
"itemId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andItemIdGreaterThanOrEqualToColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"item_id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdLessThan
(
Long
value
)
{
addCriterion
(
"item_id <"
,
value
,
"itemId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andItemIdLessThanColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"item_id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"item_id <="
,
value
,
"itemId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andItemIdLessThanOrEqualToColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"item_id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"item_id in"
,
values
,
"itemId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"item_id not in"
,
values
,
"itemId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"item_id between"
,
value1
,
value2
,
"itemId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"item_id not between"
,
value1
,
value2
,
"itemId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIsNull
()
{
addCriterion
(
"create_time is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIsNotNull
()
{
addCriterion
(
"create_time is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeEqualTo
(
Date
value
)
{
addCriterion
(
"create_time ="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeEqualToColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"create_time = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotEqualTo
(
Date
value
)
{
addCriterion
(
"create_time <>"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeNotEqualToColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"create_time <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeGreaterThan
(
Date
value
)
{
addCriterion
(
"create_time >"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeGreaterThanColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"create_time > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeGreaterThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"create_time >="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeGreaterThanOrEqualToColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"create_time >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeLessThan
(
Date
value
)
{
addCriterion
(
"create_time <"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeLessThanColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"create_time < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeLessThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"create_time <="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeLessThanOrEqualToColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"create_time <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIn
(
List
<
Date
>
values
)
{
addCriterion
(
"create_time in"
,
values
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotIn
(
List
<
Date
>
values
)
{
addCriterion
(
"create_time not in"
,
values
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"create_time between"
,
value1
,
value2
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"create_time not between"
,
value1
,
value2
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeIsNull
()
{
addCriterion
(
"update_time is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeIsNotNull
()
{
addCriterion
(
"update_time is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeEqualTo
(
Date
value
)
{
addCriterion
(
"update_time ="
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeEqualToColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"update_time = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeNotEqualTo
(
Date
value
)
{
addCriterion
(
"update_time <>"
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeNotEqualToColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"update_time <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeGreaterThan
(
Date
value
)
{
addCriterion
(
"update_time >"
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeGreaterThanColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"update_time > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeGreaterThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"update_time >="
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeGreaterThanOrEqualToColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"update_time >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeLessThan
(
Date
value
)
{
addCriterion
(
"update_time <"
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeLessThanColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"update_time < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeLessThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"update_time <="
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeLessThanOrEqualToColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"update_time <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeIn
(
List
<
Date
>
values
)
{
addCriterion
(
"update_time in"
,
values
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeNotIn
(
List
<
Date
>
values
)
{
addCriterion
(
"update_time not in"
,
values
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"update_time between"
,
value1
,
value2
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeNotBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"update_time not between"
,
value1
,
value2
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsDeletedIsNull
()
{
addCriterion
(
"is_deleted is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsDeletedIsNotNull
()
{
addCriterion
(
"is_deleted is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsDeletedEqualTo
(
Boolean
value
)
{
addCriterion
(
"is_deleted ="
,
value
,
"isDeleted"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIsDeletedEqualToColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"is_deleted = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIsDeletedNotEqualTo
(
Boolean
value
)
{
addCriterion
(
"is_deleted <>"
,
value
,
"isDeleted"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIsDeletedNotEqualToColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"is_deleted <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIsDeletedGreaterThan
(
Boolean
value
)
{
addCriterion
(
"is_deleted >"
,
value
,
"isDeleted"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIsDeletedGreaterThanColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"is_deleted > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIsDeletedGreaterThanOrEqualTo
(
Boolean
value
)
{
addCriterion
(
"is_deleted >="
,
value
,
"isDeleted"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIsDeletedGreaterThanOrEqualToColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"is_deleted >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIsDeletedLessThan
(
Boolean
value
)
{
addCriterion
(
"is_deleted <"
,
value
,
"isDeleted"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIsDeletedLessThanColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"is_deleted < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIsDeletedLessThanOrEqualTo
(
Boolean
value
)
{
addCriterion
(
"is_deleted <="
,
value
,
"isDeleted"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIsDeletedLessThanOrEqualToColumn
(
CollectionItemsRelation
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"is_deleted <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIsDeletedIn
(
List
<
Boolean
>
values
)
{
addCriterion
(
"is_deleted in"
,
values
,
"isDeleted"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsDeletedNotIn
(
List
<
Boolean
>
values
)
{
addCriterion
(
"is_deleted not in"
,
values
,
"isDeleted"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsDeletedBetween
(
Boolean
value1
,
Boolean
value2
)
{
addCriterion
(
"is_deleted between"
,
value1
,
value2
,
"isDeleted"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsDeletedNotBetween
(
Boolean
value1
,
Boolean
value2
)
{
addCriterion
(
"is_deleted not between"
,
value1
,
value2
,
"isDeleted"
);
return
(
Criteria
)
this
;
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
CollectionItemsRelationExample
example
;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
protected
Criteria
(
CollectionItemsRelationExample
example
)
{
super
();
this
.
example
=
example
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
CollectionItemsRelationExample
example
()
{
return
this
.
example
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIf
(
boolean
ifAdd
,
ICriteriaAdd
add
)
{
if
(
ifAdd
)
{
add
.
add
(
this
);
}
return
this
;
}
/**
* This interface was generated by MyBatis Generator.
* This interface corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
interface
ICriteriaAdd
{
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Criteria
add
(
Criteria
add
);
}
}
public
static
class
Criterion
{
private
String
condition
;
private
Object
value
;
private
Object
secondValue
;
private
boolean
noValue
;
private
boolean
singleValue
;
private
boolean
betweenValue
;
private
boolean
listValue
;
private
String
typeHandler
;
public
String
getCondition
()
{
return
condition
;
}
public
Object
getValue
()
{
return
value
;
}
public
Object
getSecondValue
()
{
return
secondValue
;
}
public
boolean
isNoValue
()
{
return
noValue
;
}
public
boolean
isSingleValue
()
{
return
singleValue
;
}
public
boolean
isBetweenValue
()
{
return
betweenValue
;
}
public
boolean
isListValue
()
{
return
listValue
;
}
public
String
getTypeHandler
()
{
return
typeHandler
;
}
protected
Criterion
(
String
condition
)
{
super
();
this
.
condition
=
condition
;
this
.
typeHandler
=
null
;
this
.
noValue
=
true
;
}
protected
Criterion
(
String
condition
,
Object
value
,
String
typeHandler
)
{
super
();
this
.
condition
=
condition
;
this
.
value
=
value
;
this
.
typeHandler
=
typeHandler
;
if
(
value
instanceof
List
<?>)
{
this
.
listValue
=
true
;
}
else
{
this
.
singleValue
=
true
;
}
}
protected
Criterion
(
String
condition
,
Object
value
)
{
this
(
condition
,
value
,
null
);
}
protected
Criterion
(
String
condition
,
Object
value
,
Object
secondValue
,
String
typeHandler
)
{
super
();
this
.
condition
=
condition
;
this
.
value
=
value
;
this
.
secondValue
=
secondValue
;
this
.
typeHandler
=
typeHandler
;
this
.
betweenValue
=
true
;
}
protected
Criterion
(
String
condition
,
Object
value
,
Object
secondValue
)
{
this
(
condition
,
value
,
secondValue
,
null
);
}
}
}
\ No newline at end of file
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/SupplierItem.java
View file @
2b3a4045
package
com.wwdz.ch.db.domain.distribution
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
...
...
@@ -10,7 +11,7 @@ import lombok.Data;
/**
* @author shiyu
* @date 2024/0
2/29
* @date 2024/0
3/20
*/
@Data
public
class
SupplierItem
implements
Entity
{
...
...
@@ -77,10 +78,20 @@ public class SupplierItem implements Entity {
private
Integer
buyLimitNum
;
/**
* 商品类型1一口价2竞拍
* 商品类型1一口价2竞拍
3用户藏品
*/
private
Integer
type
;
/**
* 返佣比例
*/
private
BigDecimal
rebate
;
/**
* 用户id,非用户id的为系统账号
*/
private
Long
userId
;
/**
* 商品图片,分号分隔
*/
...
...
@@ -118,6 +129,8 @@ public class SupplierItem implements Entity {
sb
.
append
(
", isDeleted="
).
append
(
isDeleted
);
sb
.
append
(
", buyLimitNum="
).
append
(
buyLimitNum
);
sb
.
append
(
", type="
).
append
(
type
);
sb
.
append
(
", rebate="
).
append
(
rebate
);
sb
.
append
(
", userId="
).
append
(
userId
);
sb
.
append
(
", images="
).
append
(
images
);
sb
.
append
(
", videos="
).
append
(
videos
);
sb
.
append
(
", description="
).
append
(
description
);
...
...
@@ -152,6 +165,8 @@ public class SupplierItem implements Entity {
&&
(
this
.
getIsDeleted
()
==
null
?
other
.
getIsDeleted
()
==
null
:
this
.
getIsDeleted
().
equals
(
other
.
getIsDeleted
()))
&&
(
this
.
getBuyLimitNum
()
==
null
?
other
.
getBuyLimitNum
()
==
null
:
this
.
getBuyLimitNum
().
equals
(
other
.
getBuyLimitNum
()))
&&
(
this
.
getType
()
==
null
?
other
.
getType
()
==
null
:
this
.
getType
().
equals
(
other
.
getType
()))
&&
(
this
.
getRebate
()
==
null
?
other
.
getRebate
()
==
null
:
this
.
getRebate
().
equals
(
other
.
getRebate
()))
&&
(
this
.
getUserId
()
==
null
?
other
.
getUserId
()
==
null
:
this
.
getUserId
().
equals
(
other
.
getUserId
()))
&&
(
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
()));
...
...
@@ -175,6 +190,8 @@ public class SupplierItem implements Entity {
result
=
prime
*
result
+
((
getIsDeleted
()
==
null
)
?
0
:
getIsDeleted
().
hashCode
());
result
=
prime
*
result
+
((
getBuyLimitNum
()
==
null
)
?
0
:
getBuyLimitNum
().
hashCode
());
result
=
prime
*
result
+
((
getType
()
==
null
)
?
0
:
getType
().
hashCode
());
result
=
prime
*
result
+
((
getRebate
()
==
null
)
?
0
:
getRebate
().
hashCode
());
result
=
prime
*
result
+
((
getUserId
()
==
null
)
?
0
:
getUserId
().
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
());
...
...
@@ -203,6 +220,8 @@ public class SupplierItem implements Entity {
isDeleted
(
"is_deleted"
,
"isDeleted"
,
"BIT"
,
false
),
buyLimitNum
(
"buy_limit_num"
,
"buyLimitNum"
,
"INTEGER"
,
false
),
type
(
"type"
,
"type"
,
"INTEGER"
,
true
),
rebate
(
"rebate"
,
"rebate"
,
"DECIMAL"
,
false
),
userId
(
"user_id"
,
"userId"
,
"BIGINT"
,
false
),
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 @
2b3a4045
package
com.wwdz.ch.db.domain.distribution
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -2015,6 +2016,270 @@ public class SupplierItemExample {
addCriterion
(
"`type` not between"
,
value1
,
value2
,
"type"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRebateIsNull
()
{
addCriterion
(
"rebate is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRebateIsNotNull
()
{
addCriterion
(
"rebate is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRebateEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"rebate ="
,
value
,
"rebate"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table supplier_item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andRebateEqualToColumn
(
SupplierItem
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"rebate = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andRebateNotEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"rebate <>"
,
value
,
"rebate"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table supplier_item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andRebateNotEqualToColumn
(
SupplierItem
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"rebate <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andRebateGreaterThan
(
BigDecimal
value
)
{
addCriterion
(
"rebate >"
,
value
,
"rebate"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table supplier_item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andRebateGreaterThanColumn
(
SupplierItem
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"rebate > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andRebateGreaterThanOrEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"rebate >="
,
value
,
"rebate"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table supplier_item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andRebateGreaterThanOrEqualToColumn
(
SupplierItem
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"rebate >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andRebateLessThan
(
BigDecimal
value
)
{
addCriterion
(
"rebate <"
,
value
,
"rebate"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table supplier_item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andRebateLessThanColumn
(
SupplierItem
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"rebate < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andRebateLessThanOrEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"rebate <="
,
value
,
"rebate"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table supplier_item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andRebateLessThanOrEqualToColumn
(
SupplierItem
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"rebate <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andRebateIn
(
List
<
BigDecimal
>
values
)
{
addCriterion
(
"rebate in"
,
values
,
"rebate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRebateNotIn
(
List
<
BigDecimal
>
values
)
{
addCriterion
(
"rebate not in"
,
values
,
"rebate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRebateBetween
(
BigDecimal
value1
,
BigDecimal
value2
)
{
addCriterion
(
"rebate between"
,
value1
,
value2
,
"rebate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRebateNotBetween
(
BigDecimal
value1
,
BigDecimal
value2
)
{
addCriterion
(
"rebate not between"
,
value1
,
value2
,
"rebate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdIsNull
()
{
addCriterion
(
"user_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdIsNotNull
()
{
addCriterion
(
"user_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdEqualTo
(
Long
value
)
{
addCriterion
(
"user_id ="
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table supplier_item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdEqualToColumn
(
SupplierItem
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"user_id <>"
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table supplier_item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdNotEqualToColumn
(
SupplierItem
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdGreaterThan
(
Long
value
)
{
addCriterion
(
"user_id >"
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table supplier_item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdGreaterThanColumn
(
SupplierItem
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"user_id >="
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table supplier_item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdGreaterThanOrEqualToColumn
(
SupplierItem
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdLessThan
(
Long
value
)
{
addCriterion
(
"user_id <"
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table supplier_item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdLessThanColumn
(
SupplierItem
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"user_id <="
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table supplier_item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdLessThanOrEqualToColumn
(
SupplierItem
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"user_id in"
,
values
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"user_id not in"
,
values
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"user_id between"
,
value1
,
value2
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"user_id not between"
,
value1
,
value2
,
"userId"
);
return
(
Criteria
)
this
;
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/UserRecentBrowse.java
View file @
2b3a4045
package
com.wwdz.ch.db.domain.distribution
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
...
...
@@ -24,7 +23,7 @@ public class UserRecentBrowse implements Entity {
/**
* 分销商id
*/
private
Long
distributo
rId
;
private
Long
share
rId
;
/**
* 创建时间
...
...
@@ -51,7 +50,7 @@ public class UserRecentBrowse implements Entity {
sb
.
append
(
"Hash = "
).
append
(
hashCode
());
sb
.
append
(
", id="
).
append
(
id
);
sb
.
append
(
", userId="
).
append
(
userId
);
sb
.
append
(
", distributorId="
).
append
(
distributo
rId
);
sb
.
append
(
", distributorId="
).
append
(
share
rId
);
sb
.
append
(
", createTime="
).
append
(
createTime
);
sb
.
append
(
", updateTime="
).
append
(
updateTime
);
sb
.
append
(
", shareRecordId="
).
append
(
shareRecordId
);
...
...
@@ -74,7 +73,7 @@ public class UserRecentBrowse implements Entity {
UserRecentBrowse
other
=
(
UserRecentBrowse
)
that
;
return
(
this
.
getId
()
==
null
?
other
.
getId
()
==
null
:
this
.
getId
().
equals
(
other
.
getId
()))
&&
(
this
.
getUserId
()
==
null
?
other
.
getUserId
()
==
null
:
this
.
getUserId
().
equals
(
other
.
getUserId
()))
&&
(
this
.
get
DistributorId
()
==
null
?
other
.
getDistributorId
()
==
null
:
this
.
getDistributorId
().
equals
(
other
.
getDistributo
rId
()))
&&
(
this
.
get
SharerId
()
==
null
?
other
.
getSharerId
()
==
null
:
this
.
getSharerId
().
equals
(
other
.
getShare
rId
()))
&&
(
this
.
getCreateTime
()
==
null
?
other
.
getCreateTime
()
==
null
:
this
.
getCreateTime
().
equals
(
other
.
getCreateTime
()))
&&
(
this
.
getUpdateTime
()
==
null
?
other
.
getUpdateTime
()
==
null
:
this
.
getUpdateTime
().
equals
(
other
.
getUpdateTime
()))
&&
(
this
.
getShareRecordId
()
==
null
?
other
.
getShareRecordId
()
==
null
:
this
.
getShareRecordId
().
equals
(
other
.
getShareRecordId
()));
...
...
@@ -86,7 +85,7 @@ public class UserRecentBrowse implements Entity {
int
result
=
1
;
result
=
prime
*
result
+
((
getId
()
==
null
)
?
0
:
getId
().
hashCode
());
result
=
prime
*
result
+
((
getUserId
()
==
null
)
?
0
:
getUserId
().
hashCode
());
result
=
prime
*
result
+
((
get
DistributorId
()
==
null
)
?
0
:
getDistributo
rId
().
hashCode
());
result
=
prime
*
result
+
((
get
SharerId
()
==
null
)
?
0
:
getShare
rId
().
hashCode
());
result
=
prime
*
result
+
((
getCreateTime
()
==
null
)
?
0
:
getCreateTime
().
hashCode
());
result
=
prime
*
result
+
((
getUpdateTime
()
==
null
)
?
0
:
getUpdateTime
().
hashCode
());
result
=
prime
*
result
+
((
getShareRecordId
()
==
null
)
?
0
:
getShareRecordId
().
hashCode
());
...
...
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/distribution/CollectionBookRequestDto.java
0 → 100644
View file @
2b3a4045
package
com.wwdz.ch.db.dto.request.distribution
;
import
com.wwdz.ch.db.dto.request.BaseRequestDto
;
import
com.xxdxxs.entity.Entity
;
import
lombok.Data
;
import
java.util.Date
;
@Data
public
class
CollectionBookRequestDto
extends
BaseRequestDto
implements
Entity
{
private
Long
id
;
/**
* 用户id
*/
private
Long
userId
;
/**
* 标题
*/
private
String
title
;
/**
* 描述
*/
private
String
description
;
/**
* 排序
*/
private
Integer
sort
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
/**
* 逻辑删除
*/
private
Boolean
isDeleted
;
/**
* 收藏册图片,用;分隔
*/
private
String
images
;
}
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/distribution/CollectionItemsRelationRequestDto.java
0 → 100644
View file @
2b3a4045
package
com.wwdz.ch.db.dto.request.distribution
;
import
com.wwdz.ch.db.dto.request.BaseRequestDto
;
import
com.xxdxxs.entity.Entity
;
import
lombok.Data
;
import
java.util.Date
;
@Data
public
class
CollectionItemsRelationRequestDto
extends
BaseRequestDto
implements
Entity
{
/**
* id
*/
private
Long
id
;
/**
* 收藏册id
*/
private
Long
collectionBookId
;
/**
* 多个收藏册id
* 分号分割
*/
private
String
collectionBookIds
;
/**
* 用户id
*/
private
Long
userId
;
/**
* 商品id
*/
private
Long
itemId
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
/**
* 是否删除
*/
private
Boolean
isDeleted
;
}
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/distribution/DistributorShareRecordRequestDto.java
View file @
2b3a4045
...
...
@@ -5,6 +5,7 @@ import com.xxdxxs.entity.Entity;
import
lombok.Data
;
import
java.util.Date
;
import
java.util.List
;
/**
* 分销分享链接记录参数类
...
...
@@ -27,11 +28,21 @@ public class DistributorShareRecordRequestDto extends BaseRequestDto implements
*/
private
Long
itemId
;
/**
* 商品id集合
*/
private
List
<
Long
>
itemIdList
;
/**
* 分销商id
*/
private
Long
distributorId
;
/**
* 分销商id
*/
private
List
<
Long
>
distributorIdList
;
/**
* 分销商店铺id
*/
...
...
@@ -42,5 +53,10 @@ public class DistributorShareRecordRequestDto extends BaseRequestDto implements
*/
private
Date
createTime
;
/**
* 类型
*/
private
Integer
type
;
}
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/distribution/SupplierItemRequestDto.java
View file @
2b3a4045
...
...
@@ -4,6 +4,7 @@ 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
;
...
...
@@ -108,6 +109,11 @@ public class SupplierItemRequestDto extends BaseRequestDto implements Entity {
*/
private
Boolean
isShop
;
/**
* 返佣比例
*/
private
String
rebate
;
/**
* 商品类型1一口价2竞拍
*/
...
...
@@ -139,4 +145,12 @@ public class SupplierItemRequestDto extends BaseRequestDto implements Entity {
* 实际竞拍结束时间
*/
private
Date
realEndTime
;
/**
* 收藏标签id
* 分号分割,可以是多个
*/
private
String
collectionBookId
;
}
ch-dao/src/main/java/com/wwdz/ch/db/impl/distribution/CollectionBookDaoImpl.java
0 → 100644
View file @
2b3a4045
package
com.wwdz.ch.db.impl.distribution
;
import
com.github.pagehelper.PageHelper
;
import
com.wwdz.ch.db.dao.distribution.CollectionBookDao
;
import
com.wwdz.ch.db.domain.distribution.CollectionBook
;
import
com.wwdz.ch.db.domain.distribution.CollectionBookExample
;
import
com.wwdz.ch.db.dto.request.distribution.CollectionBookRequestDto
;
import
com.wwdz.ch.db.mapper.distribution.CollectionBookMapper
;
import
com.xxdxxs.db.component.JdbcHelper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Repository
;
import
java.util.Date
;
import
java.util.List
;
@Repository
public
class
CollectionBookDaoImpl
implements
CollectionBookDao
{
@Autowired
CollectionBookMapper
collectionBookMapper
;
@Override
public
int
insert
(
CollectionBook
collectionBook
)
{
return
collectionBookMapper
.
insert
(
collectionBook
);
}
@Override
public
List
<
CollectionBook
>
find
(
CollectionBookRequestDto
dto
)
{
CollectionBookExample
example
=
new
CollectionBookExample
();
CollectionBookExample
.
Criteria
criteria
=
example
.
createCriteria
();
JdbcHelper
.
ifPresent
(
dto
.
getUserId
(),
criteria:
:
andUserIdEqualTo
);
criteria
.
andIsDeletedEqualTo
(
false
);
example
.
setOrderByClause
(
"update_time desc"
);
PageHelper
.
startPage
(
dto
.
getPage
(),
dto
.
getLimit
());
return
collectionBookMapper
.
selectByExample
(
example
);
}
@Override
public
List
<
CollectionBook
>
findByUserId
(
long
userId
)
{
CollectionBookExample
example
=
new
CollectionBookExample
();
CollectionBookExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andUserIdEqualTo
(
userId
);
criteria
.
andIsDeletedEqualTo
(
false
);
example
.
setOrderByClause
(
"update_time desc"
);
return
collectionBookMapper
.
selectByExample
(
example
);
}
@Override
public
int
delete
(
long
id
)
{
CollectionBook
collectionBook
=
new
CollectionBook
();
collectionBook
.
setUpdateTime
(
new
Date
());
collectionBook
.
setIsDeleted
(
true
);
collectionBook
.
setId
(
id
);
return
collectionBookMapper
.
updateByPrimaryKeySelective
(
collectionBook
);
}
}
ch-dao/src/main/java/com/wwdz/ch/db/impl/distribution/CollectionItemsRelationDaoImpl.java
0 → 100644
View file @
2b3a4045
package
com.wwdz.ch.db.impl.distribution
;
import
com.wwdz.ch.db.dao.distribution.CollectionItemsRelationDao
;
import
com.wwdz.ch.db.domain.distribution.CollectionItemsRelation
;
import
com.wwdz.ch.db.domain.distribution.CollectionItemsRelationExample
;
import
com.wwdz.ch.db.dto.request.distribution.CollectionItemsRelationRequestDto
;
import
com.wwdz.ch.db.mapper.distribution.CollectionItemsRelationMapper
;
import
com.xxdxxs.db.component.JdbcHelper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
@Repository
public
class
CollectionItemsRelationDaoImpl
implements
CollectionItemsRelationDao
{
@Autowired
CollectionItemsRelationMapper
collectionItemsRelationMapper
;
@Override
public
int
insert
(
CollectionItemsRelation
collectionItemsRelation
)
{
return
collectionItemsRelationMapper
.
insert
(
collectionItemsRelation
);
}
@Override
public
List
<
CollectionItemsRelation
>
find
(
CollectionItemsRelationRequestDto
dto
)
{
CollectionItemsRelationExample
example
=
new
CollectionItemsRelationExample
();
CollectionItemsRelationExample
.
Criteria
criteria
=
example
.
createCriteria
();
JdbcHelper
.
ifPresent
(
dto
.
getUserId
(),
criteria:
:
andUserIdEqualTo
);
JdbcHelper
.
ifPresent
(
dto
.
getCollectionBookId
(),
criteria:
:
andCollectionBookIdEqualTo
);
JdbcHelper
.
ifPresent
(
dto
.
getItemId
(),
criteria:
:
andItemIdEqualTo
);
return
collectionItemsRelationMapper
.
selectByExample
(
example
);
}
@Override
public
List
<
CollectionItemsRelation
>
findByItemId
(
long
itemId
)
{
CollectionItemsRelationExample
example
=
new
CollectionItemsRelationExample
();
CollectionItemsRelationExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andItemIdEqualTo
(
itemId
);
return
collectionItemsRelationMapper
.
selectByExample
(
example
);
}
@Override
public
boolean
isExisted
(
long
bookId
,
long
itemId
)
{
CollectionItemsRelationExample
example
=
new
CollectionItemsRelationExample
();
CollectionItemsRelationExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andCollectionBookIdEqualTo
(
bookId
);
criteria
.
andItemIdEqualTo
(
itemId
);
return
collectionItemsRelationMapper
.
countByExample
(
example
)
>
0
;
}
@Override
public
int
delete
(
CollectionItemsRelationRequestDto
dto
)
{
CollectionItemsRelationExample
example
=
new
CollectionItemsRelationExample
();
CollectionItemsRelationExample
.
Criteria
criteria
=
example
.
createCriteria
();
JdbcHelper
.
ifPresent
(
dto
.
getUserId
(),
criteria:
:
andUserIdEqualTo
);
JdbcHelper
.
ifPresent
(
dto
.
getCollectionBookId
(),
criteria:
:
andCollectionBookIdEqualTo
);
JdbcHelper
.
ifPresent
(
dto
.
getItemId
(),
criteria:
:
andItemIdEqualTo
);
CollectionItemsRelation
collectionItemsRelation
=
new
CollectionItemsRelation
();
collectionItemsRelation
.
setIsDeleted
(
true
);
return
collectionItemsRelationMapper
.
updateByExampleSelective
(
collectionItemsRelation
,
example
);
}
}
ch-dao/src/main/java/com/wwdz/ch/db/impl/distribution/DistributorShareRecordDaoImpl.java
View file @
2b3a4045
package
com.wwdz.ch.db.impl.distribution
;
import
com.github.pagehelper.PageHelper
;
import
com.wwdz.ch.db.dao.distribution.DistributorShareRecordDao
;
import
com.wwdz.ch.db.domain.distribution.DistributorShareRecord
;
import
com.wwdz.ch.db.domain.distribution.DistributorShareRecordExample
;
import
com.wwdz.ch.db.dto.request.distribution.DistributorShareRecordRequestDto
;
import
com.wwdz.ch.db.mapper.distribution.DistributorShareRecordMapper
;
import
com.xxdxxs.db.component.JdbcHelper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Repository
;
import
java.util.Date
;
...
...
@@ -29,6 +31,16 @@ public class DistributorShareRecordDaoImpl implements DistributorShareRecordDao
return
distributorShareRecordMapper
.
selectOneByExample
(
distributorShareRecordExample
);
}
@Override
public
List
<
DistributorShareRecord
>
find
(
DistributorShareRecordRequestDto
dto
)
{
DistributorShareRecordExample
example
=
new
DistributorShareRecordExample
();
DistributorShareRecordExample
.
Criteria
criteria
=
example
.
createCriteria
();
JdbcHelper
.
ifPresent
(
dto
.
getDistributorIdList
(),
criteria:
:
andDistributorIdIn
);
JdbcHelper
.
ifPresent
(
dto
.
getItemIdList
(),
criteria:
:
andItemIdIn
);
criteria
.
andEnabledEqualTo
(
true
);
return
distributorShareRecordMapper
.
selectByExample
(
example
);
}
@Override
public
List
<
DistributorShareRecord
>
findMaxPriceRecord
(
DistributorShareRecordRequestDto
dto
)
{
List
<
DistributorShareRecord
>
distributorShareRecords
=
distributorShareRecordMapper
.
findMaxPriceRecord
(
dto
.
getDistributorId
());
...
...
@@ -44,4 +56,39 @@ public class DistributorShareRecordDaoImpl implements DistributorShareRecordDao
distributorShareRecord
.
setEnabled
(
false
);
return
distributorShareRecordMapper
.
updateByExampleSelective
(
distributorShareRecord
,
distributorShareRecordExample
);
}
@Override
public
int
updateDisEnabledForDistributor
(
long
distributorId
,
long
itemId
)
{
DistributorShareRecordExample
distributorShareRecordExample
=
new
DistributorShareRecordExample
();
DistributorShareRecordExample
.
Criteria
criteria
=
distributorShareRecordExample
.
createCriteria
();
criteria
.
andDistributorIdEqualTo
(
distributorId
);
criteria
.
andItemIdEqualTo
(
itemId
);
DistributorShareRecord
distributorShareRecord
=
new
DistributorShareRecord
();
distributorShareRecord
.
setEnabled
(
false
);
return
distributorShareRecordMapper
.
updateByExampleSelective
(
distributorShareRecord
,
distributorShareRecordExample
);
}
@Override
public
List
<
DistributorShareRecord
>
findByDistributorId
(
DistributorShareRecordRequestDto
dto
)
{
DistributorShareRecordExample
distributorShareRecordExample
=
new
DistributorShareRecordExample
();
DistributorShareRecordExample
.
Criteria
criteria
=
distributorShareRecordExample
.
createCriteria
();
criteria
.
andDistributorIdEqualTo
(
dto
.
getDistributorId
());
criteria
.
andEnabledEqualTo
(
true
);
criteria
.
andTypeEqualTo
(
dto
.
getType
());
distributorShareRecordExample
.
setOrderByClause
(
" create_time desc"
);
PageHelper
.
startPage
(
dto
.
getPage
(),
dto
.
getLimit
());
return
distributorShareRecordMapper
.
selectByExample
(
distributorShareRecordExample
);
}
@Override
public
DistributorShareRecord
findItemShareRecordByDistributorId
(
long
distributorId
,
long
itemId
)
{
DistributorShareRecordExample
example
=
new
DistributorShareRecordExample
();
DistributorShareRecordExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andDistributorIdEqualTo
(
distributorId
);
criteria
.
andItemIdEqualTo
(
itemId
);
criteria
.
andEnabledEqualTo
(
true
);
return
distributorShareRecordMapper
.
selectOneByExample
(
example
);
}
}
ch-dao/src/main/java/com/wwdz/ch/db/impl/distribution/UserRecentBrowseDaoImpl.java
View file @
2b3a4045
...
...
@@ -30,6 +30,15 @@ public class UserRecentBrowseDaoImpl implements UserRecentBrowseDao {
return
userRecentBrowseMapper
.
selectOneByExample
(
example
);
}
@Override
public
boolean
isExisted
(
long
userId
,
long
distributorId
)
{
UserRecentBrowseExample
example
=
new
UserRecentBrowseExample
();
UserRecentBrowseExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andUserIdEqualTo
(
userId
);
criteria
.
andDistributorIdEqualTo
(
distributorId
);
return
userRecentBrowseMapper
.
countByExample
(
example
)
>
0
;
}
@Override
public
int
insert
(
UserRecentBrowse
userRecentBrowse
)
{
return
userRecentBrowseMapper
.
insert
(
userRecentBrowse
);
...
...
ch-dao/src/main/java/com/wwdz/ch/db/mapper/distribution/CollectionBookMapper.java
0 → 100644
View file @
2b3a4045
package
com.wwdz.ch.db.mapper.distribution
;
import
com.wwdz.ch.db.domain.distribution.CollectionBook
;
import
com.wwdz.ch.db.domain.distribution.CollectionBookExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
@Mapper
public
interface
CollectionBookMapper
{
long
countByExample
(
CollectionBookExample
example
);
int
deleteByExample
(
CollectionBookExample
example
);
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
CollectionBook
record
);
int
insertSelective
(
CollectionBook
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
CollectionBook
selectOneByExample
(
CollectionBookExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
CollectionBook
selectOneByExampleSelective
(
@Param
(
"example"
)
CollectionBookExample
example
,
@Param
(
"selective"
)
CollectionBook
.
Column
...
selective
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List
<
CollectionBook
>
selectByExampleSelective
(
@Param
(
"example"
)
CollectionBookExample
example
,
@Param
(
"selective"
)
CollectionBook
.
Column
...
selective
);
List
<
CollectionBook
>
selectByExample
(
CollectionBookExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
CollectionBook
selectByPrimaryKeySelective
(
@Param
(
"id"
)
Long
id
,
@Param
(
"selective"
)
CollectionBook
.
Column
...
selective
);
CollectionBook
selectByPrimaryKey
(
Long
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
CollectionBook
record
,
@Param
(
"example"
)
CollectionBookExample
example
);
int
updateByExample
(
@Param
(
"record"
)
CollectionBook
record
,
@Param
(
"example"
)
CollectionBookExample
example
);
int
updateByPrimaryKeySelective
(
CollectionBook
record
);
int
updateByPrimaryKey
(
CollectionBook
record
);
}
\ No newline at end of file
ch-dao/src/main/java/com/wwdz/ch/db/mapper/distribution/CollectionItemsRelationMapper.java
0 → 100644
View file @
2b3a4045
package
com.wwdz.ch.db.mapper.distribution
;
import
com.wwdz.ch.db.domain.distribution.CollectionItemsRelation
;
import
com.wwdz.ch.db.domain.distribution.CollectionItemsRelationExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
@Mapper
public
interface
CollectionItemsRelationMapper
{
long
countByExample
(
CollectionItemsRelationExample
example
);
int
deleteByExample
(
CollectionItemsRelationExample
example
);
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
CollectionItemsRelation
record
);
int
insertSelective
(
CollectionItemsRelation
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
CollectionItemsRelation
selectOneByExample
(
CollectionItemsRelationExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
CollectionItemsRelation
selectOneByExampleSelective
(
@Param
(
"example"
)
CollectionItemsRelationExample
example
,
@Param
(
"selective"
)
CollectionItemsRelation
.
Column
...
selective
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List
<
CollectionItemsRelation
>
selectByExampleSelective
(
@Param
(
"example"
)
CollectionItemsRelationExample
example
,
@Param
(
"selective"
)
CollectionItemsRelation
.
Column
...
selective
);
List
<
CollectionItemsRelation
>
selectByExample
(
CollectionItemsRelationExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_items_relation
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
CollectionItemsRelation
selectByPrimaryKeySelective
(
@Param
(
"id"
)
Long
id
,
@Param
(
"selective"
)
CollectionItemsRelation
.
Column
...
selective
);
CollectionItemsRelation
selectByPrimaryKey
(
Long
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
CollectionItemsRelation
record
,
@Param
(
"example"
)
CollectionItemsRelationExample
example
);
int
updateByExample
(
@Param
(
"record"
)
CollectionItemsRelation
record
,
@Param
(
"example"
)
CollectionItemsRelationExample
example
);
int
updateByPrimaryKeySelective
(
CollectionItemsRelation
record
);
int
updateByPrimaryKey
(
CollectionItemsRelation
record
);
}
\ No newline at end of file
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/distribution/CollectionBookMapper.xml
0 → 100644
View file @
2b3a4045
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.wwdz.ch.db.mapper.distribution.CollectionBookMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.wwdz.ch.db.domain.distribution.CollectionBook"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"user_id"
jdbcType=
"BIGINT"
property=
"userId"
/>
<result
column=
"title"
jdbcType=
"VARCHAR"
property=
"title"
/>
<result
column=
"sort"
jdbcType=
"INTEGER"
property=
"sort"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"is_deleted"
jdbcType=
"BIT"
property=
"isDeleted"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Base_Column_List"
>
id, user_id, title, sort, create_time, update_time, is_deleted
</sql>
<select
id=
"selectByExample"
parameterType=
"com.wwdz.ch.db.domain.distribution.CollectionBookExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
'true' as QUERYID,
<include
refid=
"Base_Column_List"
/>
from collection_book
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByExampleSelective"
parameterType=
"map"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<if
test=
"example.distinct"
>
distinct
</if>
<choose>
<when
test=
"selective != null and selective.length > 0"
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, user_id, title, sort, create_time, update_time, is_deleted
</otherwise>
</choose>
from collection_book
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
<if
test=
"example.orderByClause != null"
>
order by ${example.orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from collection_book
where id = #{id,jdbcType=BIGINT}
</select>
<select
id=
"selectByPrimaryKeySelective"
parameterType=
"map"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
<choose>
<when
test=
"selective != null and selective.length > 0"
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, user_id, title, sort, create_time, update_time, is_deleted
</otherwise>
</choose>
from collection_book
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from collection_book
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.wwdz.ch.db.domain.distribution.CollectionBookExample"
>
delete from collection_book
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.wwdz.ch.db.domain.distribution.CollectionBook"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into collection_book (user_id, title, sort,
create_time, update_time, is_deleted
)
values (#{userId,jdbcType=BIGINT}, #{title,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{isDeleted,jdbcType=BIT}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.distribution.CollectionBook"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into collection_book
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"userId != null"
>
user_id,
</if>
<if
test=
"title != null"
>
title,
</if>
<if
test=
"sort != null"
>
sort,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"isDeleted != null"
>
is_deleted,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"userId != null"
>
#{userId,jdbcType=BIGINT},
</if>
<if
test=
"title != null"
>
#{title,jdbcType=VARCHAR},
</if>
<if
test=
"sort != null"
>
#{sort,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"isDeleted != null"
>
#{isDeleted,jdbcType=BIT},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.wwdz.ch.db.domain.distribution.CollectionBookExample"
resultType=
"java.lang.Long"
>
select count(*) from collection_book
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update collection_book
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.userId != null"
>
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if
test=
"record.title != null"
>
title = #{record.title,jdbcType=VARCHAR},
</if>
<if
test=
"record.sort != null"
>
sort = #{record.sort,jdbcType=INTEGER},
</if>
<if
test=
"record.createTime != null"
>
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.updateTime != null"
>
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.isDeleted != null"
>
is_deleted = #{record.isDeleted,jdbcType=BIT},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update collection_book
set id = #{record.id,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
title = #{record.title,jdbcType=VARCHAR},
sort = #{record.sort,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
is_deleted = #{record.isDeleted,jdbcType=BIT}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.wwdz.ch.db.domain.distribution.CollectionBook"
>
update collection_book
<set>
<if
test=
"userId != null"
>
user_id = #{userId,jdbcType=BIGINT},
</if>
<if
test=
"title != null"
>
title = #{title,jdbcType=VARCHAR},
</if>
<if
test=
"sort != null"
>
sort = #{sort,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"isDeleted != null"
>
is_deleted = #{isDeleted,jdbcType=BIT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.wwdz.ch.db.domain.distribution.CollectionBook"
>
update collection_book
set user_id = #{userId,jdbcType=BIGINT},
title = #{title,jdbcType=VARCHAR},
sort = #{sort,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
is_deleted = #{isDeleted,jdbcType=BIT}
where id = #{id,jdbcType=BIGINT}
</update>
<select
id=
"selectOneByExample"
parameterType=
"com.wwdz.ch.db.domain.distribution.CollectionBookExample"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<include
refid=
"Base_Column_List"
/>
from collection_book
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
limit 1
</select>
<select
id=
"selectOneByExampleSelective"
parameterType=
"map"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<choose>
<when
test=
"selective != null and selective.length > 0"
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, user_id, title, sort, create_time, update_time, is_deleted
</otherwise>
</choose>
from collection_book
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
<if
test=
"example.orderByClause != null"
>
order by ${example.orderByClause}
</if>
limit 1
</select>
</mapper>
\ No newline at end of file
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/distribution/CollectionItemsRelationMapper.xml
0 → 100644
View file @
2b3a4045
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.wwdz.ch.db.mapper.distribution.CollectionItemsRelationMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.wwdz.ch.db.domain.distribution.CollectionItemsRelation"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"collection_book_id"
jdbcType=
"BIGINT"
property=
"collectionBookId"
/>
<result
column=
"user_id"
jdbcType=
"BIGINT"
property=
"userId"
/>
<result
column=
"item_id"
jdbcType=
"BIGINT"
property=
"itemId"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"is_deleted"
jdbcType=
"BIT"
property=
"isDeleted"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Base_Column_List"
>
id, collection_book_id, user_id, item_id, create_time, update_time, is_deleted
</sql>
<select
id=
"selectByExample"
parameterType=
"com.wwdz.ch.db.domain.distribution.CollectionItemsRelationExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
'true' as QUERYID,
<include
refid=
"Base_Column_List"
/>
from collection_items_relation
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByExampleSelective"
parameterType=
"map"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<if
test=
"example.distinct"
>
distinct
</if>
<choose>
<when
test=
"selective != null and selective.length > 0"
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, collection_book_id, user_id, item_id, create_time, update_time, is_deleted
</otherwise>
</choose>
from collection_items_relation
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
<if
test=
"example.orderByClause != null"
>
order by ${example.orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from collection_items_relation
where id = #{id,jdbcType=BIGINT}
</select>
<select
id=
"selectByPrimaryKeySelective"
parameterType=
"map"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
<choose>
<when
test=
"selective != null and selective.length > 0"
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, collection_book_id, user_id, item_id, create_time, update_time, is_deleted
</otherwise>
</choose>
from collection_items_relation
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from collection_items_relation
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.wwdz.ch.db.domain.distribution.CollectionItemsRelationExample"
>
delete from collection_items_relation
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.wwdz.ch.db.domain.distribution.CollectionItemsRelation"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into collection_items_relation (collection_book_id, user_id, item_id,
create_time, update_time, is_deleted
)
values (#{collectionBookId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{itemId,jdbcType=BIGINT},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{isDeleted,jdbcType=BIT}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.distribution.CollectionItemsRelation"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into collection_items_relation
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"collectionBookId != null"
>
collection_book_id,
</if>
<if
test=
"userId != null"
>
user_id,
</if>
<if
test=
"itemId != null"
>
item_id,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"isDeleted != null"
>
is_deleted,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"collectionBookId != null"
>
#{collectionBookId,jdbcType=BIGINT},
</if>
<if
test=
"userId != null"
>
#{userId,jdbcType=BIGINT},
</if>
<if
test=
"itemId != null"
>
#{itemId,jdbcType=BIGINT},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"isDeleted != null"
>
#{isDeleted,jdbcType=BIT},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.wwdz.ch.db.domain.distribution.CollectionItemsRelationExample"
resultType=
"java.lang.Long"
>
select count(*) from collection_items_relation
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update collection_items_relation
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.collectionBookId != null"
>
collection_book_id = #{record.collectionBookId,jdbcType=BIGINT},
</if>
<if
test=
"record.userId != null"
>
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if
test=
"record.itemId != null"
>
item_id = #{record.itemId,jdbcType=BIGINT},
</if>
<if
test=
"record.createTime != null"
>
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.updateTime != null"
>
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.isDeleted != null"
>
is_deleted = #{record.isDeleted,jdbcType=BIT},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update collection_items_relation
set id = #{record.id,jdbcType=BIGINT},
collection_book_id = #{record.collectionBookId,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
item_id = #{record.itemId,jdbcType=BIGINT},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
is_deleted = #{record.isDeleted,jdbcType=BIT}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.wwdz.ch.db.domain.distribution.CollectionItemsRelation"
>
update collection_items_relation
<set>
<if
test=
"collectionBookId != null"
>
collection_book_id = #{collectionBookId,jdbcType=BIGINT},
</if>
<if
test=
"userId != null"
>
user_id = #{userId,jdbcType=BIGINT},
</if>
<if
test=
"itemId != null"
>
item_id = #{itemId,jdbcType=BIGINT},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"isDeleted != null"
>
is_deleted = #{isDeleted,jdbcType=BIT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.wwdz.ch.db.domain.distribution.CollectionItemsRelation"
>
update collection_items_relation
set collection_book_id = #{collectionBookId,jdbcType=BIGINT},
user_id = #{userId,jdbcType=BIGINT},
item_id = #{itemId,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
is_deleted = #{isDeleted,jdbcType=BIT}
where id = #{id,jdbcType=BIGINT}
</update>
<select
id=
"selectOneByExample"
parameterType=
"com.wwdz.ch.db.domain.distribution.CollectionItemsRelationExample"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<include
refid=
"Base_Column_List"
/>
from collection_items_relation
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
limit 1
</select>
<select
id=
"selectOneByExampleSelective"
parameterType=
"map"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<choose>
<when
test=
"selective != null and selective.length > 0"
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, collection_book_id, user_id, item_id, create_time, update_time, is_deleted
</otherwise>
</choose>
from collection_items_relation
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
<if
test=
"example.orderByClause != null"
>
order by ${example.orderByClause}
</if>
limit 1
</select>
</mapper>
\ No newline at end of file
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/distribution/SupplierItemMapper.xml
View file @
2b3a4045
...
...
@@ -16,6 +16,8 @@
<result
column=
"is_deleted"
jdbcType=
"BIT"
property=
"isDeleted"
/>
<result
column=
"buy_limit_num"
jdbcType=
"INTEGER"
property=
"buyLimitNum"
/>
<result
column=
"type"
jdbcType=
"INTEGER"
property=
"type"
/>
<result
column=
"rebate"
jdbcType=
"DECIMAL"
property=
"rebate"
/>
<result
column=
"user_id"
jdbcType=
"BIGINT"
property=
"userId"
/>
</resultMap>
<resultMap
extends=
"BaseResultMap"
id=
"ResultMapWithBLOBs"
type=
"com.wwdz.ch.db.domain.distribution.SupplierItem"
>
<result
column=
"images"
jdbcType=
"LONGVARCHAR"
property=
"images"
/>
...
...
@@ -82,7 +84,7 @@
</sql>
<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`
stock, create_time, update_time, is_deleted, buy_limit_num, `type`
, rebate, user_id
</sql>
<sql
id=
"Blob_Column_List"
>
images, videos, description
...
...
@@ -138,8 +140,8 @@
</when>
<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`,
images, videos
,
description
stock, create_time, update_time, is_deleted, buy_limit_num, `type`,
rebate, user_id
,
images, videos,
description
</otherwise>
</choose>
from supplier_item
...
...
@@ -173,8 +175,8 @@
</when>
<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`,
images, videos
,
description
stock, create_time, update_time, is_deleted, buy_limit_num, `type`,
rebate, user_id
,
images, videos,
description
</otherwise>
</choose>
from supplier_item
...
...
@@ -198,14 +200,16 @@
sort, top_image, distribution_price,
supply_price, stock, create_time,
update_time, is_deleted, buy_limit_num,
`type`, images, videos,
description)
`type`, rebate, user_id,
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}, #{images,jdbcType=LONGVARCHAR}, #{videos,jdbcType=LONGVARCHAR},
#{description,jdbcType=LONGVARCHAR})
#{type,jdbcType=INTEGER}, #{rebate,jdbcType=DECIMAL}, #{userId,jdbcType=BIGINT},
#{images,jdbcType=LONGVARCHAR}, #{videos,jdbcType=LONGVARCHAR}, #{description,jdbcType=LONGVARCHAR}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.distribution.SupplierItem"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
...
...
@@ -252,6 +256,12 @@
<if
test=
"type != null"
>
`type`,
</if>
<if
test=
"rebate != null"
>
rebate,
</if>
<if
test=
"userId != null"
>
user_id,
</if>
<if
test=
"images != null"
>
images,
</if>
...
...
@@ -302,6 +312,12 @@
<if
test=
"type != null"
>
#{type,jdbcType=INTEGER},
</if>
<if
test=
"rebate != null"
>
#{rebate,jdbcType=DECIMAL},
</if>
<if
test=
"userId != null"
>
#{userId,jdbcType=BIGINT},
</if>
<if
test=
"images != null"
>
#{images,jdbcType=LONGVARCHAR},
</if>
...
...
@@ -364,6 +380,12 @@
<if
test=
"record.type != null"
>
`type` = #{record.type,jdbcType=INTEGER},
</if>
<if
test=
"record.rebate != null"
>
rebate = #{record.rebate,jdbcType=DECIMAL},
</if>
<if
test=
"record.userId != null"
>
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if
test=
"record.images != null"
>
images = #{record.images,jdbcType=LONGVARCHAR},
</if>
...
...
@@ -394,6 +416,8 @@
is_deleted = #{record.isDeleted,jdbcType=BIT},
buy_limit_num = #{record.buyLimitNum,jdbcType=INTEGER},
`type` = #{record.type,jdbcType=INTEGER},
rebate = #{record.rebate,jdbcType=DECIMAL},
user_id = #{record.userId,jdbcType=BIGINT},
images = #{record.images,jdbcType=LONGVARCHAR},
videos = #{record.videos,jdbcType=LONGVARCHAR},
description = #{record.description,jdbcType=LONGVARCHAR}
...
...
@@ -416,7 +440,9 @@
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
is_deleted = #{record.isDeleted,jdbcType=BIT},
buy_limit_num = #{record.buyLimitNum,jdbcType=INTEGER},
`type` = #{record.type,jdbcType=INTEGER}
`type` = #{record.type,jdbcType=INTEGER},
rebate = #{record.rebate,jdbcType=DECIMAL},
user_id = #{record.userId,jdbcType=BIGINT}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
...
...
@@ -463,6 +489,12 @@
<if
test=
"type != null"
>
`type` = #{type,jdbcType=INTEGER},
</if>
<if
test=
"rebate != null"
>
rebate = #{rebate,jdbcType=DECIMAL},
</if>
<if
test=
"userId != null"
>
user_id = #{userId,jdbcType=BIGINT},
</if>
<if
test=
"images != null"
>
images = #{images,jdbcType=LONGVARCHAR},
</if>
...
...
@@ -490,6 +522,8 @@
is_deleted = #{isDeleted,jdbcType=BIT},
buy_limit_num = #{buyLimitNum,jdbcType=INTEGER},
`type` = #{type,jdbcType=INTEGER},
rebate = #{rebate,jdbcType=DECIMAL},
user_id = #{userId,jdbcType=BIGINT},
images = #{images,jdbcType=LONGVARCHAR},
videos = #{videos,jdbcType=LONGVARCHAR},
description = #{description,jdbcType=LONGVARCHAR}
...
...
@@ -509,7 +543,9 @@
update_time = #{updateTime,jdbcType=TIMESTAMP},
is_deleted = #{isDeleted,jdbcType=BIT},
buy_limit_num = #{buyLimitNum,jdbcType=INTEGER},
`type` = #{type,jdbcType=INTEGER}
`type` = #{type,jdbcType=INTEGER},
rebate = #{rebate,jdbcType=DECIMAL},
user_id = #{userId,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
<select
id=
"selectOneByExample"
parameterType=
"com.wwdz.ch.db.domain.distribution.SupplierItemExample"
resultMap=
"BaseResultMap"
>
...
...
@@ -566,8 +602,8 @@
</when>
<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`,
images, videos
,
description
stock, create_time, update_time, is_deleted, buy_limit_num, `type`,
rebate, user_id
,
images, videos,
description
</otherwise>
</choose>
from supplier_item
...
...
ch-dao/src/main/resources/generatorConfig_new.xml
View file @
2b3a4045
...
...
@@ -72,7 +72,7 @@
<javaClientGenerator
type=
"XMLMAPPER"
targetPackage=
"com.wwdz.ch.db.mapper.distribution"
targetProject=
"ch-dao/src/main/java"
/>
<table
tableName=
"
auction_config
"
enableCountByExample=
"true"
enableUpdateByExample=
"true"
enableDeleteByExample=
"true"
enableSelectByExample=
"true"
selectByExampleQueryId=
"true"
>
<table
tableName=
"
collection_items_relation
"
enableCountByExample=
"true"
enableUpdateByExample=
"true"
enableDeleteByExample=
"true"
enableSelectByExample=
"true"
selectByExampleQueryId=
"true"
>
<generatedKey
column=
"id"
sqlStatement=
"Mysql"
identity=
"true"
/>
</table>
...
...
ch-wx-api/pom.xml
View file @
2b3a4045
...
...
@@ -37,7 +37,11 @@
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
com.wwdz.mall
</groupId>
<artifactId>
notify-api
</artifactId>
<version>
1.9.5-RELEASE
</version>
</dependency>
<dependency>
<groupId>
com.github.binarywang
</groupId>
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/config/WebMvcConfiguration.java
View file @
2b3a4045
...
...
@@ -45,7 +45,7 @@ public class WebMvcConfiguration implements WebMvcConfigurer {
"/wx/returnOrder/**"
,
"/wx/distributionOrder/confirmSigned"
,
"/wx/distributionOrder/delivery"
,
"/wx/distributionOrder/cancel"
,
"/wx/distributionOrder/refund"
,
"/wx/supplierItem/findItemsOfCurrentDistributor"
// , "/wx/supplierItem/**", "/wx/shareRecord/**", "/wx/distributionOrder/**", "/wx/selfPage/**", "/wx/auctionRecord/**
"
,
"/wx/supplierItem/**"
,
"/wx/shareRecord/**"
,
"/wx/distributionOrder/**"
,
"/wx/selfPage/**"
,
"/wx/auctionRecord/**"
,
"/wx/shareRecord
"
/* "/wx/officialAccount/**",
"/wx/item/**",
"/wx/aiAssistant/**",
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/entity/vo/distribution/CollectionBookVo.java
0 → 100644
View file @
2b3a4045
package
com.wwdz.ch.wx.entity.vo.distribution
;
import
com.xxdxxs.entity.Entity
;
import
lombok.Data
;
@Data
public
class
CollectionBookVo
implements
Entity
{
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/entity/vo/distribution/DistributorShareRecordVo.java
0 → 100644
View file @
2b3a4045
package
com.wwdz.ch.wx.entity.vo.distribution
;
import
com.xxdxxs.entity.Entity
;
import
lombok.Data
;
import
java.util.Date
;
import
java.util.Map
;
@Data
public
class
DistributorShareRecordVo
implements
Entity
{
/**
* 分享记录id
*/
private
String
shareId
;
/**
* 商品id
*/
private
Long
itemId
;
/**
* 商品名称
*/
private
String
itemName
;
/**
* 商品定价,要除以100
*/
private
String
distributionPrice
;
/**
* 用于列表展示的图片对象
*/
private
Map
<
String
,
Object
>
homePageImage
;
/**
* 分销商id
*/
private
Long
distributorId
;
/**
* 分销商店铺id
*/
private
Long
shopId
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 是否有效
*/
private
Boolean
enabled
;
/**
* 分享类型1一口价2竞拍
*/
private
Integer
type
;
/**
* 预计佣金
*/
private
String
rebateAmount
;
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/ItemServiceImpl.java
View file @
2b3a4045
...
...
@@ -913,7 +913,6 @@ public class ItemServiceImpl implements ItemService {
userCollectBrowseNumDao
.
update
(
userCollectBrowseNum
);
}
}
// 发送收藏消息
sendMessage
(
item
.
getId
(),
dto
.
getUserId
(),
MessageEnum
.
TypeEnum
.
COLLECT
.
getCode
(),
MessageEnum
.
ContentIdTypeEnum
.
ITEM
.
getCode
());
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/CollectionBookServiceImpl.java
0 → 100644
View file @
2b3a4045
package
com.wwdz.ch.wx.impl.distribution
;
import
com.github.pagehelper.PageInfo
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.db.dao.distribution.CollectionBookDao
;
import
com.wwdz.ch.db.domain.distribution.CollectionBook
;
import
com.wwdz.ch.db.dto.request.distribution.CollectionBookRequestDto
;
import
com.wwdz.ch.wx.service.distribution.CollectionBookService
;
import
com.xxdxxs.utils.EntityMapper
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.*
;
@Service
public
class
CollectionBookServiceImpl
implements
CollectionBookService
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
CollectionBookServiceImpl
.
class
);
@Autowired
CollectionBookDao
collectionBookDao
;
@Override
public
Result
create
(
CollectionBookRequestDto
dto
)
{
try
{
CollectionBook
collectionBook
=
new
CollectionBook
();
EntityMapper
.
copyAttribute
(
dto
,
collectionBook
);
collectionBook
.
setCreateTime
(
new
Date
());
collectionBook
.
setUpdateTime
(
new
Date
());
collectionBook
.
setIsDeleted
(
false
);
collectionBookDao
.
insert
(
collectionBook
);
return
Result
.
success
();
}
catch
(
Exception
e
)
{
logger
.
error
(
"新建收藏册 error: {}"
,
e
);
}
return
Result
.
failed
();
}
@Override
public
Result
findList
(
CollectionBookRequestDto
dto
)
{
try
{
List
<
CollectionBook
>
collectionBookList
=
collectionBookDao
.
findByUserId
(
dto
.
getUserId
());
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
collectionBookList
.
forEach
(
collectionBook
->
{
map
.
put
(
"id"
,
collectionBook
.
getId
());
map
.
put
(
"title"
,
collectionBook
.
getTitle
());
});
return
Result
.
success
(
map
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"查询收藏册 error: {}"
,
e
);
}
return
Result
.
failed
();
}
@Override
public
Result
delete
(
CollectionBookRequestDto
dto
)
{
try
{
collectionBookDao
.
delete
(
dto
.
getId
());
return
Result
.
success
();
}
catch
(
Exception
e
)
{
logger
.
error
(
"删除收藏册 error: {}"
,
e
);
}
return
Result
.
failed
();
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/CollectionItemsRelationServiceImpl.java
0 → 100644
View file @
2b3a4045
package
com.wwdz.ch.wx.impl.distribution
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.db.dao.distribution.CollectionItemsRelationDao
;
import
com.wwdz.ch.db.domain.distribution.CollectionItemsRelation
;
import
com.wwdz.ch.db.dto.request.distribution.CollectionItemsRelationRequestDto
;
import
com.wwdz.ch.wx.service.distribution.CollectionItemsRelationService
;
import
com.xxdxxs.utils.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
import
java.util.List
;
@Service
public
class
CollectionItemsRelationServiceImpl
implements
CollectionItemsRelationService
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
CollectionItemsRelationServiceImpl
.
class
);
@Autowired
CollectionItemsRelationDao
collectionItemsRelationDao
;
@Override
public
Result
create
(
CollectionItemsRelationRequestDto
dto
)
{
try
{
Date
now
=
new
Date
();
List
<
String
>
collectionBookIds
=
StringUtils
.
stringToList
(
dto
.
getCollectionBookIds
(),
";"
);
collectionBookIds
.
forEach
(
collectionBookId
->
{
if
(!
collectionItemsRelationDao
.
isExisted
(
Long
.
valueOf
(
collectionBookId
),
dto
.
getItemId
()))
{
CollectionItemsRelation
collectionItemsRelation
=
new
CollectionItemsRelation
();
collectionItemsRelation
.
setCollectionBookId
(
Long
.
valueOf
(
collectionBookId
));
collectionItemsRelation
.
setUserId
(
dto
.
getUserId
());
collectionItemsRelation
.
setItemId
(
dto
.
getItemId
());
collectionItemsRelation
.
setCreateTime
(
now
);
collectionItemsRelation
.
setUpdateTime
(
now
);
collectionItemsRelation
.
setIsDeleted
(
false
);
collectionItemsRelationDao
.
insert
(
collectionItemsRelation
);
}
});
}
catch
(
Exception
e
)
{
logger
.
error
(
"查询收藏册 error: {}"
,
e
);
}
return
Result
.
failed
();
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/DistributionOrderServiceImpl.java
View file @
2b3a4045
...
...
@@ -4,6 +4,7 @@ import com.github.pagehelper.PageInfo;
import
com.wechat.pay.java.service.refund.model.Refund
;
import
com.wechat.pay.java.service.refund.model.Status
;
import
com.wwdz.ch.core.api.wxpay.WxPayServiceApi
;
import
com.wwdz.ch.core.consts.CommConsts
;
import
com.wwdz.ch.core.consts.DistributionEnum
;
import
com.wwdz.ch.core.consts.LogisticsEnum
;
import
com.wwdz.ch.core.consts.ResultCode
;
...
...
@@ -55,8 +56,6 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
private
static
final
String
CREATE_ORDER_KEY_PRE
=
"AUCTION:CREATE:"
;
private
final
static
Long
SYSTEM_ACCOUNT
=
8888888888L
;
@Autowired
DistributionOrderDao
distributionOrderDao
;
...
...
@@ -421,13 +420,13 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
DistributionOrder
distributionOrder
=
new
DistributionOrder
();
distributionOrder
.
setItemId
(
itemId
);
distributionOrder
.
setItemNum
(
1
);
distributionOrder
.
setShareRecordId
(
"DA"
+
SYSTEM_ACCOUNT
);
distributionOrder
.
setShareRecordId
(
"DA"
+
CommConsts
.
SYSTEM_ACCOUNT
);
distributionOrder
.
setDistributionOrderId
(
distributionOrderId
);
distributionOrder
.
setPrepayId
(
prepayId
);
distributionOrder
.
setBuyerId
(
dto
.
getBuyerId
());
distributionOrder
.
setBuyerOpenid
(
dto
.
getBuyerOpenid
());
distributionOrder
.
setShopId
(
SYSTEM_ACCOUNT
);
distributionOrder
.
setSellerId
(
SYSTEM_ACCOUNT
);
distributionOrder
.
setShopId
(
CommConsts
.
SYSTEM_ACCOUNT
);
distributionOrder
.
setSellerId
(
CommConsts
.
SYSTEM_ACCOUNT
);
distributionOrder
.
setAmount
(
supplierItem
.
getDistributionPrice
());
distributionOrder
.
setAddressId
(
dto
.
getAddressId
());
distributionOrder
.
setReceiverAddress
(
dto
.
getReceiverAddress
());
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/DistributorShareRecordServiceImpl.java
View file @
2b3a4045
package
com.wwdz.ch.wx.impl.distribution
;
import
com.github.pagehelper.PageInfo
;
import
com.wwdz.ch.core.consts.DistributionEnum
;
import
com.wwdz.ch.core.type.PageSearchResult
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.core.util.IdUtils
;
import
com.wwdz.ch.core.util.MediaUtil
;
import
com.wwdz.ch.core.util.PriceUtil
;
import
com.wwdz.ch.core.util.UUID
;
import
com.wwdz.ch.db.dao.distribution.AuctionConfigDao
;
...
...
@@ -12,15 +15,21 @@ import com.wwdz.ch.db.domain.distribution.AuctionConfig;
import
com.wwdz.ch.db.domain.distribution.DistributorShareRecord
;
import
com.wwdz.ch.db.domain.distribution.SupplierItem
;
import
com.wwdz.ch.db.dto.request.distribution.DistributorShareRecordRequestDto
;
import
com.wwdz.ch.wx.entity.vo.distribution.DistributorShareRecordVo
;
import
com.wwdz.ch.wx.service.distribution.DistributorShareRecordService
;
import
com.xxdxxs.utils.EntityMapper
;
import
com.xxdxxs.utils.StringUtils
;
import
org.apache.commons.collections4.Put
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
@Service
public
class
DistributorShareRecordServiceImpl
implements
DistributorShareRecordService
{
...
...
@@ -40,6 +49,10 @@ public class DistributorShareRecordServiceImpl implements DistributorShareRecord
@Override
public
Result
createShareRecord
(
DistributorShareRecordRequestDto
dto
)
{
try
{
DistributorShareRecord
record
=
distributorShareRecordDao
.
findItemShareRecordByDistributorId
(
dto
.
getDistributorId
(),
dto
.
getItemId
());
if
(
record
!=
null
&&
StringUtils
.
hasLength
(
record
.
getShareId
()))
{
return
Result
.
success
(
new
HashMap
<
String
,
String
>(){{
put
(
"shareId"
,
record
.
getShareId
());}});
}
SupplierItem
supplierItem
=
supplierItemDao
.
findById
(
dto
.
getItemId
());
long
supplierPrice
=
supplierItem
.
getDistributionPrice
();
if
(
supplierPrice
>
PriceUtil
.
convertPriceFromStr
(
dto
.
getPrice
()))
{
...
...
@@ -74,6 +87,11 @@ public class DistributorShareRecordServiceImpl implements DistributorShareRecord
if
(
now
.
after
(
auctionConfig
.
getRealEndTime
()))
{
return
Result
.
failed
(
"该商品已截拍"
);
}
DistributorShareRecord
record
=
distributorShareRecordDao
.
findItemShareRecordByDistributorId
(
dto
.
getDistributorId
(),
itemId
);
if
(
record
!=
null
&&
StringUtils
.
hasLength
(
record
.
getShareId
()))
{
return
Result
.
success
(
new
HashMap
<
String
,
String
>(){{
put
(
"shareId"
,
record
.
getShareId
());}});
}
DistributorShareRecord
distributorShareRecord
=
new
DistributorShareRecord
();
String
shareRecordId
=
UUID
.
fastUUID
().
toString
(
true
);
distributorShareRecord
.
setShareId
(
shareRecordId
);
...
...
@@ -92,4 +110,51 @@ public class DistributorShareRecordServiceImpl implements DistributorShareRecord
}
return
Result
.
failed
();
}
@Override
public
Result
findList
(
DistributorShareRecordRequestDto
dto
)
{
try
{
List
<
DistributorShareRecord
>
distributorShareRecords
=
distributorShareRecordDao
.
findByDistributorId
(
dto
);
PageInfo
<
DistributorShareRecord
>
pageInfo
=
new
PageInfo
<>(
distributorShareRecords
);
List
<
DistributorShareRecordVo
>
distributorShareRecordVoList
=
new
ArrayList
<>();
distributorShareRecords
.
forEach
(
distributorShareRecord
->
{
DistributorShareRecordVo
distributorShareRecordVo
=
new
DistributorShareRecordVo
();
EntityMapper
.
copyAttribute
(
distributorShareRecord
,
distributorShareRecordVo
);
SupplierItem
supplierItem
=
supplierItemDao
.
findById
(
distributorShareRecord
.
getItemId
());
distributorShareRecordVo
.
setItemName
(
supplierItem
.
getName
());
distributorShareRecordVo
.
setHomePageImage
(
MediaUtil
.
getHomePageImage
(
supplierItem
.
getImages
(),
supplierItem
.
getVideos
()));
distributorShareRecordVo
.
setDistributionPrice
(
PriceUtil
.
convertPriceFenToYuan
(
distributorShareRecord
.
getPrice
()));
String
distributionPrice
=
supplierItem
.
getDistributionPrice
().
toString
();
if
(
dto
.
getType
()
==
DistributionEnum
.
DistributionTypeEnum
.
FIXED_PRICE
.
getCode
())
{
BigDecimal
decimal
=
supplierItem
.
getRebate
().
divide
(
new
BigDecimal
(
"100"
)).
multiply
(
new
BigDecimal
(
distributionPrice
));
distributorShareRecordVo
.
setRebateAmount
(
PriceUtil
.
convertDoubleToString
(
decimal
.
doubleValue
()));
}
distributorShareRecordVoList
.
add
(
distributorShareRecordVo
);
});
return
Result
.
success
(
PageSearchResult
.
of
(
pageInfo
,
distributorShareRecordVoList
));
}
catch
(
Exception
e
)
{
logger
.
error
(
"查询分享记录失败 error: {}"
,
e
);
}
return
Result
.
failed
();
}
@Override
public
Result
setInvalid
(
DistributorShareRecordRequestDto
dto
)
{
try
{
distributorShareRecordDao
.
updateDisEnabledForDistributor
(
dto
.
getDistributorId
(),
dto
.
getItemId
());
return
Result
.
success
();
}
catch
(
Exception
e
)
{
logger
.
error
(
"删除分享链接失败 error: {}"
,
e
);
}
return
Result
.
failed
();
}
public
static
void
main
(
String
[]
args
)
{
String
distributionPrice
=
"990"
;
BigDecimal
decimal
=
new
BigDecimal
(
"3.00"
).
divide
(
new
BigDecimal
(
"100"
)).
multiply
(
new
BigDecimal
(
distributionPrice
));
System
.
out
.
println
(
decimal
.
toPlainString
());
System
.
out
.
println
(
PriceUtil
.
convertDoubleToString
(
decimal
.
doubleValue
()));
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SelfPageServiceImpl.java
View file @
2b3a4045
...
...
@@ -73,12 +73,12 @@ public class SelfPageServiceImpl implements SelfPageService {
});
//分销商卖出去的商品订单
selfPageInfoVo
.
setOrderNumForDistributor
(
distributionOrderNumList
);
//分销商自己购买的订单
/*
//分销商自己购买的订单
List<DistributionOrderNum> selfBuyNumList = distributionOrderDao.countGroupByStateForUser(dto.getUserId());
selfBuyNumList.forEach(s -> {
s.setStateName(DistributionEnum.DistributionOrderStateEnum.getNameByCode(s.getState()));
});
selfPageInfoVo
.
setOrderNum
(
selfBuyNumList
);
selfPageInfoVo.setOrderNum(selfBuyNumList);
*/
return
Result
.
success
(
selfPageInfoVo
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"查询分销商个人主页失败 error : {}"
,
e
);
...
...
@@ -121,5 +121,20 @@ public class SelfPageServiceImpl implements SelfPageService {
}
@Override
public
Result
getMyOrders
(
SelfPageRequestDto
dto
)
{
try
{
SelfPageInfoVo
selfPageInfoVo
=
new
SelfPageInfoVo
();
//分销商自己购买的订单
List
<
DistributionOrderNum
>
selfBuyNumList
=
distributionOrderDao
.
countGroupByStateForUser
(
dto
.
getUserId
());
selfBuyNumList
.
forEach
(
s
->
{
s
.
setStateName
(
DistributionEnum
.
DistributionOrderStateEnum
.
getNameByCode
(
s
.
getState
()));
});
selfPageInfoVo
.
setOrderNum
(
selfBuyNumList
);
return
Result
.
success
(
selfPageInfoVo
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"查询分销商我的订单数量失败 error : {}"
,
e
);
}
return
Result
.
failed
();
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
View file @
2b3a4045
...
...
@@ -12,13 +12,16 @@ import com.wwdz.ch.db.dao.distribution.*;
import
com.wwdz.ch.db.domain.Switch
;
import
com.wwdz.ch.db.domain.distribution.*
;
import
com.wwdz.ch.db.dto.request.distribution.AuctionRecordRequestDto
;
import
com.wwdz.ch.db.dto.request.distribution.CollectionItemsRelationRequestDto
;
import
com.wwdz.ch.db.dto.request.distribution.DistributorShareRecordRequestDto
;
import
com.wwdz.ch.db.dto.request.distribution.SupplierItemRequestDto
;
import
com.wwdz.ch.core.entity.SupplierItemVo
;
import
com.wwdz.ch.wx.entity.vo.distribution.AuctionDetailVo
;
import
com.wwdz.ch.wx.entity.vo.distribution.AuctionRecordRowVo
;
import
com.wwdz.ch.wx.service.distribution.CollectionItemsRelationService
;
import
com.wwdz.ch.wx.service.distribution.DistributionOrderService
;
import
com.wwdz.ch.wx.service.distribution.SupplierItemService
;
import
com.xxdxxs.utils.DateUtils
;
import
com.xxdxxs.utils.EntityMapper
;
import
com.xxdxxs.utils.StringUtils
;
import
org.redisson.api.RLock
;
...
...
@@ -30,6 +33,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
java.math.BigDecimal
;
import
java.time.Duration
;
import
java.time.Instant
;
import
java.util.*
;
...
...
@@ -74,6 +78,12 @@ public class SupplierItemServiceImpl implements SupplierItemService {
@Autowired
DistributionOrderService
distributionOrderService
;
@Autowired
CollectionItemsRelationDao
collectionItemsRelationDao
;
@Autowired
CollectionItemsRelationService
collectionItemsRelationService
;
@Override
public
Result
findList
(
SupplierItemRequestDto
dto
)
{
try
{
...
...
@@ -98,12 +108,9 @@ public class SupplierItemServiceImpl implements SupplierItemService {
}
else
{
//没有出价记录最新价格为0
supplierItemVo
.
setCurrentPrice
(
"0"
);
/* //查询商品起拍价
AuctionConfig auctionConfig = auctionConfigDao.findByItemId(supplierItem.getId());
if (auctionConfig != null) {
supplierItemVo.setCurrentPrice(PriceUtil.convertPriceFenToYuan(auctionConfig.getStartPrice()));
}*/
}
AuctionConfig
auctionConfig
=
auctionConfigDao
.
findByItemId
(
supplierItem
.
getId
());
supplierItemVo
.
setRealEndTime
(
auctionConfig
.
getRealEndTime
());
}
supplierItemVos
.
add
(
supplierItemVo
);
});
...
...
@@ -146,25 +153,17 @@ public class SupplierItemServiceImpl implements SupplierItemService {
if
(!
dto
.
getIsShop
())
{
supplierItemVo
.
setSalePrice
(
PriceUtil
.
convertPriceFenToYuan
(
distributorShareRecord
.
getPrice
()));
itemId
=
distributorShareRecord
.
getItemId
();
//如果用户绑定过分销商,则不做浏览记录
boolean
isBinded
=
distributorBindDao
.
isExisted
(
dto
.
getUserId
());
if
(!
isBinded
)
{
//不存在就新增,存在浏览记录就更新
UserRecentBrowse
userRecentBrowse
=
userRecentBrowseDao
.
findByUserId
(
dto
.
getUserId
());
if
(
userRecentBrowse
!=
null
&&
userRecentBrowse
.
getUserId
()
!=
null
)
{
userRecentBrowse
.
setShareRecordId
(
dto
.
getShareRecordId
());
userRecentBrowse
.
setDistributorId
(
distributorShareRecord
.
getDistributorId
());
userRecentBrowseDao
.
update
(
userRecentBrowse
);
}
else
{
//做浏览记录
boolean
flag
=
userRecentBrowseDao
.
isExisted
(
dto
.
getUserId
(),
distributorShareRecord
.
getDistributorId
());
if
(!
flag
)
{
UserRecentBrowse
newRecord
=
new
UserRecentBrowse
();
newRecord
.
setShareRecordId
(
dto
.
getShareRecordId
());
newRecord
.
setDistributo
rId
(
distributorShareRecord
.
getDistributorId
());
newRecord
.
setShare
rId
(
distributorShareRecord
.
getDistributorId
());
newRecord
.
setUserId
(
dto
.
getUserId
());
newRecord
.
setCreateTime
(
new
Date
());
newRecord
.
setUpdateTime
(
new
Date
());
userRecentBrowseDao
.
insert
(
newRecord
);
}
}
}
else
{
//店家进入详情,需要判断是否购买过样品
if
(
distributionOrderDao
.
isBuyItem
(
dto
.
getUserId
(),
itemId
))
{
...
...
@@ -179,6 +178,9 @@ public class SupplierItemServiceImpl implements SupplierItemService {
supplierItemVo
.
setSupplyPrice
(
PriceUtil
.
convertPriceFenToYuan
(
supplierItem
.
getSupplyPrice
()));
supplierItemVo
.
setDistributionPrice
(
PriceUtil
.
convertPriceFenToYuan
(
supplierItem
.
getDistributionPrice
()));
supplierItemVo
.
setHomePageImage
(
MediaUtil
.
getHomePageImage
(
supplierItem
.
getImages
(),
supplierItem
.
getVideos
()));
BigDecimal
decimal
=
supplierItem
.
getRebate
().
divide
(
new
BigDecimal
(
"100"
)).
multiply
(
new
BigDecimal
(
supplierItem
.
getDistributionPrice
().
toString
()));
supplierItemVo
.
setRebateAmount
(
PriceUtil
.
convertDoubleToString
(
decimal
.
doubleValue
()));
supplierItemVo
.
setRebate
(
supplierItem
.
getRebate
().
toPlainString
()
+
"%"
);
return
Result
.
success
(
supplierItemVo
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"供应商商品详情查询失败 error : {}"
,
e
);
...
...
@@ -256,8 +258,8 @@ public class SupplierItemServiceImpl implements SupplierItemService {
}
else
{
//查询是否有最近一次浏览的分销商记录
UserRecentBrowse
userRecentBrowse
=
userRecentBrowseDao
.
findByUserId
(
userId
);
if
(
userRecentBrowse
!=
null
&&
userRecentBrowse
.
get
Distributo
rId
()
!=
null
)
{
sellerId
=
userRecentBrowse
.
get
Distributo
rId
();
if
(
userRecentBrowse
!=
null
&&
userRecentBrowse
.
get
Share
rId
()
!=
null
)
{
sellerId
=
userRecentBrowse
.
get
Share
rId
();
}
}
DistributorShareRecordRequestDto
distributorShareRecordRequestDto
=
new
DistributorShareRecordRequestDto
();
...
...
@@ -290,6 +292,8 @@ public class SupplierItemServiceImpl implements SupplierItemService {
}
else
{
supplierItemVo
.
setCurrentPrice
(
"0"
);
}
AuctionConfig
auctionConfig
=
auctionConfigDao
.
findByItemId
(
supplierItem
.
getId
());
supplierItemVo
.
setRealEndTime
(
auctionConfig
.
getRealEndTime
());
}
supplierItemVos
.
add
(
supplierItemVo
);
});
...
...
@@ -455,4 +459,82 @@ public class SupplierItemServiceImpl implements SupplierItemService {
}
return
Result
.
failed
();
}
@Override
public
Result
create
(
SupplierItemRequestDto
dto
)
{
try
{
SupplierItem
supplierItem
=
new
SupplierItem
();
EntityMapper
.
copyAttribute
(
dto
,
supplierItem
);
supplierItem
.
setDistributionPrice
(
PriceUtil
.
convertPriceFromStr
(
StringUtils
.
isEmpty
(
dto
.
getDistributionPrice
())?
"0"
:
dto
.
getDistributionPrice
()));
supplierItem
.
setSupplyPrice
(
0L
);
supplierItem
.
setRebate
(
new
BigDecimal
(
dto
.
getRebate
()));
supplierItem
.
setImages
(
dto
.
getImages
());
supplierItem
.
setVideos
(
dto
.
getVideos
());
supplierItem
.
setSort
(
1
);
Date
now
=
new
Date
();
supplierItem
.
setCreateTime
(
now
);
supplierItem
.
setUpdateTime
(
now
);
supplierItem
.
setIsOnSale
(
true
);
supplierItem
.
setIsDeleted
(
false
);
supplierItem
.
setUserId
(
dto
.
getUserId
());
supplierItem
.
setType
(
DistributionEnum
.
DistributionTypeEnum
.
COLLECT
.
getCode
());
long
itemId
=
supplierItemDao
.
insert
(
supplierItem
);
//商品对应收藏册关联
if
(
StringUtils
.
hasLength
(
dto
.
getCollectionBookId
()))
{
CollectionItemsRelationRequestDto
collectionItemsRelationRequestDto
=
new
CollectionItemsRelationRequestDto
();
collectionItemsRelationRequestDto
.
setItemId
(
itemId
);
collectionItemsRelationRequestDto
.
setCollectionBookIds
(
dto
.
getCollectionBookId
());
collectionItemsRelationRequestDto
.
setUserId
(
dto
.
getUserId
());
collectionItemsRelationService
.
create
(
collectionItemsRelationRequestDto
);
}
return
Result
.
success
();
}
catch
(
Exception
e
)
{
logger
.
error
(
"上传藏品失败 error : {}"
,
e
);
}
return
Result
.
failed
();
}
@Override
public
Result
update
(
SupplierItemRequestDto
dto
)
{
try
{
SupplierItem
supplierItem
=
new
SupplierItem
();
EntityMapper
.
copyAttribute
(
dto
,
supplierItem
);
supplierItem
.
setDistributionPrice
(
PriceUtil
.
convertPriceFromStr
(
StringUtils
.
isEmpty
(
dto
.
getDistributionPrice
())?
"0"
:
dto
.
getDistributionPrice
()));
supplierItem
.
setImages
(
dto
.
getImages
());
supplierItem
.
setVideos
(
dto
.
getVideos
());
supplierItemDao
.
update
(
supplierItem
);
//更新相关的收藏册
if
(
StringUtils
.
hasLength
(
dto
.
getCollectionBookId
()))
{
CollectionItemsRelationRequestDto
collectionItemsRelationRequestDto
=
new
CollectionItemsRelationRequestDto
();
collectionItemsRelationRequestDto
.
setItemId
(
dto
.
getId
());
collectionItemsRelationRequestDto
.
setCollectionBookIds
(
dto
.
getCollectionBookId
());
collectionItemsRelationRequestDto
.
setUserId
(
dto
.
getUserId
());
collectionItemsRelationService
.
create
(
collectionItemsRelationRequestDto
);
}
//删除去掉的标签对应的关系
List
<
CollectionItemsRelation
>
collectionItemsRelations
=
collectionItemsRelationDao
.
findByItemId
(
dto
.
getId
());
if
(!
CollectionUtils
.
isEmpty
(
collectionItemsRelations
)
&&
StringUtils
.
hasLength
(
dto
.
getCollectionBookId
()))
{
List
<
Long
>
collectionBookIds
=
collectionItemsRelations
.
stream
().
map
(
CollectionItemsRelation:
:
getCollectionBookId
).
collect
(
Collectors
.
toList
());
List
<
String
>
newLinkIds
=
StringUtils
.
stringToList
(
dto
.
getCollectionBookId
(),
";"
);
collectionBookIds
.
forEach
(
id
->
{
//新选的标签中不包含原来的数据,说明该标签和商品的关联关系取消
if
(!
newLinkIds
.
contains
(
id
.
toString
()))
{
CollectionItemsRelationRequestDto
deleteDto
=
new
CollectionItemsRelationRequestDto
();
deleteDto
.
setCollectionBookId
(
id
);
deleteDto
.
setItemId
(
dto
.
getId
());
collectionItemsRelationDao
.
delete
(
deleteDto
);
}
});
}
return
Result
.
success
();
}
catch
(
Exception
e
)
{
logger
.
error
(
"更新上传藏品失败 error : {}"
,
e
);
}
return
Result
.
failed
();
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/distribution/CollectionBookService.java
0 → 100644
View file @
2b3a4045
package
com.wwdz.ch.wx.service.distribution
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.db.dto.request.distribution.CollectionBookRequestDto
;
public
interface
CollectionBookService
{
/**
* 新增收藏册
* @param dto
* @return
*/
Result
create
(
CollectionBookRequestDto
dto
);
/**
* 查询收藏册
* @param dto
* @return
*/
Result
findList
(
CollectionBookRequestDto
dto
);
/**
* 删除收藏册
* @param dto
* @return
*/
Result
delete
(
CollectionBookRequestDto
dto
);
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/distribution/CollectionItemsRelationService.java
0 → 100644
View file @
2b3a4045
package
com.wwdz.ch.wx.service.distribution
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.db.dto.request.distribution.CollectionBookRequestDto
;
import
com.wwdz.ch.db.dto.request.distribution.CollectionItemsRelationRequestDto
;
public
interface
CollectionItemsRelationService
{
/**
* 新增藏品与收藏册关系
* @param dto
* @return
*/
Result
create
(
CollectionItemsRelationRequestDto
dto
);
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/distribution/DistributorShareRecordService.java
View file @
2b3a4045
...
...
@@ -19,4 +19,22 @@ public interface DistributorShareRecordService {
* @return
*/
Result
createAuctionShareRecord
(
DistributorShareRecordRequestDto
dto
);
/**
* 查询分享记录
* @param dto
* @return
*/
Result
findList
(
DistributorShareRecordRequestDto
dto
);
/**
* 手动设置分销记录无效
* @param dto
* @return
*/
Result
setInvalid
(
DistributorShareRecordRequestDto
dto
);
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/distribution/SelfPageService.java
View file @
2b3a4045
...
...
@@ -8,6 +8,7 @@ public interface SelfPageService {
/**
* 查询分销商个人主页信息
* 分销中心模块展示的信息
* @param dto
* @return
*/
...
...
@@ -22,4 +23,12 @@ public interface SelfPageService {
Result
getUserPageInfo
(
SelfPageRequestDto
dto
);
/**
* 展示我的订单数量
* @param dto
* @return
*/
Result
getMyOrders
(
SelfPageRequestDto
dto
);
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/distribution/SupplierItemService.java
View file @
2b3a4045
...
...
@@ -6,6 +6,21 @@ import com.wwdz.ch.db.dto.request.distribution.SupplierItemRequestDto;
public
interface
SupplierItemService
{
/**
* 上传藏品
* @param dto
* @return
*/
Result
create
(
SupplierItemRequestDto
dto
);
/**
* 修改藏品
* @param dto
* @return
*/
Result
update
(
SupplierItemRequestDto
dto
);
/**
* 查询供应商商品列表
* @param dto
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/distribution/DistributorShareRecordController.java
View file @
2b3a4045
...
...
@@ -61,4 +61,33 @@ public class DistributorShareRecordController {
return
distributorShareRecordService
.
createAuctionShareRecord
(
dto
);
}
@ApiOperation
(
value
=
"查询分享记录"
)
@PostMapping
(
"/findList"
)
public
Result
findList
(
@RequestBody
DistributorShareRecordRequestDto
dto
)
{
logger
.
info
(
"查询分享记录,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
Validator
validator
=
new
Validator
(
FormHandler
.
ofEntity
(
dto
));
validator
.
set
(
"distributorId"
,
"分销商id"
).
must
().
number
()
.
end
();
if
(!
validator
.
isValid
())
{
return
Result
.
failed
(
validator
.
getErrorInfo
());
}
return
distributorShareRecordService
.
findList
(
dto
);
}
@ApiOperation
(
value
=
"手动设置分销记录无效"
)
@PostMapping
(
"/setInvalid"
)
public
Result
setInvalid
(
@RequestBody
DistributorShareRecordRequestDto
dto
)
{
logger
.
info
(
"手动设置分销记录无效,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
Validator
validator
=
new
Validator
(
FormHandler
.
ofEntity
(
dto
));
validator
.
set
(
"distributorId"
,
"分销商id"
).
must
().
number
()
.
set
(
"itemId"
,
"商品id"
).
must
().
number
()
.
end
();
if
(!
validator
.
isValid
())
{
return
Result
.
failed
(
validator
.
getErrorInfo
());
}
return
distributorShareRecordService
.
setInvalid
(
dto
);
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/distribution/SelfPageController.java
View file @
2b3a4045
...
...
@@ -56,4 +56,18 @@ public class SelfPageController {
return
selfPageService
.
getUserPageInfo
(
dto
);
}
@ApiOperation
(
value
=
"分销商查询自己购买的订单信息"
)
@PostMapping
(
"/getMyOrders"
)
public
Result
getMyOrders
(
@RequestBody
SelfPageRequestDto
dto
)
{
logger
.
info
(
"分销商查询自己购买的订单信息,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
Validator
validator
=
new
Validator
(
FormHandler
.
ofEntity
(
dto
));
validator
.
set
(
"userId"
,
"用户id"
).
must
().
number
()
.
end
();
if
(!
validator
.
isValid
())
{
return
Result
.
failed
(
validator
.
getErrorInfo
());
}
return
selfPageService
.
getMyOrders
(
dto
);
}
}
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