Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
1cb9d20e
Commit
1cb9d20e
authored
Sep 06, 2018
by
Menethil
Browse files
Merge remote-tracking branch 'origin/master'
parents
c4f48302
96208795
Changes
45
Hide whitespace changes
Inline
Side-by-side
litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallBrandService.java
View file @
1cb9d20e
...
@@ -76,8 +76,8 @@ public class LitemallBrandService {
...
@@ -76,8 +76,8 @@ public class LitemallBrandService {
return
(
int
)
brandMapper
.
countByExample
(
example
);
return
(
int
)
brandMapper
.
countByExample
(
example
);
}
}
public
void
updateById
(
LitemallBrand
brand
)
{
public
int
updateById
(
LitemallBrand
brand
)
{
brandMapper
.
updateByPrimaryKeySelective
(
brand
);
return
brandMapper
.
update
WithVersion
ByPrimaryKeySelective
(
brand
.
getVersion
(),
brand
);
}
}
public
void
deleteById
(
Integer
id
)
{
public
void
deleteById
(
Integer
id
)
{
...
...
litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallCartService.java
View file @
1cb9d20e
...
@@ -25,8 +25,8 @@ public class LitemallCartService {
...
@@ -25,8 +25,8 @@ public class LitemallCartService {
cartMapper
.
insertSelective
(
cart
);
cartMapper
.
insertSelective
(
cart
);
}
}
public
void
update
(
LitemallCart
cart
)
{
public
int
update
(
LitemallCart
cart
)
{
cartMapper
.
updateByPrimaryKey
(
cart
);
return
cartMapper
.
update
WithVersion
ByPrimaryKey
Selective
(
cart
.
getVersion
(),
cart
);
}
}
public
List
<
LitemallCart
>
queryByUid
(
int
userId
)
{
public
List
<
LitemallCart
>
queryByUid
(
int
userId
)
{
...
@@ -42,12 +42,6 @@ public class LitemallCartService {
...
@@ -42,12 +42,6 @@ public class LitemallCartService {
return
cartMapper
.
selectByExample
(
example
);
return
cartMapper
.
selectByExample
(
example
);
}
}
public
List
<
LitemallCart
>
queryByUidAndSid
(
int
userId
,
String
sessionId
)
{
LitemallCartExample
example
=
new
LitemallCartExample
();
example
.
or
().
andUserIdEqualTo
(
userId
).
andDeletedEqualTo
(
false
);
return
cartMapper
.
selectByExample
(
example
);
}
public
int
delete
(
List
<
Integer
>
productIdList
,
int
userId
)
{
public
int
delete
(
List
<
Integer
>
productIdList
,
int
userId
)
{
LitemallCartExample
example
=
new
LitemallCartExample
();
LitemallCartExample
example
=
new
LitemallCartExample
();
example
.
or
().
andUserIdEqualTo
(
userId
).
andProductIdIn
(
productIdList
);
example
.
or
().
andUserIdEqualTo
(
userId
).
andProductIdIn
(
productIdList
);
...
...
litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallCategoryService.java
View file @
1cb9d20e
...
@@ -86,8 +86,8 @@ public class LitemallCategoryService {
...
@@ -86,8 +86,8 @@ public class LitemallCategoryService {
return
(
int
)
categoryMapper
.
countByExample
(
example
);
return
(
int
)
categoryMapper
.
countByExample
(
example
);
}
}
public
void
updateById
(
LitemallCategory
category
)
{
public
int
updateById
(
LitemallCategory
category
)
{
categoryMapper
.
updateByPrimaryKeySelective
(
category
);
return
categoryMapper
.
update
WithVersion
ByPrimaryKeySelective
(
category
.
getVersion
(),
category
);
}
}
public
void
deleteById
(
Integer
id
)
{
public
void
deleteById
(
Integer
id
)
{
...
...
litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallCollectService.java
View file @
1cb9d20e
...
@@ -83,12 +83,4 @@ public class LitemallCollectService {
...
@@ -83,12 +83,4 @@ public class LitemallCollectService {
return
(
int
)
collectMapper
.
countByExample
(
example
);
return
(
int
)
collectMapper
.
countByExample
(
example
);
}
}
public
void
updateById
(
LitemallCollect
collect
)
{
collectMapper
.
updateByPrimaryKeySelective
(
collect
);
}
public
LitemallCollect
findById
(
Integer
id
)
{
return
collectMapper
.
selectByPrimaryKey
(
id
);
}
}
}
litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallCommentService.java
View file @
1cb9d20e
...
@@ -40,7 +40,7 @@ public class LitemallCommentService {
...
@@ -40,7 +40,7 @@ public class LitemallCommentService {
example
.
or
().
andValueIdEqualTo
(
valueId
).
andTypeEqualTo
(
type
).
andHasPictureEqualTo
(
true
).
andDeletedEqualTo
(
false
);
example
.
or
().
andValueIdEqualTo
(
valueId
).
andTypeEqualTo
(
type
).
andHasPictureEqualTo
(
true
).
andDeletedEqualTo
(
false
);
}
}
else
{
else
{
Assert
.
state
(
false
,
"showType不支持"
);
throw
new
RuntimeException
(
"showType不支持"
);
}
}
PageHelper
.
startPage
(
offset
,
limit
);
PageHelper
.
startPage
(
offset
,
limit
);
return
commentMapper
.
selectByExample
(
example
);
return
commentMapper
.
selectByExample
(
example
);
...
@@ -55,21 +55,15 @@ public class LitemallCommentService {
...
@@ -55,21 +55,15 @@ public class LitemallCommentService {
example
.
or
().
andValueIdEqualTo
(
valueId
).
andTypeEqualTo
(
type
).
andHasPictureEqualTo
(
true
).
andDeletedEqualTo
(
false
);
example
.
or
().
andValueIdEqualTo
(
valueId
).
andTypeEqualTo
(
type
).
andHasPictureEqualTo
(
true
).
andDeletedEqualTo
(
false
);
}
}
else
{
else
{
Assert
.
state
(
false
,
"
"
);
throw
new
RuntimeException
(
"showType不支持
"
);
}
}
return
(
int
)
commentMapper
.
countByExample
(
example
);
return
(
int
)
commentMapper
.
countByExample
(
example
);
}
}
public
I
nt
eger
save
(
LitemallComment
comment
)
{
public
i
nt
save
(
LitemallComment
comment
)
{
return
commentMapper
.
insertSelective
(
comment
);
return
commentMapper
.
insertSelective
(
comment
);
}
}
public
void
update
(
LitemallComment
comment
)
{
commentMapper
.
updateByPrimaryKeySelective
(
comment
);
}
public
List
<
LitemallComment
>
querySelective
(
String
userId
,
String
valueId
,
Integer
page
,
Integer
size
,
String
sort
,
String
order
)
{
public
List
<
LitemallComment
>
querySelective
(
String
userId
,
String
valueId
,
Integer
page
,
Integer
size
,
String
sort
,
String
order
)
{
LitemallCommentExample
example
=
new
LitemallCommentExample
();
LitemallCommentExample
example
=
new
LitemallCommentExample
();
example
.
setOrderByClause
(
LitemallComment
.
Column
.
addTime
.
desc
());
example
.
setOrderByClause
(
LitemallComment
.
Column
.
addTime
.
desc
());
...
@@ -106,19 +100,8 @@ public class LitemallCommentService {
...
@@ -106,19 +100,8 @@ public class LitemallCommentService {
return
(
int
)
commentMapper
.
countByExample
(
example
);
return
(
int
)
commentMapper
.
countByExample
(
example
);
}
}
public
void
updateById
(
LitemallComment
comment
)
{
commentMapper
.
updateByPrimaryKeySelective
(
comment
);
}
public
void
deleteById
(
Integer
id
)
{
public
void
deleteById
(
Integer
id
)
{
commentMapper
.
logicalDeleteByPrimaryKey
(
id
);
commentMapper
.
logicalDeleteByPrimaryKey
(
id
);
}
}
public
void
add
(
LitemallComment
comment
)
{
commentMapper
.
insertSelective
(
comment
);
}
public
LitemallComment
findById
(
Integer
id
)
{
return
commentMapper
.
selectByPrimaryKey
(
id
);
}
}
}
litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallFeedbackService.java
View file @
1cb9d20e
...
@@ -19,7 +19,6 @@ public class LitemallFeedbackService {
...
@@ -19,7 +19,6 @@ public class LitemallFeedbackService {
@Autowired
@Autowired
private
LitemallFeedbackMapper
feedbackMapper
;
private
LitemallFeedbackMapper
feedbackMapper
;
//提交
public
Integer
add
(
LitemallFeedback
feedback
)
{
public
Integer
add
(
LitemallFeedback
feedback
)
{
return
feedbackMapper
.
insertSelective
(
feedback
);
return
feedbackMapper
.
insertSelective
(
feedback
);
}
}
...
@@ -57,16 +56,4 @@ public class LitemallFeedbackService {
...
@@ -57,16 +56,4 @@ public class LitemallFeedbackService {
criteria
.
andDeletedEqualTo
(
false
);
criteria
.
andDeletedEqualTo
(
false
);
return
(
int
)
feedbackMapper
.
countByExample
(
example
);
return
(
int
)
feedbackMapper
.
countByExample
(
example
);
}
}
public
LitemallFeedback
findById
(
Integer
id
)
{
return
feedbackMapper
.
selectByPrimaryKey
(
id
);
}
public
void
updateById
(
LitemallFeedback
feedback
)
{
feedbackMapper
.
updateByPrimaryKeySelective
(
feedback
);
}
public
void
delete
(
Integer
id
)
{
feedbackMapper
.
logicalDeleteByPrimaryKey
(
id
);
}
}
}
litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallFootprintService.java
View file @
1cb9d20e
...
@@ -75,9 +75,4 @@ public class LitemallFootprintService {
...
@@ -75,9 +75,4 @@ public class LitemallFootprintService {
return
(
int
)
footprintMapper
.
countByExample
(
example
);
return
(
int
)
footprintMapper
.
countByExample
(
example
);
}
}
public
void
updateById
(
LitemallFootprint
collect
)
{
footprintMapper
.
updateByPrimaryKeySelective
(
collect
);
}
}
}
litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallGoodsAttributeService.java
View file @
1cb9d20e
...
@@ -20,14 +20,6 @@ public class LitemallGoodsAttributeService {
...
@@ -20,14 +20,6 @@ public class LitemallGoodsAttributeService {
return
goodsAttributeMapper
.
selectByExample
(
example
);
return
goodsAttributeMapper
.
selectByExample
(
example
);
}
}
public
void
updateById
(
LitemallGoodsAttribute
goodsAttribute
)
{
goodsAttributeMapper
.
updateByPrimaryKeySelective
(
goodsAttribute
);
}
public
void
deleteById
(
Integer
id
)
{
goodsAttributeMapper
.
logicalDeleteByPrimaryKey
(
id
);
}
public
void
add
(
LitemallGoodsAttribute
goodsAttribute
)
{
public
void
add
(
LitemallGoodsAttribute
goodsAttribute
)
{
goodsAttributeMapper
.
insertSelective
(
goodsAttribute
);
goodsAttributeMapper
.
insertSelective
(
goodsAttribute
);
}
}
...
...
litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallGoodsService.java
View file @
1cb9d20e
...
@@ -222,8 +222,8 @@ public class LitemallGoodsService {
...
@@ -222,8 +222,8 @@ public class LitemallGoodsService {
return
(
int
)
goodsMapper
.
countByExample
(
example
);
return
(
int
)
goodsMapper
.
countByExample
(
example
);
}
}
public
void
updateById
(
LitemallGoods
goods
)
{
public
int
updateById
(
LitemallGoods
goods
)
{
goodsMapper
.
updateByPrimaryKeySelective
(
goods
);
return
goodsMapper
.
update
WithVersion
ByPrimaryKeySelective
(
goods
.
getVersion
(),
goods
);
}
}
public
void
deleteById
(
Integer
id
)
{
public
void
deleteById
(
Integer
id
)
{
...
...
litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallGoodsSpecificationService.java
View file @
1cb9d20e
...
@@ -27,14 +27,6 @@ public class LitemallGoodsSpecificationService {
...
@@ -27,14 +27,6 @@ public class LitemallGoodsSpecificationService {
return
goodsSpecificationMapper
.
selectByPrimaryKey
(
id
);
return
goodsSpecificationMapper
.
selectByPrimaryKey
(
id
);
}
}
public
void
updateById
(
LitemallGoodsSpecification
goodsSpecification
)
{
goodsSpecificationMapper
.
updateByPrimaryKeySelective
(
goodsSpecification
);
}
public
void
deleteById
(
Integer
id
)
{
goodsSpecificationMapper
.
logicalDeleteByPrimaryKey
(
id
);
}
public
void
deleteByGid
(
Integer
gid
)
{
public
void
deleteByGid
(
Integer
gid
)
{
LitemallGoodsSpecificationExample
example
=
new
LitemallGoodsSpecificationExample
();
LitemallGoodsSpecificationExample
example
=
new
LitemallGoodsSpecificationExample
();
example
.
or
().
andGoodsIdEqualTo
(
gid
);
example
.
or
().
andGoodsIdEqualTo
(
gid
);
...
...
litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallGrouponRulesService.java
View file @
1cb9d20e
...
@@ -109,7 +109,7 @@ public class LitemallGrouponRulesService {
...
@@ -109,7 +109,7 @@ public class LitemallGrouponRulesService {
mapper
.
logicalDeleteByPrimaryKey
(
id
);
mapper
.
logicalDeleteByPrimaryKey
(
id
);
}
}
public
void
update
(
LitemallGrouponRules
grouponRules
)
{
public
int
update
(
LitemallGrouponRules
grouponRules
)
{
mapper
.
updateByPrimaryKeySelective
(
grouponRules
);
return
mapper
.
update
WithVersion
ByPrimaryKeySelective
(
grouponRules
.
getVersion
(),
grouponRules
);
}
}
}
}
litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallGrouponService.java
View file @
1cb9d20e
...
@@ -90,8 +90,8 @@ public class LitemallGrouponService {
...
@@ -90,8 +90,8 @@ public class LitemallGrouponService {
return
(
int
)
mapper
.
countByExample
(
example
);
return
(
int
)
mapper
.
countByExample
(
example
);
}
}
public
void
update
(
LitemallGroupon
groupon
)
{
public
int
update
(
LitemallGroupon
groupon
)
{
mapper
.
updateByPrimaryKey
(
groupon
);
return
mapper
.
update
WithVersion
ByPrimaryKey
Selective
(
groupon
.
getVersion
(),
groupon
);
}
}
/**
/**
...
...
litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallIssueService.java
View file @
1cb9d20e
...
@@ -58,8 +58,8 @@ public class LitemallIssueService {
...
@@ -58,8 +58,8 @@ public class LitemallIssueService {
return
(
int
)
issueMapper
.
countByExample
(
example
);
return
(
int
)
issueMapper
.
countByExample
(
example
);
}
}
public
void
updateById
(
LitemallIssue
issue
)
{
public
int
updateById
(
LitemallIssue
issue
)
{
issueMapper
.
updateByPrimaryKeySelective
(
issue
);
return
issueMapper
.
update
WithVersion
ByPrimaryKeySelective
(
issue
.
getVersion
(),
issue
);
}
}
public
LitemallIssue
findById
(
Integer
id
)
{
public
LitemallIssue
findById
(
Integer
id
)
{
...
...
litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallKeywordService.java
View file @
1cb9d20e
...
@@ -15,12 +15,6 @@ public class LitemallKeywordService {
...
@@ -15,12 +15,6 @@ public class LitemallKeywordService {
@Resource
@Resource
private
LitemallKeywordMapper
keywordsMapper
;
private
LitemallKeywordMapper
keywordsMapper
;
public
List
<
LitemallKeyword
>
queryDefaults
()
{
LitemallKeywordExample
example
=
new
LitemallKeywordExample
();
example
.
or
().
andIsDefaultEqualTo
(
true
).
andDeletedEqualTo
(
false
);
return
keywordsMapper
.
selectByExample
(
example
);
}
public
LitemallKeyword
queryDefault
()
{
public
LitemallKeyword
queryDefault
()
{
LitemallKeywordExample
example
=
new
LitemallKeywordExample
();
LitemallKeywordExample
example
=
new
LitemallKeywordExample
();
example
.
or
().
andIsDefaultEqualTo
(
true
).
andDeletedEqualTo
(
false
);
example
.
or
().
andIsDefaultEqualTo
(
true
).
andDeletedEqualTo
(
false
);
...
@@ -85,8 +79,8 @@ public class LitemallKeywordService {
...
@@ -85,8 +79,8 @@ public class LitemallKeywordService {
return
keywordsMapper
.
selectByPrimaryKey
(
id
);
return
keywordsMapper
.
selectByPrimaryKey
(
id
);
}
}
public
void
updateById
(
LitemallKeyword
keywords
)
{
public
int
updateById
(
LitemallKeyword
keywords
)
{
keywordsMapper
.
updateByPrimaryKeySelective
(
keywords
);
return
keywordsMapper
.
update
WithVersion
ByPrimaryKeySelective
(
keywords
.
getVersion
(),
keywords
);
}
}
public
void
deleteById
(
Integer
id
)
{
public
void
deleteById
(
Integer
id
)
{
...
...
litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallProductService.java
View file @
1cb9d20e
...
@@ -24,8 +24,8 @@ public class LitemallProductService {
...
@@ -24,8 +24,8 @@ public class LitemallProductService {
return
productMapper
.
selectByPrimaryKey
(
id
);
return
productMapper
.
selectByPrimaryKey
(
id
);
}
}
public
void
updateById
(
LitemallProduct
product
)
{
public
int
updateById
(
LitemallProduct
product
)
{
productMapper
.
updateByPrimaryKeySelective
(
product
);
return
productMapper
.
update
WithVersion
ByPrimaryKeySelective
(
product
.
getVersion
(),
product
);
}
}
public
void
deleteById
(
Integer
id
)
{
public
void
deleteById
(
Integer
id
)
{
...
...
litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallSearchHistoryService.java
View file @
1cb9d20e
...
@@ -32,19 +32,6 @@ public class LitemallSearchHistoryService {
...
@@ -32,19 +32,6 @@ public class LitemallSearchHistoryService {
searchHistoryMapper
.
logicalDeleteByExample
(
example
);
searchHistoryMapper
.
logicalDeleteByExample
(
example
);
}
}
public
void
deleteById
(
Integer
id
)
{
LitemallSearchHistory
searchHistory
=
searchHistoryMapper
.
selectByPrimaryKey
(
id
);
if
(
searchHistory
==
null
){
return
;
}
searchHistory
.
setDeleted
(
true
);
searchHistoryMapper
.
logicalDeleteByPrimaryKey
(
id
);
}
public
void
add
(
LitemallSearchHistory
searchHistory
)
{
searchHistoryMapper
.
insertSelective
(
searchHistory
);
}
public
List
<
LitemallSearchHistory
>
querySelective
(
String
userId
,
String
keyword
,
Integer
page
,
Integer
size
,
String
sort
,
String
order
)
{
public
List
<
LitemallSearchHistory
>
querySelective
(
String
userId
,
String
keyword
,
Integer
page
,
Integer
size
,
String
sort
,
String
order
)
{
LitemallSearchHistoryExample
example
=
new
LitemallSearchHistoryExample
();
LitemallSearchHistoryExample
example
=
new
LitemallSearchHistoryExample
();
LitemallSearchHistoryExample
.
Criteria
criteria
=
example
.
createCriteria
();
LitemallSearchHistoryExample
.
Criteria
criteria
=
example
.
createCriteria
();
...
@@ -79,12 +66,4 @@ public class LitemallSearchHistoryService {
...
@@ -79,12 +66,4 @@ public class LitemallSearchHistoryService {
return
(
int
)
searchHistoryMapper
.
countByExample
(
example
);
return
(
int
)
searchHistoryMapper
.
countByExample
(
example
);
}
}
public
void
updateById
(
LitemallSearchHistory
collect
)
{
searchHistoryMapper
.
updateByPrimaryKeySelective
(
collect
);
}
public
LitemallSearchHistory
findById
(
Integer
id
)
{
return
searchHistoryMapper
.
selectByPrimaryKey
(
id
);
}
}
}
litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallStorageService.java
View file @
1cb9d20e
...
@@ -25,23 +25,16 @@ public class LitemallStorageService {
...
@@ -25,23 +25,16 @@ public class LitemallStorageService {
storageMapper
.
insertSelective
(
storageInfo
);
storageMapper
.
insertSelective
(
storageInfo
);
}
}
public
LitemallStorage
findByName
(
String
filename
)
{
LitemallStorageExample
example
=
new
LitemallStorageExample
();
example
.
or
().
andNameEqualTo
(
filename
).
andDeletedEqualTo
(
false
);
return
storageMapper
.
selectOneByExample
(
example
);
}
public
LitemallStorage
findByKey
(
String
key
)
{
public
LitemallStorage
findByKey
(
String
key
)
{
LitemallStorageExample
example
=
new
LitemallStorageExample
();
LitemallStorageExample
example
=
new
LitemallStorageExample
();
example
.
or
().
andKeyEqualTo
(
key
).
andDeletedEqualTo
(
false
);
example
.
or
().
andKeyEqualTo
(
key
).
andDeletedEqualTo
(
false
);
return
storageMapper
.
selectOneByExample
(
example
);
return
storageMapper
.
selectOneByExample
(
example
);
}
}
public
void
update
(
LitemallStorage
storageInfo
)
{
public
int
update
(
LitemallStorage
storageInfo
)
{
storageMapper
.
updateByPrimaryKeySelective
(
storageInfo
);
return
storageMapper
.
update
WithVersion
ByPrimaryKeySelective
(
storageInfo
.
getVersion
(),
storageInfo
);
}
}
public
LitemallStorage
findById
(
Integer
id
)
{
public
LitemallStorage
findById
(
Integer
id
)
{
return
storageMapper
.
selectByPrimaryKey
(
id
);
return
storageMapper
.
selectByPrimaryKey
(
id
);
}
}
...
...
litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallSystemConfigService.java
View file @
1cb9d20e
...
@@ -13,23 +13,9 @@ public class LitemallSystemConfigService {
...
@@ -13,23 +13,9 @@ public class LitemallSystemConfigService {
@Resource
@Resource
private
LitemallSystemMapper
systemMapper
;
private
LitemallSystemMapper
systemMapper
;
public
void
add
(
LitemallSystem
litemallSystem
)
{
systemMapper
.
insert
(
litemallSystem
);
}
public
List
<
LitemallSystem
>
queryAll
()
{
public
List
<
LitemallSystem
>
queryAll
()
{
LitemallSystemExample
example
=
new
LitemallSystemExample
();
LitemallSystemExample
example
=
new
LitemallSystemExample
();
example
.
or
();
example
.
or
();
return
systemMapper
.
selectByExample
(
example
);
return
systemMapper
.
selectByExample
(
example
);
}
}
public
LitemallSystem
queryByKeyName
(
String
keyName
,
String
groupName
)
{
LitemallSystemExample
example
=
new
LitemallSystemExample
();
example
.
or
().
andKeyNameEqualTo
(
keyName
);
return
systemMapper
.
selectOneByExample
(
example
);
}
public
void
deleteById
(
Integer
id
)
{
systemMapper
.
deleteByPrimaryKey
(
id
);
}
}
}
litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallTopicService.java
View file @
1cb9d20e
...
@@ -91,10 +91,10 @@ public class LitemallTopicService {
...
@@ -91,10 +91,10 @@ public class LitemallTopicService {
return
(
int
)
topicMapper
.
countByExample
(
example
);
return
(
int
)
topicMapper
.
countByExample
(
example
);
}
}
public
void
updateById
(
LitemallTopic
topic
)
{
public
int
updateById
(
LitemallTopic
topic
)
{
LitemallTopicExample
example
=
new
LitemallTopicExample
();
LitemallTopicExample
example
=
new
LitemallTopicExample
();
example
.
or
().
andIdEqualTo
(
topic
.
getId
());
example
.
or
().
andIdEqualTo
(
topic
.
getId
());
topicMapper
.
updateByExampleWithBLOBs
(
topic
,
example
);
return
topicMapper
.
update
WithVersion
ByExampleWithBLOBs
(
topic
.
getVersion
(),
topic
,
example
);
}
}
public
void
deleteById
(
Integer
id
)
{
public
void
deleteById
(
Integer
id
)
{
...
...
litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallUserFormIdService.java
View file @
1cb9d20e
...
@@ -35,7 +35,7 @@ public class LitemallUserFormIdService {
...
@@ -35,7 +35,7 @@ public class LitemallUserFormIdService {
//更新或者删除缓存
//更新或者删除缓存
if
(
userFormid
.
getIsprepay
()
&&
userFormid
.
getUseamount
()
>
1
)
{
if
(
userFormid
.
getIsprepay
()
&&
userFormid
.
getUseamount
()
>
1
)
{
userFormid
.
setUseamount
(
userFormid
.
getUseamount
()
-
1
);
userFormid
.
setUseamount
(
userFormid
.
getUseamount
()
-
1
);
formidMapper
.
updateByPrimaryKey
(
userFormid
);
formidMapper
.
update
WithVersion
ByPrimaryKey
(
userFormid
.
getVersion
(),
userFormid
);
}
else
{
}
else
{
formidMapper
.
deleteByPrimaryKey
(
userFormid
.
getId
());
formidMapper
.
deleteByPrimaryKey
(
userFormid
.
getId
());
}
}
...
...
Prev
1
2
3
Next
Write
Preview
Supports
Markdown
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