提交 2b6f57c4 authored 作者: renjiancai's avatar renjiancai

--no commit message

上级 249e4f15
......@@ -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;
}
......@@ -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("资源类型")
......
......@@ -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.getAccountId());
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.setAccountId(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.setAccountId(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.getAccountId());
articleTencent(null,null, article.getObjectId(),article.getArticle_id(),article.getAccount());
}
}
return CallBack.success();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论