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
2276b9d2
Commit
2276b9d2
authored
Aug 28, 2023
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增商品状态字段
parent
776c8d18
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
140 additions
and
72 deletions
+140
-72
ch-admin-api/src/main/java/com/wwdz/ch/admin/controller/ItemController.java
...ain/java/com/wwdz/ch/admin/controller/ItemController.java
+10
-0
ch-admin-api/src/main/java/com/wwdz/ch/admin/entity/vo/ItemVo.java
...api/src/main/java/com/wwdz/ch/admin/entity/vo/ItemVo.java
+3
-3
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/ItemServiceImpl.java
...src/main/java/com/wwdz/ch/admin/impl/ItemServiceImpl.java
+19
-2
ch-admin-api/src/main/java/com/wwdz/ch/admin/job/SynCoinJob.java
...n-api/src/main/java/com/wwdz/ch/admin/job/SynCoinJob.java
+2
-1
ch-admin-api/src/main/java/com/wwdz/ch/admin/service/ItemService.java
.../src/main/java/com/wwdz/ch/admin/service/ItemService.java
+2
-0
ch-core/src/main/java/com/wwdz/ch/core/consts/ItemStateEnum.java
.../src/main/java/com/wwdz/ch/core/consts/ItemStateEnum.java
+37
-0
ch-dao/src/main/java/com/wwdz/ch/db/bean/ItemOfEs.java
ch-dao/src/main/java/com/wwdz/ch/db/bean/ItemOfEs.java
+2
-2
ch-dao/src/main/java/com/wwdz/ch/db/domain/Item.java
ch-dao/src/main/java/com/wwdz/ch/db/domain/Item.java
+7
-7
ch-dao/src/main/java/com/wwdz/ch/db/domain/ItemExample.java
ch-dao/src/main/java/com/wwdz/ch/db/domain/ItemExample.java
+36
-36
ch-dao/src/main/java/com/wwdz/ch/db/impl/ItemDaoImpl.java
ch-dao/src/main/java/com/wwdz/ch/db/impl/ItemDaoImpl.java
+1
-2
ch-dao/src/main/java/com/wwdz/ch/db/mapper/ItemMapper.java
ch-dao/src/main/java/com/wwdz/ch/db/mapper/ItemMapper.java
+1
-0
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/ItemMapper.xml
...o/src/main/resources/com/wwdz/ch/db/mapper/ItemMapper.xml
+20
-19
No files found.
ch-admin-api/src/main/java/com/wwdz/ch/admin/controller/ItemController.java
View file @
2276b9d2
...
...
@@ -61,6 +61,16 @@ public class ItemController {
return
result
;
}
@RequiresPermissionsDesc
(
menu
=
{
"商品列表"
,
"商品设置主图"
},
button
=
"更新"
)
@PostMapping
(
"/setTopImage"
)
public
Result
setTopImage
(
@RequestBody
CoinRequestDto
coinRequestDto
)
{
logger
.
info
(
"【请求开始】操作人:["
+
AuthSupport
.
userName
()+
"] 商品列表->商品设置主图->更新,请求参数:parma:{}"
,
coinRequestDto
);
Result
result
=
itemService
.
setItem
(
coinRequestDto
);
logger
.
info
(
"【请求结束】钱币列表->商品设置主图->更新"
);
return
result
;
}
@GetMapping
(
"/updateUrl"
)
public
void
syn
()
{
synCoinJob
.
updateImageUrlOfsSize
();
...
...
ch-admin-api/src/main/java/com/wwdz/ch/admin/entity/vo/ItemVo.java
View file @
2276b9d2
...
...
@@ -63,9 +63,9 @@ public class ItemVo implements Entity {
private
Boolean
isOnSale
;
/**
*
是否设置过
*
商品状态
*/
private
Integer
isSetted
;
private
Integer
state
;
/**
* 逻辑删除
...
...
@@ -176,7 +176,7 @@ public class ItemVo implements Entity {
itemVo
.
setImages
(
item
.
getImages
().
split
(
";"
));
}
itemVo
.
setIsDeleted
(
item
.
getIsDeleted
());
itemVo
.
set
IsSetted
(
item
.
getIsSetted
());
itemVo
.
set
State
(
item
.
getState
());
if
(!
ObjectUtils
.
isEmpty
(
item
.
getPrice
()))
{
itemVo
.
setPrice
(
Double
.
parseDouble
(
PriceUtil
.
convertPrice
(
item
.
getPrice
())));
}
...
...
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/ItemServiceImpl.java
View file @
2276b9d2
...
...
@@ -6,6 +6,7 @@ import com.wwdz.ch.admin.service.OperateLogService;
import
com.wwdz.ch.admin.util.AuthSupport
;
import
com.wwdz.ch.core.consts.CommConsts
;
import
com.wwdz.ch.core.consts.CommonEnum
;
import
com.wwdz.ch.core.consts.ItemStateEnum
;
import
com.wwdz.ch.core.storage.QiniuStorage
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.db.dao.CroppingRecordDao
;
...
...
@@ -146,10 +147,9 @@ public class ItemServiceImpl implements ItemService {
paramMap
.
put
(
"topImage"
,
url
);
item
.
setTopImage
(
url
);
}
item
.
setState
(
ItemStateEnum
.
FINISH
.
getCode
());
itemDao
.
setCoin
(
item
);
//记录钱币设置的操作日志
OperateLog
operateLog
=
OperateLog
.
of
(
coinRequestDto
.
getId
(),
CommonEnum
.
OperateTypeEnum
.
ITEM_SET
.
getDes
(),
CommonEnum
.
OperateTypeEnum
.
ITEM_SET
.
getCode
(),
AuthSupport
.
adminId
(),
AuthSupport
.
userName
(),
JsonUtils
.
fromMap
(
paramMap
));
...
...
@@ -161,6 +161,23 @@ public class ItemServiceImpl implements ItemService {
return
Result
.
success
();
}
@Override
public
Result
setTopImage
(
CoinRequestDto
coinRequestDto
)
{
try
{
Item
item
=
new
Item
();
item
.
setId
(
coinRequestDto
.
getId
());
item
.
setTopImage
(
coinRequestDto
.
getTopImage
());
item
.
setState
(
ItemStateEnum
.
FINISH
.
getCode
());
item
.
setUpdateTime
(
new
Date
());
itemDao
.
update
(
item
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"设置主图出错:{}"
,
e
);
return
Result
.
failed
();
}
return
Result
.
success
();
}
@Override
public
Result
saveCroppingRecord
(
CroppingRecordRequestDto
croppingRecordRequestDto
)
{
try
{
...
...
ch-admin-api/src/main/java/com/wwdz/ch/admin/job/SynCoinJob.java
View file @
2276b9d2
...
...
@@ -3,6 +3,7 @@ package com.wwdz.ch.admin.job;
import
com.github.pagehelper.PageInfo
;
import
com.wwdz.ch.core.consts.CommConsts
;
import
com.wwdz.ch.core.consts.CommonEnum
;
import
com.wwdz.ch.core.consts.ItemStateEnum
;
import
com.wwdz.ch.core.consts.MediaTypeEnum
;
import
com.wwdz.ch.core.storage.QiniuStorage
;
import
com.wwdz.ch.core.util.RedisUtils
;
...
...
@@ -100,7 +101,7 @@ public class SynCoinJob {
item
.
setIsDeleted
(
false
);
item
.
setBidTime
(
""
);
item
.
setRemark
(
null
);
item
.
set
IsSetted
(
0
);
item
.
set
State
(
ItemStateEnum
.
PENDING
.
getCode
()
);
item
.
setOriginalExtra
(
coins
.
getExtra
());
item
.
setOriginalSourceUrl
(
coins
.
getSourceUrl
());
item
.
setSource
(
coins
.
getSource
());
...
...
ch-admin-api/src/main/java/com/wwdz/ch/admin/service/ItemService.java
View file @
2276b9d2
...
...
@@ -16,6 +16,8 @@ public interface ItemService {
Result
setItem
(
CoinRequestDto
coinRequestDto
);
Result
setTopImage
(
CoinRequestDto
coinRequestDto
);
/**
* 保存图片裁剪记录
* @param croppingRecordRequestDto
...
...
ch-core/src/main/java/com/wwdz/ch/core/consts/ItemStateEnum.java
0 → 100644
View file @
2276b9d2
package
com.wwdz.ch.core.consts
;
/**
* 商品种类
*/
public
enum
ItemStateEnum
{
PENDING
(
0
,
"待处理"
),
SHELVE
(
1
,
"暂不处理"
),
FINISH
(
10
,
"已完成"
),
;
private
int
code
;
private
String
des
;
ItemStateEnum
(
int
code
,
String
des
)
{
this
.
code
=
code
;
this
.
des
=
des
;
}
public
static
String
getNameByCode
(
int
code
)
{
for
(
ItemStateEnum
itemStateEnum
:
ItemStateEnum
.
values
())
{
if
(
code
==
itemStateEnum
.
getCode
())
{
return
itemStateEnum
.
getDes
();
}
}
return
null
;
}
public
int
getCode
()
{
return
code
;
}
public
String
getDes
()
{
return
des
;
}
}
ch-dao/src/main/java/com/wwdz/ch/db/bean/ItemOfEs.java
View file @
2276b9d2
...
...
@@ -84,9 +84,9 @@ public class ItemOfEs implements Entity {
private
String
remark
;
/**
*
是否设置过
*
商品状态
*/
private
Integer
isSetted
;
private
Integer
state
;
/**
* 原始的资源url
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/Item.java
View file @
2276b9d2
...
...
@@ -10,7 +10,7 @@ import lombok.Data;
/**
* @author shiyu
* @date 2023/08/
17
* @date 2023/08/
28
*/
@Data
public
class
Item
implements
Entity
{
...
...
@@ -87,9 +87,9 @@ public class Item implements Entity {
private
String
remark
;
/**
*
是否设置过
*
商品状态
*/
private
Integer
isSetted
;
private
Integer
state
;
/**
* 原始的资源url
...
...
@@ -154,7 +154,7 @@ public class Item implements Entity {
sb
.
append
(
", isDeleted="
).
append
(
isDeleted
);
sb
.
append
(
", bidTime="
).
append
(
bidTime
);
sb
.
append
(
", remark="
).
append
(
remark
);
sb
.
append
(
",
isSetted="
).
append
(
isSetted
);
sb
.
append
(
",
state="
).
append
(
state
);
sb
.
append
(
", originalSourceUrl="
).
append
(
originalSourceUrl
);
sb
.
append
(
", source="
).
append
(
source
);
sb
.
append
(
", kind="
).
append
(
kind
);
...
...
@@ -195,7 +195,7 @@ public class Item implements Entity {
&&
(
this
.
getIsDeleted
()
==
null
?
other
.
getIsDeleted
()
==
null
:
this
.
getIsDeleted
().
equals
(
other
.
getIsDeleted
()))
&&
(
this
.
getBidTime
()
==
null
?
other
.
getBidTime
()
==
null
:
this
.
getBidTime
().
equals
(
other
.
getBidTime
()))
&&
(
this
.
getRemark
()
==
null
?
other
.
getRemark
()
==
null
:
this
.
getRemark
().
equals
(
other
.
getRemark
()))
&&
(
this
.
get
IsSetted
()
==
null
?
other
.
getIsSetted
()
==
null
:
this
.
getIsSetted
().
equals
(
other
.
getIsSetted
()))
&&
(
this
.
get
State
()
==
null
?
other
.
getState
()
==
null
:
this
.
getState
().
equals
(
other
.
getState
()))
&&
(
this
.
getOriginalSourceUrl
()
==
null
?
other
.
getOriginalSourceUrl
()
==
null
:
this
.
getOriginalSourceUrl
().
equals
(
other
.
getOriginalSourceUrl
()))
&&
(
this
.
getSource
()
==
null
?
other
.
getSource
()
==
null
:
this
.
getSource
().
equals
(
other
.
getSource
()))
&&
(
this
.
getKind
()
==
null
?
other
.
getKind
()
==
null
:
this
.
getKind
().
equals
(
other
.
getKind
()))
...
...
@@ -225,7 +225,7 @@ public class Item implements Entity {
result
=
prime
*
result
+
((
getIsDeleted
()
==
null
)
?
0
:
getIsDeleted
().
hashCode
());
result
=
prime
*
result
+
((
getBidTime
()
==
null
)
?
0
:
getBidTime
().
hashCode
());
result
=
prime
*
result
+
((
getRemark
()
==
null
)
?
0
:
getRemark
().
hashCode
());
result
=
prime
*
result
+
((
get
IsSetted
()
==
null
)
?
0
:
getIsSetted
().
hashCode
());
result
=
prime
*
result
+
((
get
State
()
==
null
)
?
0
:
getState
().
hashCode
());
result
=
prime
*
result
+
((
getOriginalSourceUrl
()
==
null
)
?
0
:
getOriginalSourceUrl
().
hashCode
());
result
=
prime
*
result
+
((
getSource
()
==
null
)
?
0
:
getSource
().
hashCode
());
result
=
prime
*
result
+
((
getKind
()
==
null
)
?
0
:
getKind
().
hashCode
());
...
...
@@ -260,7 +260,7 @@ public class Item implements Entity {
isDeleted
(
"is_deleted"
,
"isDeleted"
,
"BIT"
,
false
),
bidTime
(
"bid_time"
,
"bidTime"
,
"VARCHAR"
,
false
),
remark
(
"remark"
,
"remark"
,
"VARCHAR"
,
false
),
isSetted
(
"is_setted"
,
"isSetted"
,
"INTEGER"
,
fals
e
),
state
(
"state"
,
"state"
,
"INTEGER"
,
tru
e
),
originalSourceUrl
(
"original_source_url"
,
"originalSourceUrl"
,
"VARCHAR"
,
false
),
source
(
"source"
,
"source"
,
"INTEGER"
,
true
),
kind
(
"kind"
,
"kind"
,
"INTEGER"
,
false
),
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/ItemExample.java
View file @
2276b9d2
...
...
@@ -2178,18 +2178,18 @@ public class ItemExample {
return
(
Criteria
)
this
;
}
public
Criteria
and
IsSetted
IsNull
()
{
addCriterion
(
"
is_setted
is null"
);
public
Criteria
and
State
IsNull
()
{
addCriterion
(
"
`state`
is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
IsSetted
IsNotNull
()
{
addCriterion
(
"
is_setted
is not null"
);
public
Criteria
and
State
IsNotNull
()
{
addCriterion
(
"
`state`
is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
IsSetted
EqualTo
(
Integer
value
)
{
addCriterion
(
"
is_setted ="
,
value
,
"isSetted
"
);
public
Criteria
and
State
EqualTo
(
Integer
value
)
{
addCriterion
(
"
`state` ="
,
value
,
"state
"
);
return
(
Criteria
)
this
;
}
...
...
@@ -2200,13 +2200,13 @@ public class ItemExample {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
and
IsSetted
EqualToColumn
(
Item
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
is_setted
= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
public
Criteria
and
State
EqualToColumn
(
Item
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
`state`
= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
and
IsSetted
NotEqualTo
(
Integer
value
)
{
addCriterion
(
"
is_setted <>"
,
value
,
"isSetted
"
);
public
Criteria
and
State
NotEqualTo
(
Integer
value
)
{
addCriterion
(
"
`state` <>"
,
value
,
"state
"
);
return
(
Criteria
)
this
;
}
...
...
@@ -2217,13 +2217,13 @@ public class ItemExample {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
and
IsSetted
NotEqualToColumn
(
Item
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
is_setted
<> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
public
Criteria
and
State
NotEqualToColumn
(
Item
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
`state`
<> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
and
IsSetted
GreaterThan
(
Integer
value
)
{
addCriterion
(
"
is_setted >"
,
value
,
"isSetted
"
);
public
Criteria
and
State
GreaterThan
(
Integer
value
)
{
addCriterion
(
"
`state` >"
,
value
,
"state
"
);
return
(
Criteria
)
this
;
}
...
...
@@ -2234,13 +2234,13 @@ public class ItemExample {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
and
IsSetted
GreaterThanColumn
(
Item
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
is_setted
> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
public
Criteria
and
State
GreaterThanColumn
(
Item
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
`state`
> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
and
IsSetted
GreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"
is_setted >="
,
value
,
"isSetted
"
);
public
Criteria
and
State
GreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"
`state` >="
,
value
,
"state
"
);
return
(
Criteria
)
this
;
}
...
...
@@ -2251,13 +2251,13 @@ public class ItemExample {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
and
IsSetted
GreaterThanOrEqualToColumn
(
Item
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
is_setted
>= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
public
Criteria
and
State
GreaterThanOrEqualToColumn
(
Item
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
`state`
>= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
and
IsSetted
LessThan
(
Integer
value
)
{
addCriterion
(
"
is_setted <"
,
value
,
"isSetted
"
);
public
Criteria
and
State
LessThan
(
Integer
value
)
{
addCriterion
(
"
`state` <"
,
value
,
"state
"
);
return
(
Criteria
)
this
;
}
...
...
@@ -2268,13 +2268,13 @@ public class ItemExample {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
and
IsSetted
LessThanColumn
(
Item
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
is_setted
< "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
public
Criteria
and
State
LessThanColumn
(
Item
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
`state`
< "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
and
IsSetted
LessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"
is_setted <="
,
value
,
"isSetted
"
);
public
Criteria
and
State
LessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"
`state` <="
,
value
,
"state
"
);
return
(
Criteria
)
this
;
}
...
...
@@ -2285,28 +2285,28 @@ public class ItemExample {
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
and
IsSetted
LessThanOrEqualToColumn
(
Item
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
is_setted
<= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
public
Criteria
and
State
LessThanOrEqualToColumn
(
Item
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"
`state`
<= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
and
IsSetted
In
(
List
<
Integer
>
values
)
{
addCriterion
(
"
is_setted in"
,
values
,
"isSetted
"
);
public
Criteria
and
State
In
(
List
<
Integer
>
values
)
{
addCriterion
(
"
`state` in"
,
values
,
"state
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
IsSetted
NotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"
is_setted not in"
,
values
,
"isSetted
"
);
public
Criteria
and
State
NotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"
`state` not in"
,
values
,
"state
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
IsSetted
Between
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"
is_setted between"
,
value1
,
value2
,
"isSetted
"
);
public
Criteria
and
State
Between
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"
`state` between"
,
value1
,
value2
,
"state
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
IsSetted
NotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"
is_setted not between"
,
value1
,
value2
,
"isSetted
"
);
public
Criteria
and
State
NotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"
`state` not between"
,
value1
,
value2
,
"state
"
);
return
(
Criteria
)
this
;
}
...
...
ch-dao/src/main/java/com/wwdz/ch/db/impl/ItemDaoImpl.java
View file @
2276b9d2
...
...
@@ -36,7 +36,7 @@ public class ItemDaoImpl implements ItemDao {
criteria
.
andIdNotIn
(
coinRequestDto
.
getIdExcludeList
());
}
criteria
.
andIsDeletedEqualTo
(
false
);
criteria
.
and
IsSetted
EqualTo
(
0
);
criteria
.
and
State
EqualTo
(
0
);
criteria
.
andSourceIn
(
CHINESE_SOURCE_LIST
);
return
itemMapper
.
selectOneByExampleWithBLOBs
(
example
);
}
...
...
@@ -125,7 +125,6 @@ public class ItemDaoImpl implements ItemDao {
ItemExample
example
=
new
ItemExample
();
ItemExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andIdEqualTo
(
item
.
getId
());
item
.
setIsSetted
(
1
);
item
.
setUpdateTime
(
new
Date
());
int
num
=
itemMapper
.
updateByExampleSelective
(
item
,
example
);
return
num
>
0
;
...
...
ch-dao/src/main/java/com/wwdz/ch/db/mapper/ItemMapper.java
View file @
2276b9d2
...
...
@@ -68,6 +68,7 @@ public interface ItemMapper {
*/
Item
selectByPrimaryKeySelective
(
@Param
(
"id"
)
Long
id
,
@Param
(
"selective"
)
Item
.
Column
...
selective
);
Item
selectByPrimaryKey
(
Long
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
Item
record
,
@Param
(
"example"
)
ItemExample
example
);
...
...
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/ItemMapper.xml
View file @
2276b9d2
...
...
@@ -17,7 +17,7 @@
<result
column=
"is_deleted"
jdbcType=
"BIT"
property=
"isDeleted"
/>
<result
column=
"bid_time"
jdbcType=
"VARCHAR"
property=
"bidTime"
/>
<result
column=
"remark"
jdbcType=
"VARCHAR"
property=
"remark"
/>
<result
column=
"
is_setted"
jdbcType=
"INTEGER"
property=
"isSetted
"
/>
<result
column=
"
state"
jdbcType=
"INTEGER"
property=
"state
"
/>
<result
column=
"original_source_url"
jdbcType=
"VARCHAR"
property=
"originalSourceUrl"
/>
<result
column=
"source"
jdbcType=
"INTEGER"
property=
"source"
/>
<result
column=
"kind"
jdbcType=
"INTEGER"
property=
"kind"
/>
...
...
@@ -91,7 +91,7 @@
</sql>
<sql
id=
"Base_Column_List"
>
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,
is_setted
, original_source_url,
source_type, update_time, is_deleted, bid_time, remark,
`state`
, original_source_url,
`source`, kind
</sql>
<sql
id=
"Blob_Column_List"
>
...
...
@@ -148,7 +148,7 @@
</when>
<otherwise>
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,
is_setted
, original_source_url,
source_type, update_time, is_deleted, bid_time, remark,
`state`
, original_source_url,
`source`, kind, extra, images, videos, detail, original_extra
</otherwise>
</choose>
...
...
@@ -183,7 +183,7 @@
</when>
<otherwise>
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,
is_setted
, original_source_url,
source_type, update_time, is_deleted, bid_time, remark,
`state`
, original_source_url,
`source`, kind, extra, images, videos, detail, original_extra
</otherwise>
</choose>
...
...
@@ -208,7 +208,7 @@
is_std, sort, share_image,
top_image, price, create_time,
source_type, update_time, is_deleted,
bid_time, remark,
is_setted
,
bid_time, remark,
`state`
,
original_source_url, `source`, kind,
extra, images, videos,
detail, original_extra)
...
...
@@ -216,7 +216,7 @@
#{isStd,jdbcType=BIT}, #{sort,jdbcType=INTEGER}, #{shareImage,jdbcType=VARCHAR},
#{topImage,jdbcType=VARCHAR}, #{price,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
#{sourceType,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, #{isDeleted,jdbcType=BIT},
#{bidTime,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{
isSetted
,jdbcType=INTEGER},
#{bidTime,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{
state
,jdbcType=INTEGER},
#{originalSourceUrl,jdbcType=VARCHAR}, #{source,jdbcType=INTEGER}, #{kind,jdbcType=INTEGER},
#{extra,jdbcType=LONGVARCHAR}, #{images,jdbcType=LONGVARCHAR}, #{videos,jdbcType=LONGVARCHAR},
#{detail,jdbcType=LONGVARCHAR}, #{originalExtra,jdbcType=LONGVARCHAR})
...
...
@@ -269,8 +269,8 @@
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"
isSetted
!= null"
>
is_setted
,
<if
test=
"
state
!= null"
>
`state`
,
</if>
<if
test=
"originalSourceUrl != null"
>
original_source_url,
...
...
@@ -340,8 +340,8 @@
<if
test=
"remark != null"
>
#{remark,jdbcType=VARCHAR},
</if>
<if
test=
"
isSetted
!= null"
>
#{
isSetted
,jdbcType=INTEGER},
<if
test=
"
state
!= null"
>
#{
state
,jdbcType=INTEGER},
</if>
<if
test=
"originalSourceUrl != null"
>
#{originalSourceUrl,jdbcType=VARCHAR},
...
...
@@ -423,8 +423,8 @@
<if
test=
"record.remark != null"
>
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if
test=
"record.
isSetted
!= null"
>
is_setted = #{record.isSetted
,jdbcType=INTEGER},
<if
test=
"record.
state
!= null"
>
`state` = #{record.state
,jdbcType=INTEGER},
</if>
<if
test=
"record.originalSourceUrl != null"
>
original_source_url = #{record.originalSourceUrl,jdbcType=VARCHAR},
...
...
@@ -472,7 +472,7 @@
is_deleted = #{record.isDeleted,jdbcType=BIT},
bid_time = #{record.bidTime,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
is_setted = #{record.isSetted
,jdbcType=INTEGER},
`state` = #{record.state
,jdbcType=INTEGER},
original_source_url = #{record.originalSourceUrl,jdbcType=VARCHAR},
`source` = #{record.source,jdbcType=INTEGER},
kind = #{record.kind,jdbcType=INTEGER},
...
...
@@ -502,7 +502,7 @@
is_deleted = #{record.isDeleted,jdbcType=BIT},
bid_time = #{record.bidTime,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
is_setted = #{record.isSetted
,jdbcType=INTEGER},
`state` = #{record.state
,jdbcType=INTEGER},
original_source_url = #{record.originalSourceUrl,jdbcType=VARCHAR},
`source` = #{record.source,jdbcType=INTEGER},
kind = #{record.kind,jdbcType=INTEGER}
...
...
@@ -555,8 +555,8 @@
<if
test=
"remark != null"
>
remark = #{remark,jdbcType=VARCHAR},
</if>
<if
test=
"
isSetted
!= null"
>
is_setted = #{isSetted
,jdbcType=INTEGER},
<if
test=
"
state
!= null"
>
`state` = #{state
,jdbcType=INTEGER},
</if>
<if
test=
"originalSourceUrl != null"
>
original_source_url = #{originalSourceUrl,jdbcType=VARCHAR},
...
...
@@ -601,7 +601,7 @@
is_deleted = #{isDeleted,jdbcType=BIT},
bid_time = #{bidTime,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
is_setted = #{isSetted
,jdbcType=INTEGER},
`state` = #{state
,jdbcType=INTEGER},
original_source_url = #{originalSourceUrl,jdbcType=VARCHAR},
`source` = #{source,jdbcType=INTEGER},
kind = #{kind,jdbcType=INTEGER},
...
...
@@ -628,7 +628,7 @@
is_deleted = #{isDeleted,jdbcType=BIT},
bid_time = #{bidTime,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
is_setted = #{isSetted
,jdbcType=INTEGER},
`state` = #{state
,jdbcType=INTEGER},
original_source_url = #{originalSourceUrl,jdbcType=VARCHAR},
`source` = #{source,jdbcType=INTEGER},
kind = #{kind,jdbcType=INTEGER}
...
...
@@ -688,7 +688,7 @@
</when>
<otherwise>
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,
is_setted
, original_source_url,
source_type, update_time, is_deleted, bid_time, remark,
`state`
, original_source_url,
`source`, kind, extra, images, videos, detail, original_extra
</otherwise>
</choose>
...
...
@@ -702,6 +702,7 @@
limit 1
</select>
<select
id=
"selectNameByExample"
parameterType=
"com.wwdz.ch.db.domain.ItemExample"
resultMap=
"StringResultMap"
>
select
distinct
...
...
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