Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
enterprise-platform
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
赵啸非
enterprise-platform
Commits
35c38f60
Commit
35c38f60
authored
Dec 10, 2024
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
产品,新闻,名片详情接口增加收藏状态
parent
bd5249c1
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
90 additions
and
3 deletions
+90
-3
enterprise-manager/src/main/java/com/mortals/xhx/module/bussinesscard/model/vo/BussinesscardVo.java
...ls/xhx/module/bussinesscard/model/vo/BussinesscardVo.java
+2
-1
enterprise-manager/src/main/java/com/mortals/xhx/module/bussinesscard/service/impl/BussinesscardServiceImpl.java
.../bussinesscard/service/impl/BussinesscardServiceImpl.java
+22
-0
enterprise-manager/src/main/java/com/mortals/xhx/module/company/model/vo/CompanyVo.java
...va/com/mortals/xhx/module/company/model/vo/CompanyVo.java
+0
-1
enterprise-manager/src/main/java/com/mortals/xhx/module/company/service/impl/CompanyServiceImpl.java
...s/xhx/module/company/service/impl/CompanyServiceImpl.java
+18
-0
enterprise-manager/src/main/java/com/mortals/xhx/module/news/model/vo/NewsVo.java
...ain/java/com/mortals/xhx/module/news/model/vo/NewsVo.java
+2
-0
enterprise-manager/src/main/java/com/mortals/xhx/module/news/service/impl/NewsServiceImpl.java
...mortals/xhx/module/news/service/impl/NewsServiceImpl.java
+11
-0
enterprise-manager/src/main/java/com/mortals/xhx/module/product/model/vo/ProductVo.java
...va/com/mortals/xhx/module/product/model/vo/ProductVo.java
+2
-1
enterprise-manager/src/main/java/com/mortals/xhx/module/product/service/impl/ProductServiceImpl.java
...s/xhx/module/product/service/impl/ProductServiceImpl.java
+33
-0
No files found.
enterprise-manager/src/main/java/com/mortals/xhx/module/bussinesscard/model/vo/BussinesscardVo.java
View file @
35c38f60
...
@@ -18,6 +18,7 @@ public class BussinesscardVo extends BaseEntityLong {
...
@@ -18,6 +18,7 @@ public class BussinesscardVo extends BaseEntityLong {
/** 序号,主键,自增长列表 */
/** 序号,主键,自增长列表 */
private
List
<
Long
>
idList
;
private
List
<
Long
>
idList
;
/**收藏状态**/
private
Integer
favoriteStatus
;
}
}
\ No newline at end of file
enterprise-manager/src/main/java/com/mortals/xhx/module/bussinesscard/service/impl/BussinesscardServiceImpl.java
View file @
35c38f60
...
@@ -5,6 +5,9 @@ import com.mortals.framework.util.DataUtil;
...
@@ -5,6 +5,9 @@ import com.mortals.framework.util.DataUtil;
import
com.mortals.framework.util.StringUtils
;
import
com.mortals.framework.util.StringUtils
;
import
com.mortals.xhx.module.company.model.CompanyEntity
;
import
com.mortals.xhx.module.company.model.CompanyEntity
;
import
com.mortals.xhx.module.company.service.CompanyService
;
import
com.mortals.xhx.module.company.service.CompanyService
;
import
com.mortals.xhx.module.favorites.model.FavoritesBusinesscardEntity
;
import
com.mortals.xhx.module.favorites.model.FavoritesBusinesscardQuery
;
import
com.mortals.xhx.module.favorites.service.FavoritesBusinesscardService
;
import
com.mortals.xhx.module.position.model.PositionEntity
;
import
com.mortals.xhx.module.position.model.PositionEntity
;
import
com.mortals.xhx.module.position.service.PositionService
;
import
com.mortals.xhx.module.position.service.PositionService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -31,6 +34,8 @@ public class BussinesscardServiceImpl extends AbstractCRUDServiceImpl<Bussinessc
...
@@ -31,6 +34,8 @@ public class BussinesscardServiceImpl extends AbstractCRUDServiceImpl<Bussinessc
private
CompanyService
companyService
;
private
CompanyService
companyService
;
@Autowired
@Autowired
private
PositionService
positionService
;
private
PositionService
positionService
;
@Autowired
private
FavoritesBusinesscardService
favoritesBusinesscardService
;
@Override
@Override
protected
void
saveBefore
(
BussinesscardEntity
entity
,
Context
context
)
throws
AppException
{
protected
void
saveBefore
(
BussinesscardEntity
entity
,
Context
context
)
throws
AppException
{
...
@@ -72,4 +77,21 @@ public class BussinesscardServiceImpl extends AbstractCRUDServiceImpl<Bussinessc
...
@@ -72,4 +77,21 @@ public class BussinesscardServiceImpl extends AbstractCRUDServiceImpl<Bussinessc
}
}
}
}
@Override
public
BussinesscardEntity
get
(
Long
key
,
Context
context
)
throws
AppException
{
BussinesscardEntity
entity
=
this
.
dao
.
get
(
key
);
if
(
entity
!=
null
){
if
(
context
!=
null
&&
context
.
getUser
()!=
null
)
{
FavoritesBusinesscardEntity
favoritesBusinesscardEntity
=
favoritesBusinesscardService
.
selectOne
(
new
FavoritesBusinesscardQuery
().
staffId
(
entity
.
getStaffId
()).
userId
(
context
.
getUser
().
getId
()));
if
(
favoritesBusinesscardEntity
!=
null
){
entity
.
setFavoriteStatus
(
1
);
}
else
{
entity
.
setFavoriteStatus
(
0
);
}
}
else
{
entity
.
setFavoriteStatus
(
0
);
}
}
return
entity
;
}
}
}
\ No newline at end of file
enterprise-manager/src/main/java/com/mortals/xhx/module/company/model/vo/CompanyVo.java
View file @
35c38f60
...
@@ -37,5 +37,4 @@ public class CompanyVo extends BaseEntityLong {
...
@@ -37,5 +37,4 @@ public class CompanyVo extends BaseEntityLong {
//名片数量
//名片数量
private
Integer
businessCardNums
=
0
;
private
Integer
businessCardNums
=
0
;
}
}
\ No newline at end of file
enterprise-manager/src/main/java/com/mortals/xhx/module/company/service/impl/CompanyServiceImpl.java
View file @
35c38f60
...
@@ -294,4 +294,22 @@ public class CompanyServiceImpl extends AbstractCRUDServiceImpl<CompanyDao, Comp
...
@@ -294,4 +294,22 @@ public class CompanyServiceImpl extends AbstractCRUDServiceImpl<CompanyDao, Comp
homeStatInfo
.
setSendCardStaffList
(
staffList
);
homeStatInfo
.
setSendCardStaffList
(
staffList
);
return
Rest
.
ok
(
homeStatInfo
);
return
Rest
.
ok
(
homeStatInfo
);
}
}
@Override
public
CompanyEntity
get
(
Long
key
,
Context
context
)
throws
AppException
{
CompanyEntity
entity
=
this
.
dao
.
get
(
key
);
if
(
entity
!=
null
){
if
(
StringUtils
.
isNotEmpty
(
entity
.
getCompanyIntroduction
()))
{
String
regex
=
"src=\"file"
;
String
replacement
;
if
(
domain
.
endsWith
(
"/"
)){
replacement
=
"src=\""
+
domain
+
"file"
;
}
else
{
replacement
=
"src=\""
+
domain
+
"/file"
;
}
entity
.
setCompanyIntroduction
(
entity
.
getCompanyIntroduction
().
replaceAll
(
regex
,
replacement
));
}
}
return
entity
;
}
}
}
\ No newline at end of file
enterprise-manager/src/main/java/com/mortals/xhx/module/news/model/vo/NewsVo.java
View file @
35c38f60
...
@@ -27,6 +27,8 @@ public class NewsVo extends BaseEntityLong {
...
@@ -27,6 +27,8 @@ public class NewsVo extends BaseEntityLong {
private
Integer
upStatus
;
private
Integer
upStatus
;
/**分享状态**/
/**分享状态**/
private
Integer
shareStatus
;
private
Integer
shareStatus
;
/**收藏状态**/
private
Integer
favoriteStatus
;
/**
/**
* 头像地址
* 头像地址
*/
*/
...
...
enterprise-manager/src/main/java/com/mortals/xhx/module/news/service/impl/NewsServiceImpl.java
View file @
35c38f60
...
@@ -4,6 +4,9 @@ import com.mortals.framework.util.StringUtils;
...
@@ -4,6 +4,9 @@ import com.mortals.framework.util.StringUtils;
import
com.mortals.xhx.base.system.user.model.UserEntity
;
import
com.mortals.xhx.base.system.user.model.UserEntity
;
import
com.mortals.xhx.base.system.user.model.UserQuery
;
import
com.mortals.xhx.base.system.user.model.UserQuery
;
import
com.mortals.xhx.base.system.user.service.UserService
;
import
com.mortals.xhx.base.system.user.service.UserService
;
import
com.mortals.xhx.module.favorites.model.FavoritesNewsEntity
;
import
com.mortals.xhx.module.favorites.model.FavoritesNewsQuery
;
import
com.mortals.xhx.module.favorites.service.FavoritesNewsService
;
import
com.mortals.xhx.module.news.model.*
;
import
com.mortals.xhx.module.news.model.*
;
import
com.mortals.xhx.module.news.service.NewsRecordService
;
import
com.mortals.xhx.module.news.service.NewsRecordService
;
import
com.mortals.xhx.module.news.service.NewsShareService
;
import
com.mortals.xhx.module.news.service.NewsShareService
;
...
@@ -44,6 +47,8 @@ public class NewsServiceImpl extends AbstractCRUDServiceImpl<NewsDao, NewsEntity
...
@@ -44,6 +47,8 @@ public class NewsServiceImpl extends AbstractCRUDServiceImpl<NewsDao, NewsEntity
private
NewsUpService
newsUpService
;
private
NewsUpService
newsUpService
;
@Autowired
@Autowired
private
UserService
userService
;
private
UserService
userService
;
@Autowired
private
FavoritesNewsService
favoritesNewsService
;
@Value
(
"${domain.name:https://oa.xinhx.co}"
)
@Value
(
"${domain.name:https://oa.xinhx.co}"
)
private
String
domain
;
private
String
domain
;
...
@@ -132,6 +137,12 @@ public class NewsServiceImpl extends AbstractCRUDServiceImpl<NewsDao, NewsEntity
...
@@ -132,6 +137,12 @@ public class NewsServiceImpl extends AbstractCRUDServiceImpl<NewsDao, NewsEntity
}
else
{
}
else
{
entity
.
setUpStatus
(
0
);
entity
.
setUpStatus
(
0
);
}
}
FavoritesNewsEntity
favoritesNewsEntity
=
favoritesNewsService
.
selectOne
(
new
FavoritesNewsQuery
().
newsId
(
key
).
userId
(
userEntity
.
getId
()));
if
(
favoritesNewsEntity
!=
null
){
entity
.
setFavoriteStatus
(
1
);
}
else
{
entity
.
setFavoriteStatus
(
0
);
}
}
else
{
}
else
{
entity
.
setShareStatus
(
0
);
entity
.
setShareStatus
(
0
);
entity
.
setUpStatus
(
0
);
entity
.
setUpStatus
(
0
);
...
...
enterprise-manager/src/main/java/com/mortals/xhx/module/product/model/vo/ProductVo.java
View file @
35c38f60
...
@@ -23,6 +23,7 @@ public class ProductVo extends BaseEntityLong {
...
@@ -23,6 +23,7 @@ public class ProductVo extends BaseEntityLong {
private
String
companyId
;
private
String
companyId
;
//所属企业
//所属企业
private
String
categoryId
;
private
String
categoryId
;
/**收藏状态**/
private
Integer
favoriteStatus
;
}
}
\ No newline at end of file
enterprise-manager/src/main/java/com/mortals/xhx/module/product/service/impl/ProductServiceImpl.java
View file @
35c38f60
...
@@ -12,6 +12,9 @@ import com.mortals.xhx.module.company.model.CompanyProductEntity;
...
@@ -12,6 +12,9 @@ import com.mortals.xhx.module.company.model.CompanyProductEntity;
import
com.mortals.xhx.module.company.model.CompanyProductQuery
;
import
com.mortals.xhx.module.company.model.CompanyProductQuery
;
import
com.mortals.xhx.module.company.service.CompanyProductService
;
import
com.mortals.xhx.module.company.service.CompanyProductService
;
import
com.mortals.xhx.module.company.service.CompanyService
;
import
com.mortals.xhx.module.company.service.CompanyService
;
import
com.mortals.xhx.module.favorites.model.FavoritesProductEntity
;
import
com.mortals.xhx.module.favorites.model.FavoritesProductQuery
;
import
com.mortals.xhx.module.favorites.service.FavoritesProductService
;
import
com.mortals.xhx.module.product.model.*
;
import
com.mortals.xhx.module.product.model.*
;
import
com.mortals.xhx.module.product.service.ProductCategoryService
;
import
com.mortals.xhx.module.product.service.ProductCategoryService
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
...
@@ -52,6 +55,8 @@ public class ProductServiceImpl extends AbstractCRUDCacheServiceImpl<ProductDao,
...
@@ -52,6 +55,8 @@ public class ProductServiceImpl extends AbstractCRUDCacheServiceImpl<ProductDao,
private
CategoryService
categoryService
;
private
CategoryService
categoryService
;
@Autowired
@Autowired
private
CompanyService
companyService
;
private
CompanyService
companyService
;
@Autowired
private
FavoritesProductService
favoritesProductService
;
@Value
(
"${domain.name:https://oa.xinhx.co}"
)
@Value
(
"${domain.name:https://oa.xinhx.co}"
)
private
String
domain
;
private
String
domain
;
...
@@ -301,4 +306,32 @@ public class ProductServiceImpl extends AbstractCRUDCacheServiceImpl<ProductDao,
...
@@ -301,4 +306,32 @@ public class ProductServiceImpl extends AbstractCRUDCacheServiceImpl<ProductDao,
productQuestionService
.
removeList
(
productQuestionlist
,
context
);
productQuestionService
.
removeList
(
productQuestionlist
,
context
);
super
.
removeAfter
(
ids
,
context
,
result
);
super
.
removeAfter
(
ids
,
context
,
result
);
}
}
@Override
public
ProductEntity
get
(
Long
key
,
Context
context
)
throws
AppException
{
ProductEntity
entity
=
this
.
dao
.
get
(
key
);
if
(
entity
!=
null
)
{
String
regex
=
"src=\"file"
;
String
replacement
;
if
(
domain
.
endsWith
(
"/"
))
{
replacement
=
"src=\""
+
domain
+
"file"
;
}
else
{
replacement
=
"src=\""
+
domain
+
"/file"
;
}
if
(
StringUtils
.
isNotEmpty
(
entity
.
getProductDetail
()))
{
entity
.
setProductDetail
(
entity
.
getProductDetail
().
replaceAll
(
regex
,
replacement
));
}
if
(
context
!=
null
&&
context
.
getUser
()!=
null
)
{
FavoritesProductEntity
favoritesProductEntity
=
favoritesProductService
.
selectOne
(
new
FavoritesProductQuery
().
productId
(
key
).
userId
(
context
.
getUser
().
getId
()));
if
(
favoritesProductEntity
!=
null
){
entity
.
setFavoriteStatus
(
1
);
}
else
{
entity
.
setFavoriteStatus
(
0
);
}
}
else
{
entity
.
setFavoriteStatus
(
0
);
}
}
return
entity
;
}
}
}
\ No newline at end of file
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