Browse Source
# Conflicts: # epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.javadev_shibei_match
14 changed files with 357 additions and 2 deletions
@ -0,0 +1,25 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 编辑草稿-获取草稿内容、属性统一入参DTO |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2020/6/3 12:58 |
|||
*/ |
|||
@Data |
|||
public class DraftDetailFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 4492335656284426299L; |
|||
|
|||
public interface AddUserInternalGroup {} |
|||
|
|||
/** |
|||
* 草稿ID |
|||
*/ |
|||
@NotBlank(message = "草稿id不能为空", groups = {DraftDetailFormDTO.AddUserInternalGroup.class}) |
|||
private String draftId; |
|||
} |
@ -0,0 +1,20 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 政府端:选中草稿编辑,获取草稿属性-封面图片 |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2020/6/3 14:26 |
|||
*/ |
|||
@Data |
|||
public class CoverImgDTO implements Serializable { |
|||
private static final long serialVersionUID = -6735712590479867385L; |
|||
private String coverId; |
|||
private String url; |
|||
private String auditStatus; |
|||
private String auditReason; |
|||
} |
@ -0,0 +1,32 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 政府端:选中草稿编辑,获取草稿属性 |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2020/6/3 14:15 |
|||
*/ |
|||
@Data |
|||
public class DraftAttrResultDTO implements Serializable { |
|||
private static final long serialVersionUID = 6999941497971286747L; |
|||
private String draftId; |
|||
private CoverImgDTO coverImg; |
|||
private List<String> tagNameList; |
|||
private Integer isTop; |
|||
private List<String> gridIdList; |
|||
private String publisher; |
|||
private String publisherName; |
|||
@JsonFormat(pattern="yyyy-MM-dd", timezone = "GMT+8") |
|||
private Date publishDate; |
|||
private String title; |
|||
private String publishRangeDesc; |
|||
private String tags; |
|||
private String publisherType; |
|||
} |
@ -0,0 +1,45 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 政府端:选中草稿编辑,获取草稿内容返参明细 |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2020/6/3 13:14 |
|||
*/ |
|||
@Data |
|||
public class DraftContentDetailDTO implements Serializable { |
|||
private static final long serialVersionUID = -415892498226389295L; |
|||
/** |
|||
*内容Id |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 具体内容 |
|||
*/ |
|||
private String content; |
|||
|
|||
/** |
|||
* 内容类型 图片:img;文字:text |
|||
*/ |
|||
private String contentType; |
|||
|
|||
/** |
|||
* 内容序号 |
|||
*/ |
|||
private Integer orderNum; |
|||
|
|||
/** |
|||
* 审核状态 通过:pass;失败:fail |
|||
*/ |
|||
private String auditStatus; |
|||
|
|||
/** |
|||
* 审核理由 |
|||
*/ |
|||
private String auditReason; |
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 政府端:选中草稿编辑,获取草稿内容返参 |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2020/6/3 13:01 |
|||
*/ |
|||
@Data |
|||
public class DraftContentResultDTO implements Serializable { |
|||
private static final long serialVersionUID = -1310987373261903935L; |
|||
/** |
|||
* |
|||
*/ |
|||
private String draftId; |
|||
/** |
|||
* 标题 |
|||
*/ |
|||
private String title; |
|||
/** |
|||
* 内容 |
|||
*/ |
|||
private List<DraftContentDetailDTO> contentList; |
|||
|
|||
} |
@ -0,0 +1,56 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.util.Set; |
|||
|
|||
@Data |
|||
public class LoginUserDetailsResultDTO { |
|||
|
|||
/** |
|||
* 政府端:gov、居民端:resi、运营端:oper |
|||
*/ |
|||
private String app; |
|||
|
|||
/** |
|||
* PC端:web、微信小程序:wxmp |
|||
*/ |
|||
private String client; |
|||
|
|||
/** |
|||
* 用户ID |
|||
*/ |
|||
private String userId; |
|||
|
|||
/** |
|||
* 角色列表 |
|||
*/ |
|||
private Set<String> roleIdList; |
|||
|
|||
/** |
|||
* 部门id列表 |
|||
*/ |
|||
private Set<String> deptIdList; |
|||
|
|||
/** |
|||
* 当前登录的组织id(顶级) |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 组织ID |
|||
*/ |
|||
private String orgIdPath; |
|||
|
|||
/** |
|||
* 网格ID列表 |
|||
*/ |
|||
private Set<String> gridIdList; |
|||
|
|||
/** |
|||
* 当前工作人员进入的客户id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
|
|||
} |
@ -0,0 +1,23 @@ |
|||
package com.epmet.feign; |
|||
|
|||
import com.epmet.commons.tools.constant.ServiceConstant; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.form.LoginUserDetailsFormDTO; |
|||
import com.epmet.dto.result.LoginUserDetailsResultDTO; |
|||
import com.epmet.feign.fallback.EpmetUserClientFeignClientFallback; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
|
|||
@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallback = EpmetUserClientFeignClientFallback.class) |
|||
//@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallback = EpmetUserClientFeignClientFallback.class, url = "localhost:8087")
|
|||
public interface EpmetUserClientFeignClient { |
|||
|
|||
/** |
|||
* 从缓存中查询已登录用户的基本信息以及角色等相关信息 |
|||
* @return |
|||
*/ |
|||
@PostMapping("/epmetuser/user/loginuserdetails") |
|||
Result<LoginUserDetailsResultDTO> getLoginUserDetails(@RequestBody LoginUserDetailsFormDTO dto); |
|||
|
|||
} |
@ -0,0 +1,18 @@ |
|||
package com.epmet.feign.fallback; |
|||
|
|||
import com.epmet.commons.tools.constant.ServiceConstant; |
|||
import com.epmet.commons.tools.utils.ModuleUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.form.LoginUserDetailsFormDTO; |
|||
import com.epmet.dto.result.LoginUserDetailsResultDTO; |
|||
import com.epmet.feign.EpmetUserClientFeignClient; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
@Component |
|||
public class EpmetUserClientFeignClientFallback implements EpmetUserClientFeignClient { |
|||
|
|||
@Override |
|||
public Result<LoginUserDetailsResultDTO> getLoginUserDetails(LoginUserDetailsFormDTO dto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getLoginUserDetails", dto); |
|||
} |
|||
} |
Loading…
Reference in new issue