Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
sc_media
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
svn
sc_media
Commits
2b6f57c4
提交
2b6f57c4
authored
5月 10, 2019
作者:
renjiancai
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
上级
249e4f15
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
20 行增加
和
12 行删除
+20
-12
ArticleLibrary.java
...ain/java/com/zrqx/core/model/resource/ArticleLibrary.java
+4
-0
ResourceRelation.java
...n/java/com/zrqx/core/model/resource/ResourceRelation.java
+3
-1
ArticleLibraryController.java
...ource/bg/controller/content/ArticleLibraryController.java
+13
-11
没有找到文件。
com.zrqx.core/src/main/java/com/zrqx/core/model/resource/ArticleLibrary.java
浏览文件 @
2b6f57c4
...
...
@@ -4,11 +4,13 @@ import io.swagger.annotations.ApiModel;
import
io.swagger.annotations.ApiModelProperty
;
import
java.util.Date
;
import
java.util.List
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GenerationType
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
javax.persistence.Transient
;
import
scala.collection.generic.BitOperations.Int
;
import
lombok.Data
;
...
...
@@ -50,5 +52,7 @@ public class ArticleLibrary {
private
String
article_id
;
@ApiModelProperty
(
"封面类型,1表示单图,3表示三图"
)
private
Integer
cover_type
;
@Transient
private
List
<
String
>
accountName
;
}
com.zrqx.core/src/main/java/com/zrqx/core/model/resource/ResourceRelation.java
浏览文件 @
2b6f57c4
...
...
@@ -19,7 +19,9 @@ public class ResourceRelation {
@ApiModelProperty
(
"id"
)
private
String
id
;
@ApiModelProperty
(
"账号id"
)
private
String
accountId
;
private
String
account
;
@ApiModelProperty
(
"账号名称"
)
private
String
accountName
;
@ApiModelProperty
(
"资源id"
)
private
String
objectId
;
@ApiModelProperty
(
"资源类型"
)
...
...
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/controller/content/ArticleLibraryController.java
浏览文件 @
2b6f57c4
...
...
@@ -176,10 +176,19 @@ public class ArticleLibraryController {
@ApiOperation
(
value
=
"复制文章"
,
notes
=
"复制文章"
)
@GetMapping
(
value
=
ResourceRequestPath
.
COPY
)
public
CallBack
<
ArticleLibrary
>
articleCopy
(
String
id
)
{
List
<
String
>
lists
=
new
ArrayList
<
String
>();
ArticleLibrary
articleLibrary
=
articleService
.
selectByPrimaryKey
(
id
);
if
(
articleLibrary
==
null
)
{
throw
new
BaseException
(
ResponseCodeEnum
.
FAIL
);
}
resourceRelationService
.
createCriteria
().
andEqualTo
(
""
,
articleLibrary
.
getId
());
List
<
ResourceRelation
>
list
=
resourceRelationService
.
selectByCriteria
();
if
(
list
.
size
()>
0
){
for
(
ResourceRelation
resourceRelation
:
list
)
{
lists
.
add
(
resourceRelation
.
getAccountName
());
}
articleLibrary
.
setAccountName
(
lists
);
}
return
CallBack
.
success
(
articleLibrary
);
}
...
...
@@ -265,13 +274,6 @@ public class ArticleLibraryController {
}
return
CallBack
.
success
();
}
@ApiOperation
(
value
=
"跳转发布文章页"
,
notes
=
"跳转发布文章页"
)
@GetMapping
(
value
=
ResourceRequestPath
.
PUNLISH_ARICLE
)
public
CallBack
<
String
>
publish
(
String
code
){
return
CallBack
.
success
(
code
);
}
@ApiOperation
(
value
=
"同步内容接口"
,
notes
=
"同步内容接口"
)
@PostMapping
(
value
=
ResourceRequestPath
.
PUNLISH_CONENT
)
...
...
@@ -286,7 +288,7 @@ public class ArticleLibraryController {
List
<
ResourceRelation
>
list
=
resourceRelationService
.
selectByCriteria
();
if
(
list
.
size
()>
0
){
for
(
ResourceRelation
resourceRelation
:
list
)
{
userAccountRelationService
.
createCriteria
().
andEqualTo
(
"account"
,
resourceRelation
.
getAccount
Id
());
userAccountRelationService
.
createCriteria
().
andEqualTo
(
"account"
,
resourceRelation
.
getAccount
());
UserAccountRelation
user
=
userAccountRelationService
.
selectOneByCriteria
();
if
(
form
.
getOriginal_author
().
get
(
i
).
equals
(
"1"
)){
//企鹅号
JSONObject
jsonobj_token
=
null
;
...
...
@@ -325,7 +327,7 @@ public class ArticleLibraryController {
}
//添加用户、资源id
ResourceRelation
res
=
new
ResourceRelation
();
res
.
setAccount
Id
(
openid
);
res
.
setAccount
(
openid
);
res
.
setResourceType
(
1
);
res
.
setObjectId
(
form
.
getId
());
res
.
setIsDelete
(
0
);
...
...
@@ -362,7 +364,7 @@ public class ArticleLibraryController {
jsonobj_aid = JSON.parseObject(info);*/
}
ResourceRelation
res
=
new
ResourceRelation
();
res
.
setAccount
Id
(
user_id
);
res
.
setAccount
(
user_id
);
res
.
setResourceType
(
1
);
res
.
setObjectId
(
form
.
getId
());
res
.
setIsDelete
(
0
);
...
...
@@ -501,7 +503,7 @@ public class ArticleLibraryController {
List
<
ResourceRelation
>
list
=
resourceRelationService
.
selectByCriteria
();
if
(
list
.
size
()>
0
){
for
(
ResourceRelation
article
:
list
)
{
articleTencent
(
null
,
null
,
article
.
getObjectId
(),
article
.
getArticle_id
(),
article
.
getAccount
Id
());
articleTencent
(
null
,
null
,
article
.
getObjectId
(),
article
.
getArticle_id
(),
article
.
getAccount
());
}
}
return
CallBack
.
success
();
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论