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
43f35cbd
Commit
43f35cbd
authored
Jul 19, 2023
by
muhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 收藏册文件名
parent
289005df
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
23 deletions
+23
-23
ch-dao/src/main/java/com/wwdz/ch/db/manager/FavoritesCoinsRelationManager.java
...com/wwdz/ch/db/manager/FavoritesCoinsRelationManager.java
+1
-1
ch-dao/src/main/java/com/wwdz/ch/db/manager/FavoritesManager.java
...rc/main/java/com/wwdz/ch/db/manager/FavoritesManager.java
+1
-1
ch-dao/src/main/java/com/wwdz/ch/db/manager/impl/FavoritesCoinsRelationManagerImpl.java
...ch/db/manager/impl/FavoritesCoinsRelationManagerImpl.java
+2
-2
ch-dao/src/main/java/com/wwdz/ch/db/manager/impl/FavoritesManagerImpl.java
...ava/com/wwdz/ch/db/manager/impl/FavoritesManagerImpl.java
+2
-2
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/impl/FavoritesServiceImpl.java
...ava/com/wwdz/ch/wx/service/impl/FavoritesServiceImpl.java
+17
-17
No files found.
ch-dao/src/main/java/com/wwdz/ch/db/manager/FavoritesCoinsRelation
Dao
.java
→
ch-dao/src/main/java/com/wwdz/ch/db/manager/FavoritesCoinsRelation
Manager
.java
View file @
43f35cbd
...
@@ -5,7 +5,7 @@ import com.wwdz.ch.db.domain.FavoritesCoinsRelation;
...
@@ -5,7 +5,7 @@ import com.wwdz.ch.db.domain.FavoritesCoinsRelation;
import
java.util.List
;
import
java.util.List
;
public
interface
FavoritesCoinsRelation
Dao
{
public
interface
FavoritesCoinsRelation
Manager
{
int
add
(
FavoritesCoinsRelation
record
);
int
add
(
FavoritesCoinsRelation
record
);
int
batchAdd
(
List
<
FavoritesCoinsRelation
>
list
);
int
batchAdd
(
List
<
FavoritesCoinsRelation
>
list
);
int
deleteByFavoritesId
(
Long
favoritesId
,
List
<
Long
>
favoritesIds
);
int
deleteByFavoritesId
(
Long
favoritesId
,
List
<
Long
>
favoritesIds
);
...
...
ch-dao/src/main/java/com/wwdz/ch/db/manager/Favorites
Dao
.java
→
ch-dao/src/main/java/com/wwdz/ch/db/manager/Favorites
Manager
.java
View file @
43f35cbd
...
@@ -5,7 +5,7 @@ import com.wwdz.ch.db.domain.Favorites;
...
@@ -5,7 +5,7 @@ import com.wwdz.ch.db.domain.Favorites;
import
java.util.List
;
import
java.util.List
;
public
interface
Favorites
Dao
{
public
interface
Favorites
Manager
{
int
add
(
Favorites
record
);
int
add
(
Favorites
record
);
int
delete
(
Long
id
);
int
delete
(
Long
id
);
int
update
(
Favorites
record
);
int
update
(
Favorites
record
);
...
...
ch-dao/src/main/java/com/wwdz/ch/db/manager/impl/FavoritesCoinsRelation
Dao
Impl.java
→
ch-dao/src/main/java/com/wwdz/ch/db/manager/impl/FavoritesCoinsRelation
Manager
Impl.java
View file @
43f35cbd
...
@@ -5,7 +5,7 @@ import com.github.pagehelper.PageInfo;
...
@@ -5,7 +5,7 @@ import com.github.pagehelper.PageInfo;
import
com.wwdz.ch.db.dao.FavoritesCoinsRelationMapper
;
import
com.wwdz.ch.db.dao.FavoritesCoinsRelationMapper
;
import
com.wwdz.ch.db.domain.FavoritesCoinsRelation
;
import
com.wwdz.ch.db.domain.FavoritesCoinsRelation
;
import
com.wwdz.ch.db.domain.FavoritesCoinsRelationExample
;
import
com.wwdz.ch.db.domain.FavoritesCoinsRelationExample
;
import
com.wwdz.ch.db.manager.FavoritesCoinsRelation
Dao
;
import
com.wwdz.ch.db.manager.FavoritesCoinsRelation
Manager
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
...
@@ -13,7 +13,7 @@ import org.springframework.util.CollectionUtils;
...
@@ -13,7 +13,7 @@ import org.springframework.util.CollectionUtils;
import
java.util.List
;
import
java.util.List
;
@Repository
@Repository
public
class
FavoritesCoinsRelation
DaoImpl
implements
FavoritesCoinsRelationDao
{
public
class
FavoritesCoinsRelation
ManagerImpl
implements
FavoritesCoinsRelationManager
{
@Autowired
@Autowired
private
FavoritesCoinsRelationMapper
favoritesCoinsRelationMapper
;
private
FavoritesCoinsRelationMapper
favoritesCoinsRelationMapper
;
...
...
ch-dao/src/main/java/com/wwdz/ch/db/manager/impl/Favorites
Dao
Impl.java
→
ch-dao/src/main/java/com/wwdz/ch/db/manager/impl/Favorites
Manager
Impl.java
View file @
43f35cbd
...
@@ -5,7 +5,7 @@ import com.github.pagehelper.PageInfo;
...
@@ -5,7 +5,7 @@ import com.github.pagehelper.PageInfo;
import
com.wwdz.ch.db.dao.FavoritesMapper
;
import
com.wwdz.ch.db.dao.FavoritesMapper
;
import
com.wwdz.ch.db.domain.Favorites
;
import
com.wwdz.ch.db.domain.Favorites
;
import
com.wwdz.ch.db.domain.FavoritesExample
;
import
com.wwdz.ch.db.domain.FavoritesExample
;
import
com.wwdz.ch.db.manager.Favorites
Dao
;
import
com.wwdz.ch.db.manager.Favorites
Manager
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
...
@@ -15,7 +15,7 @@ import java.util.List;
...
@@ -15,7 +15,7 @@ import java.util.List;
import
java.util.Objects
;
import
java.util.Objects
;
@Repository
@Repository
public
class
Favorites
DaoImpl
implements
FavoritesDao
{
public
class
Favorites
ManagerImpl
implements
FavoritesManager
{
@Autowired
@Autowired
private
FavoritesMapper
favoritesMapper
;
private
FavoritesMapper
favoritesMapper
;
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/impl/FavoritesServiceImpl.java
View file @
43f35cbd
...
@@ -3,8 +3,8 @@ package com.wwdz.ch.wx.service.impl;
...
@@ -3,8 +3,8 @@ package com.wwdz.ch.wx.service.impl;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.db.domain.Favorites
;
import
com.wwdz.ch.db.domain.Favorites
;
import
com.wwdz.ch.db.domain.FavoritesCoinsRelation
;
import
com.wwdz.ch.db.domain.FavoritesCoinsRelation
;
import
com.wwdz.ch.db.manager.FavoritesCoinsRelation
Dao
;
import
com.wwdz.ch.db.manager.FavoritesCoinsRelation
Manager
;
import
com.wwdz.ch.db.manager.Favorites
Dao
;
import
com.wwdz.ch.db.manager.Favorites
Manager
;
import
com.wwdz.ch.wx.entity.request.FavoritesRequestDto
;
import
com.wwdz.ch.wx.entity.request.FavoritesRequestDto
;
import
com.wwdz.ch.wx.service.FavoritesService
;
import
com.wwdz.ch.wx.service.FavoritesService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
...
@@ -24,14 +24,14 @@ public class FavoritesServiceImpl implements FavoritesService {
...
@@ -24,14 +24,14 @@ public class FavoritesServiceImpl implements FavoritesService {
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
FavoritesServiceImpl
.
class
);
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
FavoritesServiceImpl
.
class
);
@Autowired
@Autowired
private
Favorites
Dao
favoritesDao
;
private
Favorites
Manager
favoritesManager
;
@Autowired
@Autowired
private
FavoritesCoinsRelation
Dao
favoritesCoinsRelationDao
;
private
FavoritesCoinsRelation
Manager
favoritesCoinsRelationManager
;
@Override
@Override
public
Result
page
(
FavoritesRequestDto
dto
)
{
public
Result
page
(
FavoritesRequestDto
dto
)
{
try
{
try
{
return
Result
.
success
(
favorites
Dao
.
pageByUid
(
dto
.
getUid
(),
dto
.
getPage
(),
dto
.
getSize
()));
return
Result
.
success
(
favorites
Manager
.
pageByUid
(
dto
.
getUid
(),
dto
.
getPage
(),
dto
.
getSize
()));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"查询收藏册列表失败,原因:"
+
e
.
getMessage
(),
e
);
logger
.
error
(
"查询收藏册列表失败,原因:"
+
e
.
getMessage
(),
e
);
return
Result
.
failed
(-
1
,
"查询收藏册列表失败"
);
return
Result
.
failed
(-
1
,
"查询收藏册列表失败"
);
...
@@ -43,7 +43,7 @@ public class FavoritesServiceImpl implements FavoritesService {
...
@@ -43,7 +43,7 @@ public class FavoritesServiceImpl implements FavoritesService {
public
Result
add
(
FavoritesRequestDto
dto
)
{
public
Result
add
(
FavoritesRequestDto
dto
)
{
try
{
try
{
// 判断收藏册标题是否已存在
// 判断收藏册标题是否已存在
if
(
favorites
Dao
.
isExisted
(
null
,
dto
.
getUid
(),
dto
.
getTitle
()))
{
if
(
favorites
Manager
.
isExisted
(
null
,
dto
.
getUid
(),
dto
.
getTitle
()))
{
return
Result
.
failed
(-
1
,
"收藏册的标题不能重复"
);
return
Result
.
failed
(-
1
,
"收藏册的标题不能重复"
);
}
}
...
@@ -56,7 +56,7 @@ public class FavoritesServiceImpl implements FavoritesService {
...
@@ -56,7 +56,7 @@ public class FavoritesServiceImpl implements FavoritesService {
favorites
.
setAddTime
(
date
);
favorites
.
setAddTime
(
date
);
favorites
.
setUpdateTime
(
date
);
favorites
.
setUpdateTime
(
date
);
favorites
.
setDeleted
(
false
);
favorites
.
setDeleted
(
false
);
favorites
Dao
.
add
(
favorites
);
favorites
Manager
.
add
(
favorites
);
return
Result
.
success
();
return
Result
.
success
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"新增收藏册失败,原因:"
+
e
.
getMessage
(),
e
);
logger
.
error
(
"新增收藏册失败,原因:"
+
e
.
getMessage
(),
e
);
...
@@ -69,12 +69,12 @@ public class FavoritesServiceImpl implements FavoritesService {
...
@@ -69,12 +69,12 @@ public class FavoritesServiceImpl implements FavoritesService {
@Override
@Override
public
Result
update
(
FavoritesRequestDto
dto
)
{
public
Result
update
(
FavoritesRequestDto
dto
)
{
try
{
try
{
Favorites
favorites
=
favorites
Dao
.
info
(
dto
.
getId
());
Favorites
favorites
=
favorites
Manager
.
info
(
dto
.
getId
());
if
(
Objects
.
isNull
(
favorites
))
{
if
(
Objects
.
isNull
(
favorites
))
{
return
Result
.
failed
(
"数据异常,记录不存在"
);
return
Result
.
failed
(
"数据异常,记录不存在"
);
}
}
// 判断收藏册标题是否已存在
// 判断收藏册标题是否已存在
if
(
favorites
Dao
.
isExisted
(
dto
.
getId
(),
dto
.
getUid
(),
dto
.
getTitle
()))
{
if
(
favorites
Manager
.
isExisted
(
dto
.
getId
(),
dto
.
getUid
(),
dto
.
getTitle
()))
{
return
Result
.
failed
(
"收藏册的标题不能重复"
);
return
Result
.
failed
(
"收藏册的标题不能重复"
);
}
}
...
@@ -82,7 +82,7 @@ public class FavoritesServiceImpl implements FavoritesService {
...
@@ -82,7 +82,7 @@ public class FavoritesServiceImpl implements FavoritesService {
favorites
.
setDescription
(
dto
.
getDescription
());
favorites
.
setDescription
(
dto
.
getDescription
());
favorites
.
setImages
(
dto
.
getImages
());
favorites
.
setImages
(
dto
.
getImages
());
favorites
.
setUpdateTime
(
new
Date
());
favorites
.
setUpdateTime
(
new
Date
());
favorites
Dao
.
update
(
favorites
);
favorites
Manager
.
update
(
favorites
);
return
Result
.
success
();
return
Result
.
success
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"新增收藏册失败,原因:"
+
e
.
getMessage
(),
e
);
logger
.
error
(
"新增收藏册失败,原因:"
+
e
.
getMessage
(),
e
);
...
@@ -94,7 +94,7 @@ public class FavoritesServiceImpl implements FavoritesService {
...
@@ -94,7 +94,7 @@ public class FavoritesServiceImpl implements FavoritesService {
@Override
@Override
public
Result
info
(
FavoritesRequestDto
dto
)
{
public
Result
info
(
FavoritesRequestDto
dto
)
{
try
{
try
{
Favorites
favorites
=
favorites
Dao
.
info
(
dto
.
getId
());
Favorites
favorites
=
favorites
Manager
.
info
(
dto
.
getId
());
if
(
Objects
.
isNull
(
favorites
))
{
if
(
Objects
.
isNull
(
favorites
))
{
return
Result
.
failed
(
"数据异常,记录不存在"
);
return
Result
.
failed
(
"数据异常,记录不存在"
);
}
}
...
@@ -109,7 +109,7 @@ public class FavoritesServiceImpl implements FavoritesService {
...
@@ -109,7 +109,7 @@ public class FavoritesServiceImpl implements FavoritesService {
@Override
@Override
public
Result
delete
(
FavoritesRequestDto
dto
)
{
public
Result
delete
(
FavoritesRequestDto
dto
)
{
try
{
try
{
List
<
FavoritesCoinsRelation
>
list
=
favoritesCoinsRelation
Dao
.
listByFavoritesId
(
dto
.
getId
(),
null
);
List
<
FavoritesCoinsRelation
>
list
=
favoritesCoinsRelation
Manager
.
listByFavoritesId
(
dto
.
getId
(),
null
);
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
return
Result
.
failed
(
"收藏册内有藏品,清先移除藏品"
);
return
Result
.
failed
(
"收藏册内有藏品,清先移除藏品"
);
}
}
...
@@ -117,10 +117,10 @@ public class FavoritesServiceImpl implements FavoritesService {
...
@@ -117,10 +117,10 @@ public class FavoritesServiceImpl implements FavoritesService {
//TODO 删除该收藏册下用户创建的钱币
//TODO 删除该收藏册下用户创建的钱币
// 删除收藏册和钱币的关联
// 删除收藏册和钱币的关联
favoritesCoinsRelation
Dao
.
deleteByFavoritesId
(
dto
.
getId
(),
null
);
favoritesCoinsRelation
Manager
.
deleteByFavoritesId
(
dto
.
getId
(),
null
);
// 删除收藏册
// 删除收藏册
favorites
Dao
.
delete
(
dto
.
getId
(),
null
);
favorites
Manager
.
delete
(
dto
.
getId
(),
null
);
return
Result
.
success
();
return
Result
.
success
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"批量删除收藏册失败,原因:"
+
e
.
getMessage
(),
e
);
logger
.
error
(
"批量删除收藏册失败,原因:"
+
e
.
getMessage
(),
e
);
...
@@ -133,14 +133,14 @@ public class FavoritesServiceImpl implements FavoritesService {
...
@@ -133,14 +133,14 @@ public class FavoritesServiceImpl implements FavoritesService {
@Override
@Override
public
Result
batchDelete
(
FavoritesRequestDto
dto
)
{
public
Result
batchDelete
(
FavoritesRequestDto
dto
)
{
try
{
try
{
List
<
FavoritesCoinsRelation
>
list
=
favoritesCoinsRelation
Dao
.
listByFavoritesId
(
null
,
dto
.
getIds
());
List
<
FavoritesCoinsRelation
>
list
=
favoritesCoinsRelation
Manager
.
listByFavoritesId
(
null
,
dto
.
getIds
());
//TODO 删除该收藏册下用户创建的钱币
//TODO 删除该收藏册下用户创建的钱币
// 删除收藏册和钱币的关联
// 删除收藏册和钱币的关联
favoritesCoinsRelation
Dao
.
deleteByFavoritesId
(
null
,
dto
.
getIds
());
favoritesCoinsRelation
Manager
.
deleteByFavoritesId
(
null
,
dto
.
getIds
());
// 删除收藏册
// 删除收藏册
favorites
Dao
.
delete
(
null
,
dto
.
getIds
());
favorites
Manager
.
delete
(
null
,
dto
.
getIds
());
return
Result
.
success
();
return
Result
.
success
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"批量删除收藏册失败,原因:"
+
e
.
getMessage
(),
e
);
logger
.
error
(
"批量删除收藏册失败,原因:"
+
e
.
getMessage
(),
e
);
...
...
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