Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
midjourney-proxy
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
徐少华
midjourney-proxy
Commits
b148fa76
Commit
b148fa76
authored
Sep 02, 2020
by
桂前礼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug: [none] 旧数据处理
parent
a4f46f4f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletions
+17
-1
AppletThirdResourcesBizImpl.java
...oud/book/applet/biz/impl/AppletThirdResourcesBizImpl.java
+4
-1
BizMaterialBiz.java
...c/main/java/com/pcloud/book/group/biz/BizMaterialBiz.java
+7
-0
BizMaterialBizImpl.java
...va/com/pcloud/book/group/biz/impl/BizMaterialBizImpl.java
+6
-0
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/applet/biz/impl/AppletThirdResourcesBizImpl.java
View file @
b148fa76
...
@@ -15,6 +15,7 @@ import com.pcloud.book.applet.enums.DataRecordTypeEnum;
...
@@ -15,6 +15,7 @@ import com.pcloud.book.applet.enums.DataRecordTypeEnum;
import
com.pcloud.book.applet.enums.DataTypeEnum
;
import
com.pcloud.book.applet.enums.DataTypeEnum
;
import
com.pcloud.book.base.exception.BookBizException
;
import
com.pcloud.book.base.exception.BookBizException
;
import
com.pcloud.book.group.biz.BizMaterialBiz
;
import
com.pcloud.book.group.biz.BizMaterialBiz
;
import
com.pcloud.book.group.enums.UseTypeEnum
;
import
com.pcloud.common.page.PageBeanNew
;
import
com.pcloud.common.page.PageBeanNew
;
import
com.pcloud.common.page.PageParam
;
import
com.pcloud.common.page.PageParam
;
import
com.pcloud.common.utils.ListUtils
;
import
com.pcloud.common.utils.ListUtils
;
...
@@ -192,7 +193,9 @@ public class AppletThirdResourcesBizImpl implements AppletThirdResourcesBiz {
...
@@ -192,7 +193,9 @@ public class AppletThirdResourcesBizImpl implements AppletThirdResourcesBiz {
// 链接发生变化,更新素材
// 链接发生变化,更新素材
if
(
Objects
.
nonNull
(
thirdResourcesDTO
.
getRouteCode
())
&&
thirdResourcesDTO
.
getRouteCode
()
==
1
){
if
(
Objects
.
nonNull
(
thirdResourcesDTO
.
getRouteCode
())
&&
thirdResourcesDTO
.
getRouteCode
()
==
1
){
AppletThirdResources
byId
=
thirdResourcesDao
.
getById
(
thirdResourcesDTO
.
getId
());
AppletThirdResources
byId
=
thirdResourcesDao
.
getById
(
thirdResourcesDTO
.
getId
());
if
(!(
StrUtil
.
equals
(
byId
.
getUrl
(),
thirdResourcesDTO
.
getUrl
())
&&
StrUtil
.
equals
(
byId
.
getName
(),
thirdResourcesDTO
.
getName
()))){
boolean
exists
=
bizMaterialBiz
.
materialExists
(
byId
.
getId
(),
UseTypeEnum
.
THIRD_GROUP
.
value
);
exists
=
!(
exists
&&
StrUtil
.
equals
(
byId
.
getUrl
(),
thirdResourcesDTO
.
getUrl
())
&&
StrUtil
.
equals
(
byId
.
getName
(),
thirdResourcesDTO
.
getName
()));
if
(
exists
){
bizMaterialBiz
.
createMaterial4ThirdResource
(
thirdResourcesDTO
.
getName
(),
thirdResourcesDTO
.
getUrl
(),
Math
.
toIntExact
(
thirdResourcesDTO
.
getId
()));
bizMaterialBiz
.
createMaterial4ThirdResource
(
thirdResourcesDTO
.
getName
(),
thirdResourcesDTO
.
getUrl
(),
Math
.
toIntExact
(
thirdResourcesDTO
.
getId
()));
}
}
}
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/BizMaterialBiz.java
View file @
b148fa76
...
@@ -12,4 +12,11 @@ public interface BizMaterialBiz {
...
@@ -12,4 +12,11 @@ public interface BizMaterialBiz {
*/
*/
void
createMaterial4ThirdResource
(
String
name
,
String
link
,
Integer
resourceId
);
void
createMaterial4ThirdResource
(
String
name
,
String
link
,
Integer
resourceId
);
/**
* 判读素材是否存在
* @param id
* @param value
* @return
*/
boolean
materialExists
(
Long
id
,
Integer
type
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/BizMaterialBizImpl.java
View file @
b148fa76
...
@@ -68,4 +68,10 @@ public class BizMaterialBizImpl implements BizMaterialBiz {
...
@@ -68,4 +68,10 @@ public class BizMaterialBizImpl implements BizMaterialBiz {
bizMaterial
.
setMediaId
(
mediaId
);
bizMaterial
.
setMediaId
(
mediaId
);
bizMaterialMapper
.
insertOrUpdate
(
bizMaterial
);
bizMaterialMapper
.
insertOrUpdate
(
bizMaterial
);
}
}
@Override
public
boolean
materialExists
(
Long
id
,
Integer
type
)
{
BizMaterial
byBizId
=
bizMaterialMapper
.
getByBizId
(
Math
.
toIntExact
(
id
),
type
);
return
Objects
.
nonNull
(
byBizId
)
&&
Objects
.
nonNull
(
byBizId
.
getId
());
}
}
}
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