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
83b3e878
Commit
83b3e878
authored
Nov 30, 2023
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
小程序寄售单
parent
19c10d1f
Changes
39
Hide whitespace changes
Inline
Side-by-side
Showing
39 changed files
with
6161 additions
and
84 deletions
+6161
-84
ch-admin-api/src/main/java/com/wwdz/ch/admin/controller/ConsignSaleController.java
...a/com/wwdz/ch/admin/controller/ConsignSaleController.java
+106
-0
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/ConsignSaleServiceImpl.java
...n/java/com/wwdz/ch/admin/impl/ConsignSaleServiceImpl.java
+154
-0
ch-admin-api/src/main/java/com/wwdz/ch/admin/job/SynCategoryInfo.java
.../src/main/java/com/wwdz/ch/admin/job/SynCategoryInfo.java
+14
-15
ch-admin-api/src/main/java/com/wwdz/ch/admin/service/ConsignSaleService.java
...in/java/com/wwdz/ch/admin/service/ConsignSaleService.java
+52
-0
ch-core/src/main/java/com/wwdz/ch/core/consts/ConsignSaleEnum.java
...rc/main/java/com/wwdz/ch/core/consts/ConsignSaleEnum.java
+41
-6
ch-core/src/main/java/com/wwdz/ch/core/entity/ConsignSaleVo.java
.../src/main/java/com/wwdz/ch/core/entity/ConsignSaleVo.java
+94
-0
ch-core/src/main/java/com/wwdz/ch/core/util/IdUtils.java
ch-core/src/main/java/com/wwdz/ch/core/util/IdUtils.java
+110
-0
ch-core/src/main/java/com/wwdz/ch/core/util/RegexUtil.java
ch-core/src/main/java/com/wwdz/ch/core/util/RegexUtil.java
+13
-0
ch-dao/src/main/java/com/wwdz/ch/db/dao/ConsignSaleDao.java
ch-dao/src/main/java/com/wwdz/ch/db/dao/ConsignSaleDao.java
+34
-0
ch-dao/src/main/java/com/wwdz/ch/db/dao/ConsignSaleRecordDao.java
...rc/main/java/com/wwdz/ch/db/dao/ConsignSaleRecordDao.java
+25
-0
ch-dao/src/main/java/com/wwdz/ch/db/dao/ItemDao.java
ch-dao/src/main/java/com/wwdz/ch/db/dao/ItemDao.java
+38
-0
ch-dao/src/main/java/com/wwdz/ch/db/dao/UserItemsRelationDao.java
...rc/main/java/com/wwdz/ch/db/dao/UserItemsRelationDao.java
+9
-9
ch-dao/src/main/java/com/wwdz/ch/db/domain/ConsignSale.java
ch-dao/src/main/java/com/wwdz/ch/db/domain/ConsignSale.java
+338
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/ConsignSaleExample.java
...c/main/java/com/wwdz/ch/db/domain/ConsignSaleExample.java
+2039
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/ConsignSaleRecord.java
...rc/main/java/com/wwdz/ch/db/domain/ConsignSaleRecord.java
+285
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/ConsignSaleRecordExample.java
.../java/com/wwdz/ch/db/domain/ConsignSaleRecordExample.java
+1125
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/Item.java
ch-dao/src/main/java/com/wwdz/ch/db/domain/Item.java
+10
-1
ch-dao/src/main/java/com/wwdz/ch/db/domain/ItemExample.java
ch-dao/src/main/java/com/wwdz/ch/db/domain/ItemExample.java
+132
-0
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/ConsignSaleRecordRequestDto.java
...m/wwdz/ch/db/dto/request/ConsignSaleRecordRequestDto.java
+38
-0
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/ConsignSaleRequestDto.java
...ava/com/wwdz/ch/db/dto/request/ConsignSaleRequestDto.java
+88
-0
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/EsSearchRequestDto.java
...n/java/com/wwdz/ch/db/dto/request/EsSearchRequestDto.java
+1
-0
ch-dao/src/main/java/com/wwdz/ch/db/es/ItemEsDao.java
ch-dao/src/main/java/com/wwdz/ch/db/es/ItemEsDao.java
+4
-0
ch-dao/src/main/java/com/wwdz/ch/db/impl/ConsignSaleDaoImpl.java
...src/main/java/com/wwdz/ch/db/impl/ConsignSaleDaoImpl.java
+50
-0
ch-dao/src/main/java/com/wwdz/ch/db/impl/ConsignSaleRecordDaoImpl.java
...in/java/com/wwdz/ch/db/impl/ConsignSaleRecordDaoImpl.java
+42
-0
ch-dao/src/main/java/com/wwdz/ch/db/impl/ItemDaoImpl.java
ch-dao/src/main/java/com/wwdz/ch/db/impl/ItemDaoImpl.java
+71
-7
ch-dao/src/main/java/com/wwdz/ch/db/impl/UserItemsRelationDaoImpl.java
...in/java/com/wwdz/ch/db/impl/UserItemsRelationDaoImpl.java
+3
-2
ch-dao/src/main/java/com/wwdz/ch/db/mapper/ConsignSaleMapper.java
...rc/main/java/com/wwdz/ch/db/mapper/ConsignSaleMapper.java
+69
-0
ch-dao/src/main/java/com/wwdz/ch/db/mapper/ConsignSaleRecordMapper.java
...n/java/com/wwdz/ch/db/mapper/ConsignSaleRecordMapper.java
+69
-0
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/ConsignSaleMapper.xml
...ain/resources/com/wwdz/ch/db/mapper/ConsignSaleMapper.xml
+436
-0
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/ConsignSaleRecordMapper.xml
...sources/com/wwdz/ch/db/mapper/ConsignSaleRecordMapper.xml
+321
-0
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/ItemMapper.xml
...o/src/main/resources/com/wwdz/ch/db/mapper/ItemMapper.xml
+30
-10
ch-dao/src/main/resources/generatorConfig_new.xml
ch-dao/src/main/resources/generatorConfig_new.xml
+1
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/ConsignSaleServiceImpl.java
...main/java/com/wwdz/ch/wx/impl/ConsignSaleServiceImpl.java
+155
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/FavoritesServiceImpl.java
...c/main/java/com/wwdz/ch/wx/impl/FavoritesServiceImpl.java
+3
-6
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/FootPrintServiceImpl.java
...c/main/java/com/wwdz/ch/wx/impl/FootPrintServiceImpl.java
+2
-4
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/ItemCommonServiceImpl.java
.../main/java/com/wwdz/ch/wx/impl/ItemCommonServiceImpl.java
+3
-6
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/ItemServiceImpl.java
...pi/src/main/java/com/wwdz/ch/wx/impl/ItemServiceImpl.java
+18
-17
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/ConsignSaleService.java
.../main/java/com/wwdz/ch/wx/service/ConsignSaleService.java
+38
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/ConsignSaleController.java
...c/main/java/com/wwdz/ch/wx/web/ConsignSaleController.java
+100
-0
No files found.
ch-admin-api/src/main/java/com/wwdz/ch/admin/controller/ConsignSaleController.java
0 → 100644
View file @
83b3e878
package
com.wwdz.ch.admin.controller
;
import
com.alibaba.fastjson.JSON
;
import
com.wwdz.ch.admin.service.ConsignSaleService
;
import
com.wwdz.ch.core.consts.ResultCode
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.db.dto.request.ConsignSaleRecordRequestDto
;
import
com.wwdz.ch.db.dto.request.ConsignSaleRequestDto
;
import
com.xxdxxs.service.FormHandler
;
import
com.xxdxxs.validation.Validator
;
import
io.swagger.annotations.ApiOperation
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* 寄售单
*/
@RestController
@RequestMapping
(
"/admin/consignSaleManage"
)
public
class
ConsignSaleController
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
ConsignSaleController
.
class
);
@Autowired
ConsignSaleService
consignSaleService
;
@ApiOperation
(
value
=
"查询寄售单"
)
@PostMapping
(
"/findList"
)
public
Result
findList
(
@RequestBody
ConsignSaleRequestDto
dto
)
{
logger
.
info
(
"【请求开始】用户取消寄售单,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
Validator
validator
=
new
Validator
(
FormHandler
.
ofEntity
(
dto
));
validator
.
set
(
"userId"
,
"用户id"
).
must
().
string
()
.
end
();
if
(!
validator
.
isValid
())
{
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
.
getCode
(),
validator
.
getErrorInfo
());
}
return
consignSaleService
.
findList
(
dto
);
}
@ApiOperation
(
value
=
"图文估价"
)
@PostMapping
(
"/imgValuate"
)
public
Result
valuate
(
@RequestBody
ConsignSaleRequestDto
dto
)
{
logger
.
info
(
"【请求开始】图文估价,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
Validator
validator
=
new
Validator
(
FormHandler
.
ofEntity
(
dto
));
validator
.
set
(
"saleId"
,
"寄售单号"
).
must
().
string
()
.
set
(
"imgValuation"
,
"估价"
).
must
().
string
()
.
end
();
if
(!
validator
.
isValid
())
{
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
.
getCode
(),
validator
.
getErrorInfo
());
}
return
consignSaleService
.
imgValuate
(
dto
);
}
@ApiOperation
(
value
=
"实物鉴定"
)
@PostMapping
(
"/identify"
)
public
Result
identify
(
@RequestBody
ConsignSaleRequestDto
dto
)
{
logger
.
info
(
"【请求开始】实物鉴定,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
Validator
validator
=
new
Validator
(
FormHandler
.
ofEntity
(
dto
));
validator
.
set
(
"saleId"
,
"寄售单号"
).
must
().
string
()
.
set
(
"valuation"
,
"实物估价"
).
must
().
string
()
.
end
();
if
(!
validator
.
isValid
())
{
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
.
getCode
(),
validator
.
getErrorInfo
());
}
return
consignSaleService
.
identify
(
dto
);
}
@ApiOperation
(
value
=
"完成寄售"
)
@PostMapping
(
"/finish"
)
public
Result
finish
(
@RequestBody
ConsignSaleRequestDto
dto
)
{
logger
.
info
(
"【请求开始】完成寄售,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
Validator
validator
=
new
Validator
(
FormHandler
.
ofEntity
(
dto
));
validator
.
set
(
"saleId"
,
"寄售单号"
).
must
().
string
()
.
set
(
"dealPrice"
,
"成交价格"
).
must
().
string
()
.
end
();
if
(!
validator
.
isValid
())
{
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
.
getCode
(),
validator
.
getErrorInfo
());
}
return
consignSaleService
.
finish
(
dto
);
}
@ApiOperation
(
value
=
"取消寄售单"
)
@PostMapping
(
"/cancel"
)
public
Result
cancel
(
@RequestBody
ConsignSaleRecordRequestDto
dto
)
{
logger
.
info
(
"【请求开始】取消寄售单,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
Validator
validator
=
new
Validator
(
FormHandler
.
ofEntity
(
dto
));
validator
.
set
(
"saleId"
,
"寄售单号"
).
must
().
string
()
.
set
(
"itemId"
,
"商品id"
).
must
().
number
()
.
end
();
if
(!
validator
.
isValid
())
{
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
.
getCode
(),
validator
.
getErrorInfo
());
}
return
consignSaleService
.
cancel
(
dto
);
}
}
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/ConsignSaleServiceImpl.java
0 → 100644
View file @
83b3e878
package
com.wwdz.ch.admin.impl
;
import
com.github.pagehelper.PageInfo
;
import
com.wwdz.ch.admin.service.ConsignSaleService
;
import
com.wwdz.ch.core.consts.ConsignSaleEnum
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.core.util.IdUtils
;
import
com.wwdz.ch.db.dao.ConsignSaleDao
;
import
com.wwdz.ch.db.dao.ConsignSaleRecordDao
;
import
com.wwdz.ch.db.dao.ItemDao
;
import
com.wwdz.ch.db.domain.ConsignSale
;
import
com.wwdz.ch.db.domain.ConsignSaleRecord
;
import
com.wwdz.ch.db.domain.Item
;
import
com.wwdz.ch.db.dto.request.ConsignSaleRecordRequestDto
;
import
com.wwdz.ch.db.dto.request.ConsignSaleRequestDto
;
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.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
@Service
public
class
ConsignSaleServiceImpl
implements
ConsignSaleService
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
ConsignSaleServiceImpl
.
class
);
@Autowired
ConsignSaleDao
consignSaleDao
;
@Autowired
ConsignSaleRecordDao
consignSaleRecordDao
;
@Autowired
ItemDao
itemDao
;
@Override
public
Result
findList
(
ConsignSaleRequestDto
dto
)
{
List
<
ConsignSale
>
list
=
consignSaleDao
.
find
(
dto
);
PageInfo
<
ConsignSale
>
pageInfo
=
new
PageInfo
<>(
list
);
List
<
Long
>
itemIds
=
list
.
stream
().
map
(
ConsignSale:
:
getItemId
).
collect
(
Collectors
.
toList
());
//查询商品的信息
List
<
Item
>
itemList
=
itemDao
.
findDetails
(
itemIds
);
Map
<
Long
,
Item
>
itemMap
=
itemList
.
stream
().
collect
(
Collectors
.
toMap
(
Item:
:
getId
,
Function
.
identity
()));
return
null
;
}
@Override
public
Result
findDetail
(
ConsignSaleRequestDto
dto
)
{
return
null
;
}
@Override
public
Result
imgValuate
(
ConsignSaleRequestDto
dto
)
{
try
{
ConsignSale
consignSale
=
new
ConsignSale
();
consignSale
.
setImgValuation
(
dto
.
getImgValuation
());
consignSale
.
setSaleId
(
dto
.
getSaleId
());
consignSale
.
setSystemState
(
ConsignSaleEnum
.
SaleForSysStateEnum
.
IDENTIFY
.
getCode
());
consignSaleDao
.
update
(
consignSale
);
//插入操作记录
ConsignSaleRecord
consignSaleRecord
=
new
ConsignSaleRecord
();
consignSaleRecord
.
setSaleId
(
dto
.
getSaleId
());
consignSaleRecord
.
setCreateTime
(
new
Date
());
consignSaleRecord
.
setContent
(
"估价金额: "
+
dto
.
getImgValuation
());
consignSaleRecord
.
setRemark
(
dto
.
getRemark
());
consignSaleRecord
.
setType
(
ConsignSaleEnum
.
OperateTypeEnum
.
VALUATE
.
getCode
());
consignSaleRecordDao
.
insert
(
consignSaleRecord
);
return
Result
.
success
();
}
catch
(
Exception
e
)
{
logger
.
error
(
"图文估价error:{}"
,
e
);
}
return
Result
.
failed
();
}
@Override
public
Result
identify
(
ConsignSaleRequestDto
dto
)
{
try
{
ConsignSale
consignSale
=
new
ConsignSale
();
consignSale
.
setValuation
(
dto
.
getValuation
());
consignSale
.
setSaleId
(
dto
.
getSaleId
());
consignSale
.
setSystemState
(
ConsignSaleEnum
.
SaleForSysStateEnum
.
CONSIGN_SALEING
.
getCode
());
consignSaleDao
.
update
(
consignSale
);
//插入操作记录
ConsignSaleRecord
consignSaleRecord
=
new
ConsignSaleRecord
();
consignSaleRecord
.
setSaleId
(
dto
.
getSaleId
());
consignSaleRecord
.
setCreateTime
(
new
Date
());
consignSaleRecord
.
setContent
(
"实物鉴定: "
+
dto
.
getImgValuation
()
+
" 元"
);
consignSaleRecord
.
setRemark
(
dto
.
getRemark
());
consignSaleRecord
.
setType
(
ConsignSaleEnum
.
OperateTypeEnum
.
IDENTIFY
.
getCode
());
consignSaleRecordDao
.
insert
(
consignSaleRecord
);
return
Result
.
success
();
}
catch
(
Exception
e
)
{
logger
.
error
(
"实物鉴定 error:{}"
,
e
);
}
return
Result
.
failed
();
}
@Override
public
Result
finish
(
ConsignSaleRequestDto
dto
)
{
try
{
ConsignSale
consignSale
=
new
ConsignSale
();
consignSale
.
setDealPrice
(
dto
.
getDealPrice
());
consignSale
.
setSaleId
(
dto
.
getSaleId
());
consignSale
.
setSystemState
(
ConsignSaleEnum
.
SaleForSysStateEnum
.
FINISH
.
getCode
());
consignSaleDao
.
update
(
consignSale
);
//插入操作记录
ConsignSaleRecord
consignSaleRecord
=
new
ConsignSaleRecord
();
consignSaleRecord
.
setSaleId
(
dto
.
getSaleId
());
consignSaleRecord
.
setCreateTime
(
new
Date
());
consignSaleRecord
.
setContent
(
"成交金额: "
+
dto
.
getImgValuation
()
+
" 元"
);
consignSaleRecord
.
setRemark
(
"成交平台: "
+
dto
.
getRemark
());
consignSaleRecord
.
setType
(
ConsignSaleEnum
.
OperateTypeEnum
.
VALUATE
.
getCode
());
consignSaleRecordDao
.
insert
(
consignSaleRecord
);
return
Result
.
success
();
}
catch
(
Exception
e
)
{
logger
.
error
(
"实物鉴定 error:{}"
,
e
);
}
return
Result
.
failed
();
}
@Override
public
Result
cancel
(
ConsignSaleRecordRequestDto
dto
)
{
try
{
ConsignSale
consignSale
=
new
ConsignSale
();
consignSale
.
setSaleId
(
dto
.
getSaleId
());
consignSale
.
setCustomState
(
ConsignSaleEnum
.
SaleForUserStateEnum
.
CANCEL
.
getCode
());
consignSale
.
setSystemState
(
ConsignSaleEnum
.
SaleForSysStateEnum
.
CANCEL
.
getCode
());
consignSaleDao
.
update
(
consignSale
);
//商品下架
itemDao
.
updateOnSale
(
dto
.
getItemId
());
//插入记录
ConsignSaleRecord
consignSaleRecord
=
new
ConsignSaleRecord
();
consignSaleRecord
.
setSaleId
(
dto
.
getSaleId
());
consignSaleRecord
.
setCreateTime
(
new
Date
());
consignSaleRecord
.
setContent
(
"取消类型:"
+
dto
.
getContent
());
consignSaleRecord
.
setRemark
(
dto
.
getRemark
());
consignSaleRecord
.
setType
(
ConsignSaleEnum
.
OperateTypeEnum
.
CANCEL
.
getCode
());
consignSaleRecordDao
.
insert
(
consignSaleRecord
);
return
Result
.
success
();
}
catch
(
Exception
e
)
{
logger
.
error
(
"取消寄售单error : {}"
,
e
);
}
return
Result
.
failed
();
}
}
ch-admin-api/src/main/java/com/wwdz/ch/admin/job/SynCategoryInfo.java
View file @
83b3e878
...
@@ -42,7 +42,7 @@ public class SynCategoryInfo {
...
@@ -42,7 +42,7 @@ public class SynCategoryInfo {
public
void
importCategory
()
{
public
void
importCategory
()
{
String
FILE_NAME
=
"category.xlsx"
;
String
FILE_NAME
=
"category
_new
.xlsx"
;
InputStream
inputStream
=
this
.
getClass
().
getClassLoader
().
getResourceAsStream
(
FILE_NAME
);
InputStream
inputStream
=
this
.
getClass
().
getClassLoader
().
getResourceAsStream
(
FILE_NAME
);
StringArrayExcelReadListener
listener
=
new
StringArrayExcelReadListener
();
StringArrayExcelReadListener
listener
=
new
StringArrayExcelReadListener
();
ExcelReader
reader
=
EasyExcelFactory
.
read
(
inputStream
,
listener
).
build
();
ExcelReader
reader
=
EasyExcelFactory
.
read
(
inputStream
,
listener
).
build
();
...
@@ -53,26 +53,25 @@ public class SynCategoryInfo {
...
@@ -53,26 +53,25 @@ public class SynCategoryInfo {
logger
.
info
(
"excel title = {}"
,
head
);
logger
.
info
(
"excel title = {}"
,
head
);
List
<
List
<
String
>>
dataList
=
listener
.
getData
();
List
<
List
<
String
>>
dataList
=
listener
.
getData
();
logger
.
info
(
">>>>>>>>>> excel 读取数据 : {} 条"
,
dataList
.
size
());
logger
.
info
(
">>>>>>>>>> excel 读取数据 : {} 条"
,
dataList
.
size
());
dataList
.
parallelStream
().
forEach
(
array
->
{
for
(
List
<
String
>
array
:
dataList
)
{
if
(!
array
.
get
(
2
).
equals
(
"1"
))
{
continue
;
}
Category
category
=
new
Category
();
Category
category
=
new
Category
();
int
categoryId
=
Integer
.
parseInt
(
array
.
get
(
0
));
int
categoryId
=
Integer
.
parseInt
(
array
.
get
(
0
));
category
.
setId
(
categoryId
);
category
.
setId
(
categoryId
);
category
.
setName
(
array
.
get
(
1
));
category
.
setName
(
array
.
get
(
3
));
category
.
setDesc
(
array
.
get
(
2
));
category
.
setDesc
(
array
.
get
(
5
));
category
.
setPid
(
Integer
.
parseInt
(
array
.
get
(
4
)));
category
.
setPid
(
Integer
.
parseInt
(
array
.
get
(
7
)));
category
.
setLevel
(
Integer
.
parseInt
(
array
.
get
(
5
)));
category
.
setLevel
(
Integer
.
parseInt
(
array
.
get
(
8
)));
category
.
setSort
(
Integer
.
parseInt
(
array
.
get
(
6
)));
category
.
setSort
(
Integer
.
parseInt
(
array
.
get
(
11
)));
category
.
setCreated
(
new
Date
());
category
.
setCreated
(
new
Date
());
category
.
setUpdated
(
new
Date
());
category
.
setUpdated
(
new
Date
());
if
(
array
.
get
(
12
).
equals
(
"0"
))
{
category
.
setIsDeleted
(
false
);
category
.
setIsDeleted
(
true
);
category
.
setIsLeaf
(
array
.
get
(
9
).
equals
(
"0"
)?
false
:
true
);
}
else
{
category
.
setIcon
(
"https://cdn.wanwudezhi.com"
+
array
.
get
(
4
));
category
.
setIsDeleted
(
false
);
}
category
.
setIsLeaf
(
array
.
get
(
13
).
equals
(
"0"
)?
false
:
true
);
category
.
setIcon
(
array
.
get
(
14
));
categoryDao
.
add
(
category
);
categoryDao
.
add
(
category
);
}
);
}
}
}
}
}
ch-admin-api/src/main/java/com/wwdz/ch/admin/service/ConsignSaleService.java
0 → 100644
View file @
83b3e878
package
com.wwdz.ch.admin.service
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.db.dto.request.ConsignSaleRecordRequestDto
;
import
com.wwdz.ch.db.dto.request.ConsignSaleRequestDto
;
public
interface
ConsignSaleService
{
/**
* 查询寄售单
* @param dto
* @return
*/
Result
findList
(
ConsignSaleRequestDto
dto
);
/**
* 查询寄售单详情
* @param dto
* @return
*/
Result
findDetail
(
ConsignSaleRequestDto
dto
);
/**
* 图文估价
* @param dto
* @return
*/
Result
imgValuate
(
ConsignSaleRequestDto
dto
);
/**
* 实物鉴定
* @param dto
* @return
*/
Result
identify
(
ConsignSaleRequestDto
dto
);
/**
* 完成寄售
* @param dto
* @return
*/
Result
finish
(
ConsignSaleRequestDto
dto
);
/**
* 取消寄售
* @param dto
* @return
*/
Result
cancel
(
ConsignSaleRecordRequestDto
dto
);
}
ch-core/src/main/java/com/wwdz/ch/core/consts/Consign
For
SaleEnum.java
→
ch-core/src/main/java/com/wwdz/ch/core/consts/ConsignSaleEnum.java
View file @
83b3e878
package
com.wwdz.ch.core.consts
;
package
com.wwdz.ch.core.consts
;
public
class
Consign
For
SaleEnum
{
public
class
ConsignSaleEnum
{
/**
/**
* 用户端寄售单的状态
* 用户端寄售单的状态
...
@@ -25,7 +25,7 @@ public class ConsignForSaleEnum {
...
@@ -25,7 +25,7 @@ public class ConsignForSaleEnum {
public
static
String
getNameByCode
(
int
code
)
{
public
static
String
getNameByCode
(
int
code
)
{
for
(
Consign
ForSaleEnum
.
SaleForUserStateEnum
saleForUserStateEnum
:
ConsignFor
SaleEnum
.
SaleForUserStateEnum
.
values
())
{
for
(
Consign
SaleEnum
.
SaleForUserStateEnum
saleForUserStateEnum
:
Consign
SaleEnum
.
SaleForUserStateEnum
.
values
())
{
if
(
code
==
saleForUserStateEnum
.
getCode
())
{
if
(
code
==
saleForUserStateEnum
.
getCode
())
{
return
saleForUserStateEnum
.
getDes
();
return
saleForUserStateEnum
.
getDes
();
}
}
...
@@ -44,15 +44,14 @@ public class ConsignForSaleEnum {
...
@@ -44,15 +44,14 @@ public class ConsignForSaleEnum {
}
}
/**
/**
* 后台寄售单的状态
* 后台寄售单的状态
*/
*/
public
enum
SaleForSysStateEnum
{
public
enum
SaleForSysStateEnum
{
VALUATE
(
1
,
"
图文估价"
),
WAIT_IMG_VALUATE
(
1
,
"待
图文估价"
),
WAIT_CONSIGN
(
3
,
"待用户寄出"
),
WAIT_CONSIGN
(
3
,
"待用户寄出"
),
WAIT_TAKE
(
6
,
"待收货"
),
WAIT_TAKE
(
6
,
"待收货"
),
CHECK
(
8
,
"实物鉴定"
),
IDENTIFY
(
8
,
"实物鉴定"
),
CONSIGN_SALEING
(
10
,
"寄售中"
),
CONSIGN_SALEING
(
10
,
"寄售中"
),
PRE_PAY
(
16
,
"待结款"
),
PRE_PAY
(
16
,
"待结款"
),
FINISH
(
20
,
"已完成"
),
FINISH
(
20
,
"已完成"
),
...
@@ -69,7 +68,7 @@ public class ConsignForSaleEnum {
...
@@ -69,7 +68,7 @@ public class ConsignForSaleEnum {
}
}
public
static
String
getNameByCode
(
int
code
)
{
public
static
String
getNameByCode
(
int
code
)
{
for
(
Consign
ForSaleEnum
.
SaleForSysStateEnum
saleForSysStateEnum
:
ConsignFor
SaleEnum
.
SaleForSysStateEnum
.
values
())
{
for
(
Consign
SaleEnum
.
SaleForSysStateEnum
saleForSysStateEnum
:
Consign
SaleEnum
.
SaleForSysStateEnum
.
values
())
{
if
(
code
==
saleForSysStateEnum
.
getCode
())
{
if
(
code
==
saleForSysStateEnum
.
getCode
())
{
return
saleForSysStateEnum
.
getDes
();
return
saleForSysStateEnum
.
getDes
();
}
}
...
@@ -86,4 +85,40 @@ public class ConsignForSaleEnum {
...
@@ -86,4 +85,40 @@ public class ConsignForSaleEnum {
}
}
}
}
public
enum
OperateTypeEnum
{
VALUATE
(
1
,
"图文估价"
),
IDENTIFY
(
4
,
"实物鉴定"
),
WAIT_TAKE
(
10
,
"寄售单完成"
),
CANCEL
(
20
,
"寄售单取消"
),
;
private
int
code
;
private
String
des
;
OperateTypeEnum
(
int
code
,
String
des
)
{
this
.
code
=
code
;
this
.
des
=
des
;
}
public
static
String
getNameByCode
(
int
code
)
{
for
(
ConsignSaleEnum
.
OperateTypeEnum
operateTypeEnum
:
ConsignSaleEnum
.
OperateTypeEnum
.
values
())
{
if
(
code
==
operateTypeEnum
.
getCode
())
{
return
operateTypeEnum
.
getDes
();
}
}
return
null
;
}
public
int
getCode
()
{
return
code
;
}
public
String
getDes
()
{
return
des
;
}
}
}
}
ch-core/src/main/java/com/wwdz/ch/core/entity/ConsignSaleVo.java
0 → 100644
View file @
83b3e878
package
com.wwdz.ch.core.entity
;
import
com.xxdxxs.entity.Entity
;
import
lombok.Data
;
import
java.util.Date
;
import
java.util.Map
;
@Data
public
class
ConsignSaleVo
implements
Entity
{
/**
* 寄售单号
*/
private
String
saleId
;
/**
* 商品ID
*/
private
Long
itemId
;
/**
* 商品名称
*/
private
String
itemName
;
// 用于列表展示的图片对象
private
Map
<
String
,
Object
>
homePageImage
;
/**
* 商品图片
*/
private
String
itemImg
;
/**
* 用户ID
*/
private
Long
userId
;
/**
* 寄售时间
*/
private
Date
saleTime
;
/**
* 用户报价
*/
private
Integer
userPrice
;
/**
* 图文估价范围
*/
private
String
imgValuation
;
/**
* 实物估价
*/
private
Integer
valuation
;
/**
* 成交价格
*/
private
Integer
dealPrice
;
/**
* 客户端状态
*/
private
Integer
customState
;
/**
* 客户端状态
*/
private
String
customStateName
;
/**
* 系统状态
*/
private
Integer
systemState
;
/**
* 系统状态
*/
private
String
systemStateName
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
}
ch-core/src/main/java/com/wwdz/ch/core/util/IdUtils.java
0 → 100644
View file @
83b3e878
package
com.wwdz.ch.core.util
;
import
org.apache.commons.lang3.time.DateFormatUtils
;
import
java.util.Date
;
public
class
IdUtils
{
// 最近的时间戳
private
long
lastTimestamp
=
0
;
//机器id 2位
// private final String machineId;
//用用户编码代替机器id
private
String
userCode
;
// 0,并发控制
private
long
sequence
=
0L
;
// 序列号的最大值
private
final
int
sequenceMax
=
9999
;
public
IdUtils
(
String
userCode
)
{
this
.
userCode
=
userCode
;
}
/**
* 生成订单号
*/
public
synchronized
String
nextId
(
String
prefix
,
String
randnum
)
{
Date
now
=
new
Date
();
String
time
=
DateFormatUtils
.
format
(
now
,
"yyMMddHHmmssSSS"
);
long
timestamp
=
now
.
getTime
();
if
(
this
.
lastTimestamp
==
timestamp
)
{
// 如果上一个timestamp与新产生的相等,则sequence加一(0-4095循环);
// 对新的timestamp,sequence从0开始
this
.
sequence
=
this
.
sequence
+
1
%
this
.
sequenceMax
;
if
(
this
.
sequence
==
0
)
{
// 重新生成timestamp
timestamp
=
this
.
tilNextMillis
(
this
.
lastTimestamp
);
}
}
else
{
this
.
sequence
=
0
;
}
this
.
lastTimestamp
=
timestamp
;
// StringBuilder sb = new StringBuilder(prefix).append(time).append(randnum).append(leftPad(sequence, 4));
StringBuilder
sb
=
new
StringBuilder
(
prefix
).
append
(
time
).
append
(
randnum
);
return
sb
.
toString
();
}
/**
* 补码
*
* @param i
* @param n
* @return
*/
private
String
leftPad
(
long
i
,
int
n
)
{
String
s
=
String
.
valueOf
(
i
);
StringBuilder
sb
=
new
StringBuilder
();
int
c
=
n
-
s
.
length
();
c
=
c
<
0
?
0
:
c
;
for
(
int
t
=
0
;
t
<
c
;
t
++)
{
sb
.
append
(
"0"
);
}
return
sb
.
append
(
s
).
toString
();
}
/**
* 等待下一个毫秒的到来, 保证返回的毫秒数在参数lastTimestamp之后
*/
private
long
tilNextMillis
(
long
lastTimestamp
)
{
long
timestamp
=
System
.
currentTimeMillis
();
while
(
timestamp
<=
lastTimestamp
)
{
timestamp
=
System
.
currentTimeMillis
();
}
return
timestamp
;
}
// 这里读取的是配置文件
// 机器id(我这里是01,正式环境建议使用机器IP)
// 注意:分布式环境,注意每台机器的id要保证不同;也可以使用机器ip,映射成一个数字编号(如01:192.168.55.12)
private
static
String
myid
=
"1"
;
// 示例
private
static
IdUtils
instance
=
new
IdUtils
(
myid
);
public
static
IdUtils
getInstance
()
{
return
instance
;
}
public
static
String
getOrderNumber
(
String
prefix
)
{
String
randomNum
=
CharUtil
.
getRandomNum
(
4
);
IdUtils
orderId
=
IdUtils
.
getInstance
();
String
nextId
=
orderId
.
nextId
(
prefix
,
randomNum
);
return
nextId
;
}
/**
* 调用
*/
public
static
void
main
(
String
[]
args
)
{
String
id
=
IdUtils
.
getOrderNumber
(
"OT"
);
System
.
out
.
println
(
id
);
}
}
ch-core/src/main/java/com/wwdz/ch/core/util/RegexUtil.java
View file @
83b3e878
...
@@ -61,6 +61,9 @@ public class RegexUtil {
...
@@ -61,6 +61,9 @@ public class RegexUtil {
* Regex of Chinese character.
* Regex of Chinese character.
*/
*/
public
static
final
String
REGEX_ZH
=
"^[\\u4e00-\\u9fa5]+$"
;
public
static
final
String
REGEX_ZH
=
"^[\\u4e00-\\u9fa5]+$"
;
public
static
final
String
REGEX_CONTAIN_CHINESE
=
".*[\\u4e00-\\u9fa5]+.*"
;
/**
/**
* Regex of username.
* Regex of username.
* <p>
* <p>
...
@@ -236,6 +239,16 @@ public class RegexUtil {
...
@@ -236,6 +239,16 @@ public class RegexUtil {
return
isMatch
(
REGEX_ZH
,
input
);
return
isMatch
(
REGEX_ZH
,
input
);
}
}
/**
* 是否包含中文
* @param input
* @return
*/
public
static
boolean
isContainChinese
(
final
CharSequence
input
)
{
return
isMatch
(
REGEX_CONTAIN_CHINESE
,
input
);
}
/**
/**
* Return whether input matches regex of username.
* Return whether input matches regex of username.
* <p>
* <p>
...
...
ch-dao/src/main/java/com/wwdz/ch/db/dao/ConsignSaleDao.java
0 → 100644
View file @
83b3e878
package
com.wwdz.ch.db.dao
;
import
com.wwdz.ch.db.domain.ConsignSale
;
import
com.wwdz.ch.db.dto.request.ConsignSaleRequestDto
;
import
java.util.List
;
public
interface
ConsignSaleDao
{
/**
* 插入新记录
*
* @param consignSale
* @return
*/
int
insert
(
ConsignSale
consignSale
);
/**
* 更新记录
*
* @param consignSale
* @return
*/
int
update
(
ConsignSale
consignSale
);
/**
*
* @param dto
* @return
*/
List
<
ConsignSale
>
find
(
ConsignSaleRequestDto
dto
);
}
ch-dao/src/main/java/com/wwdz/ch/db/dao/ConsignSaleRecordDao.java
0 → 100644
View file @
83b3e878
package
com.wwdz.ch.db.dao
;
import
com.wwdz.ch.db.domain.ConsignSaleRecord
;
import
java.util.List
;
public
interface
ConsignSaleRecordDao
{
/**
* 插入新记录
*
* @param consignSaleRecord
* @return
*/
int
insert
(
ConsignSaleRecord
consignSaleRecord
);
/**
* 查询记录
* @param saleId
* @return
*/
List
<
ConsignSaleRecord
>
find
(
String
saleId
);
}
ch-dao/src/main/java/com/wwdz/ch/db/dao/ItemDao.java
View file @
83b3e878
...
@@ -2,6 +2,7 @@ package com.wwdz.ch.db.dao;
...
@@ -2,6 +2,7 @@ package com.wwdz.ch.db.dao;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.wwdz.ch.db.domain.Item
;
import
com.wwdz.ch.db.domain.Item
;
import
com.wwdz.ch.db.domain.UserItemsRelation
;
import
com.wwdz.ch.db.dto.request.CoinRequestDto
;
import
com.wwdz.ch.db.dto.request.CoinRequestDto
;
import
java.util.List
;
import
java.util.List
;
...
@@ -44,6 +45,8 @@ public interface ItemDao {
...
@@ -44,6 +45,8 @@ public interface ItemDao {
Item
findDetails
(
Long
id
);
Item
findDetails
(
Long
id
);
List
<
Item
>
findDetails
(
List
<
Long
>
idList
);
boolean
setCoin
(
Item
item
);
boolean
setCoin
(
Item
item
);
int
deleteUserItems
(
CoinRequestDto
coinRequestDto
);
int
deleteUserItems
(
CoinRequestDto
coinRequestDto
);
...
@@ -125,4 +128,39 @@ public interface ItemDao {
...
@@ -125,4 +128,39 @@ public interface ItemDao {
List
<
Item
>
findListWithImages
(
CoinRequestDto
coinRequestDto
);
List
<
Item
>
findListWithImages
(
CoinRequestDto
coinRequestDto
);
List
<
Long
>
findOnlyOneselfItems
(
Long
userId
);
List
<
Long
>
findOnlyOneselfItems
(
Long
userId
);
/**
* 商品下架
* @param itemId
* @return
*/
boolean
updateOnSale
(
long
itemId
);
//--------------------------承接原来用户发布商品关联表--------------------------//
/**
* 通过用户id查询列表
*
* @param userId
* @param userIds
* @return
*/
List
<
UserItemsRelation
>
listByUserIds
(
Long
userId
,
List
<
Long
>
userIds
);
/**
* 判断是否已存在用户id和藏品id对应的记录
*
* @param userId
* @param itemId
* @return
*/
boolean
isExisted
(
Long
userId
,
Long
itemId
);
/**
* 通过藏品id获取单条记录
*
* @param itemId
* @return
*/
UserItemsRelation
find
(
Long
itemId
);
}
}
ch-dao/src/main/java/com/wwdz/ch/db/dao/UserItemsRelationDao.java
View file @
83b3e878
...
@@ -5,37 +5,37 @@ import com.wwdz.ch.db.domain.UserItemsRelation;
...
@@ -5,37 +5,37 @@ import com.wwdz.ch.db.domain.UserItemsRelation;
import
java.util.List
;
import
java.util.List
;
public
interface
UserItemsRelationDao
{
public
interface
UserItemsRelationDao
{
/**
/* */
/**
* 插入新记录
* 插入新记录
*
*
* @param record
* @param record
* @return
* @return
*/
*/
/*
int insert(UserItemsRelation record);
int insert(UserItemsRelation record);
/**
*/
/**
* 通过用户id查询列表
* 通过用户id查询列表
*
*
* @param userId
* @param userId
* @param userIds
* @param userIds
* @return
* @return
*/
*/
/*
List<UserItemsRelation> listByUserIds(Long userId, List<Long> userIds);
List<UserItemsRelation> listByUserIds(Long userId, List<Long> userIds);
/**
*/
/**
* 判断是否已存在用户id和藏品id对应的记录
* 判断是否已存在用户id和藏品id对应的记录
*
*
* @param userId
* @param userId
* @param itemId
* @param itemId
* @return
* @return
*/
*/
/*
boolean isExisted(Long userId, Long itemId);
boolean isExisted(Long userId, Long itemId);
/**
*/
/**
* 通过藏品id获取单条记录
* 通过藏品id获取单条记录
*
*
* @param itemId
* @param itemId
* @return
* @return
*/
*/
/*
UserItemsRelation
find
(
Long
itemId
);
UserItemsRelation find(Long itemId);
*/
}
}
ch-dao/src/main/java/com/wwdz/ch/db/domain/ConsignSale.java
0 → 100644
View file @
83b3e878
package
com.wwdz.ch.db.domain
;
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 2023/11/28
*/
@Data
public
class
ConsignSale
implements
Entity
{
private
Integer
id
;
/**
* 寄售单号
*/
private
String
saleId
;
/**
* 商品ID
*/
private
Long
itemId
;
/**
* 用户ID
*/
private
Long
userId
;
/**
* 寄售时间
*/
private
Date
saleTime
;
/**
* 用户报价
*/
private
Integer
userPrice
;
/**
* 图文估价范围
*/
private
String
imgValuation
;
/**
* 实物估价
*/
private
Integer
valuation
;
/**
* 成交价格
*/
private
Integer
dealPrice
;
/**
* 客户端状态
*/
private
Integer
customState
;
/**
* 系统状态
*/
private
Integer
systemState
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
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
(
", saleId="
).
append
(
saleId
);
sb
.
append
(
", itemId="
).
append
(
itemId
);
sb
.
append
(
", userId="
).
append
(
userId
);
sb
.
append
(
", saleTime="
).
append
(
saleTime
);
sb
.
append
(
", userPrice="
).
append
(
userPrice
);
sb
.
append
(
", imgValuation="
).
append
(
imgValuation
);
sb
.
append
(
", valuation="
).
append
(
valuation
);
sb
.
append
(
", dealPrice="
).
append
(
dealPrice
);
sb
.
append
(
", customState="
).
append
(
customState
);
sb
.
append
(
", systemState="
).
append
(
systemState
);
sb
.
append
(
", createTime="
).
append
(
createTime
);
sb
.
append
(
", updateTime="
).
append
(
updateTime
);
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
;
}
ConsignSale
other
=
(
ConsignSale
)
that
;
return
(
this
.
getId
()
==
null
?
other
.
getId
()
==
null
:
this
.
getId
().
equals
(
other
.
getId
()))
&&
(
this
.
getSaleId
()
==
null
?
other
.
getSaleId
()
==
null
:
this
.
getSaleId
().
equals
(
other
.
getSaleId
()))
&&
(
this
.
getItemId
()
==
null
?
other
.
getItemId
()
==
null
:
this
.
getItemId
().
equals
(
other
.
getItemId
()))
&&
(
this
.
getUserId
()
==
null
?
other
.
getUserId
()
==
null
:
this
.
getUserId
().
equals
(
other
.
getUserId
()))
&&
(
this
.
getSaleTime
()
==
null
?
other
.
getSaleTime
()
==
null
:
this
.
getSaleTime
().
equals
(
other
.
getSaleTime
()))
&&
(
this
.
getUserPrice
()
==
null
?
other
.
getUserPrice
()
==
null
:
this
.
getUserPrice
().
equals
(
other
.
getUserPrice
()))
&&
(
this
.
getImgValuation
()
==
null
?
other
.
getImgValuation
()
==
null
:
this
.
getImgValuation
().
equals
(
other
.
getImgValuation
()))
&&
(
this
.
getValuation
()
==
null
?
other
.
getValuation
()
==
null
:
this
.
getValuation
().
equals
(
other
.
getValuation
()))
&&
(
this
.
getDealPrice
()
==
null
?
other
.
getDealPrice
()
==
null
:
this
.
getDealPrice
().
equals
(
other
.
getDealPrice
()))
&&
(
this
.
getCustomState
()
==
null
?
other
.
getCustomState
()
==
null
:
this
.
getCustomState
().
equals
(
other
.
getCustomState
()))
&&
(
this
.
getSystemState
()
==
null
?
other
.
getSystemState
()
==
null
:
this
.
getSystemState
().
equals
(
other
.
getSystemState
()))
&&
(
this
.
getCreateTime
()
==
null
?
other
.
getCreateTime
()
==
null
:
this
.
getCreateTime
().
equals
(
other
.
getCreateTime
()))
&&
(
this
.
getUpdateTime
()
==
null
?
other
.
getUpdateTime
()
==
null
:
this
.
getUpdateTime
().
equals
(
other
.
getUpdateTime
()));
}
@Override
public
int
hashCode
()
{
final
int
prime
=
31
;
int
result
=
1
;
result
=
prime
*
result
+
((
getId
()
==
null
)
?
0
:
getId
().
hashCode
());
result
=
prime
*
result
+
((
getSaleId
()
==
null
)
?
0
:
getSaleId
().
hashCode
());
result
=
prime
*
result
+
((
getItemId
()
==
null
)
?
0
:
getItemId
().
hashCode
());
result
=
prime
*
result
+
((
getUserId
()
==
null
)
?
0
:
getUserId
().
hashCode
());
result
=
prime
*
result
+
((
getSaleTime
()
==
null
)
?
0
:
getSaleTime
().
hashCode
());
result
=
prime
*
result
+
((
getUserPrice
()
==
null
)
?
0
:
getUserPrice
().
hashCode
());
result
=
prime
*
result
+
((
getImgValuation
()
==
null
)
?
0
:
getImgValuation
().
hashCode
());
result
=
prime
*
result
+
((
getValuation
()
==
null
)
?
0
:
getValuation
().
hashCode
());
result
=
prime
*
result
+
((
getDealPrice
()
==
null
)
?
0
:
getDealPrice
().
hashCode
());
result
=
prime
*
result
+
((
getCustomState
()
==
null
)
?
0
:
getCustomState
().
hashCode
());
result
=
prime
*
result
+
((
getSystemState
()
==
null
)
?
0
:
getSystemState
().
hashCode
());
result
=
prime
*
result
+
((
getCreateTime
()
==
null
)
?
0
:
getCreateTime
().
hashCode
());
result
=
prime
*
result
+
((
getUpdateTime
()
==
null
)
?
0
:
getUpdateTime
().
hashCode
());
return
result
;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
enum
Column
{
id
(
"id"
,
"id"
,
"INTEGER"
,
false
),
saleId
(
"sale_id"
,
"saleId"
,
"VARCHAR"
,
false
),
itemId
(
"item_id"
,
"itemId"
,
"BIGINT"
,
false
),
userId
(
"user_id"
,
"userId"
,
"BIGINT"
,
false
),
saleTime
(
"sale_time"
,
"saleTime"
,
"TIMESTAMP"
,
false
),
userPrice
(
"user_price"
,
"userPrice"
,
"INTEGER"
,
false
),
imgValuation
(
"img_valuation"
,
"imgValuation"
,
"VARCHAR"
,
false
),
valuation
(
"valuation"
,
"valuation"
,
"INTEGER"
,
false
),
dealPrice
(
"deal_price"
,
"dealPrice"
,
"INTEGER"
,
false
),
customState
(
"custom_state"
,
"customState"
,
"INTEGER"
,
false
),
systemState
(
"system_state"
,
"systemState"
,
"INTEGER"
,
false
),
createTime
(
"create_time"
,
"createTime"
,
"TIMESTAMP"
,
false
),
updateTime
(
"update_time"
,
"updateTime"
,
"TIMESTAMP"
,
false
);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table consign_sale
*
* @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 consign_sale
*
* @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 consign_sale
*
* @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 consign_sale
*
* @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 consign_sale
*
* @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 consign_sale
*
* @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 consign_sale
*
* @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 consign_sale
*
* @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 consign_sale
*
* @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 consign_sale
*
* @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 consign_sale
*
* @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 consign_sale
*
* @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 consign_sale
*
* @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 consign_sale
*
* @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 consign_sale
*
* @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/ConsignSaleExample.java
0 → 100644
View file @
83b3e878
package
com.wwdz.ch.db.domain
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
public
class
ConsignSaleExample
{
protected
String
orderByClause
;
protected
boolean
distinct
;
protected
List
<
Criteria
>
oredCriteria
;
public
ConsignSaleExample
()
{
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 consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
ConsignSaleExample
orderBy
(
String
orderByClause
)
{
this
.
setOrderByClause
(
orderByClause
);
return
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
ConsignSaleExample
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 consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
static
Criteria
newAndCreateCriteria
()
{
ConsignSaleExample
example
=
new
ConsignSaleExample
();
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
(
Integer
value
)
{
addCriterion
(
"id ="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotEqualTo
(
Integer
value
)
{
addCriterion
(
"id <>"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdNotEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThan
(
Integer
value
)
{
addCriterion
(
"id >"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdGreaterThanColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"id >="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdGreaterThanOrEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThan
(
Integer
value
)
{
addCriterion
(
"id <"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdLessThanColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"id <="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdLessThanOrEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"id in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"id not in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"id between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"id not between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSaleIdIsNull
()
{
addCriterion
(
"sale_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSaleIdIsNotNull
()
{
addCriterion
(
"sale_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSaleIdEqualTo
(
String
value
)
{
addCriterion
(
"sale_id ="
,
value
,
"saleId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSaleIdEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"sale_id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSaleIdNotEqualTo
(
String
value
)
{
addCriterion
(
"sale_id <>"
,
value
,
"saleId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSaleIdNotEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"sale_id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSaleIdGreaterThan
(
String
value
)
{
addCriterion
(
"sale_id >"
,
value
,
"saleId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSaleIdGreaterThanColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"sale_id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSaleIdGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"sale_id >="
,
value
,
"saleId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSaleIdGreaterThanOrEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"sale_id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSaleIdLessThan
(
String
value
)
{
addCriterion
(
"sale_id <"
,
value
,
"saleId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSaleIdLessThanColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"sale_id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSaleIdLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"sale_id <="
,
value
,
"saleId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSaleIdLessThanOrEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"sale_id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSaleIdLike
(
String
value
)
{
addCriterion
(
"sale_id like"
,
value
,
"saleId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSaleIdNotLike
(
String
value
)
{
addCriterion
(
"sale_id not like"
,
value
,
"saleId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSaleIdIn
(
List
<
String
>
values
)
{
addCriterion
(
"sale_id in"
,
values
,
"saleId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSaleIdNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"sale_id not in"
,
values
,
"saleId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSaleIdBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"sale_id between"
,
value1
,
value2
,
"saleId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSaleIdNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"sale_id not between"
,
value1
,
value2
,
"saleId"
);
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 consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andItemIdEqualToColumn
(
ConsignSale
.
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 consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andItemIdNotEqualToColumn
(
ConsignSale
.
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 consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andItemIdGreaterThanColumn
(
ConsignSale
.
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 consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andItemIdGreaterThanOrEqualToColumn
(
ConsignSale
.
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 consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andItemIdLessThanColumn
(
ConsignSale
.
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 consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andItemIdLessThanOrEqualToColumn
(
ConsignSale
.
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
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 consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdEqualToColumn
(
ConsignSale
.
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 consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdNotEqualToColumn
(
ConsignSale
.
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 consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdGreaterThanColumn
(
ConsignSale
.
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 consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdGreaterThanOrEqualToColumn
(
ConsignSale
.
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 consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdLessThanColumn
(
ConsignSale
.
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 consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdLessThanOrEqualToColumn
(
ConsignSale
.
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
andSaleTimeIsNull
()
{
addCriterion
(
"sale_time is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSaleTimeIsNotNull
()
{
addCriterion
(
"sale_time is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSaleTimeEqualTo
(
Date
value
)
{
addCriterion
(
"sale_time ="
,
value
,
"saleTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSaleTimeEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"sale_time = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSaleTimeNotEqualTo
(
Date
value
)
{
addCriterion
(
"sale_time <>"
,
value
,
"saleTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSaleTimeNotEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"sale_time <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSaleTimeGreaterThan
(
Date
value
)
{
addCriterion
(
"sale_time >"
,
value
,
"saleTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSaleTimeGreaterThanColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"sale_time > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSaleTimeGreaterThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"sale_time >="
,
value
,
"saleTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSaleTimeGreaterThanOrEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"sale_time >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSaleTimeLessThan
(
Date
value
)
{
addCriterion
(
"sale_time <"
,
value
,
"saleTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSaleTimeLessThanColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"sale_time < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSaleTimeLessThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"sale_time <="
,
value
,
"saleTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSaleTimeLessThanOrEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"sale_time <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSaleTimeIn
(
List
<
Date
>
values
)
{
addCriterion
(
"sale_time in"
,
values
,
"saleTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSaleTimeNotIn
(
List
<
Date
>
values
)
{
addCriterion
(
"sale_time not in"
,
values
,
"saleTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSaleTimeBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"sale_time between"
,
value1
,
value2
,
"saleTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSaleTimeNotBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"sale_time not between"
,
value1
,
value2
,
"saleTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserPriceIsNull
()
{
addCriterion
(
"user_price is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserPriceIsNotNull
()
{
addCriterion
(
"user_price is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserPriceEqualTo
(
Integer
value
)
{
addCriterion
(
"user_price ="
,
value
,
"userPrice"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserPriceEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_price = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserPriceNotEqualTo
(
Integer
value
)
{
addCriterion
(
"user_price <>"
,
value
,
"userPrice"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserPriceNotEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_price <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserPriceGreaterThan
(
Integer
value
)
{
addCriterion
(
"user_price >"
,
value
,
"userPrice"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserPriceGreaterThanColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_price > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserPriceGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"user_price >="
,
value
,
"userPrice"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserPriceGreaterThanOrEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_price >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserPriceLessThan
(
Integer
value
)
{
addCriterion
(
"user_price <"
,
value
,
"userPrice"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserPriceLessThanColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_price < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserPriceLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"user_price <="
,
value
,
"userPrice"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserPriceLessThanOrEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"user_price <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andUserPriceIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"user_price in"
,
values
,
"userPrice"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserPriceNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"user_price not in"
,
values
,
"userPrice"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserPriceBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"user_price between"
,
value1
,
value2
,
"userPrice"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserPriceNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"user_price not between"
,
value1
,
value2
,
"userPrice"
);
return
(
Criteria
)
this
;
}
public
Criteria
andImgValuationIsNull
()
{
addCriterion
(
"img_valuation is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andImgValuationIsNotNull
()
{
addCriterion
(
"img_valuation is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andImgValuationEqualTo
(
String
value
)
{
addCriterion
(
"img_valuation ="
,
value
,
"imgValuation"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andImgValuationEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"img_valuation = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andImgValuationNotEqualTo
(
String
value
)
{
addCriterion
(
"img_valuation <>"
,
value
,
"imgValuation"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andImgValuationNotEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"img_valuation <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andImgValuationGreaterThan
(
String
value
)
{
addCriterion
(
"img_valuation >"
,
value
,
"imgValuation"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andImgValuationGreaterThanColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"img_valuation > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andImgValuationGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"img_valuation >="
,
value
,
"imgValuation"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andImgValuationGreaterThanOrEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"img_valuation >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andImgValuationLessThan
(
String
value
)
{
addCriterion
(
"img_valuation <"
,
value
,
"imgValuation"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andImgValuationLessThanColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"img_valuation < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andImgValuationLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"img_valuation <="
,
value
,
"imgValuation"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andImgValuationLessThanOrEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"img_valuation <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andImgValuationLike
(
String
value
)
{
addCriterion
(
"img_valuation like"
,
value
,
"imgValuation"
);
return
(
Criteria
)
this
;
}
public
Criteria
andImgValuationNotLike
(
String
value
)
{
addCriterion
(
"img_valuation not like"
,
value
,
"imgValuation"
);
return
(
Criteria
)
this
;
}
public
Criteria
andImgValuationIn
(
List
<
String
>
values
)
{
addCriterion
(
"img_valuation in"
,
values
,
"imgValuation"
);
return
(
Criteria
)
this
;
}
public
Criteria
andImgValuationNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"img_valuation not in"
,
values
,
"imgValuation"
);
return
(
Criteria
)
this
;
}
public
Criteria
andImgValuationBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"img_valuation between"
,
value1
,
value2
,
"imgValuation"
);
return
(
Criteria
)
this
;
}
public
Criteria
andImgValuationNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"img_valuation not between"
,
value1
,
value2
,
"imgValuation"
);
return
(
Criteria
)
this
;
}
public
Criteria
andValuationIsNull
()
{
addCriterion
(
"valuation is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andValuationIsNotNull
()
{
addCriterion
(
"valuation is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andValuationEqualTo
(
Integer
value
)
{
addCriterion
(
"valuation ="
,
value
,
"valuation"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andValuationEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"valuation = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andValuationNotEqualTo
(
Integer
value
)
{
addCriterion
(
"valuation <>"
,
value
,
"valuation"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andValuationNotEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"valuation <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andValuationGreaterThan
(
Integer
value
)
{
addCriterion
(
"valuation >"
,
value
,
"valuation"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andValuationGreaterThanColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"valuation > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andValuationGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"valuation >="
,
value
,
"valuation"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andValuationGreaterThanOrEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"valuation >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andValuationLessThan
(
Integer
value
)
{
addCriterion
(
"valuation <"
,
value
,
"valuation"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andValuationLessThanColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"valuation < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andValuationLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"valuation <="
,
value
,
"valuation"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andValuationLessThanOrEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"valuation <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andValuationIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"valuation in"
,
values
,
"valuation"
);
return
(
Criteria
)
this
;
}
public
Criteria
andValuationNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"valuation not in"
,
values
,
"valuation"
);
return
(
Criteria
)
this
;
}
public
Criteria
andValuationBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"valuation between"
,
value1
,
value2
,
"valuation"
);
return
(
Criteria
)
this
;
}
public
Criteria
andValuationNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"valuation not between"
,
value1
,
value2
,
"valuation"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDealPriceIsNull
()
{
addCriterion
(
"deal_price is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDealPriceIsNotNull
()
{
addCriterion
(
"deal_price is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDealPriceEqualTo
(
Integer
value
)
{
addCriterion
(
"deal_price ="
,
value
,
"dealPrice"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andDealPriceEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"deal_price = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andDealPriceNotEqualTo
(
Integer
value
)
{
addCriterion
(
"deal_price <>"
,
value
,
"dealPrice"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andDealPriceNotEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"deal_price <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andDealPriceGreaterThan
(
Integer
value
)
{
addCriterion
(
"deal_price >"
,
value
,
"dealPrice"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andDealPriceGreaterThanColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"deal_price > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andDealPriceGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"deal_price >="
,
value
,
"dealPrice"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andDealPriceGreaterThanOrEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"deal_price >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andDealPriceLessThan
(
Integer
value
)
{
addCriterion
(
"deal_price <"
,
value
,
"dealPrice"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andDealPriceLessThanColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"deal_price < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andDealPriceLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"deal_price <="
,
value
,
"dealPrice"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andDealPriceLessThanOrEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"deal_price <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andDealPriceIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"deal_price in"
,
values
,
"dealPrice"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDealPriceNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"deal_price not in"
,
values
,
"dealPrice"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDealPriceBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"deal_price between"
,
value1
,
value2
,
"dealPrice"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDealPriceNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"deal_price not between"
,
value1
,
value2
,
"dealPrice"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCustomStateIsNull
()
{
addCriterion
(
"custom_state is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCustomStateIsNotNull
()
{
addCriterion
(
"custom_state is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCustomStateEqualTo
(
Integer
value
)
{
addCriterion
(
"custom_state ="
,
value
,
"customState"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCustomStateEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"custom_state = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCustomStateNotEqualTo
(
Integer
value
)
{
addCriterion
(
"custom_state <>"
,
value
,
"customState"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCustomStateNotEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"custom_state <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCustomStateGreaterThan
(
Integer
value
)
{
addCriterion
(
"custom_state >"
,
value
,
"customState"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCustomStateGreaterThanColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"custom_state > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCustomStateGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"custom_state >="
,
value
,
"customState"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCustomStateGreaterThanOrEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"custom_state >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCustomStateLessThan
(
Integer
value
)
{
addCriterion
(
"custom_state <"
,
value
,
"customState"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCustomStateLessThanColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"custom_state < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCustomStateLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"custom_state <="
,
value
,
"customState"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCustomStateLessThanOrEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"custom_state <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCustomStateIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"custom_state in"
,
values
,
"customState"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCustomStateNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"custom_state not in"
,
values
,
"customState"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCustomStateBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"custom_state between"
,
value1
,
value2
,
"customState"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCustomStateNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"custom_state not between"
,
value1
,
value2
,
"customState"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSystemStateIsNull
()
{
addCriterion
(
"system_state is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSystemStateIsNotNull
()
{
addCriterion
(
"system_state is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSystemStateEqualTo
(
Integer
value
)
{
addCriterion
(
"system_state ="
,
value
,
"systemState"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSystemStateEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"system_state = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSystemStateNotEqualTo
(
Integer
value
)
{
addCriterion
(
"system_state <>"
,
value
,
"systemState"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSystemStateNotEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"system_state <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSystemStateGreaterThan
(
Integer
value
)
{
addCriterion
(
"system_state >"
,
value
,
"systemState"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSystemStateGreaterThanColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"system_state > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSystemStateGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"system_state >="
,
value
,
"systemState"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSystemStateGreaterThanOrEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"system_state >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSystemStateLessThan
(
Integer
value
)
{
addCriterion
(
"system_state <"
,
value
,
"systemState"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSystemStateLessThanColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"system_state < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSystemStateLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"system_state <="
,
value
,
"systemState"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSystemStateLessThanOrEqualToColumn
(
ConsignSale
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"system_state <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSystemStateIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"system_state in"
,
values
,
"systemState"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSystemStateNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"system_state not in"
,
values
,
"systemState"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSystemStateBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"system_state between"
,
value1
,
value2
,
"systemState"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSystemStateNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"system_state not between"
,
value1
,
value2
,
"systemState"
);
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 consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeEqualToColumn
(
ConsignSale
.
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 consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeNotEqualToColumn
(
ConsignSale
.
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 consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeGreaterThanColumn
(
ConsignSale
.
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 consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeGreaterThanOrEqualToColumn
(
ConsignSale
.
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 consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeLessThanColumn
(
ConsignSale
.
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 consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeLessThanOrEqualToColumn
(
ConsignSale
.
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 consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeEqualToColumn
(
ConsignSale
.
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 consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeNotEqualToColumn
(
ConsignSale
.
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 consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeGreaterThanColumn
(
ConsignSale
.
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 consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeGreaterThanOrEqualToColumn
(
ConsignSale
.
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 consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeLessThanColumn
(
ConsignSale
.
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 consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUpdateTimeLessThanOrEqualToColumn
(
ConsignSale
.
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
static
class
Criteria
extends
GeneratedCriteria
{
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
ConsignSaleExample
example
;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
protected
Criteria
(
ConsignSaleExample
example
)
{
super
();
this
.
example
=
example
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
ConsignSaleExample
example
()
{
return
this
.
example
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @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 consign_sale
*
* @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 consign_sale
*
* @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/ConsignSaleRecord.java
0 → 100644
View file @
83b3e878
package
com.wwdz.ch.db.domain
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
com.xxdxxs.entity.Entity
;
import
lombok.Data
;
import
org.springframework.util.StringUtils
;
/**
* @author shiyu
* @date 2023/11/28
*/
@Data
public
class
ConsignSaleRecord
implements
Entity
{
private
Integer
id
;
/**
* 寄售单
*/
private
String
saleId
;
/**
* 操作时间
*/
private
Date
createTime
;
/**
* 操作内容
*/
private
String
content
;
/**
* 操作理由或成交平台
*/
private
String
remark
;
/**
* 操作类型
*/
private
Integer
type
;
private
static
final
long
serialVersionUID
=
1L
;
public
void
setRemark
(
String
remark
)
{
if
(
StringUtils
.
isEmpty
(
remark
)
)
{
this
.
remark
=
"理由:"
+
remark
;
}
else
if
(
StringUtils
.
hasLength
(
remark
)
&&
!
remark
.
startsWith
(
"理由:"
)
&&
!
remark
.
startsWith
(
"成交平台"
))
{
this
.
remark
=
"理由:"
+
remark
;
}
else
{
this
.
remark
=
remark
;
}
}
@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
(
", saleId="
).
append
(
saleId
);
sb
.
append
(
", createTime="
).
append
(
createTime
);
sb
.
append
(
", content="
).
append
(
content
);
sb
.
append
(
", remark="
).
append
(
remark
);
sb
.
append
(
", type="
).
append
(
type
);
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
;
}
ConsignSaleRecord
other
=
(
ConsignSaleRecord
)
that
;
return
(
this
.
getId
()
==
null
?
other
.
getId
()
==
null
:
this
.
getId
().
equals
(
other
.
getId
()))
&&
(
this
.
getSaleId
()
==
null
?
other
.
getSaleId
()
==
null
:
this
.
getSaleId
().
equals
(
other
.
getSaleId
()))
&&
(
this
.
getCreateTime
()
==
null
?
other
.
getCreateTime
()
==
null
:
this
.
getCreateTime
().
equals
(
other
.
getCreateTime
()))
&&
(
this
.
getContent
()
==
null
?
other
.
getContent
()
==
null
:
this
.
getContent
().
equals
(
other
.
getContent
()))
&&
(
this
.
getRemark
()
==
null
?
other
.
getRemark
()
==
null
:
this
.
getRemark
().
equals
(
other
.
getRemark
()))
&&
(
this
.
getType
()
==
null
?
other
.
getType
()
==
null
:
this
.
getType
().
equals
(
other
.
getType
()));
}
@Override
public
int
hashCode
()
{
final
int
prime
=
31
;
int
result
=
1
;
result
=
prime
*
result
+
((
getId
()
==
null
)
?
0
:
getId
().
hashCode
());
result
=
prime
*
result
+
((
getSaleId
()
==
null
)
?
0
:
getSaleId
().
hashCode
());
result
=
prime
*
result
+
((
getCreateTime
()
==
null
)
?
0
:
getCreateTime
().
hashCode
());
result
=
prime
*
result
+
((
getContent
()
==
null
)
?
0
:
getContent
().
hashCode
());
result
=
prime
*
result
+
((
getRemark
()
==
null
)
?
0
:
getRemark
().
hashCode
());
result
=
prime
*
result
+
((
getType
()
==
null
)
?
0
:
getType
().
hashCode
());
return
result
;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
enum
Column
{
id
(
"id"
,
"id"
,
"INTEGER"
,
false
),
saleId
(
"sale_id"
,
"saleId"
,
"VARCHAR"
,
false
),
createTime
(
"create_time"
,
"createTime"
,
"TIMESTAMP"
,
false
),
content
(
"content"
,
"content"
,
"VARCHAR"
,
false
),
remark
(
"remark"
,
"remark"
,
"VARCHAR"
,
false
),
type
(
"type"
,
"type"
,
"INTEGER"
,
true
);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table consign_sale_record
*
* @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 consign_sale_record
*
* @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 consign_sale_record
*
* @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 consign_sale_record
*
* @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 consign_sale_record
*
* @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 consign_sale_record
*
* @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 consign_sale_record
*
* @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 consign_sale_record
*
* @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 consign_sale_record
*
* @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 consign_sale_record
*
* @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 consign_sale_record
*
* @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 consign_sale_record
*
* @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 consign_sale_record
*
* @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 consign_sale_record
*
* @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 consign_sale_record
*
* @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/ConsignSaleRecordExample.java
0 → 100644
View file @
83b3e878
package
com.wwdz.ch.db.domain
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
public
class
ConsignSaleRecordExample
{
protected
String
orderByClause
;
protected
boolean
distinct
;
protected
List
<
Criteria
>
oredCriteria
;
public
ConsignSaleRecordExample
()
{
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 consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
ConsignSaleRecordExample
orderBy
(
String
orderByClause
)
{
this
.
setOrderByClause
(
orderByClause
);
return
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
ConsignSaleRecordExample
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 consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
static
Criteria
newAndCreateCriteria
()
{
ConsignSaleRecordExample
example
=
new
ConsignSaleRecordExample
();
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
(
Integer
value
)
{
addCriterion
(
"id ="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdEqualToColumn
(
ConsignSaleRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotEqualTo
(
Integer
value
)
{
addCriterion
(
"id <>"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdNotEqualToColumn
(
ConsignSaleRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThan
(
Integer
value
)
{
addCriterion
(
"id >"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdGreaterThanColumn
(
ConsignSaleRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"id >="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdGreaterThanOrEqualToColumn
(
ConsignSaleRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThan
(
Integer
value
)
{
addCriterion
(
"id <"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdLessThanColumn
(
ConsignSaleRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"id <="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdLessThanOrEqualToColumn
(
ConsignSaleRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"id in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"id not in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"id between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"id not between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSaleIdIsNull
()
{
addCriterion
(
"sale_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSaleIdIsNotNull
()
{
addCriterion
(
"sale_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSaleIdEqualTo
(
String
value
)
{
addCriterion
(
"sale_id ="
,
value
,
"saleId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSaleIdEqualToColumn
(
ConsignSaleRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"sale_id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSaleIdNotEqualTo
(
String
value
)
{
addCriterion
(
"sale_id <>"
,
value
,
"saleId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSaleIdNotEqualToColumn
(
ConsignSaleRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"sale_id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSaleIdGreaterThan
(
String
value
)
{
addCriterion
(
"sale_id >"
,
value
,
"saleId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSaleIdGreaterThanColumn
(
ConsignSaleRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"sale_id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSaleIdGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"sale_id >="
,
value
,
"saleId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSaleIdGreaterThanOrEqualToColumn
(
ConsignSaleRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"sale_id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSaleIdLessThan
(
String
value
)
{
addCriterion
(
"sale_id <"
,
value
,
"saleId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSaleIdLessThanColumn
(
ConsignSaleRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"sale_id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSaleIdLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"sale_id <="
,
value
,
"saleId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andSaleIdLessThanOrEqualToColumn
(
ConsignSaleRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"sale_id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andSaleIdLike
(
String
value
)
{
addCriterion
(
"sale_id like"
,
value
,
"saleId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSaleIdNotLike
(
String
value
)
{
addCriterion
(
"sale_id not like"
,
value
,
"saleId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSaleIdIn
(
List
<
String
>
values
)
{
addCriterion
(
"sale_id in"
,
values
,
"saleId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSaleIdNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"sale_id not in"
,
values
,
"saleId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSaleIdBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"sale_id between"
,
value1
,
value2
,
"saleId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSaleIdNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"sale_id not between"
,
value1
,
value2
,
"saleId"
);
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 consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeEqualToColumn
(
ConsignSaleRecord
.
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 consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeNotEqualToColumn
(
ConsignSaleRecord
.
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 consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeGreaterThanColumn
(
ConsignSaleRecord
.
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 consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeGreaterThanOrEqualToColumn
(
ConsignSaleRecord
.
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 consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeLessThanColumn
(
ConsignSaleRecord
.
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 consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeLessThanOrEqualToColumn
(
ConsignSaleRecord
.
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
andContentIsNull
()
{
addCriterion
(
"content is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andContentIsNotNull
()
{
addCriterion
(
"content is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andContentEqualTo
(
String
value
)
{
addCriterion
(
"content ="
,
value
,
"content"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andContentEqualToColumn
(
ConsignSaleRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"content = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andContentNotEqualTo
(
String
value
)
{
addCriterion
(
"content <>"
,
value
,
"content"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andContentNotEqualToColumn
(
ConsignSaleRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"content <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andContentGreaterThan
(
String
value
)
{
addCriterion
(
"content >"
,
value
,
"content"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andContentGreaterThanColumn
(
ConsignSaleRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"content > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andContentGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"content >="
,
value
,
"content"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andContentGreaterThanOrEqualToColumn
(
ConsignSaleRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"content >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andContentLessThan
(
String
value
)
{
addCriterion
(
"content <"
,
value
,
"content"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andContentLessThanColumn
(
ConsignSaleRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"content < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andContentLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"content <="
,
value
,
"content"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andContentLessThanOrEqualToColumn
(
ConsignSaleRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"content <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andContentLike
(
String
value
)
{
addCriterion
(
"content like"
,
value
,
"content"
);
return
(
Criteria
)
this
;
}
public
Criteria
andContentNotLike
(
String
value
)
{
addCriterion
(
"content not like"
,
value
,
"content"
);
return
(
Criteria
)
this
;
}
public
Criteria
andContentIn
(
List
<
String
>
values
)
{
addCriterion
(
"content in"
,
values
,
"content"
);
return
(
Criteria
)
this
;
}
public
Criteria
andContentNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"content not in"
,
values
,
"content"
);
return
(
Criteria
)
this
;
}
public
Criteria
andContentBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"content between"
,
value1
,
value2
,
"content"
);
return
(
Criteria
)
this
;
}
public
Criteria
andContentNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"content not between"
,
value1
,
value2
,
"content"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRemarkIsNull
()
{
addCriterion
(
"remark is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRemarkIsNotNull
()
{
addCriterion
(
"remark is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRemarkEqualTo
(
String
value
)
{
addCriterion
(
"remark ="
,
value
,
"remark"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andRemarkEqualToColumn
(
ConsignSaleRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"remark = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andRemarkNotEqualTo
(
String
value
)
{
addCriterion
(
"remark <>"
,
value
,
"remark"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andRemarkNotEqualToColumn
(
ConsignSaleRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"remark <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andRemarkGreaterThan
(
String
value
)
{
addCriterion
(
"remark >"
,
value
,
"remark"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andRemarkGreaterThanColumn
(
ConsignSaleRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"remark > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andRemarkGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"remark >="
,
value
,
"remark"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andRemarkGreaterThanOrEqualToColumn
(
ConsignSaleRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"remark >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andRemarkLessThan
(
String
value
)
{
addCriterion
(
"remark <"
,
value
,
"remark"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andRemarkLessThanColumn
(
ConsignSaleRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"remark < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andRemarkLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"remark <="
,
value
,
"remark"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andRemarkLessThanOrEqualToColumn
(
ConsignSaleRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"remark <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andRemarkLike
(
String
value
)
{
addCriterion
(
"remark like"
,
value
,
"remark"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRemarkNotLike
(
String
value
)
{
addCriterion
(
"remark not like"
,
value
,
"remark"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRemarkIn
(
List
<
String
>
values
)
{
addCriterion
(
"remark in"
,
values
,
"remark"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRemarkNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"remark not in"
,
values
,
"remark"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRemarkBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"remark between"
,
value1
,
value2
,
"remark"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRemarkNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"remark not between"
,
value1
,
value2
,
"remark"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTypeIsNull
()
{
addCriterion
(
"`type` is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTypeIsNotNull
()
{
addCriterion
(
"`type` is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTypeEqualTo
(
Integer
value
)
{
addCriterion
(
"`type` ="
,
value
,
"type"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTypeEqualToColumn
(
ConsignSaleRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`type` = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTypeNotEqualTo
(
Integer
value
)
{
addCriterion
(
"`type` <>"
,
value
,
"type"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTypeNotEqualToColumn
(
ConsignSaleRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`type` <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTypeGreaterThan
(
Integer
value
)
{
addCriterion
(
"`type` >"
,
value
,
"type"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTypeGreaterThanColumn
(
ConsignSaleRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`type` > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTypeGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"`type` >="
,
value
,
"type"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTypeGreaterThanOrEqualToColumn
(
ConsignSaleRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`type` >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTypeLessThan
(
Integer
value
)
{
addCriterion
(
"`type` <"
,
value
,
"type"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTypeLessThanColumn
(
ConsignSaleRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`type` < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTypeLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"`type` <="
,
value
,
"type"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTypeLessThanOrEqualToColumn
(
ConsignSaleRecord
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`type` <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTypeIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"`type` in"
,
values
,
"type"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTypeNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"`type` not in"
,
values
,
"type"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTypeBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"`type` between"
,
value1
,
value2
,
"type"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTypeNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"`type` not between"
,
value1
,
value2
,
"type"
);
return
(
Criteria
)
this
;
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
ConsignSaleRecordExample
example
;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
protected
Criteria
(
ConsignSaleRecordExample
example
)
{
super
();
this
.
example
=
example
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
ConsignSaleRecordExample
example
()
{
return
this
.
example
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale_record
*
* @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 consign_sale_record
*
* @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 consign_sale_record
*
* @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/Item.java
View file @
83b3e878
...
@@ -10,7 +10,7 @@ import lombok.Data;
...
@@ -10,7 +10,7 @@ import lombok.Data;
/**
/**
* @author shiyu
* @author shiyu
* @date 2023/
09/27
* @date 2023/
11/30
*/
*/
@Data
@Data
public
class
Item
implements
Entity
{
public
class
Item
implements
Entity
{
...
@@ -103,6 +103,11 @@ public class Item implements Entity {
...
@@ -103,6 +103,11 @@ public class Item implements Entity {
*/
*/
private
Integer
kind
;
private
Integer
kind
;
/**
* 商品所属用户id
*/
private
Long
userId
;
/**
/**
* 查看权限(0所有人,1仅自己可见)
* 查看权限(0所有人,1仅自己可见)
*/
*/
...
@@ -160,6 +165,7 @@ public class Item implements Entity {
...
@@ -160,6 +165,7 @@ public class Item implements Entity {
sb
.
append
(
", originalSourceUrl="
).
append
(
originalSourceUrl
);
sb
.
append
(
", originalSourceUrl="
).
append
(
originalSourceUrl
);
sb
.
append
(
", source="
).
append
(
source
);
sb
.
append
(
", source="
).
append
(
source
);
sb
.
append
(
", kind="
).
append
(
kind
);
sb
.
append
(
", kind="
).
append
(
kind
);
sb
.
append
(
", userId="
).
append
(
userId
);
sb
.
append
(
", viewPermission="
).
append
(
viewPermission
);
sb
.
append
(
", viewPermission="
).
append
(
viewPermission
);
sb
.
append
(
", extra="
).
append
(
extra
);
sb
.
append
(
", extra="
).
append
(
extra
);
sb
.
append
(
", images="
).
append
(
images
);
sb
.
append
(
", images="
).
append
(
images
);
...
@@ -202,6 +208,7 @@ public class Item implements Entity {
...
@@ -202,6 +208,7 @@ public class Item implements Entity {
&&
(
this
.
getOriginalSourceUrl
()
==
null
?
other
.
getOriginalSourceUrl
()
==
null
:
this
.
getOriginalSourceUrl
().
equals
(
other
.
getOriginalSourceUrl
()))
&&
(
this
.
getOriginalSourceUrl
()
==
null
?
other
.
getOriginalSourceUrl
()
==
null
:
this
.
getOriginalSourceUrl
().
equals
(
other
.
getOriginalSourceUrl
()))
&&
(
this
.
getSource
()
==
null
?
other
.
getSource
()
==
null
:
this
.
getSource
().
equals
(
other
.
getSource
()))
&&
(
this
.
getSource
()
==
null
?
other
.
getSource
()
==
null
:
this
.
getSource
().
equals
(
other
.
getSource
()))
&&
(
this
.
getKind
()
==
null
?
other
.
getKind
()
==
null
:
this
.
getKind
().
equals
(
other
.
getKind
()))
&&
(
this
.
getKind
()
==
null
?
other
.
getKind
()
==
null
:
this
.
getKind
().
equals
(
other
.
getKind
()))
&&
(
this
.
getUserId
()
==
null
?
other
.
getUserId
()
==
null
:
this
.
getUserId
().
equals
(
other
.
getUserId
()))
&&
(
this
.
getViewPermission
()
==
null
?
other
.
getViewPermission
()
==
null
:
this
.
getViewPermission
().
equals
(
other
.
getViewPermission
()))
&&
(
this
.
getViewPermission
()
==
null
?
other
.
getViewPermission
()
==
null
:
this
.
getViewPermission
().
equals
(
other
.
getViewPermission
()))
&&
(
this
.
getExtra
()
==
null
?
other
.
getExtra
()
==
null
:
this
.
getExtra
().
equals
(
other
.
getExtra
()))
&&
(
this
.
getExtra
()
==
null
?
other
.
getExtra
()
==
null
:
this
.
getExtra
().
equals
(
other
.
getExtra
()))
&&
(
this
.
getImages
()
==
null
?
other
.
getImages
()
==
null
:
this
.
getImages
().
equals
(
other
.
getImages
()))
&&
(
this
.
getImages
()
==
null
?
other
.
getImages
()
==
null
:
this
.
getImages
().
equals
(
other
.
getImages
()))
...
@@ -233,6 +240,7 @@ public class Item implements Entity {
...
@@ -233,6 +240,7 @@ public class Item implements Entity {
result
=
prime
*
result
+
((
getOriginalSourceUrl
()
==
null
)
?
0
:
getOriginalSourceUrl
().
hashCode
());
result
=
prime
*
result
+
((
getOriginalSourceUrl
()
==
null
)
?
0
:
getOriginalSourceUrl
().
hashCode
());
result
=
prime
*
result
+
((
getSource
()
==
null
)
?
0
:
getSource
().
hashCode
());
result
=
prime
*
result
+
((
getSource
()
==
null
)
?
0
:
getSource
().
hashCode
());
result
=
prime
*
result
+
((
getKind
()
==
null
)
?
0
:
getKind
().
hashCode
());
result
=
prime
*
result
+
((
getKind
()
==
null
)
?
0
:
getKind
().
hashCode
());
result
=
prime
*
result
+
((
getUserId
()
==
null
)
?
0
:
getUserId
().
hashCode
());
result
=
prime
*
result
+
((
getViewPermission
()
==
null
)
?
0
:
getViewPermission
().
hashCode
());
result
=
prime
*
result
+
((
getViewPermission
()
==
null
)
?
0
:
getViewPermission
().
hashCode
());
result
=
prime
*
result
+
((
getExtra
()
==
null
)
?
0
:
getExtra
().
hashCode
());
result
=
prime
*
result
+
((
getExtra
()
==
null
)
?
0
:
getExtra
().
hashCode
());
result
=
prime
*
result
+
((
getImages
()
==
null
)
?
0
:
getImages
().
hashCode
());
result
=
prime
*
result
+
((
getImages
()
==
null
)
?
0
:
getImages
().
hashCode
());
...
@@ -269,6 +277,7 @@ public class Item implements Entity {
...
@@ -269,6 +277,7 @@ public class Item implements Entity {
originalSourceUrl
(
"original_source_url"
,
"originalSourceUrl"
,
"VARCHAR"
,
false
),
originalSourceUrl
(
"original_source_url"
,
"originalSourceUrl"
,
"VARCHAR"
,
false
),
source
(
"source"
,
"source"
,
"INTEGER"
,
true
),
source
(
"source"
,
"source"
,
"INTEGER"
,
true
),
kind
(
"kind"
,
"kind"
,
"INTEGER"
,
false
),
kind
(
"kind"
,
"kind"
,
"INTEGER"
,
false
),
userId
(
"user_id"
,
"userId"
,
"BIGINT"
,
false
),
viewPermission
(
"view_permission"
,
"viewPermission"
,
"INTEGER"
,
false
),
viewPermission
(
"view_permission"
,
"viewPermission"
,
"INTEGER"
,
false
),
extra
(
"extra"
,
"extra"
,
"LONGVARCHAR"
,
false
),
extra
(
"extra"
,
"extra"
,
"LONGVARCHAR"
,
false
),
images
(
"images"
,
"images"
,
"LONGVARCHAR"
,
false
),
images
(
"images"
,
"images"
,
"LONGVARCHAR"
,
false
),
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/ItemExample.java
View file @
83b3e878
...
@@ -2706,6 +2706,138 @@ public class ItemExample {
...
@@ -2706,6 +2706,138 @@ public class ItemExample {
return
(
Criteria
)
this
;
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 item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdEqualToColumn
(
Item
.
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 item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdNotEqualToColumn
(
Item
.
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 item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdGreaterThanColumn
(
Item
.
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 item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdGreaterThanOrEqualToColumn
(
Item
.
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 item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdLessThanColumn
(
Item
.
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 item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andUserIdLessThanOrEqualToColumn
(
Item
.
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
andViewPermissionIsNull
()
{
public
Criteria
andViewPermissionIsNull
()
{
addCriterion
(
"view_permission is null"
);
addCriterion
(
"view_permission is null"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
...
...
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/ConsignSaleRecordRequestDto.java
0 → 100644
View file @
83b3e878
package
com.wwdz.ch.db.dto.request
;
import
com.xxdxxs.entity.Entity
;
import
lombok.Data
;
import
java.util.Date
;
@Data
public
class
ConsignSaleRecordRequestDto
implements
Entity
{
/**
* 寄售单
*/
private
String
saleId
;
private
Long
itemId
;
/**
* 操作时间
*/
private
Date
createTime
;
/**
* 操作内容
*/
private
String
content
;
/**
* 操作理由或成交平台
*/
private
String
remark
;
/**
* 操作类型
*/
private
Integer
type
;
}
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/ConsignSaleRequestDto.java
0 → 100644
View file @
83b3e878
package
com.wwdz.ch.db.dto.request
;
import
com.xxdxxs.entity.Entity
;
import
lombok.Data
;
import
java.util.Date
;
import
java.util.List
;
@Data
public
class
ConsignSaleRequestDto
extends
BaseRequestDto
implements
Entity
{
/**
* 寄售单号
*/
private
String
saleId
;
/**
* 商品ID
*/
private
Long
itemId
;
private
List
<
Long
>
itemIds
;
/**
* 商品名称
*/
private
String
itemName
;
/**
* 商品名称/寄售单号
* 正则判断根据哪个字段查询
*/
private
String
searchParam
;
/**
* 用户ID
*/
private
Long
userId
;
/**
* 寄售时间
*/
private
Date
saleTime
;
/**
* 用户报价
*/
private
Integer
userPrice
;
/**
* 图文估价范围
*/
private
String
imgValuation
;
/**
* 实物估价
*/
private
Integer
valuation
;
/**
* 成交价格
*/
private
Integer
dealPrice
;
/**
* 客户端状态
*/
private
Integer
customState
;
/**
* 系统状态
*/
private
Integer
systemState
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
private
String
remark
;
}
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/EsSearchRequestDto.java
View file @
83b3e878
...
@@ -12,6 +12,7 @@ public class EsSearchRequestDto implements Entity {
...
@@ -12,6 +12,7 @@ public class EsSearchRequestDto implements Entity {
private
Map
<
String
,
String
>
paramMap
;
private
Map
<
String
,
String
>
paramMap
;
private
String
content
;
private
String
content
;
private
Integer
cid
;
private
Long
idStart
;
private
Long
idStart
;
private
Long
idEnd
;
private
Long
idEnd
;
private
List
<
String
>
includes
;
private
List
<
String
>
includes
;
...
...
ch-dao/src/main/java/com/wwdz/ch/db/es/ItemEsDao.java
View file @
83b3e878
...
@@ -103,6 +103,10 @@ public class ItemEsDao {
...
@@ -103,6 +103,10 @@ public class ItemEsDao {
build
.
filter
(
wildcardQuery
);
build
.
filter
(
wildcardQuery
);
Query
isDeleteQuery
=
TermQuery
.
of
(
t
->
t
.
field
(
"isDeleted"
).
value
(
false
)).
_toQuery
();
Query
isDeleteQuery
=
TermQuery
.
of
(
t
->
t
.
field
(
"isDeleted"
).
value
(
false
)).
_toQuery
();
build
.
filter
(
isDeleteQuery
);
build
.
filter
(
isDeleteQuery
);
if
(
esSearchRequestDto
.
getCid
()
!=
null
)
{
Query
cidQuery
=
TermQuery
.
of
(
t
->
t
.
field
(
"cid"
).
value
(
esSearchRequestDto
.
getCid
())).
_toQuery
();
build
.
filter
(
cidQuery
);
}
//只查询权限为公开的商品
//只查询权限为公开的商品
Query
viewPermissionQuery
=
TermQuery
.
of
(
t
->
t
.
field
(
"viewPermission"
).
value
(
0
)).
_toQuery
();
Query
viewPermissionQuery
=
TermQuery
.
of
(
t
->
t
.
field
(
"viewPermission"
).
value
(
0
)).
_toQuery
();
build
.
filter
(
viewPermissionQuery
);
build
.
filter
(
viewPermissionQuery
);
...
...
ch-dao/src/main/java/com/wwdz/ch/db/impl/ConsignSaleDaoImpl.java
0 → 100644
View file @
83b3e878
package
com.wwdz.ch.db.impl
;
import
com.github.pagehelper.PageHelper
;
import
com.wwdz.ch.db.dao.ConsignSaleDao
;
import
com.wwdz.ch.db.domain.ConsignSale
;
import
com.wwdz.ch.db.domain.ConsignSaleExample
;
import
com.wwdz.ch.db.dto.request.ConsignSaleRequestDto
;
import
com.wwdz.ch.db.mapper.ConsignSaleMapper
;
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
ConsignSaleDaoImpl
implements
ConsignSaleDao
{
@Autowired
ConsignSaleMapper
consignSaleMapper
;
@Override
public
int
insert
(
ConsignSale
consignSale
)
{
return
consignSaleMapper
.
insert
(
consignSale
);
}
@Override
public
int
update
(
ConsignSale
consignSale
)
{
ConsignSaleExample
example
=
new
ConsignSaleExample
();
ConsignSaleExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andSaleIdEqualTo
(
consignSale
.
getSaleId
());
return
consignSaleMapper
.
updateByExampleSelective
(
consignSale
,
example
);
}
@Override
public
List
<
ConsignSale
>
find
(
ConsignSaleRequestDto
dto
)
{
ConsignSaleExample
example
=
new
ConsignSaleExample
();
ConsignSaleExample
.
Criteria
criteria
=
example
.
createCriteria
();
JdbcHelper
.
ifPresent
(
dto
.
getSaleId
(),
criteria:
:
andSaleIdEqualTo
);
JdbcHelper
.
ifPresent
(
dto
.
getItemId
(),
criteria:
:
andItemIdEqualTo
);
JdbcHelper
.
ifPresent
(
dto
.
getItemIds
(),
criteria:
:
andItemIdIn
);
JdbcHelper
.
ifPresent
(
dto
.
getUserId
(),
criteria:
:
andUserIdEqualTo
);
JdbcHelper
.
ifPresent
(
dto
.
getCustomState
(),
criteria:
:
andCustomStateEqualTo
);
JdbcHelper
.
ifPresent
(
dto
.
getSystemState
(),
criteria:
:
andSystemStateEqualTo
);
example
.
orderBy
(
" sale_time desc"
);
PageHelper
.
startPage
(
dto
.
getPage
(),
dto
.
getLimit
());
return
consignSaleMapper
.
selectByExample
(
example
);
}
}
ch-dao/src/main/java/com/wwdz/ch/db/impl/ConsignSaleRecordDaoImpl.java
0 → 100644
View file @
83b3e878
package
com.wwdz.ch.db.impl
;
import
com.github.pagehelper.PageHelper
;
import
com.wwdz.ch.db.dao.ConsignSaleDao
;
import
com.wwdz.ch.db.dao.ConsignSaleRecordDao
;
import
com.wwdz.ch.db.domain.ConsignSale
;
import
com.wwdz.ch.db.domain.ConsignSaleExample
;
import
com.wwdz.ch.db.domain.ConsignSaleRecord
;
import
com.wwdz.ch.db.domain.ConsignSaleRecordExample
;
import
com.wwdz.ch.db.dto.request.ConsignSaleRequestDto
;
import
com.wwdz.ch.db.mapper.ConsignSaleMapper
;
import
com.wwdz.ch.db.mapper.ConsignSaleRecordMapper
;
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
ConsignSaleRecordDaoImpl
implements
ConsignSaleRecordDao
{
@Autowired
ConsignSaleRecordMapper
consignSaleRecordMapper
;
@Override
public
int
insert
(
ConsignSaleRecord
consignSaleRecord
)
{
return
consignSaleRecordMapper
.
insert
(
consignSaleRecord
);
}
@Override
public
List
<
ConsignSaleRecord
>
find
(
String
saleId
)
{
ConsignSaleRecordExample
example
=
new
ConsignSaleRecordExample
();
ConsignSaleRecordExample
.
Criteria
criteria
=
example
.
createCriteria
();
JdbcHelper
.
ifPresent
(
saleId
,
criteria:
:
andSaleIdEqualTo
);
example
.
orderBy
(
" create_time asc"
);
return
consignSaleRecordMapper
.
selectByExample
(
example
);
}
}
ch-dao/src/main/java/com/wwdz/ch/db/impl/ItemDaoImpl.java
View file @
83b3e878
...
@@ -2,6 +2,7 @@ package com.wwdz.ch.db.impl;
...
@@ -2,6 +2,7 @@ package com.wwdz.ch.db.impl;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.wwdz.ch.db.domain.UserItemsRelation
;
import
com.wwdz.ch.db.mapper.ItemMapper
;
import
com.wwdz.ch.db.mapper.ItemMapper
;
import
com.wwdz.ch.db.domain.Item
;
import
com.wwdz.ch.db.domain.Item
;
import
com.wwdz.ch.db.domain.ItemExample
;
import
com.wwdz.ch.db.domain.ItemExample
;
...
@@ -14,10 +15,7 @@ import org.springframework.util.CollectionUtils;
...
@@ -14,10 +15,7 @@ import org.springframework.util.CollectionUtils;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
import
java.util.Arrays
;
import
java.util.*
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.stream.IntStream
;
import
java.util.stream.IntStream
;
@Repository
@Repository
...
@@ -48,9 +46,11 @@ public class ItemDaoImpl implements ItemDao {
...
@@ -48,9 +46,11 @@ public class ItemDaoImpl implements ItemDao {
ItemExample
example
=
new
ItemExample
();
ItemExample
example
=
new
ItemExample
();
ItemExample
.
Criteria
criteria
=
example
.
createCriteria
();
ItemExample
.
Criteria
criteria
=
example
.
createCriteria
();
JdbcHelper
.
ifPresent
(
coinRequestDto
.
getId
(),
criteria
::
andIdEqualTo
);
JdbcHelper
.
ifPresent
(
coinRequestDto
.
getId
(),
criteria
::
andIdEqualTo
);
JdbcHelper
.
ifPresent
(
coinRequestDto
.
getName
(),
criteria
::
andNameLike
);
JdbcHelper
.
ifPresent
(
coinRequestDto
.
getCid
(),
criteria
::
andCidEqualTo
);
JdbcHelper
.
ifPresent
(
coinRequestDto
.
getIds
(),
criteria:
:
andIdIn
);
JdbcHelper
.
ifPresent
(
coinRequestDto
.
getIds
(),
criteria:
:
andIdIn
);
JdbcHelper
.
ifPresent
(
coinRequestDto
.
getCid
(),
criteria
::
andCidEqualTo
);
if
(
StringUtils
.
hasLength
(
coinRequestDto
.
getName
()))
{
criteria
.
andNameLike
(
"%"
+
coinRequestDto
.
getName
()
+
"%"
);
}
return
itemMapper
.
selectByExampleWithBLOBs
(
example
);
return
itemMapper
.
selectByExampleWithBLOBs
(
example
);
}
}
...
@@ -155,6 +155,16 @@ public class ItemDaoImpl implements ItemDao {
...
@@ -155,6 +155,16 @@ public class ItemDaoImpl implements ItemDao {
return
item
;
return
item
;
}
}
@Override
public
List
<
Item
>
findDetails
(
List
<
Long
>
idList
)
{
ItemExample
example
=
new
ItemExample
();
ItemExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andIdIn
(
idList
);
List
<
Item
>
itemList
=
itemMapper
.
selectByExampleWithBLOBs
(
example
);
return
itemList
;
}
@Override
@Override
public
boolean
setCoin
(
Item
item
)
{
public
boolean
setCoin
(
Item
item
)
{
ItemExample
example
=
new
ItemExample
();
ItemExample
example
=
new
ItemExample
();
...
@@ -339,7 +349,7 @@ public class ItemDaoImpl implements ItemDao {
...
@@ -339,7 +349,7 @@ public class ItemDaoImpl implements ItemDao {
public
int
updateById
(
Item
item
)
{
public
int
updateById
(
Item
item
)
{
item
.
setUpdateTime
(
new
Date
());
item
.
setUpdateTime
(
new
Date
());
return
itemMapper
.
updateByPrimaryKey
WithBLOBs
(
item
);
return
itemMapper
.
updateByPrimaryKey
Selective
(
item
);
}
}
/* public void deleteById(Long id) {
/* public void deleteById(Long id) {
...
@@ -379,4 +389,58 @@ public class ItemDaoImpl implements ItemDao {
...
@@ -379,4 +389,58 @@ public class ItemDaoImpl implements ItemDao {
public
List
<
Long
>
findOnlyOneselfItems
(
Long
userId
)
{
public
List
<
Long
>
findOnlyOneselfItems
(
Long
userId
)
{
return
itemMapper
.
selectOnlyOneselfItems
(
userId
);
return
itemMapper
.
selectOnlyOneselfItems
(
userId
);
}
}
@Override
public
boolean
updateOnSale
(
long
itemId
)
{
Item
item
=
new
Item
();
item
.
setIsOnSale
(
false
);
item
.
setId
(
itemId
);
return
updateById
(
item
)
>
0
;
}
@Override
public
List
<
UserItemsRelation
>
listByUserIds
(
Long
userId
,
List
<
Long
>
userIds
)
{
ItemExample
example
=
new
ItemExample
();
ItemExample
.
Criteria
criteria
=
example
.
createCriteria
();
JdbcHelper
.
ifPresent
(
userId
,
criteria
::
andUserIdEqualTo
);
JdbcHelper
.
ifPresent
(
userIds
,
criteria
::
andUserIdIn
);
List
<
Item
>
items
=
itemMapper
.
selectByExample
(
example
);
return
convertList
(
items
);
}
@Override
public
boolean
isExisted
(
Long
userId
,
Long
itemId
)
{
ItemExample
example
=
new
ItemExample
();
ItemExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andIdEqualTo
(
itemId
);
criteria
.
andUserIdEqualTo
(
userId
);
return
itemMapper
.
countByExample
(
example
)
>
0
;
}
@Override
public
UserItemsRelation
find
(
Long
itemId
)
{
ItemExample
example
=
new
ItemExample
();
ItemExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andIdEqualTo
(
itemId
);
Item
item
=
itemMapper
.
selectOneByExample
(
example
);
return
convert
(
item
);
}
private
List
<
UserItemsRelation
>
convertList
(
List
<
Item
>
items
)
{
List
<
UserItemsRelation
>
list
=
new
ArrayList
<>();
items
.
forEach
(
item
->
{
UserItemsRelation
userItemsRelation
=
new
UserItemsRelation
();
userItemsRelation
.
setItemId
(
item
.
getId
());
userItemsRelation
.
setUserId
(
item
.
getUserId
());
list
.
add
(
userItemsRelation
);
});
return
list
;
}
private
UserItemsRelation
convert
(
Item
item
)
{
UserItemsRelation
userItemsRelation
=
new
UserItemsRelation
();
userItemsRelation
.
setItemId
(
item
.
getId
());
userItemsRelation
.
setUserId
(
item
.
getUserId
());
return
userItemsRelation
;
}
}
}
ch-dao/src/main/java/com/wwdz/ch/db/impl/UserItemsRelationDaoImpl.java
View file @
83b3e878
...
@@ -10,9 +10,10 @@ import org.springframework.stereotype.Repository;
...
@@ -10,9 +10,10 @@ import org.springframework.stereotype.Repository;
import
java.util.List
;
import
java.util.List
;
@Deprecated
@Repository
@Repository
public
class
UserItemsRelationDaoImpl
implements
UserItemsRelationDao
{
public
class
UserItemsRelationDaoImpl
implements
UserItemsRelationDao
{
@Autowired
/*
@Autowired
private UserItemsRelationMapper usersItemsRelationMapper;
private UserItemsRelationMapper usersItemsRelationMapper;
@Override
@Override
...
@@ -45,5 +46,5 @@ public class UserItemsRelationDaoImpl implements UserItemsRelationDao {
...
@@ -45,5 +46,5 @@ public class UserItemsRelationDaoImpl implements UserItemsRelationDao {
UserItemsRelationExample.Criteria criteria = example.createCriteria();
UserItemsRelationExample.Criteria criteria = example.createCriteria();
criteria.andItemIdEqualTo(itemId);
criteria.andItemIdEqualTo(itemId);
return usersItemsRelationMapper.selectOneByExample(example);
return usersItemsRelationMapper.selectOneByExample(example);
}
}
*/
}
}
ch-dao/src/main/java/com/wwdz/ch/db/mapper/ConsignSaleMapper.java
0 → 100644
View file @
83b3e878
package
com.wwdz.ch.db.mapper
;
import
com.wwdz.ch.db.domain.ConsignSale
;
import
com.wwdz.ch.db.domain.ConsignSaleExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
@Mapper
public
interface
ConsignSaleMapper
{
long
countByExample
(
ConsignSaleExample
example
);
int
deleteByExample
(
ConsignSaleExample
example
);
int
deleteByPrimaryKey
(
Integer
id
);
int
insert
(
ConsignSale
record
);
int
insertSelective
(
ConsignSale
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
ConsignSale
selectOneByExample
(
ConsignSaleExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
ConsignSale
selectOneByExampleSelective
(
@Param
(
"example"
)
ConsignSaleExample
example
,
@Param
(
"selective"
)
ConsignSale
.
Column
...
selective
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List
<
ConsignSale
>
selectByExampleSelective
(
@Param
(
"example"
)
ConsignSaleExample
example
,
@Param
(
"selective"
)
ConsignSale
.
Column
...
selective
);
List
<
ConsignSale
>
selectByExample
(
ConsignSaleExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
ConsignSale
selectByPrimaryKeySelective
(
@Param
(
"id"
)
Integer
id
,
@Param
(
"selective"
)
ConsignSale
.
Column
...
selective
);
ConsignSale
selectByPrimaryKey
(
Integer
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
ConsignSale
record
,
@Param
(
"example"
)
ConsignSaleExample
example
);
int
updateByExample
(
@Param
(
"record"
)
ConsignSale
record
,
@Param
(
"example"
)
ConsignSaleExample
example
);
int
updateByPrimaryKeySelective
(
ConsignSale
record
);
int
updateByPrimaryKey
(
ConsignSale
record
);
}
\ No newline at end of file
ch-dao/src/main/java/com/wwdz/ch/db/mapper/ConsignSaleRecordMapper.java
0 → 100644
View file @
83b3e878
package
com.wwdz.ch.db.mapper
;
import
com.wwdz.ch.db.domain.ConsignSaleRecord
;
import
com.wwdz.ch.db.domain.ConsignSaleRecordExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
@Mapper
public
interface
ConsignSaleRecordMapper
{
long
countByExample
(
ConsignSaleRecordExample
example
);
int
deleteByExample
(
ConsignSaleRecordExample
example
);
int
deleteByPrimaryKey
(
Integer
id
);
int
insert
(
ConsignSaleRecord
record
);
int
insertSelective
(
ConsignSaleRecord
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
ConsignSaleRecord
selectOneByExample
(
ConsignSaleRecordExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
ConsignSaleRecord
selectOneByExampleSelective
(
@Param
(
"example"
)
ConsignSaleRecordExample
example
,
@Param
(
"selective"
)
ConsignSaleRecord
.
Column
...
selective
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List
<
ConsignSaleRecord
>
selectByExampleSelective
(
@Param
(
"example"
)
ConsignSaleRecordExample
example
,
@Param
(
"selective"
)
ConsignSaleRecord
.
Column
...
selective
);
List
<
ConsignSaleRecord
>
selectByExample
(
ConsignSaleRecordExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
ConsignSaleRecord
selectByPrimaryKeySelective
(
@Param
(
"id"
)
Integer
id
,
@Param
(
"selective"
)
ConsignSaleRecord
.
Column
...
selective
);
ConsignSaleRecord
selectByPrimaryKey
(
Integer
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
ConsignSaleRecord
record
,
@Param
(
"example"
)
ConsignSaleRecordExample
example
);
int
updateByExample
(
@Param
(
"record"
)
ConsignSaleRecord
record
,
@Param
(
"example"
)
ConsignSaleRecordExample
example
);
int
updateByPrimaryKeySelective
(
ConsignSaleRecord
record
);
int
updateByPrimaryKey
(
ConsignSaleRecord
record
);
}
\ No newline at end of file
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/ConsignSaleMapper.xml
0 → 100644
View file @
83b3e878
<?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.ConsignSaleMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.wwdz.ch.db.domain.ConsignSale"
>
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<result
column=
"sale_id"
jdbcType=
"VARCHAR"
property=
"saleId"
/>
<result
column=
"item_id"
jdbcType=
"BIGINT"
property=
"itemId"
/>
<result
column=
"user_id"
jdbcType=
"BIGINT"
property=
"userId"
/>
<result
column=
"sale_time"
jdbcType=
"TIMESTAMP"
property=
"saleTime"
/>
<result
column=
"user_price"
jdbcType=
"INTEGER"
property=
"userPrice"
/>
<result
column=
"img_valuation"
jdbcType=
"VARCHAR"
property=
"imgValuation"
/>
<result
column=
"valuation"
jdbcType=
"INTEGER"
property=
"valuation"
/>
<result
column=
"deal_price"
jdbcType=
"INTEGER"
property=
"dealPrice"
/>
<result
column=
"custom_state"
jdbcType=
"INTEGER"
property=
"customState"
/>
<result
column=
"system_state"
jdbcType=
"INTEGER"
property=
"systemState"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</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, sale_id, item_id, user_id, sale_time, user_price, img_valuation, valuation, deal_price,
custom_state, system_state, create_time, update_time
</sql>
<select
id=
"selectByExample"
parameterType=
"com.wwdz.ch.db.domain.ConsignSaleExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
'true' as QUERYID,
<include
refid=
"Base_Column_List"
/>
from consign_sale
<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, sale_id, item_id, user_id, sale_time, user_price, img_valuation, valuation, deal_price,
custom_state, system_state, create_time, update_time
</otherwise>
</choose>
from consign_sale
<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.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from consign_sale
where id = #{id,jdbcType=INTEGER}
</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, sale_id, item_id, user_id, sale_time, user_price, img_valuation, valuation, deal_price,
custom_state, system_state, create_time, update_time
</otherwise>
</choose>
from consign_sale
where id = #{id,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from consign_sale
where id = #{id,jdbcType=INTEGER}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.wwdz.ch.db.domain.ConsignSaleExample"
>
delete from consign_sale
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.wwdz.ch.db.domain.ConsignSale"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Integer"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into consign_sale (sale_id, item_id, user_id,
sale_time, user_price, img_valuation,
valuation, deal_price, custom_state,
system_state, create_time, update_time
)
values (#{saleId,jdbcType=VARCHAR}, #{itemId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT},
#{saleTime,jdbcType=TIMESTAMP}, #{userPrice,jdbcType=INTEGER}, #{imgValuation,jdbcType=VARCHAR},
#{valuation,jdbcType=INTEGER}, #{dealPrice,jdbcType=INTEGER}, #{customState,jdbcType=INTEGER},
#{systemState,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.ConsignSale"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Integer"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into consign_sale
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"saleId != null"
>
sale_id,
</if>
<if
test=
"itemId != null"
>
item_id,
</if>
<if
test=
"userId != null"
>
user_id,
</if>
<if
test=
"saleTime != null"
>
sale_time,
</if>
<if
test=
"userPrice != null"
>
user_price,
</if>
<if
test=
"imgValuation != null"
>
img_valuation,
</if>
<if
test=
"valuation != null"
>
valuation,
</if>
<if
test=
"dealPrice != null"
>
deal_price,
</if>
<if
test=
"customState != null"
>
custom_state,
</if>
<if
test=
"systemState != null"
>
system_state,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"saleId != null"
>
#{saleId,jdbcType=VARCHAR},
</if>
<if
test=
"itemId != null"
>
#{itemId,jdbcType=BIGINT},
</if>
<if
test=
"userId != null"
>
#{userId,jdbcType=BIGINT},
</if>
<if
test=
"saleTime != null"
>
#{saleTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"userPrice != null"
>
#{userPrice,jdbcType=INTEGER},
</if>
<if
test=
"imgValuation != null"
>
#{imgValuation,jdbcType=VARCHAR},
</if>
<if
test=
"valuation != null"
>
#{valuation,jdbcType=INTEGER},
</if>
<if
test=
"dealPrice != null"
>
#{dealPrice,jdbcType=INTEGER},
</if>
<if
test=
"customState != null"
>
#{customState,jdbcType=INTEGER},
</if>
<if
test=
"systemState != null"
>
#{systemState,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.wwdz.ch.db.domain.ConsignSaleExample"
resultType=
"java.lang.Long"
>
select count(*) from consign_sale
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update consign_sale
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=INTEGER},
</if>
<if
test=
"record.saleId != null"
>
sale_id = #{record.saleId,jdbcType=VARCHAR},
</if>
<if
test=
"record.itemId != null"
>
item_id = #{record.itemId,jdbcType=BIGINT},
</if>
<if
test=
"record.userId != null"
>
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if
test=
"record.saleTime != null"
>
sale_time = #{record.saleTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.userPrice != null"
>
user_price = #{record.userPrice,jdbcType=INTEGER},
</if>
<if
test=
"record.imgValuation != null"
>
img_valuation = #{record.imgValuation,jdbcType=VARCHAR},
</if>
<if
test=
"record.valuation != null"
>
valuation = #{record.valuation,jdbcType=INTEGER},
</if>
<if
test=
"record.dealPrice != null"
>
deal_price = #{record.dealPrice,jdbcType=INTEGER},
</if>
<if
test=
"record.customState != null"
>
custom_state = #{record.customState,jdbcType=INTEGER},
</if>
<if
test=
"record.systemState != null"
>
system_state = #{record.systemState,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>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update consign_sale
set id = #{record.id,jdbcType=INTEGER},
sale_id = #{record.saleId,jdbcType=VARCHAR},
item_id = #{record.itemId,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
sale_time = #{record.saleTime,jdbcType=TIMESTAMP},
user_price = #{record.userPrice,jdbcType=INTEGER},
img_valuation = #{record.imgValuation,jdbcType=VARCHAR},
valuation = #{record.valuation,jdbcType=INTEGER},
deal_price = #{record.dealPrice,jdbcType=INTEGER},
custom_state = #{record.customState,jdbcType=INTEGER},
system_state = #{record.systemState,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.wwdz.ch.db.domain.ConsignSale"
>
update consign_sale
<set>
<if
test=
"saleId != null"
>
sale_id = #{saleId,jdbcType=VARCHAR},
</if>
<if
test=
"itemId != null"
>
item_id = #{itemId,jdbcType=BIGINT},
</if>
<if
test=
"userId != null"
>
user_id = #{userId,jdbcType=BIGINT},
</if>
<if
test=
"saleTime != null"
>
sale_time = #{saleTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"userPrice != null"
>
user_price = #{userPrice,jdbcType=INTEGER},
</if>
<if
test=
"imgValuation != null"
>
img_valuation = #{imgValuation,jdbcType=VARCHAR},
</if>
<if
test=
"valuation != null"
>
valuation = #{valuation,jdbcType=INTEGER},
</if>
<if
test=
"dealPrice != null"
>
deal_price = #{dealPrice,jdbcType=INTEGER},
</if>
<if
test=
"customState != null"
>
custom_state = #{customState,jdbcType=INTEGER},
</if>
<if
test=
"systemState != null"
>
system_state = #{systemState,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.wwdz.ch.db.domain.ConsignSale"
>
update consign_sale
set sale_id = #{saleId,jdbcType=VARCHAR},
item_id = #{itemId,jdbcType=BIGINT},
user_id = #{userId,jdbcType=BIGINT},
sale_time = #{saleTime,jdbcType=TIMESTAMP},
user_price = #{userPrice,jdbcType=INTEGER},
img_valuation = #{imgValuation,jdbcType=VARCHAR},
valuation = #{valuation,jdbcType=INTEGER},
deal_price = #{dealPrice,jdbcType=INTEGER},
custom_state = #{customState,jdbcType=INTEGER},
system_state = #{systemState,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select
id=
"selectOneByExample"
parameterType=
"com.wwdz.ch.db.domain.ConsignSaleExample"
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 consign_sale
<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, sale_id, item_id, user_id, sale_time, user_price, img_valuation, valuation, deal_price,
custom_state, system_state, create_time, update_time
</otherwise>
</choose>
from consign_sale
<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/ConsignSaleRecordMapper.xml
0 → 100644
View file @
83b3e878
<?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.ConsignSaleRecordMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.wwdz.ch.db.domain.ConsignSaleRecord"
>
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<result
column=
"sale_id"
jdbcType=
"VARCHAR"
property=
"saleId"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"content"
jdbcType=
"VARCHAR"
property=
"content"
/>
<result
column=
"remark"
jdbcType=
"VARCHAR"
property=
"remark"
/>
<result
column=
"type"
jdbcType=
"INTEGER"
property=
"type"
/>
</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, sale_id, create_time, content, remark, `type`
</sql>
<select
id=
"selectByExample"
parameterType=
"com.wwdz.ch.db.domain.ConsignSaleRecordExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
'true' as QUERYID,
<include
refid=
"Base_Column_List"
/>
from consign_sale_record
<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, sale_id, create_time, content, remark, `type`
</otherwise>
</choose>
from consign_sale_record
<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.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from consign_sale_record
where id = #{id,jdbcType=INTEGER}
</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, sale_id, create_time, content, remark, `type`
</otherwise>
</choose>
from consign_sale_record
where id = #{id,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from consign_sale_record
where id = #{id,jdbcType=INTEGER}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.wwdz.ch.db.domain.ConsignSaleRecordExample"
>
delete from consign_sale_record
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.wwdz.ch.db.domain.ConsignSaleRecord"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Integer"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into consign_sale_record (sale_id, create_time, content,
remark, `type`)
values (#{saleId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{content,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.ConsignSaleRecord"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Integer"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into consign_sale_record
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"saleId != null"
>
sale_id,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"content != null"
>
content,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"type != null"
>
`type`,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"saleId != null"
>
#{saleId,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"content != null"
>
#{content,jdbcType=VARCHAR},
</if>
<if
test=
"remark != null"
>
#{remark,jdbcType=VARCHAR},
</if>
<if
test=
"type != null"
>
#{type,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.wwdz.ch.db.domain.ConsignSaleRecordExample"
resultType=
"java.lang.Long"
>
select count(*) from consign_sale_record
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update consign_sale_record
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=INTEGER},
</if>
<if
test=
"record.saleId != null"
>
sale_id = #{record.saleId,jdbcType=VARCHAR},
</if>
<if
test=
"record.createTime != null"
>
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.content != null"
>
content = #{record.content,jdbcType=VARCHAR},
</if>
<if
test=
"record.remark != null"
>
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if
test=
"record.type != null"
>
`type` = #{record.type,jdbcType=INTEGER},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update consign_sale_record
set id = #{record.id,jdbcType=INTEGER},
sale_id = #{record.saleId,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
content = #{record.content,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
`type` = #{record.type,jdbcType=INTEGER}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.wwdz.ch.db.domain.ConsignSaleRecord"
>
update consign_sale_record
<set>
<if
test=
"saleId != null"
>
sale_id = #{saleId,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"content != null"
>
content = #{content,jdbcType=VARCHAR},
</if>
<if
test=
"remark != null"
>
remark = #{remark,jdbcType=VARCHAR},
</if>
<if
test=
"type != null"
>
`type` = #{type,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.wwdz.ch.db.domain.ConsignSaleRecord"
>
update consign_sale_record
set sale_id = #{saleId,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
content = #{content,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
`type` = #{type,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
<select
id=
"selectOneByExample"
parameterType=
"com.wwdz.ch.db.domain.ConsignSaleRecordExample"
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 consign_sale_record
<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, sale_id, create_time, content, remark, `type`
</otherwise>
</choose>
from consign_sale_record
<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/ItemMapper.xml
View file @
83b3e878
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
<result
column=
"original_source_url"
jdbcType=
"VARCHAR"
property=
"originalSourceUrl"
/>
<result
column=
"original_source_url"
jdbcType=
"VARCHAR"
property=
"originalSourceUrl"
/>
<result
column=
"source"
jdbcType=
"INTEGER"
property=
"source"
/>
<result
column=
"source"
jdbcType=
"INTEGER"
property=
"source"
/>
<result
column=
"kind"
jdbcType=
"INTEGER"
property=
"kind"
/>
<result
column=
"kind"
jdbcType=
"INTEGER"
property=
"kind"
/>
<result
column=
"user_id"
jdbcType=
"BIGINT"
property=
"userId"
/>
<result
column=
"view_permission"
jdbcType=
"INTEGER"
property=
"viewPermission"
/>
<result
column=
"view_permission"
jdbcType=
"INTEGER"
property=
"viewPermission"
/>
</resultMap>
</resultMap>
<resultMap
extends=
"BaseResultMap"
id=
"ResultMapWithBLOBs"
type=
"com.wwdz.ch.db.domain.Item"
>
<resultMap
extends=
"BaseResultMap"
id=
"ResultMapWithBLOBs"
type=
"com.wwdz.ch.db.domain.Item"
>
...
@@ -91,7 +92,7 @@
...
@@ -91,7 +92,7 @@
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time,
id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time,
source_type, update_time, is_deleted, bid_time, remark, `state`, original_source_url,
source_type, update_time, is_deleted, bid_time, remark, `state`, original_source_url,
`source`, kind, view_permission
`source`, kind,
user_id,
view_permission
</sql>
</sql>
<sql
id=
"Blob_Column_List"
>
<sql
id=
"Blob_Column_List"
>
extra, images, videos, detail, original_extra
extra, images, videos, detail, original_extra
...
@@ -148,7 +149,8 @@
...
@@ -148,7 +149,8 @@
<otherwise>
<otherwise>
id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time,
id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time,
source_type, update_time, is_deleted, bid_time, remark, `state`, original_source_url,
source_type, update_time, is_deleted, bid_time, remark, `state`, original_source_url,
`source`, kind, view_permission, extra, images, videos, detail, original_extra
`source`, kind, user_id, view_permission, extra, images, videos, detail, original_extra
</otherwise>
</otherwise>
</choose>
</choose>
from item
from item
...
@@ -183,7 +185,8 @@
...
@@ -183,7 +185,8 @@
<otherwise>
<otherwise>
id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time,
id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time,
source_type, update_time, is_deleted, bid_time, remark, `state`, original_source_url,
source_type, update_time, is_deleted, bid_time, remark, `state`, original_source_url,
`source`, kind, view_permission, extra, images, videos, detail, original_extra
`source`, kind, user_id, view_permission, extra, images, videos, detail, original_extra
</otherwise>
</otherwise>
</choose>
</choose>
from item
from item
...
@@ -209,18 +212,18 @@
...
@@ -209,18 +212,18 @@
source_type, update_time, is_deleted,
source_type, update_time, is_deleted,
bid_time, remark, `state`,
bid_time, remark, `state`,
original_source_url, `source`, kind,
original_source_url, `source`, kind,
view_permission, extra, images
,
user_id, view_permission, extra
,
videos, detail, original_extra
images, videos, detail,
)
original_extra
)
values (#{name,jdbcType=VARCHAR}, #{cid,jdbcType=INTEGER}, #{isOnSale,jdbcType=BIT},
values (#{name,jdbcType=VARCHAR}, #{cid,jdbcType=INTEGER}, #{isOnSale,jdbcType=BIT},
#{isStd,jdbcType=BIT}, #{sort,jdbcType=INTEGER}, #{shareImage,jdbcType=VARCHAR},
#{isStd,jdbcType=BIT}, #{sort,jdbcType=INTEGER}, #{shareImage,jdbcType=VARCHAR},
#{topImage,jdbcType=VARCHAR}, #{price,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
#{topImage,jdbcType=VARCHAR}, #{price,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
#{sourceType,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, #{isDeleted,jdbcType=BIT},
#{sourceType,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, #{isDeleted,jdbcType=BIT},
#{bidTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}, #{state,jdbcType=INTEGER},
#{bidTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}, #{state,jdbcType=INTEGER},
#{originalSourceUrl,jdbcType=VARCHAR}, #{source,jdbcType=INTEGER}, #{kind,jdbcType=INTEGER},
#{originalSourceUrl,jdbcType=VARCHAR}, #{source,jdbcType=INTEGER}, #{kind,jdbcType=INTEGER},
#{
viewPermission,jdbcType=INTEGER}, #{extra,jdbcType=LONGVARCHAR}, #{images
,jdbcType=LONGVARCHAR},
#{
userId,jdbcType=BIGINT}, #{viewPermission,jdbcType=INTEGER}, #{extra
,jdbcType=LONGVARCHAR},
#{
videos,jdbcType=LONGVARCHAR}, #{detail,jdbcType=LONGVARCHAR}, #{originalExtra,jdbcType=LONGVARCHAR}
#{
images,jdbcType=LONGVARCHAR}, #{videos,jdbcType=LONGVARCHAR}, #{detail,jdbcType=LONGVARCHAR},
)
#{originalExtra,jdbcType=LONGVARCHAR}
)
</insert>
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.Item"
>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.Item"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
...
@@ -282,6 +285,9 @@
...
@@ -282,6 +285,9 @@
<if
test=
"kind != null"
>
<if
test=
"kind != null"
>
kind,
kind,
</if>
</if>
<if
test=
"userId != null"
>
user_id,
</if>
<if
test=
"viewPermission != null"
>
<if
test=
"viewPermission != null"
>
view_permission,
view_permission,
</if>
</if>
...
@@ -356,6 +362,9 @@
...
@@ -356,6 +362,9 @@
<if
test=
"kind != null"
>
<if
test=
"kind != null"
>
#{kind,jdbcType=INTEGER},
#{kind,jdbcType=INTEGER},
</if>
</if>
<if
test=
"userId != null"
>
#{userId,jdbcType=BIGINT},
</if>
<if
test=
"viewPermission != null"
>
<if
test=
"viewPermission != null"
>
#{viewPermission,jdbcType=INTEGER},
#{viewPermission,jdbcType=INTEGER},
</if>
</if>
...
@@ -442,6 +451,9 @@
...
@@ -442,6 +451,9 @@
<if
test=
"record.kind != null"
>
<if
test=
"record.kind != null"
>
kind = #{record.kind,jdbcType=INTEGER},
kind = #{record.kind,jdbcType=INTEGER},
</if>
</if>
<if
test=
"record.userId != null"
>
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if
test=
"record.viewPermission != null"
>
<if
test=
"record.viewPermission != null"
>
view_permission = #{record.viewPermission,jdbcType=INTEGER},
view_permission = #{record.viewPermission,jdbcType=INTEGER},
</if>
</if>
...
@@ -486,6 +498,7 @@
...
@@ -486,6 +498,7 @@
original_source_url = #{record.originalSourceUrl,jdbcType=VARCHAR},
original_source_url = #{record.originalSourceUrl,jdbcType=VARCHAR},
`source` = #{record.source,jdbcType=INTEGER},
`source` = #{record.source,jdbcType=INTEGER},
kind = #{record.kind,jdbcType=INTEGER},
kind = #{record.kind,jdbcType=INTEGER},
user_id = #{record.userId,jdbcType=BIGINT},
view_permission = #{record.viewPermission,jdbcType=INTEGER},
view_permission = #{record.viewPermission,jdbcType=INTEGER},
extra = #{record.extra,jdbcType=LONGVARCHAR},
extra = #{record.extra,jdbcType=LONGVARCHAR},
images = #{record.images,jdbcType=LONGVARCHAR},
images = #{record.images,jdbcType=LONGVARCHAR},
...
@@ -517,6 +530,7 @@
...
@@ -517,6 +530,7 @@
original_source_url = #{record.originalSourceUrl,jdbcType=VARCHAR},
original_source_url = #{record.originalSourceUrl,jdbcType=VARCHAR},
`source` = #{record.source,jdbcType=INTEGER},
`source` = #{record.source,jdbcType=INTEGER},
kind = #{record.kind,jdbcType=INTEGER},
kind = #{record.kind,jdbcType=INTEGER},
user_id = #{record.userId,jdbcType=BIGINT},
view_permission = #{record.viewPermission,jdbcType=INTEGER}
view_permission = #{record.viewPermission,jdbcType=INTEGER}
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
<include
refid=
"Update_By_Example_Where_Clause"
/>
...
@@ -579,6 +593,9 @@
...
@@ -579,6 +593,9 @@
<if
test=
"kind != null"
>
<if
test=
"kind != null"
>
kind = #{kind,jdbcType=INTEGER},
kind = #{kind,jdbcType=INTEGER},
</if>
</if>
<if
test=
"userId != null"
>
user_id = #{userId,jdbcType=BIGINT},
</if>
<if
test=
"viewPermission != null"
>
<if
test=
"viewPermission != null"
>
view_permission = #{viewPermission,jdbcType=INTEGER},
view_permission = #{viewPermission,jdbcType=INTEGER},
</if>
</if>
...
@@ -620,6 +637,7 @@
...
@@ -620,6 +637,7 @@
original_source_url = #{originalSourceUrl,jdbcType=VARCHAR},
original_source_url = #{originalSourceUrl,jdbcType=VARCHAR},
`source` = #{source,jdbcType=INTEGER},
`source` = #{source,jdbcType=INTEGER},
kind = #{kind,jdbcType=INTEGER},
kind = #{kind,jdbcType=INTEGER},
user_id = #{userId,jdbcType=BIGINT},
view_permission = #{viewPermission,jdbcType=INTEGER},
view_permission = #{viewPermission,jdbcType=INTEGER},
extra = #{extra,jdbcType=LONGVARCHAR},
extra = #{extra,jdbcType=LONGVARCHAR},
images = #{images,jdbcType=LONGVARCHAR},
images = #{images,jdbcType=LONGVARCHAR},
...
@@ -648,6 +666,7 @@
...
@@ -648,6 +666,7 @@
original_source_url = #{originalSourceUrl,jdbcType=VARCHAR},
original_source_url = #{originalSourceUrl,jdbcType=VARCHAR},
`source` = #{source,jdbcType=INTEGER},
`source` = #{source,jdbcType=INTEGER},
kind = #{kind,jdbcType=INTEGER},
kind = #{kind,jdbcType=INTEGER},
user_id = #{userId,jdbcType=BIGINT},
view_permission = #{viewPermission,jdbcType=INTEGER}
view_permission = #{viewPermission,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</update>
...
@@ -706,7 +725,8 @@
...
@@ -706,7 +725,8 @@
<otherwise>
<otherwise>
id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time,
id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time,
source_type, update_time, is_deleted, bid_time, remark, `state`, original_source_url,
source_type, update_time, is_deleted, bid_time, remark, `state`, original_source_url,
`source`, kind, view_permission, extra, images, videos, detail, original_extra
`source`, kind, user_id, view_permission, extra, images, videos, detail, original_extra
</otherwise>
</otherwise>
</choose>
</choose>
from item
from item
...
...
ch-dao/src/main/resources/generatorConfig_new.xml
View file @
83b3e878
...
@@ -72,7 +72,7 @@
...
@@ -72,7 +72,7 @@
<javaClientGenerator
type=
"XMLMAPPER"
targetPackage=
"com.wwdz.ch.db.mapper"
<javaClientGenerator
type=
"XMLMAPPER"
targetPackage=
"com.wwdz.ch.db.mapper"
targetProject=
"ch-dao/src/main/java"
/>
targetProject=
"ch-dao/src/main/java"
/>
<table
tableName=
"i
m_record
"
enableCountByExample=
"true"
enableUpdateByExample=
"true"
enableDeleteByExample=
"true"
enableSelectByExample=
"true"
selectByExampleQueryId=
"true"
>
<table
tableName=
"i
tem
"
enableCountByExample=
"true"
enableUpdateByExample=
"true"
enableDeleteByExample=
"true"
enableSelectByExample=
"true"
selectByExampleQueryId=
"true"
>
<generatedKey
column=
"id"
sqlStatement=
"Mysql"
identity=
"true"
/>
<generatedKey
column=
"id"
sqlStatement=
"Mysql"
identity=
"true"
/>
</table>
</table>
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/ConsignSaleServiceImpl.java
0 → 100644
View file @
83b3e878
package
com.wwdz.ch.wx.impl
;
import
com.github.pagehelper.PageInfo
;
import
com.wwdz.ch.core.consts.ConsignSaleEnum
;
import
com.wwdz.ch.core.entity.ConsignSaleVo
;
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.RegexUtil
;
import
com.wwdz.ch.db.dao.ConsignSaleDao
;
import
com.wwdz.ch.db.dao.ConsignSaleRecordDao
;
import
com.wwdz.ch.db.dao.ItemDao
;
import
com.wwdz.ch.db.domain.ConsignSale
;
import
com.wwdz.ch.db.domain.ConsignSaleRecord
;
import
com.wwdz.ch.db.domain.Item
;
import
com.wwdz.ch.db.domain.UserItemsRelation
;
import
com.wwdz.ch.db.dto.request.CoinRequestDto
;
import
com.wwdz.ch.db.dto.request.ConsignSaleRequestDto
;
import
com.wwdz.ch.wx.service.ConsignSaleService
;
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
org.springframework.util.CollectionUtils
;
import
org.springframework.util.StringUtils
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
@Service
public
class
ConsignSaleServiceImpl
implements
ConsignSaleService
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
ConsignSaleServiceImpl
.
class
);
private
final
static
String
CONSIGN_SALE_ORDER_PREFIX
=
"CSO"
;
@Autowired
ConsignSaleDao
consignSaleDao
;
@Autowired
ConsignSaleRecordDao
consignSaleRecordDao
;
@Autowired
ItemDao
itemDao
;
@Override
public
Result
createConsignSaleOrder
(
ConsignSaleRequestDto
dto
)
{
try
{
ConsignSale
consignSale
=
new
ConsignSale
();
EntityMapper
.
copyAttribute
(
dto
,
consignSale
);
Date
now
=
new
Date
();
consignSale
.
setSaleTime
(
now
);
consignSale
.
setCreateTime
(
now
);
consignSale
.
setUpdateTime
(
now
);
//目前创建了寄售单客户显示的状态就是寄售中
consignSale
.
setCustomState
(
ConsignSaleEnum
.
SaleForUserStateEnum
.
CONSIGN_SALEING
.
getCode
());
consignSale
.
setSystemState
(
ConsignSaleEnum
.
SaleForSysStateEnum
.
WAIT_IMG_VALUATE
.
getCode
());
String
saleId
=
IdUtils
.
getOrderNumber
(
CONSIGN_SALE_ORDER_PREFIX
);
consignSale
.
setSaleId
(
saleId
);
consignSaleDao
.
insert
(
consignSale
);
return
Result
.
success
();
}
catch
(
Exception
e
)
{
logger
.
info
(
"用户: {}, 创建寄售单失败 : {}"
,
dto
.
getUserId
(),
e
);
}
return
Result
.
failed
();
}
@Override
public
Result
findList
(
ConsignSaleRequestDto
dto
)
{
try
{
if
(
StringUtils
.
hasLength
(
dto
.
getSearchParam
()))
{
//判断查询条件是否为中文,是的话就根据商品名称模糊查询
if
(
RegexUtil
.
isContainChinese
(
dto
.
getSearchParam
()))
{
//先查询该用户发布的商品id
List
<
UserItemsRelation
>
userItemsRelations
=
itemDao
.
listByUserIds
(
dto
.
getUserId
(),
null
);
List
<
Long
>
itemIds
=
userItemsRelations
.
stream
().
map
(
UserItemsRelation:
:
getItemId
).
collect
(
Collectors
.
toList
());
CoinRequestDto
coinRequestDto
=
new
CoinRequestDto
();
coinRequestDto
.
setIds
(
itemIds
);
coinRequestDto
.
setName
(
dto
.
getSearchParam
());
List
<
Item
>
items
=
itemDao
.
findList
(
coinRequestDto
);
if
(!
CollectionUtils
.
isEmpty
(
items
))
{
itemIds
=
items
.
stream
().
map
(
Item:
:
getId
).
collect
(
Collectors
.
toList
());
dto
.
setItemIds
(
itemIds
);
}
}
else
{
dto
.
setSaleId
(
dto
.
getSearchParam
());
}
}
List
<
ConsignSale
>
list
=
consignSaleDao
.
find
(
dto
);
PageInfo
<
ConsignSale
>
pageInfo
=
new
PageInfo
<>(
list
);
List
<
Long
>
itemIds
=
list
.
stream
().
map
(
ConsignSale:
:
getItemId
).
collect
(
Collectors
.
toList
());
//查询商品的信息
List
<
Item
>
itemList
=
itemDao
.
findDetails
(
itemIds
);
Map
<
Long
,
Item
>
itemMap
=
itemList
.
stream
().
collect
(
Collectors
.
toMap
(
Item:
:
getId
,
Function
.
identity
()));
List
<
ConsignSaleVo
>
consignSaleVos
=
new
ArrayList
<>();
list
.
forEach
(
consignSale
->
{
ConsignSaleVo
consignSaleVo
=
new
ConsignSaleVo
();
EntityMapper
.
copyAttribute
(
consignSale
,
consignSaleVo
);
long
itemId
=
consignSale
.
getItemId
();
Item
item
=
itemMap
.
get
(
itemId
);
consignSaleVo
.
setHomePageImage
(
MediaUtil
.
getHomePageImage
(
item
.
getImages
(),
item
.
getVideos
()));
consignSaleVo
.
setItemName
(
item
.
getName
());
consignSaleVo
.
setCustomStateName
(
ConsignSaleEnum
.
SaleForUserStateEnum
.
getNameByCode
(
consignSale
.
getCustomState
()));
consignSaleVos
.
add
(
consignSaleVo
);
});
PageSearchResult
pageSearchResult
=
PageSearchResult
.
of
(
pageInfo
,
consignSaleVos
);
return
Result
.
success
(
pageSearchResult
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"查询接收单列表error : {}"
,
e
);
}
return
Result
.
failed
();
}
@Override
public
Result
findDetail
(
ConsignSaleRequestDto
dto
)
{
return
null
;
}
@Override
public
Result
customCancel
(
ConsignSaleRequestDto
dto
)
{
try
{
ConsignSale
consignSale
=
new
ConsignSale
();
consignSale
.
setSaleId
(
dto
.
getSaleId
());
consignSale
.
setCustomState
(
ConsignSaleEnum
.
SaleForUserStateEnum
.
CANCEL
.
getCode
());
consignSale
.
setSystemState
(
ConsignSaleEnum
.
SaleForSysStateEnum
.
CANCEL
.
getCode
());
consignSaleDao
.
update
(
consignSale
);
//商品下架
itemDao
.
updateOnSale
(
dto
.
getItemId
());
//插入操作记录
ConsignSaleRecord
consignSaleRecord
=
new
ConsignSaleRecord
();
consignSaleRecord
.
setSaleId
(
dto
.
getSaleId
());
consignSaleRecord
.
setCreateTime
(
new
Date
());
consignSaleRecord
.
setContent
(
"取消类型:用户主动取消"
);
consignSaleRecord
.
setType
(
ConsignSaleEnum
.
OperateTypeEnum
.
CANCEL
.
getCode
());
consignSaleRecordDao
.
insert
(
consignSaleRecord
);
return
Result
.
success
();
}
catch
(
Exception
e
)
{
logger
.
error
(
"用户取消寄售单error : {}"
,
e
);
}
return
Result
.
failed
();
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/FavoritesServiceImpl.java
View file @
83b3e878
...
@@ -25,7 +25,6 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -25,7 +25,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -42,8 +41,6 @@ public class FavoritesServiceImpl implements FavoritesService {
...
@@ -42,8 +41,6 @@ public class FavoritesServiceImpl implements FavoritesService {
@Autowired
@Autowired
private
FavoritesItemsRelationDao
favoritesItemsRelationDao
;
private
FavoritesItemsRelationDao
favoritesItemsRelationDao
;
@Autowired
@Autowired
private
UserItemsRelationDao
userItemsRelationDao
;
@Autowired
private
ItemDao
itemDao
;
private
ItemDao
itemDao
;
@Autowired
@Autowired
private
FootPrintDao
footPrintDao
;
private
FootPrintDao
footPrintDao
;
...
@@ -263,7 +260,7 @@ public class FavoritesServiceImpl implements FavoritesService {
...
@@ -263,7 +260,7 @@ public class FavoritesServiceImpl implements FavoritesService {
itemResponseVo
.
setPrice
(
getPrice
(
item
.
getPrice
()));
itemResponseVo
.
setPrice
(
getPrice
(
item
.
getPrice
()));
// 设置是否收藏或是否是自己发布的
// 设置是否收藏或是否是自己发布的
itemResponseVo
.
setIsCollected
(
favoritesItemsRelationDao
.
isCollected
(
userId
,
relation
.
getItemId
(),
null
)
?
1
:
0
);
itemResponseVo
.
setIsCollected
(
favoritesItemsRelationDao
.
isCollected
(
userId
,
relation
.
getItemId
(),
null
)
?
1
:
0
);
itemResponseVo
.
setIsMine
(
userItemsRelation
Dao
.
isExisted
(
userId
,
item
.
getId
())
?
1
:
0
);
itemResponseVo
.
setIsMine
(
item
Dao
.
isExisted
(
userId
,
item
.
getId
())
?
1
:
0
);
// 设置收藏数
// 设置收藏数
long
count
=
favoritesItemsRelationDao
.
countByItemId
(
item
.
getId
());
long
count
=
favoritesItemsRelationDao
.
countByItemId
(
item
.
getId
());
itemResponseVo
.
setCollectCount
(
StringUtil
.
formatCount
(
count
));
itemResponseVo
.
setCollectCount
(
StringUtil
.
formatCount
(
count
));
...
@@ -322,7 +319,7 @@ public class FavoritesServiceImpl implements FavoritesService {
...
@@ -322,7 +319,7 @@ public class FavoritesServiceImpl implements FavoritesService {
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
List
<
Long
>
favoritesItemsIds
=
list
.
stream
()
List
<
Long
>
favoritesItemsIds
=
list
.
stream
()
.
map
(
FavoritesItemsRelation:
:
getItemId
).
collect
(
Collectors
.
toList
());
.
map
(
FavoritesItemsRelation:
:
getItemId
).
collect
(
Collectors
.
toList
());
List
<
UserItemsRelation
>
usersItemsList
=
userItemsRelation
Dao
.
listByUserIds
(
dto
.
getUserId
(),
null
);
List
<
UserItemsRelation
>
usersItemsList
=
item
Dao
.
listByUserIds
(
dto
.
getUserId
(),
null
);
if
(
CollectionUtils
.
isNotEmpty
(
usersItemsList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
usersItemsList
))
{
List
<
Long
>
usersItemsIds
=
usersItemsList
.
stream
()
List
<
Long
>
usersItemsIds
=
usersItemsList
.
stream
()
.
map
(
UserItemsRelation:
:
getItemId
).
collect
(
Collectors
.
toList
());
.
map
(
UserItemsRelation:
:
getItemId
).
collect
(
Collectors
.
toList
());
...
@@ -365,7 +362,7 @@ public class FavoritesServiceImpl implements FavoritesService {
...
@@ -365,7 +362,7 @@ public class FavoritesServiceImpl implements FavoritesService {
// 更新藏品发布者的收藏数
// 更新藏品发布者的收藏数
for
(
Long
itemId
:
dto
.
getItemIds
())
{
for
(
Long
itemId
:
dto
.
getItemIds
())
{
UserItemsRelation
userItemsRelation
=
userItemsRelation
Dao
.
find
(
itemId
);
UserItemsRelation
userItemsRelation
=
item
Dao
.
find
(
itemId
);
if
(
Objects
.
nonNull
(
userItemsRelation
))
{
if
(
Objects
.
nonNull
(
userItemsRelation
))
{
UserCollectBrowseNum
userCollectBrowseNum
=
userCollectBrowseNumDao
.
findByUserId
(
userItemsRelation
.
getUserId
());
UserCollectBrowseNum
userCollectBrowseNum
=
userCollectBrowseNumDao
.
findByUserId
(
userItemsRelation
.
getUserId
());
if
(
Objects
.
nonNull
(
userCollectBrowseNum
))
{
if
(
Objects
.
nonNull
(
userCollectBrowseNum
))
{
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/FootPrintServiceImpl.java
View file @
83b3e878
...
@@ -6,7 +6,6 @@ import com.wwdz.ch.core.util.MediaUtil;
...
@@ -6,7 +6,6 @@ import com.wwdz.ch.core.util.MediaUtil;
import
com.wwdz.ch.db.dao.FavoritesItemsRelationDao
;
import
com.wwdz.ch.db.dao.FavoritesItemsRelationDao
;
import
com.wwdz.ch.db.dao.FootPrintDao
;
import
com.wwdz.ch.db.dao.FootPrintDao
;
import
com.wwdz.ch.db.dao.ItemDao
;
import
com.wwdz.ch.db.dao.ItemDao
;
import
com.wwdz.ch.db.dao.UserItemsRelationDao
;
import
com.wwdz.ch.db.domain.Footprint
;
import
com.wwdz.ch.db.domain.Footprint
;
import
com.wwdz.ch.db.domain.Item
;
import
com.wwdz.ch.db.domain.Item
;
import
com.wwdz.ch.db.dto.request.CoinRequestDto
;
import
com.wwdz.ch.db.dto.request.CoinRequestDto
;
...
@@ -40,8 +39,7 @@ public class FootPrintServiceImpl implements FootPrintService {
...
@@ -40,8 +39,7 @@ public class FootPrintServiceImpl implements FootPrintService {
private
ItemDao
itemDao
;
private
ItemDao
itemDao
;
@Autowired
@Autowired
private
FavoritesItemsRelationDao
favoritesItemsRelationDao
;
private
FavoritesItemsRelationDao
favoritesItemsRelationDao
;
@Autowired
private
UserItemsRelationDao
userItemsRelationDao
;
@Autowired
@Autowired
private
ItemCommonService
itemCommonService
;
private
ItemCommonService
itemCommonService
;
...
@@ -107,7 +105,7 @@ public class FootPrintServiceImpl implements FootPrintService {
...
@@ -107,7 +105,7 @@ public class FootPrintServiceImpl implements FootPrintService {
itemResponseVo
.
setPrice
(
getPrice
(
item
.
getPrice
()));
itemResponseVo
.
setPrice
(
getPrice
(
item
.
getPrice
()));
// 设置是否收藏或是否是自己发布的
// 设置是否收藏或是否是自己发布的
itemResponseVo
.
setIsCollected
(
favoritesItemsRelationDao
.
isCollected
(
dto
.
getUserId
(),
footprint
.
getItemId
(),
null
)
?
1
:
0
);
itemResponseVo
.
setIsCollected
(
favoritesItemsRelationDao
.
isCollected
(
dto
.
getUserId
(),
footprint
.
getItemId
(),
null
)
?
1
:
0
);
itemResponseVo
.
setIsMine
(
userItemsRelation
Dao
.
isExisted
(
dto
.
getUserId
(),
item
.
getId
())
?
1
:
0
);
itemResponseVo
.
setIsMine
(
item
Dao
.
isExisted
(
dto
.
getUserId
(),
item
.
getId
())
?
1
:
0
);
// 设置收藏数
// 设置收藏数
long
count
=
favoritesItemsRelationDao
.
countByItemId
(
item
.
getId
());
long
count
=
favoritesItemsRelationDao
.
countByItemId
(
item
.
getId
());
itemResponseVo
.
setCollectCount
(
StringUtil
.
formatCount
(
count
));
itemResponseVo
.
setCollectCount
(
StringUtil
.
formatCount
(
count
));
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/ItemCommonServiceImpl.java
View file @
83b3e878
...
@@ -15,7 +15,6 @@ import com.wwdz.ch.wx.util.StringUtil;
...
@@ -15,7 +15,6 @@ import com.wwdz.ch.wx.util.StringUtil;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -27,8 +26,7 @@ import java.util.stream.Collectors;
...
@@ -27,8 +26,7 @@ import java.util.stream.Collectors;
*/
*/
@Service
@Service
public
class
ItemCommonServiceImpl
implements
ItemCommonService
{
public
class
ItemCommonServiceImpl
implements
ItemCommonService
{
@Autowired
private
UserItemsRelationDao
userItemsRelationDao
;
@Autowired
@Autowired
private
FavoritesItemsRelationDao
favoritesItemsRelationDao
;
private
FavoritesItemsRelationDao
favoritesItemsRelationDao
;
@Autowired
@Autowired
...
@@ -41,7 +39,6 @@ public class ItemCommonServiceImpl implements ItemCommonService {
...
@@ -41,7 +39,6 @@ public class ItemCommonServiceImpl implements ItemCommonService {
private
ItemDao
itemDao
;
private
ItemDao
itemDao
;
@Autowired
@Autowired
private
UserCollectBrowseNumDao
userCollectBrowseNumDao
;
private
UserCollectBrowseNumDao
userCollectBrowseNumDao
;
@Autowired
@Autowired
private
UserTokenManager
userTokenManager
;
private
UserTokenManager
userTokenManager
;
@Autowired
@Autowired
...
@@ -50,7 +47,7 @@ public class ItemCommonServiceImpl implements ItemCommonService {
...
@@ -50,7 +47,7 @@ public class ItemCommonServiceImpl implements ItemCommonService {
@Override
@Override
public
void
getNicknameAvatar
(
Long
itemId
,
ItemResponseVo
vo
)
{
public
void
getNicknameAvatar
(
Long
itemId
,
ItemResponseVo
vo
)
{
User
user
=
null
;
User
user
=
null
;
UserItemsRelation
userItemsRelation
=
userItemsRelation
Dao
.
find
(
itemId
);
UserItemsRelation
userItemsRelation
=
item
Dao
.
find
(
itemId
);
if
(
Objects
.
nonNull
(
userItemsRelation
))
{
if
(
Objects
.
nonNull
(
userItemsRelation
))
{
user
=
userDao
.
queryById
(
userItemsRelation
.
getUserId
());
user
=
userDao
.
queryById
(
userItemsRelation
.
getUserId
());
}
else
{
}
else
{
...
@@ -95,7 +92,7 @@ public class ItemCommonServiceImpl implements ItemCommonService {
...
@@ -95,7 +92,7 @@ public class ItemCommonServiceImpl implements ItemCommonService {
}
}
UserCollectBrowseNum
userCollectBrowseNum
=
userCollectBrowseNumDao
.
findByUserId
(
userInfo
.
getUserId
());
UserCollectBrowseNum
userCollectBrowseNum
=
userCollectBrowseNumDao
.
findByUserId
(
userInfo
.
getUserId
());
// 所有人私密数量
// 所有人私密数量
List
<
UserItemsRelation
>
userItemsRelations
=
userItemsRelation
Dao
.
listByUserIds
(
userInfo
.
getUserId
(),
null
);
List
<
UserItemsRelation
>
userItemsRelations
=
item
Dao
.
listByUserIds
(
userInfo
.
getUserId
(),
null
);
if
(
CollectionUtils
.
isNotEmpty
(
userItemsRelations
))
{
if
(
CollectionUtils
.
isNotEmpty
(
userItemsRelations
))
{
List
<
Long
>
itemIds
=
userItemsRelations
.
stream
()
List
<
Long
>
itemIds
=
userItemsRelations
.
stream
()
.
map
(
UserItemsRelation:
:
getItemId
).
collect
(
Collectors
.
toList
());
.
map
(
UserItemsRelation:
:
getItemId
).
collect
(
Collectors
.
toList
());
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/ItemServiceImpl.java
View file @
83b3e878
...
@@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSON;
...
@@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSON;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.qiniu.storage.model.FileInfo
;
import
com.qiniu.storage.model.FileInfo
;
import
com.wwdz.ch.core.consts.*
;
import
com.wwdz.ch.core.consts.*
;
import
com.wwdz.ch.core.entity.OfficialAccountCollectSubscribeMsg
;
import
com.wwdz.ch.core.storage.QiniuStorage
;
import
com.wwdz.ch.core.storage.QiniuStorage
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.core.util.CacheUtil
;
import
com.wwdz.ch.core.util.CacheUtil
;
...
@@ -73,9 +72,6 @@ public class ItemServiceImpl implements ItemService {
...
@@ -73,9 +72,6 @@ public class ItemServiceImpl implements ItemService {
@Autowired
@Autowired
private
ItemDao
itemDao
;
private
ItemDao
itemDao
;
@Autowired
private
UserItemsRelationDao
userItemsRelationDao
;
@Autowired
@Autowired
private
FavoritesItemsRelationDao
favoritesItemsRelationDao
;
private
FavoritesItemsRelationDao
favoritesItemsRelationDao
;
...
@@ -192,6 +188,10 @@ public class ItemServiceImpl implements ItemService {
...
@@ -192,6 +188,10 @@ public class ItemServiceImpl implements ItemService {
if
(
StringUtils
.
isNotBlank
(
dto
.
getName
()))
{
if
(
StringUtils
.
isNotBlank
(
dto
.
getName
()))
{
esSearchRequestDto
.
setContent
(
dto
.
getName
());
esSearchRequestDto
.
setContent
(
dto
.
getName
());
}
}
if
(
dto
.
getCid
()
!=
null
)
{
esSearchRequestDto
.
setCid
(
dto
.
getCid
());
}
EsPageInfo
esPageInfo
=
itemEsDao
.
findList
(
esSearchRequestDto
);
EsPageInfo
esPageInfo
=
itemEsDao
.
findList
(
esSearchRequestDto
);
if
(
Objects
.
isNull
(
esPageInfo
)
||
CollectionUtils
.
isEmpty
(
esPageInfo
.
getDataList
()))
{
if
(
Objects
.
isNull
(
esPageInfo
)
||
CollectionUtils
.
isEmpty
(
esPageInfo
.
getDataList
()))
{
return
Result
.
success
(
result
);
return
Result
.
success
(
result
);
...
@@ -219,7 +219,7 @@ public class ItemServiceImpl implements ItemService {
...
@@ -219,7 +219,7 @@ public class ItemServiceImpl implements ItemService {
itemResponseVo
.
setIsOnSale
(
es
.
getIsOnSale
());
itemResponseVo
.
setIsOnSale
(
es
.
getIsOnSale
());
if
(
Objects
.
nonNull
(
dto
.
getUserId
())
&&
!
dto
.
getUserId
().
equals
(
0L
))
{
if
(
Objects
.
nonNull
(
dto
.
getUserId
())
&&
!
dto
.
getUserId
().
equals
(
0L
))
{
itemResponseVo
.
setIsCollected
(
favoritesItemsRelationDao
.
isCollected
(
dto
.
getUserId
(),
es
.
getId
(),
null
)
?
1
:
0
);
itemResponseVo
.
setIsCollected
(
favoritesItemsRelationDao
.
isCollected
(
dto
.
getUserId
(),
es
.
getId
(),
null
)
?
1
:
0
);
itemResponseVo
.
setIsMine
(
userItemsRelation
Dao
.
isExisted
(
dto
.
getUserId
(),
es
.
getId
())
?
1
:
0
);
itemResponseVo
.
setIsMine
(
item
Dao
.
isExisted
(
dto
.
getUserId
(),
es
.
getId
())
?
1
:
0
);
}
}
// 设置收藏数
// 设置收藏数
long
count
=
favoritesItemsRelationDao
.
countByItemId
(
es
.
getId
());
long
count
=
favoritesItemsRelationDao
.
countByItemId
(
es
.
getId
());
...
@@ -270,7 +270,7 @@ public class ItemServiceImpl implements ItemService {
...
@@ -270,7 +270,7 @@ public class ItemServiceImpl implements ItemService {
//查询关注者发布的商品id,排除官方的账号
//查询关注者发布的商品id,排除官方的账号
//之后要优化,以免查询出来数据过多,在下一步骤in查询中造成慢sql问题
//之后要优化,以免查询出来数据过多,在下一步骤in查询中造成慢sql问题
List
<
UserItemsRelation
>
userItemsRelations
=
userItemsRelation
Dao
.
listByUserIds
(
null
,
filterFollowerIds
);
List
<
UserItemsRelation
>
userItemsRelations
=
item
Dao
.
listByUserIds
(
null
,
filterFollowerIds
);
List
<
Long
>
itemIdList
=
userItemsRelations
.
stream
().
map
(
UserItemsRelation:
:
getItemId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
itemIdList
=
userItemsRelations
.
stream
().
map
(
UserItemsRelation:
:
getItemId
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
itemIdList
))
{
if
(
CollectionUtils
.
isEmpty
(
itemIdList
))
{
...
@@ -364,7 +364,7 @@ public class ItemServiceImpl implements ItemService {
...
@@ -364,7 +364,7 @@ public class ItemServiceImpl implements ItemService {
//自定义官方用户判断
//自定义官方用户判断
if
(!
officialUserIds
.
contains
(
dto
.
getUserId
()))
{
if
(!
officialUserIds
.
contains
(
dto
.
getUserId
()))
{
// 查询用户和藏品关联表
// 查询用户和藏品关联表
List
<
UserItemsRelation
>
userItemsRelations
=
userItemsRelation
Dao
.
listByUserIds
(
dto
.
getUserId
(),
null
);
List
<
UserItemsRelation
>
userItemsRelations
=
item
Dao
.
listByUserIds
(
dto
.
getUserId
(),
null
);
if
(
CollectionUtils
.
isEmpty
(
userItemsRelations
))
{
if
(
CollectionUtils
.
isEmpty
(
userItemsRelations
))
{
return
Result
.
success
(
result
);
return
Result
.
success
(
result
);
}
}
...
@@ -529,7 +529,7 @@ public class ItemServiceImpl implements ItemService {
...
@@ -529,7 +529,7 @@ public class ItemServiceImpl implements ItemService {
itemResponseVo
.
setIsCollected
(
1
);
itemResponseVo
.
setIsCollected
(
1
);
}
}
itemResponseVo
.
setIsMine
(
userItemsRelation
Dao
.
isExisted
(
userId
,
item
.
getId
())
?
1
:
0
);
itemResponseVo
.
setIsMine
(
item
Dao
.
isExisted
(
userId
,
item
.
getId
())
?
1
:
0
);
// 设置收藏数
// 设置收藏数
long
count
=
favoritesItemsRelationDao
.
countByItemId
(
item
.
getId
());
long
count
=
favoritesItemsRelationDao
.
countByItemId
(
item
.
getId
());
itemResponseVo
.
setCollectCount
(
StringUtil
.
formatCount
(
count
));
itemResponseVo
.
setCollectCount
(
StringUtil
.
formatCount
(
count
));
...
@@ -580,6 +580,7 @@ public class ItemServiceImpl implements ItemService {
...
@@ -580,6 +580,7 @@ public class ItemServiceImpl implements ItemService {
item
.
setKind
(
ItemKindEnum
.
COIN
.
getCode
());
item
.
setKind
(
ItemKindEnum
.
COIN
.
getCode
());
item
.
setState
(
ItemStateEnum
.
SHELVE
.
getCode
());
item
.
setState
(
ItemStateEnum
.
SHELVE
.
getCode
());
item
.
setViewPermission
(
Objects
.
isNull
(
dto
.
getViewPermission
())
?
ViewPermissionEnum
.
ALL
.
getCode
()
:
dto
.
getViewPermission
());
item
.
setViewPermission
(
Objects
.
isNull
(
dto
.
getViewPermission
())
?
ViewPermissionEnum
.
ALL
.
getCode
()
:
dto
.
getViewPermission
());
item
.
setUserId
(
dto
.
getUserId
());
itemDao
.
insert
(
item
);
itemDao
.
insert
(
item
);
//微信音频内容安全识别
//微信音频内容安全识别
...
@@ -593,11 +594,11 @@ public class ItemServiceImpl implements ItemService {
...
@@ -593,11 +594,11 @@ public class ItemServiceImpl implements ItemService {
logger
.
info
(
"=========== 微信音频内容安全识别接口调用成功 ==========="
);
logger
.
info
(
"=========== 微信音频内容安全识别接口调用成功 ==========="
);
// 新增用户和藏品关联记录
// 新增用户和藏品关联记录
,2023-11-30该关联中间表废弃
UserItemsRelation
userItemsRelation
=
new
UserItemsRelation
();
/*
UserItemsRelation userItemsRelation = new UserItemsRelation();
userItemsRelation.setUserId(dto.getUserId());
userItemsRelation.setUserId(dto.getUserId());
userItemsRelation.setItemId(item.getId());
userItemsRelation.setItemId(item.getId());
userItemsRelationDao
.
insert
(
userItemsRelation
);
itemDao.insert(userItemsRelation);*/
// 新增收藏册和藏品关联记录
// 新增收藏册和藏品关联记录
if
(
Objects
.
nonNull
(
dto
.
getFavoritesId
())
&&
!
dto
.
getFavoritesId
().
equals
(
0L
))
{
if
(
Objects
.
nonNull
(
dto
.
getFavoritesId
())
&&
!
dto
.
getFavoritesId
().
equals
(
0L
))
{
...
@@ -654,7 +655,7 @@ public class ItemServiceImpl implements ItemService {
...
@@ -654,7 +655,7 @@ public class ItemServiceImpl implements ItemService {
return
Result
.
failed
(
ResultCode
.
INVALID_DATA
.
getCode
(),
"该藏品已经被移除"
);
return
Result
.
failed
(
ResultCode
.
INVALID_DATA
.
getCode
(),
"该藏品已经被移除"
);
}
}
// 查看权限校验
// 查看权限校验
UserItemsRelation
userItemsRelation
=
userItemsRelation
Dao
.
find
(
item
.
getId
());
UserItemsRelation
userItemsRelation
=
item
Dao
.
find
(
item
.
getId
());
if
(
item
.
getViewPermission
().
equals
(
ViewPermissionEnum
.
ONLY_ONESELF
.
getCode
()))
{
if
(
item
.
getViewPermission
().
equals
(
ViewPermissionEnum
.
ONLY_ONESELF
.
getCode
()))
{
// 未登录无权查看
// 未登录无权查看
if
(
Objects
.
isNull
(
dto
.
getUserId
())
||
dto
.
getUserId
().
equals
(
0L
))
{
if
(
Objects
.
isNull
(
dto
.
getUserId
())
||
dto
.
getUserId
().
equals
(
0L
))
{
...
@@ -718,7 +719,7 @@ public class ItemServiceImpl implements ItemService {
...
@@ -718,7 +719,7 @@ public class ItemServiceImpl implements ItemService {
}
else
{
}
else
{
itemResponseVo
.
setIsCollected
(
0
);
itemResponseVo
.
setIsCollected
(
0
);
}
}
itemResponseVo
.
setIsMine
(
userItemsRelation
Dao
.
isExisted
(
dto
.
getUserId
(),
item
.
getId
())
?
1
:
0
);
itemResponseVo
.
setIsMine
(
item
Dao
.
isExisted
(
dto
.
getUserId
(),
item
.
getId
())
?
1
:
0
);
if
(
itemResponseVo
.
getIsMine
()
==
0
)
{
if
(
itemResponseVo
.
getIsMine
()
==
0
)
{
FollowFansRecordRequestDto
followFansRecordRequestDto
=
new
FollowFansRecordRequestDto
();
FollowFansRecordRequestDto
followFansRecordRequestDto
=
new
FollowFansRecordRequestDto
();
followFansRecordRequestDto
.
setFollowerId
(
itemResponseVo
.
getItemUserId
());
followFansRecordRequestDto
.
setFollowerId
(
itemResponseVo
.
getItemUserId
());
...
@@ -773,7 +774,7 @@ public class ItemServiceImpl implements ItemService {
...
@@ -773,7 +774,7 @@ public class ItemServiceImpl implements ItemService {
public
Result
del
(
ItemRequestDto
dto
)
{
public
Result
del
(
ItemRequestDto
dto
)
{
try
{
try
{
itemDao
.
deleteById
(
dto
.
getId
());
itemDao
.
deleteById
(
dto
.
getId
());
UserItemsRelation
userItemsRelation
=
userItemsRelation
Dao
.
find
(
dto
.
getId
());
UserItemsRelation
userItemsRelation
=
item
Dao
.
find
(
dto
.
getId
());
if
(
Objects
.
nonNull
(
userItemsRelation
))
{
if
(
Objects
.
nonNull
(
userItemsRelation
))
{
FavoritesItemsRelation
favoritesItemsRelation
=
favoritesItemsRelationDao
.
selectByUserIdItemId
(
userItemsRelation
.
getUserId
(),
dto
.
getId
());
FavoritesItemsRelation
favoritesItemsRelation
=
favoritesItemsRelationDao
.
selectByUserIdItemId
(
userItemsRelation
.
getUserId
(),
dto
.
getId
());
if
(
Objects
.
nonNull
(
favoritesItemsRelation
))
{
if
(
Objects
.
nonNull
(
favoritesItemsRelation
))
{
...
@@ -801,7 +802,7 @@ public class ItemServiceImpl implements ItemService {
...
@@ -801,7 +802,7 @@ public class ItemServiceImpl implements ItemService {
return
Result
.
failed
(
"该藏品已删除,不支持收藏"
);
return
Result
.
failed
(
"该藏品已删除,不支持收藏"
);
}
}
// 权限校验
// 权限校验
UserItemsRelation
userItemsRelation
=
userItemsRelation
Dao
.
find
(
item
.
getId
());
UserItemsRelation
userItemsRelation
=
item
Dao
.
find
(
item
.
getId
());
if
(
item
.
getViewPermission
().
equals
(
ViewPermissionEnum
.
ONLY_ONESELF
.
getCode
()))
{
if
(
item
.
getViewPermission
().
equals
(
ViewPermissionEnum
.
ONLY_ONESELF
.
getCode
()))
{
if
(
Objects
.
nonNull
(
userItemsRelation
)
&&
!
userItemsRelation
.
getUserId
().
equals
(
dto
.
getUserId
()))
{
if
(
Objects
.
nonNull
(
userItemsRelation
)
&&
!
userItemsRelation
.
getUserId
().
equals
(
dto
.
getUserId
()))
{
return
Result
.
failed
(
"暂无权限收藏该藏品"
);
return
Result
.
failed
(
"暂无权限收藏该藏品"
);
...
@@ -876,7 +877,7 @@ public class ItemServiceImpl implements ItemService {
...
@@ -876,7 +877,7 @@ public class ItemServiceImpl implements ItemService {
String
collectCount
=
StringUtil
.
formatCount
(
count
);
String
collectCount
=
StringUtil
.
formatCount
(
count
);
// 更新藏品发布者的收藏数
// 更新藏品发布者的收藏数
UserItemsRelation
userItemsRelation
=
userItemsRelation
Dao
.
find
(
item
.
getId
());
UserItemsRelation
userItemsRelation
=
item
Dao
.
find
(
item
.
getId
());
if
(
Objects
.
nonNull
(
userItemsRelation
))
{
if
(
Objects
.
nonNull
(
userItemsRelation
))
{
UserCollectBrowseNum
userCollectBrowseNum
=
userCollectBrowseNumDao
.
findByUserId
(
userItemsRelation
.
getUserId
());
UserCollectBrowseNum
userCollectBrowseNum
=
userCollectBrowseNumDao
.
findByUserId
(
userItemsRelation
.
getUserId
());
if
(
Objects
.
nonNull
(
userCollectBrowseNum
))
{
if
(
Objects
.
nonNull
(
userCollectBrowseNum
))
{
...
@@ -1198,7 +1199,7 @@ public class ItemServiceImpl implements ItemService {
...
@@ -1198,7 +1199,7 @@ public class ItemServiceImpl implements ItemService {
*/
*/
private
void
sendMessage
(
Long
id
,
Long
userId
,
Integer
messageType
,
Integer
idType
)
{
private
void
sendMessage
(
Long
id
,
Long
userId
,
Integer
messageType
,
Integer
idType
)
{
if
(
idType
.
equals
(
MessageEnum
.
ContentIdTypeEnum
.
ITEM
.
getCode
()))
{
if
(
idType
.
equals
(
MessageEnum
.
ContentIdTypeEnum
.
ITEM
.
getCode
()))
{
UserItemsRelation
userItemsRelation
=
userItemsRelation
Dao
.
find
(
id
);
UserItemsRelation
userItemsRelation
=
item
Dao
.
find
(
id
);
if
(
Objects
.
nonNull
(
userItemsRelation
))
{
if
(
Objects
.
nonNull
(
userItemsRelation
))
{
if
(!
userItemsRelation
.
getUserId
().
equals
(
userId
))
{
if
(!
userItemsRelation
.
getUserId
().
equals
(
userId
))
{
if
(
messageType
.
equals
(
MessageEnum
.
TypeEnum
.
COLLECT
.
getCode
()))
{
if
(
messageType
.
equals
(
MessageEnum
.
TypeEnum
.
COLLECT
.
getCode
()))
{
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/ConsignSaleService.java
0 → 100644
View file @
83b3e878
package
com.wwdz.ch.wx.service
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.db.dto.request.ConsignSaleRequestDto
;
public
interface
ConsignSaleService
{
/**
* 创建寄售单
* @param dto
* @return
*/
Result
createConsignSaleOrder
(
ConsignSaleRequestDto
dto
);
/**
* 查询寄售单
* @param dto
* @return
*/
Result
findList
(
ConsignSaleRequestDto
dto
);
/**
* 查询寄售单详情
* @param dto
* @return
*/
Result
findDetail
(
ConsignSaleRequestDto
dto
);
/**
* 客户取消寄售
* @param dto
* @return
*/
Result
customCancel
(
ConsignSaleRequestDto
dto
);
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/ConsignSaleController.java
0 → 100644
View file @
83b3e878
package
com.wwdz.ch.wx.web
;
import
com.alibaba.fastjson.JSON
;
import
com.wwdz.ch.core.consts.ResultCode
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.db.domain.ConsignSale
;
import
com.wwdz.ch.db.dto.request.AiAssistantRequestDto
;
import
com.wwdz.ch.db.dto.request.ConsignSaleRequestDto
;
import
com.wwdz.ch.wx.entity.request.ItemRequestDto
;
import
com.wwdz.ch.wx.service.ConsignSaleService
;
import
com.wwdz.ch.wx.service.ItemService
;
import
com.xxdxxs.service.FormHandler
;
import
com.xxdxxs.validation.Validator
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Objects
;
/**
* 寄售单
*/
@RestController
@RequestMapping
(
"/wx/consignSale"
)
public
class
ConsignSaleController
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
ConsignSaleController
.
class
);
@Autowired
ConsignSaleService
consignSaleService
;
@Autowired
ItemService
itemService
;
@ApiOperation
(
value
=
"创建寄售单"
)
@PostMapping
(
"/create"
)
public
Result
create
(
@RequestBody
ItemRequestDto
dto
)
{
logger
.
info
(
"【请求开始】创建寄售单,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
Validator
validator
=
new
Validator
(
FormHandler
.
ofEntity
(
dto
));
validator
.
set
(
"userId"
,
"用户ID"
).
must
().
number
()
.
set
(
"name"
,
"标题"
).
must
().
string
()
.
set
(
"images"
,
"图片"
).
must
().
string
()
.
end
();
if
(!
validator
.
isValid
())
{
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
.
getCode
(),
validator
.
getErrorInfo
());
}
//先发布商品
dto
.
setPrice
(
StringUtils
.
isBlank
(
dto
.
getPrice
())
?
"0"
:
dto
.
getPrice
());
dto
.
setIsOnSale
(
true
);
Result
addItemResult
=
itemService
.
add
(
dto
);
if
(!
addItemResult
.
getSuccess
())
{
return
Result
.
failed
(
ResultCode
.
FAILED
.
getCode
(),
"商品发布失败"
);
}
Map
<
String
,
Object
>
map
=
(
Map
<
String
,
Object
>)
addItemResult
.
getData
();
long
itemId
=
(
long
)
map
.
get
(
"id"
);
//为发布的商品创建寄售单
ConsignSaleRequestDto
consignSaleRequestDto
=
new
ConsignSaleRequestDto
();
consignSaleRequestDto
.
setUserId
(
dto
.
getUserId
());
consignSaleRequestDto
.
setItemId
(
itemId
);
consignSaleRequestDto
.
setUserPrice
(
Integer
.
valueOf
(
dto
.
getPrice
()));
return
consignSaleService
.
createConsignSaleOrder
(
consignSaleRequestDto
);
}
@ApiOperation
(
value
=
"用户查询寄售单"
)
@PostMapping
(
"/findList"
)
public
Result
findList
(
@RequestBody
ConsignSaleRequestDto
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
(
ResultCode
.
PARAM_ERROR
.
getCode
(),
validator
.
getErrorInfo
());
}
return
consignSaleService
.
findList
(
dto
);
}
@ApiOperation
(
value
=
"用户取消寄售单"
)
@PostMapping
(
"/cancel"
)
public
Result
cancel
(
@RequestBody
ConsignSaleRequestDto
dto
)
{
logger
.
info
(
"【请求开始】用户取消寄售单,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
Validator
validator
=
new
Validator
(
FormHandler
.
ofEntity
(
dto
));
validator
.
set
(
"saleId"
,
"寄售单号"
).
must
().
string
()
.
set
(
"itemId"
,
"商品id"
).
must
().
number
()
.
end
();
if
(!
validator
.
isValid
())
{
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
.
getCode
(),
validator
.
getErrorInfo
());
}
return
consignSaleService
.
customCancel
(
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