forked from rongchao/epmet-cloud-rizhao
Browse Source
# Conflicts: # epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java # epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/OssService.java # epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/impl/OssServiceImpl.java # epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java # epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java # epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/fallback/ResiGroupOpenFeignClientFallback.java # epmet-module/resi-group/resi-group-server/src/main/resources/bootstrap.ymldev
167 changed files with 8952 additions and 61 deletions
@ -0,0 +1,35 @@ |
|||
package com.epmet.commons.tools.scan.param; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.Valid; |
|||
import javax.validation.constraints.NotEmpty; |
|||
import javax.validation.constraints.NotNull; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 语音检测入参DTO |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2020/12/18 10:15 |
|||
*/ |
|||
@Data |
|||
public class VoiceScanParamDTO implements Serializable { |
|||
|
|||
/** |
|||
* 是否开启回调 |
|||
*/ |
|||
@NotNull(message = "openCallBack必填,true开启;false不开启") |
|||
private Boolean openCallBack; |
|||
|
|||
/** |
|||
* 异步检测结果回调地址,执行异步审查内容时 必填 |
|||
* openCallBack=true时,callback必填 |
|||
*/ |
|||
private String callback; |
|||
|
|||
@Valid |
|||
@NotEmpty(message = "任务列表不能为空") |
|||
private List<VoiceTaskDTO> tasks; |
|||
} |
@ -0,0 +1,31 @@ |
|||
package com.epmet.commons.tools.scan.param; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 语音异步检测对象 |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2020/12/18 10:21 |
|||
*/ |
|||
@Data |
|||
public class VoiceTaskDTO implements Serializable { |
|||
/** |
|||
* 不必填 |
|||
* 要检测的数据id 非必填 |
|||
* 检测对象对应的数据ID。 |
|||
* 由大小写英文字母、数字、下划线(_)、短划线(-)、英文句号(.)组成,不超过128个字符,可以用于唯一标识您的业务数据。 |
|||
* */ |
|||
@NotBlank(message = "dataId不能为空") |
|||
private String dataId; |
|||
|
|||
/** |
|||
* 必填 |
|||
* 需要检测的音频文件或语音流的下载地址。 |
|||
*/ |
|||
@NotBlank(message = "音频URL不能为空") |
|||
private String url; |
|||
} |
@ -0,0 +1,49 @@ |
|||
package com.epmet.commons.tools.scan.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 语音异步检测 返参 |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2020/12/18 10:09 |
|||
*/ |
|||
@Data |
|||
public class AsyncScanResult implements Serializable { |
|||
private static final long serialVersionUID = -939433332419948118L; |
|||
|
|||
/** |
|||
* 随机字符串,该值用于回调通知请求中的签名。 |
|||
*/ |
|||
private String seed; |
|||
|
|||
/** |
|||
* 提交成功的失败对象 |
|||
*/ |
|||
private List<AsyncScanTaskDTO> successTasks=new ArrayList<>(); |
|||
|
|||
/** |
|||
* 提交失败的检测对象 |
|||
*/ |
|||
private List<AsyncScanTaskDTO> failTasks=new ArrayList<>(); |
|||
|
|||
/** |
|||
* 是否全部提交成功 |
|||
*/ |
|||
private boolean isAllSuccess; |
|||
|
|||
public boolean isAllSuccess() { |
|||
if (failTasks.isEmpty() && !successTasks.isEmpty()) { |
|||
return true; |
|||
} |
|||
return isAllSuccess; |
|||
} |
|||
|
|||
public void setAllSuccess(boolean allSuccess) { |
|||
isAllSuccess = allSuccess; |
|||
} |
|||
} |
@ -0,0 +1,25 @@ |
|||
package com.epmet.commons.tools.scan.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 语音异步检测 -返回的task集合 |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2020/12/18 10:31 |
|||
*/ |
|||
@Data |
|||
public class AsyncScanTaskDTO implements Serializable { |
|||
/** |
|||
* 检测对象对应的数据ID。 |
|||
* 由大小写英文字母、数字、下划线(_)、短划线(-)、英文句号(.)组成,不超过128个字符,可以用于唯一标识您的业务数据。 |
|||
*/ |
|||
private String dataId; |
|||
|
|||
/** |
|||
* 任务id |
|||
*/ |
|||
private String taskId; |
|||
} |
@ -0,0 +1,56 @@ |
|||
package com.epmet.commons.tools.scan.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 检测成功(检测成功+检测失败的)的任务详情 |
|||
* 处理中的该接口不返回,继续轮询即可 |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2020/12/18 13:10 |
|||
*/ |
|||
@Data |
|||
public class VoiceResultDTO implements Serializable { |
|||
private static final long serialVersionUID = 8006827312407034344L; |
|||
/** |
|||
* 检测对象对应的数据ID。 |
|||
*/ |
|||
private String dataId; |
|||
|
|||
/** |
|||
* 检测任务的ID |
|||
*/ |
|||
private String taskId; |
|||
|
|||
/** |
|||
* 建议您执行的后续操作。取值: |
|||
* pass:结果正常,无需进行其余操作。 |
|||
* review:结果不确定,需要进行人工审核。 |
|||
* block:结果违规,建议直接删除或者限制公开。 |
|||
*/ |
|||
private String suggestion; |
|||
|
|||
/** |
|||
* 检测结果的分类。取值: |
|||
* normal:正常文本 |
|||
* spam:含垃圾信息 |
|||
* ad:广告 |
|||
* politics:涉政 |
|||
* terrorism:暴恐 |
|||
* abuse:辱骂 |
|||
* porn:色情 |
|||
* flood:灌水 |
|||
* contraband:违禁 |
|||
* meaningless:无意义 |
|||
* customized:自定义(例如命中自定义关键词) |
|||
*/ |
|||
private String label; |
|||
|
|||
/** |
|||
* labelDesc是对label的说明,包含两种特殊说明: |
|||
* (1)如果检测任务失败labelDesc:智能检测任务失败,结果已失效,需要人工审核 |
|||
* (2)如果检测结果失效labelDesc:智能检测任务失败,需要人工审核 |
|||
*/ |
|||
private String labelDesc; |
|||
} |
@ -0,0 +1,66 @@ |
|||
|
|||
INSERT INTO point_rule_default ( |
|||
`ID`, |
|||
`RULE_NAME`, |
|||
`RULE_DESC`, |
|||
`EVENT_CODE`, |
|||
`FUNCTION_ID`, |
|||
`OPERATE_TYPE`, |
|||
`UP_LIMIT`, |
|||
`UP_LIMIT_DESC`, |
|||
`UP_LIMIT_PREFIX`, |
|||
`RULE_PERIOD`, |
|||
`POINT`, |
|||
`POINT_UNIT`, |
|||
`ENABLED_FLAG`, |
|||
`DEL_FLAG`, |
|||
`REVISION`, |
|||
`CREATED_BY`, |
|||
`CREATED_TIME`, |
|||
`UPDATED_BY`, |
|||
`UPDATED_TIME` |
|||
) |
|||
VALUES |
|||
( |
|||
'3','发布话题', |
|||
'对小组内话题进行15字以上评论','publish_one_topic', |
|||
'43addd0735230c01eedbb38d721076b0','plus', |
|||
15,'每天上限为15分',null,'day',5,'time','0','0',0,'APP_USER',now(),'APP_USER',now() |
|||
), |
|||
( |
|||
'4','参与话题', |
|||
'楼院小组内通过我有话说功能发布话题','participate_one_topic', |
|||
'43addd0735230c01eedbb38d721076b0','plus', |
|||
6,'每天上限为6分',null,'day',2,'time','0','0',0,'APP_USER',now(),'APP_USER',now() |
|||
), |
|||
( |
|||
'5','话题被转为议题', |
|||
'小组中发布的话题被组长转为议题','topic_shifted_to_issue', |
|||
'43addd0735230c01eedbb38d721076b0','plus', |
|||
0,'无上限',null,'day',15,'time','0','0',0,'APP_USER',now(),'APP_USER',now() |
|||
), |
|||
( |
|||
'6','话题被转为项目', |
|||
'小组中发布的话题被组长转为议题 又被网格员转为项目','topic_shifted_to_project', |
|||
'43addd0735230c01eedbb38d721076b0','plus', |
|||
0,'无上限',null,'day',30,'time','0','0',0,'APP_USER',now(),'APP_USER',now() |
|||
), |
|||
( |
|||
'7','转话题为议题', |
|||
'将自建小组中话题转为议题','shift_topic_to_issue', |
|||
'43addd0735230c01eedbb38d721076b0','plus', |
|||
15,'每天上限为15分',null,'day',5,'time','0','0',0,'APP_USER',now(),'APP_USER',now() |
|||
), |
|||
( |
|||
'8','邀请新人入组', |
|||
'通过话题/议题分享链接邀请新用户入组,需注册居民成功入组方能获得','invite_new_resident_into_group', |
|||
'43addd0735230c01eedbb38d721076b0','plus', |
|||
0,'无上限',null,'day',30,'time','0','0',0,'APP_USER',now(),'APP_USER',now() |
|||
), |
|||
( |
|||
'9','邀请入组', |
|||
'通过话题/议题分享链接邀请已注册用户入组,需通过入组审核方能获得','invite_resident_into_group', |
|||
'43addd0735230c01eedbb38d721076b0','plus', |
|||
25,'每天上限为25分',null,'day',5,'time','0','0',0,'APP_USER',now(),'APP_USER',now() |
|||
) |
|||
|
@ -0,0 +1,17 @@ |
|||
package com.epmet.constant; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/12/18 下午1:59 |
|||
*/ |
|||
public interface IssueShareConstant { |
|||
|
|||
String NOT_EXIST_ISSUE_INFO = "未查询到此议题相关信息"; |
|||
|
|||
String TOPIC_BELONG_GROUP_FAILURE = "查询话题所属小组失败......"; |
|||
|
|||
String TOPIC_BELONG_GROUP_NULL = "查询话题所属小组为空......"; |
|||
|
|||
String NOT_EXIST_INVITE_ISSUE_RECORD = "未查询到该邀请记录【议题】......"; |
|||
|
|||
} |
@ -0,0 +1,97 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 议题分享链接表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-12-18 |
|||
*/ |
|||
@Data |
|||
public class IssueShareLinkRecordDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 议题所属网格ID |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 议题ID |
|||
*/ |
|||
private String issueId; |
|||
|
|||
/** |
|||
* 分享人(当前用户id) |
|||
*/ |
|||
private String shareUserId; |
|||
|
|||
/** |
|||
* 邀请内容 |
|||
*/ |
|||
private String inviteContent; |
|||
|
|||
/** |
|||
* 删除状态 0:正常,1:删除 |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,101 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 议题分享链接访问记录表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-12-18 |
|||
*/ |
|||
@Data |
|||
public class IssueShareLinkVisitRecordDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 分享人【邀请人】ID |
|||
*/ |
|||
private String shareUserId; |
|||
|
|||
/** |
|||
* 被邀请人ID |
|||
*/ |
|||
private String inviteeUserId; |
|||
|
|||
/** |
|||
* 议题分享链接表.id |
|||
*/ |
|||
private String shareLinkRecId; |
|||
|
|||
/** |
|||
* 是否邀请注册:0:是,1:不是 |
|||
*/ |
|||
private Integer isInviteRegister; |
|||
|
|||
/** |
|||
* 是否同意进组,1是0否,在注册完居民之后,是否同意入组,如果同意发送入组申请,不同意此项默认为0 |
|||
*/ |
|||
private Boolean ifJoinGroup; |
|||
|
|||
/** |
|||
* 删除状态,0:正常,1:删除 |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/12/18 下午1:23 |
|||
*/ |
|||
@Data |
|||
public class IssueCreateUrlFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -7269328640568283013L; |
|||
|
|||
public interface IssueCreateUrlForm{} |
|||
|
|||
@NotBlank(message = "议题ID不能为空",groups = {IssueCreateUrlForm.class}) |
|||
private String issueId; |
|||
} |
@ -0,0 +1,24 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/12/18 下午3:12 |
|||
*/ |
|||
@Data |
|||
public class IssueVisitFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -7901684507046042401L; |
|||
|
|||
public interface IssueVisitForm{} |
|||
|
|||
/** |
|||
* 分享ID |
|||
*/ |
|||
@NotBlank(message = "分享ID不能为空",groups = {IssueVisitForm.class}) |
|||
private String shareLinkId; |
|||
} |
@ -0,0 +1,29 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description 议题分享链接和被邀请人传参DTO |
|||
* @ClassName SharableIssueAndInviteeFormDTO |
|||
* @Auth wangc |
|||
* @Date 2020-12-18 15:10 |
|||
*/ |
|||
@Data |
|||
public class SharableIssueAndInviteeFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -2777459178190245842L; |
|||
|
|||
/** |
|||
* 议题分享链接 |
|||
*/ |
|||
@NotBlank(message = "分享链接不能为空") |
|||
private String shareLinkId; |
|||
|
|||
/** |
|||
* 通过链接进入议题页面用户的Id |
|||
*/ |
|||
@NotBlank(message = "用户Id不能为空") |
|||
private String inviteeId; |
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/12/18 下午1:30 |
|||
*/ |
|||
@Data |
|||
@AllArgsConstructor |
|||
public class IssueCreateUrlResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 552194128388715353L; |
|||
|
|||
/** |
|||
* 议题分享链接ID |
|||
*/ |
|||
private String shareLinkId; |
|||
} |
@ -0,0 +1,34 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/12/18 下午5:13 |
|||
*/ |
|||
@Data |
|||
@AllArgsConstructor |
|||
@NoArgsConstructor |
|||
public class IssueVisitResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -5079228371448105954L; |
|||
|
|||
/** |
|||
* 议题ID |
|||
*/ |
|||
private String issueId; |
|||
|
|||
/** |
|||
* 网格ID |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
} |
@ -0,0 +1,128 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.annotation.LoginUser; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.AssertUtils; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.commons.tools.validator.group.AddGroup; |
|||
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|||
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|||
import com.epmet.dto.IssueShareLinkRecordDTO; |
|||
import com.epmet.dto.form.IssueCreateUrlFormDTO; |
|||
import com.epmet.dto.form.IssueVisitFormDTO; |
|||
import com.epmet.dto.result.IssueCreateUrlResultDTO; |
|||
import com.epmet.dto.result.IssueVisitResultDTO; |
|||
import com.epmet.service.IssueShareLinkRecordService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 议题分享链接表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-12-18 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("issuesharelink") |
|||
public class IssueShareLinkRecordController { |
|||
|
|||
@Autowired |
|||
private IssueShareLinkRecordService issueShareLinkRecordService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<IssueShareLinkRecordDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<IssueShareLinkRecordDTO> page = issueShareLinkRecordService.page(params); |
|||
return new Result<PageData<IssueShareLinkRecordDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<IssueShareLinkRecordDTO> get(@PathVariable("id") String id){ |
|||
IssueShareLinkRecordDTO data = issueShareLinkRecordService.get(id); |
|||
return new Result<IssueShareLinkRecordDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody IssueShareLinkRecordDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
issueShareLinkRecordService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody IssueShareLinkRecordDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
issueShareLinkRecordService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
issueShareLinkRecordService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* @Description 议题分享链接ID |
|||
* @Param formDTO |
|||
* @Param tokenDto |
|||
* @author zxc |
|||
* @date 2020/12/18 下午1:36 |
|||
*/ |
|||
@PostMapping("createurl") |
|||
public Result<IssueCreateUrlResultDTO> getIssueShareLinkId(@RequestBody IssueCreateUrlFormDTO formDTO, @LoginUser TokenDto tokenDto){ |
|||
ValidatorUtils.validateEntity(formDTO, IssueCreateUrlFormDTO.IssueCreateUrlForm.class); |
|||
return new Result<IssueCreateUrlResultDTO>().ok(issueShareLinkRecordService.getIssueShareLinkId(formDTO,tokenDto)); |
|||
} |
|||
|
|||
/** |
|||
* @Description 分享议题id获取信息 |
|||
* @Param formDTO |
|||
* @Param tokenDto |
|||
* @author zxc |
|||
* @date 2020/12/18 下午5:22 |
|||
*/ |
|||
@PostMapping("visit") |
|||
public Result<IssueVisitResultDTO> issueVisit(@RequestBody IssueVisitFormDTO formDTO,@LoginUser TokenDto tokenDto){ |
|||
ValidatorUtils.validateEntity(formDTO, IssueVisitFormDTO.IssueVisitForm.class); |
|||
return new Result<IssueVisitResultDTO>().ok(issueShareLinkRecordService.issueVisit(formDTO,tokenDto)); |
|||
} |
|||
|
|||
/** |
|||
* @Description 根据议题分享链接Id查询链接详情 |
|||
* @param shareLinkId |
|||
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.IssueShareLinkRecordDTO> |
|||
* @author wangc |
|||
* @date 2020.12.22 10:53 |
|||
*/ |
|||
@PostMapping("sharelinkinfo") |
|||
public Result<IssueShareLinkRecordDTO> shareLinkInfo(@RequestParam String shareLinkId){ |
|||
return null; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,98 @@ |
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.AssertUtils; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.commons.tools.validator.group.AddGroup; |
|||
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|||
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|||
import com.epmet.dto.IssueShareLinkVisitRecordDTO; |
|||
import com.epmet.dto.form.SharableIssueAndInviteeFormDTO; |
|||
import com.epmet.service.IssueShareLinkVisitRecordService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 议题分享链接访问记录表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-12-18 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("issuesharelinkvisitrecord") |
|||
public class IssueShareLinkVisitRecordController { |
|||
|
|||
@Autowired |
|||
private IssueShareLinkVisitRecordService issueShareLinkVisitRecordService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<IssueShareLinkVisitRecordDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<IssueShareLinkVisitRecordDTO> page = issueShareLinkVisitRecordService.page(params); |
|||
return new Result<PageData<IssueShareLinkVisitRecordDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<IssueShareLinkVisitRecordDTO> get(@PathVariable("id") String id){ |
|||
IssueShareLinkVisitRecordDTO data = issueShareLinkVisitRecordService.get(id); |
|||
return new Result<IssueShareLinkVisitRecordDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody IssueShareLinkVisitRecordDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
issueShareLinkVisitRecordService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody IssueShareLinkVisitRecordDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
issueShareLinkVisitRecordService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
issueShareLinkVisitRecordService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* @Description 检查邀请关系,如果确实存在邀请关系则返回邀请人Id |
|||
* 符合条件: |
|||
* ① 链接Id对应 |
|||
* ② 邀请人Id对应 |
|||
* ③ 邀请人在被邀请时的状态为陌生人 |
|||
* @param param |
|||
* @return com.epmet.commons.tools.utils.Result<java.lang.String> |
|||
* @author wangc |
|||
* @date 2020.12.18 14:53 |
|||
*/ |
|||
@PostMapping("checkinviterelationship") |
|||
public Result<String> checkInviteRelationship(@RequestBody SharableIssueAndInviteeFormDTO param){ |
|||
ValidatorUtils.validateEntity(param); |
|||
return new Result<String>().ok(issueShareLinkVisitRecordService.checkInviteRelationship(param)); |
|||
} |
|||
|
|||
/** |
|||
* @Description 通过链接Id查询分享人和被邀请人的信息 |
|||
* @param |
|||
* @return |
|||
* @author wangc |
|||
* @date 2020.12.21 16:27 |
|||
*/ |
|||
@PostMapping("visitrecord") |
|||
public Result<IssueShareLinkVisitRecordDTO> visitRecord(@RequestParam("linkId")String linkId,@RequestParam("invitee")String invitee){ |
|||
return new Result<IssueShareLinkVisitRecordDTO>().ok(issueShareLinkVisitRecordService.getVisitRecord(linkId,invitee)); |
|||
} |
|||
} |
@ -0,0 +1,51 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.IssueShareLinkRecordEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
/** |
|||
* 议题分享链接表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-12-18 |
|||
*/ |
|||
@Mapper |
|||
public interface IssueShareLinkRecordDao extends BaseDao<IssueShareLinkRecordEntity> { |
|||
|
|||
/** |
|||
* @Description 校验此人此议题是否存在分享记录 |
|||
* @Param issueId |
|||
* @Param userId |
|||
* @author zxc |
|||
* @date 2020/12/18 下午1:47 |
|||
*/ |
|||
String checkIssueRecord(@Param("issueId") String issueId, @Param("userId") String userId); |
|||
|
|||
/** |
|||
* @Description 根据issueId查询议题信息 |
|||
* @Param issueId |
|||
* @author zxc |
|||
* @date 2020/12/18 下午1:55 |
|||
*/ |
|||
IssueShareLinkRecordEntity selectIssueInfoById(@Param("issueId") String issueId); |
|||
|
|||
} |
@ -0,0 +1,65 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.dto.IssueShareLinkVisitRecordDTO; |
|||
import com.epmet.entity.IssueShareLinkVisitRecordEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 议题分享链接访问记录表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-12-18 |
|||
*/ |
|||
@Mapper |
|||
public interface IssueShareLinkVisitRecordDao extends BaseDao<IssueShareLinkVisitRecordEntity> { |
|||
|
|||
/** |
|||
* @Description 根据邀请Id和邀请人Id查询邀请人的Id |
|||
* @param linkId |
|||
* @param invitee |
|||
* @return java.lang.String |
|||
* @author wangc |
|||
* @date 2020.12.18 15:50 |
|||
*/ |
|||
String selectInviterIdByLinkIdAndInvitee(@Param("linkId") String linkId, @Param("invitee") String invitee); |
|||
|
|||
/** |
|||
* @Description 修改是否通过链接注册居民由0改为1 |
|||
* @param linkId |
|||
* @param invitee |
|||
* @return int |
|||
* @author wangc |
|||
* @date 2020.12.18 15:50 |
|||
*/ |
|||
int updateInviteRegister(@Param("linkId") String linkId, @Param("invitee") String invitee); |
|||
|
|||
/** |
|||
* @Description 根据邀请Id和被邀请人Id查询查询链接浏览记录 |
|||
* @param |
|||
* @return com.epmet.dto.IssueShareLinkVisitRecordDTO |
|||
* @author wangc |
|||
* @date 2020.12.22 09:53 |
|||
*/ |
|||
IssueShareLinkVisitRecordDTO selectRecordByLinkIdAndInvitee(@Param("linkId") String linkId, @Param("invitee") String invitee); |
|||
} |
@ -0,0 +1,70 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableField; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
/** |
|||
* 议题分享链接表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-12-18 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("issue_share_link_record") |
|||
public class IssueShareLinkRecordEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 议题所属网格ID |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 议题ID |
|||
*/ |
|||
private String issueId; |
|||
|
|||
/** |
|||
* 分享人(当前用户id) |
|||
*/ |
|||
private String shareUserId; |
|||
|
|||
/** |
|||
* 邀请内容 |
|||
*/ |
|||
private String inviteContent; |
|||
|
|||
/** |
|||
* 话题ID |
|||
*/ |
|||
@TableField(exist = false) |
|||
private String topicId; |
|||
|
|||
} |
@ -0,0 +1,70 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 议题分享链接访问记录表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-12-18 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("issue_share_link_visit_record") |
|||
public class IssueShareLinkVisitRecordEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 分享人【邀请人】ID |
|||
*/ |
|||
private String shareUserId; |
|||
|
|||
/** |
|||
* 被邀请人ID |
|||
*/ |
|||
private String inviteeUserId; |
|||
|
|||
/** |
|||
* 议题分享链接表.id |
|||
*/ |
|||
private String shareLinkRecId; |
|||
|
|||
/** |
|||
* 是否邀请注册:0:是,1:不是 |
|||
*/ |
|||
private Integer isInviteRegister; |
|||
|
|||
/** |
|||
* 是否同意进组,1是0否,在注册完居民之后,是否同意入组,如果同意发送入组申请,不同意此项默认为0 |
|||
*/ |
|||
private Boolean ifJoinGroup; |
|||
} |
@ -0,0 +1,118 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.dto.IssueShareLinkRecordDTO; |
|||
import com.epmet.dto.form.IssueCreateUrlFormDTO; |
|||
import com.epmet.dto.form.IssueVisitFormDTO; |
|||
import com.epmet.dto.result.IssueCreateUrlResultDTO; |
|||
import com.epmet.dto.result.IssueVisitResultDTO; |
|||
import com.epmet.entity.IssueShareLinkRecordEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 议题分享链接表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-12-18 |
|||
*/ |
|||
public interface IssueShareLinkRecordService extends BaseService<IssueShareLinkRecordEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<IssueShareLinkRecordDTO> |
|||
* @author generator |
|||
* @date 2020-12-18 |
|||
*/ |
|||
PageData<IssueShareLinkRecordDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<IssueShareLinkRecordDTO> |
|||
* @author generator |
|||
* @date 2020-12-18 |
|||
*/ |
|||
List<IssueShareLinkRecordDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return IssueShareLinkRecordDTO |
|||
* @author generator |
|||
* @date 2020-12-18 |
|||
*/ |
|||
IssueShareLinkRecordDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-12-18 |
|||
*/ |
|||
void save(IssueShareLinkRecordDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-12-18 |
|||
*/ |
|||
void update(IssueShareLinkRecordDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-12-18 |
|||
*/ |
|||
void delete(String[] ids); |
|||
|
|||
/** |
|||
* @Description 议题分享链接ID |
|||
* @Param formDTO |
|||
* @Param tokenDto |
|||
* @author zxc |
|||
* @date 2020/12/18 下午1:36 |
|||
*/ |
|||
IssueCreateUrlResultDTO getIssueShareLinkId(IssueCreateUrlFormDTO formDTO, TokenDto tokenDto); |
|||
|
|||
/** |
|||
* @Description 分享议题id获取信息 |
|||
* @Param formDTO |
|||
* @Param tokenDto |
|||
* @author zxc |
|||
* @date 2020/12/18 下午5:22 |
|||
*/ |
|||
IssueVisitResultDTO issueVisit( IssueVisitFormDTO formDTO, TokenDto tokenDto); |
|||
} |
@ -0,0 +1,113 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.dto.IssueShareLinkVisitRecordDTO; |
|||
import com.epmet.dto.form.SharableIssueAndInviteeFormDTO; |
|||
import com.epmet.entity.IssueShareLinkVisitRecordEntity; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 议题分享链接访问记录表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-12-18 |
|||
*/ |
|||
public interface IssueShareLinkVisitRecordService extends BaseService<IssueShareLinkVisitRecordEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<IssueShareLinkVisitRecordDTO> |
|||
* @author generator |
|||
* @date 2020-12-18 |
|||
*/ |
|||
PageData<IssueShareLinkVisitRecordDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<IssueShareLinkVisitRecordDTO> |
|||
* @author generator |
|||
* @date 2020-12-18 |
|||
*/ |
|||
List<IssueShareLinkVisitRecordDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return IssueShareLinkVisitRecordDTO |
|||
* @author generator |
|||
* @date 2020-12-18 |
|||
*/ |
|||
IssueShareLinkVisitRecordDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-12-18 |
|||
*/ |
|||
void save(IssueShareLinkVisitRecordDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-12-18 |
|||
*/ |
|||
void update(IssueShareLinkVisitRecordDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-12-18 |
|||
*/ |
|||
void delete(String[] ids); |
|||
|
|||
/** |
|||
* @Description |
|||
* @param param |
|||
* @return java.lang.String |
|||
* @author wangc |
|||
* @date 2020.12.18 15:24 |
|||
*/ |
|||
String checkInviteRelationship(SharableIssueAndInviteeFormDTO param); |
|||
|
|||
/** |
|||
* @Description 通过链接Id查询分享人和被邀请人的信息 |
|||
* @param |
|||
* @return |
|||
* @author wangc |
|||
* @date 2020.12.21 16:27 |
|||
*/ |
|||
IssueShareLinkVisitRecordDTO getVisitRecord(String linkId,String invitee); |
|||
} |
@ -0,0 +1,167 @@ |
|||
package com.epmet.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.commons.tools.constant.NumConstant; |
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.constant.IssueShareConstant; |
|||
import com.epmet.dao.IssueShareLinkRecordDao; |
|||
import com.epmet.dao.IssueShareLinkVisitRecordDao; |
|||
import com.epmet.dto.IssueShareLinkRecordDTO; |
|||
import com.epmet.dto.form.IssueCreateUrlFormDTO; |
|||
import com.epmet.dto.form.IssueVisitFormDTO; |
|||
import com.epmet.dto.result.IssueCreateUrlResultDTO; |
|||
import com.epmet.dto.result.IssueVisitResultDTO; |
|||
import com.epmet.entity.IssueShareLinkRecordEntity; |
|||
import com.epmet.entity.IssueShareLinkVisitRecordEntity; |
|||
import com.epmet.resi.group.dto.topic.form.TopicBelongGroupFormDTO; |
|||
import com.epmet.resi.group.dto.topic.result.TopicBelongGroupResultDTO; |
|||
import com.epmet.resi.group.feign.ResiGroupOpenFeignClient; |
|||
import com.epmet.service.IssueShareLinkRecordService; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 议题分享链接表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-12-18 |
|||
*/ |
|||
@Service |
|||
public class IssueShareLinkRecordServiceImpl extends BaseServiceImpl<IssueShareLinkRecordDao, IssueShareLinkRecordEntity> implements IssueShareLinkRecordService { |
|||
|
|||
@Autowired |
|||
private ResiGroupOpenFeignClient resiGroupOpenFeignClient; |
|||
@Autowired |
|||
private IssueShareLinkVisitRecordDao visitRecordDao; |
|||
|
|||
@Override |
|||
public PageData<IssueShareLinkRecordDTO> page(Map<String, Object> params) { |
|||
IPage<IssueShareLinkRecordEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, IssueShareLinkRecordDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<IssueShareLinkRecordDTO> list(Map<String, Object> params) { |
|||
List<IssueShareLinkRecordEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, IssueShareLinkRecordDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<IssueShareLinkRecordEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<IssueShareLinkRecordEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public IssueShareLinkRecordDTO get(String id) { |
|||
IssueShareLinkRecordEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, IssueShareLinkRecordDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(IssueShareLinkRecordDTO dto) { |
|||
IssueShareLinkRecordEntity entity = ConvertUtils.sourceToTarget(dto, IssueShareLinkRecordEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(IssueShareLinkRecordDTO dto) { |
|||
IssueShareLinkRecordEntity entity = ConvertUtils.sourceToTarget(dto, IssueShareLinkRecordEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
/** |
|||
* @Description 议题分享链接ID |
|||
* @Param formDTO |
|||
* @Param tokenDto |
|||
* @author zxc |
|||
* @date 2020/12/18 下午1:36 |
|||
*/ |
|||
@Override |
|||
public IssueCreateUrlResultDTO getIssueShareLinkId(IssueCreateUrlFormDTO formDTO, TokenDto tokenDto) { |
|||
// 校验此人此议题是否存在分享记录
|
|||
String shareLinkId = baseDao.checkIssueRecord(formDTO.getIssueId(), tokenDto.getUserId()); |
|||
if (StringUtils.isNotBlank(shareLinkId)){ |
|||
return new IssueCreateUrlResultDTO(shareLinkId); |
|||
} |
|||
// 查询议题信息
|
|||
IssueShareLinkRecordEntity issueInfo = baseDao.selectIssueInfoById(formDTO.getIssueId()); |
|||
if (null == issueInfo){ |
|||
throw new RenException(IssueShareConstant.NOT_EXIST_ISSUE_INFO); |
|||
} |
|||
TopicBelongGroupFormDTO topicBelongGroupFormDTO = new TopicBelongGroupFormDTO(); |
|||
topicBelongGroupFormDTO.setTopicId(issueInfo.getTopicId()); |
|||
// 查询议题来源所属小组【话题所属小组】
|
|||
Result<TopicBelongGroupResultDTO> topicInfo = resiGroupOpenFeignClient.selectTopicBelongGroup(topicBelongGroupFormDTO); |
|||
if (!topicInfo.success()){ |
|||
throw new RenException(IssueShareConstant.TOPIC_BELONG_GROUP_FAILURE); |
|||
} |
|||
IssueShareLinkRecordEntity entity = new IssueShareLinkRecordEntity(); |
|||
entity.setCustomerId(issueInfo.getCustomerId()); |
|||
if (StringUtils.isBlank(topicInfo.getData().getGroupId())){ |
|||
throw new RenException(IssueShareConstant.TOPIC_BELONG_GROUP_NULL); |
|||
} |
|||
entity.setGridId(topicInfo.getData().getGroupId()); |
|||
entity.setIssueId(formDTO.getIssueId()); |
|||
entity.setShareUserId(tokenDto.getUserId()); |
|||
entity.setInviteContent(null); |
|||
// 插入分享记录
|
|||
baseDao.insert(entity); |
|||
return new IssueCreateUrlResultDTO(entity.getId()); |
|||
} |
|||
|
|||
/** |
|||
* @Description 分享议题id获取信息 |
|||
* @Param formDTO |
|||
* @Param tokenDto |
|||
* @author zxc |
|||
* @date 2020/12/18 下午5:22 |
|||
*/ |
|||
@Override |
|||
public IssueVisitResultDTO issueVisit(IssueVisitFormDTO formDTO, TokenDto tokenDto) { |
|||
// 查询记录信息
|
|||
IssueShareLinkRecordEntity linkRecord = baseDao.selectById(formDTO.getShareLinkId()); |
|||
if (null == linkRecord){ |
|||
throw new RenException(IssueShareConstant.NOT_EXIST_INVITE_ISSUE_RECORD); |
|||
} |
|||
IssueShareLinkVisitRecordEntity entity = new IssueShareLinkVisitRecordEntity(); |
|||
entity.setCustomerId(linkRecord.getCustomerId()); |
|||
entity.setShareUserId(linkRecord.getShareUserId()); |
|||
entity.setInviteeUserId(tokenDto.getUserId()); |
|||
entity.setShareLinkRecId(formDTO.getShareLinkId()); |
|||
entity.setIsInviteRegister(NumConstant.ONE); |
|||
// 插入访问记录
|
|||
visitRecordDao.insert(entity); |
|||
return new IssueVisitResultDTO(linkRecord.getIssueId(),linkRecord.getGridId(),linkRecord.getCustomerId()); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,126 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.dao.IssueShareLinkVisitRecordDao; |
|||
import com.epmet.dto.IssueShareLinkVisitRecordDTO; |
|||
import com.epmet.dto.form.SharableIssueAndInviteeFormDTO; |
|||
import com.epmet.entity.IssueShareLinkVisitRecordEntity; |
|||
import com.epmet.service.IssueShareLinkVisitRecordService; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.HashMap; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 议题分享链接访问记录表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-12-18 |
|||
*/ |
|||
@Service |
|||
public class IssueShareLinkVisitRecordServiceImpl extends BaseServiceImpl<IssueShareLinkVisitRecordDao, IssueShareLinkVisitRecordEntity> implements IssueShareLinkVisitRecordService { |
|||
|
|||
@Override |
|||
public PageData<IssueShareLinkVisitRecordDTO> page(Map<String, Object> params) { |
|||
IPage<IssueShareLinkVisitRecordEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, IssueShareLinkVisitRecordDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<IssueShareLinkVisitRecordDTO> list(Map<String, Object> params) { |
|||
List<IssueShareLinkVisitRecordEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, IssueShareLinkVisitRecordDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<IssueShareLinkVisitRecordEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<IssueShareLinkVisitRecordEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public IssueShareLinkVisitRecordDTO get(String id) { |
|||
IssueShareLinkVisitRecordEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, IssueShareLinkVisitRecordDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(IssueShareLinkVisitRecordDTO dto) { |
|||
IssueShareLinkVisitRecordEntity entity = ConvertUtils.sourceToTarget(dto, IssueShareLinkVisitRecordEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(IssueShareLinkVisitRecordDTO dto) { |
|||
IssueShareLinkVisitRecordEntity entity = ConvertUtils.sourceToTarget(dto, IssueShareLinkVisitRecordEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
/** |
|||
* @Description |
|||
* @param param |
|||
* @return java.lang.String |
|||
* @author wangc |
|||
* @date 2020.12.18 15:18 |
|||
*/ |
|||
@Override |
|||
public String checkInviteRelationship(SharableIssueAndInviteeFormDTO param) { |
|||
String inviterId = baseDao.selectInviterIdByLinkIdAndInvitee(param.getShareLinkId(),param.getInviteeId()); |
|||
if(StringUtils.isNotBlank(inviterId)) baseDao.updateInviteRegister(param.getShareLinkId(),param.getInviteeId()); |
|||
return inviterId; |
|||
} |
|||
|
|||
/** |
|||
* @Description 通过链接Id查询分享人和被邀请人的信息 |
|||
* @param |
|||
* @return |
|||
* @author wangc |
|||
* @date 2020.12.21 16:27 |
|||
*/ |
|||
@Override |
|||
public IssueShareLinkVisitRecordDTO getVisitRecord(String linkId, String invitee) { |
|||
return baseDao.selectRecordByLinkIdAndInvitee(linkId, invitee); |
|||
} |
|||
} |
@ -0,0 +1,39 @@ |
|||
DROP TABLE IF EXISTS `issue_share_link_record`; |
|||
CREATE TABLE `issue_share_link_record` |
|||
( |
|||
`ID` varchar(64) NOT NULL, |
|||
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', |
|||
`GRID_ID` varchar(64) NOT NULL COMMENT '议题所属网格ID', |
|||
`ISSUE_ID` varchar(64) NOT NULL COMMENT '议题ID', |
|||
`SHARE_USER_ID` varchar(64) NOT NULL COMMENT '分享人(当前用户id)', |
|||
`INVITE_CONTENT` varchar(255) DEFAULT NULL COMMENT '邀请内容', |
|||
`DEL_FLAG` int(11) NOT NULL COMMENT '删除状态 0:正常,1:删除', |
|||
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
|||
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', |
|||
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
|||
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
|||
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
|||
PRIMARY KEY (`ID`) |
|||
) ENGINE = InnoDB |
|||
DEFAULT CHARSET = utf8mb4 COMMENT ='议题分享链接表'; |
|||
|
|||
#================================================================================= |
|||
|
|||
DROP TABLE IF EXISTS `issue_share_link_visit_record`; |
|||
CREATE TABLE `issue_share_link_visit_record` |
|||
( |
|||
`ID` varchar(64) NOT NULL, |
|||
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', |
|||
`SHARE_USER_ID` varchar(64) NOT NULL COMMENT '分享人【邀请人】ID', |
|||
`INVITEE_USER_ID` varchar(64) NOT NULL COMMENT '被邀请人ID', |
|||
`SHARE_LINK_REC_ID` varchar(64) NOT NULL COMMENT '议题分享链接表.id', |
|||
`IS_INVITE_REGISTER` int(11) NOT NULL COMMENT '是否邀请注册:0:是,1:不是', |
|||
`DEL_FLAG` int(11) NOT NULL COMMENT '删除状态,0:正常,1:删除', |
|||
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
|||
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', |
|||
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
|||
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
|||
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
|||
PRIMARY KEY (`ID`) |
|||
) ENGINE = InnoDB |
|||
DEFAULT CHARSET = utf8mb4 COMMENT ='议题分享链接访问记录表 '; |
@ -0,0 +1,25 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.epmet.dao.IssueShareLinkRecordDao"> |
|||
|
|||
<!-- 校验此人此议题是否存在分享记录 --> |
|||
<select id="checkIssueRecord" resultType="java.lang.String"> |
|||
SELECT |
|||
ID |
|||
FROM issue_share_link_record |
|||
WHERE DEL_FLAG = 0 |
|||
AND SHARE_USER_ID = #{userId} |
|||
AND ISSUE_ID = #{issueId} |
|||
</select> |
|||
|
|||
<!-- 根据issueId查询议题信息 --> |
|||
<select id="selectIssueInfoById" resultType="com.epmet.entity.IssueShareLinkRecordEntity"> |
|||
SELECT |
|||
CUSTOMER_ID, |
|||
SOURCE_ID AS topicId |
|||
FROM issue |
|||
WHERE DEL_FLAG = 0 |
|||
AND ID = #{issueId} |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,47 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.epmet.dao.IssueShareLinkVisitRecordDao"> |
|||
|
|||
<select id="selectInviterIdByLinkIdAndInvitee" resultType="string"> |
|||
SELECT |
|||
share_user_id |
|||
FROM issue_share_link_visit_record |
|||
WHERE |
|||
del_flag = '0' |
|||
AND |
|||
share_link_rec_id = #{linkId} |
|||
AND |
|||
invitee_user_id = #{invitee} |
|||
AND |
|||
is_invite_register = 1 |
|||
LIMIT 1 |
|||
</select> |
|||
|
|||
<update id="updateInviteRegister"> |
|||
UPDATE |
|||
issue_share_link_visit_record |
|||
SET |
|||
is_invite_register = 0 |
|||
WHERE |
|||
del_flag = '0' |
|||
AND |
|||
share_link_rec_id = #{linkId} |
|||
AND |
|||
invitee_user_id = #{invitee} |
|||
</update> |
|||
|
|||
<select id="selectRecordByLinkIdAndInvitee" |
|||
resultType="com.epmet.dto.IssueShareLinkVisitRecordDTO"> |
|||
SELECT |
|||
* |
|||
FROM issue_share_link_visit_record |
|||
WHERE |
|||
del_flag = '0' |
|||
AND |
|||
share_link_rec_id = #{linkId} |
|||
AND |
|||
invitee_user_id = #{invitee} |
|||
LIMIT 1 |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,15 @@ |
|||
package com.epmet.resi.group.constant; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/12/18 上午10:53 |
|||
*/ |
|||
public interface TopicShareConstant { |
|||
|
|||
String NOT_EXIST_TOPIC_INFO = "未查到该话题信息......"; |
|||
|
|||
String NOT_EXIST_TOPIC_BELONG_GROUP = "未查询到话题所属小组......"; |
|||
|
|||
String NOT_EXIST_INVITE_RECORD = "未查询到该邀请记录......"; |
|||
|
|||
} |
@ -0,0 +1,32 @@ |
|||
package com.epmet.resi.group.dto.member.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description 通过链接入组申请传参DTO |
|||
* @ClassName JoinGroupByShareLinkFormDTO |
|||
* @Auth wangc |
|||
* @Date 2020-12-22 10:34 |
|||
*/ |
|||
@Data |
|||
public class JoinGroupByShareLinkFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -4402483318595770636L; |
|||
|
|||
/** |
|||
* 分享链接Id |
|||
*/ |
|||
@NotBlank(message = "分享链接Id不能为空") |
|||
private String shareLinkId; |
|||
|
|||
/** |
|||
* topic | issue |
|||
*/ |
|||
@NotBlank(message = "链接类型不能为空") |
|||
private String shareLinkType; |
|||
|
|||
@NotBlank(message = "用户Id不能为空") |
|||
private String userId; |
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.epmet.resi.group.dto.member.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description 申请入群实时结果 |
|||
* @ClassName JoinGroupApplyRealTimeResultDTO |
|||
* @Auth wangc |
|||
* @Date 2020-12-22 10:32 |
|||
*/ |
|||
@Data |
|||
public class JoinGroupApplyRealTimeResultDTO implements Serializable { |
|||
private static final long serialVersionUID = 6251288539242747659L; |
|||
|
|||
/** |
|||
* entered(已入组) auditing(审核中) |
|||
*/ |
|||
private String status; |
|||
} |
@ -0,0 +1,97 @@ |
|||
package com.epmet.resi.group.dto.scanapicallback; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 语音检测callBack入参 |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2020/12/10 10:47 |
|||
*/ |
|||
@Data |
|||
public class VoiceScanCallBackContentFormDTO implements Serializable { |
|||
|
|||
/** |
|||
* 错误码,和HTTP状态码一致。 |
|||
* 200:表示检测成功。 |
|||
* 280:表示处理中,需要继续轮询。 |
|||
* 其他:表示任务失败。 |
|||
* 更多信息,请参见公共错误码。 |
|||
* |
|||
* 说明 只有返回280表示任务还在进行,需要继续轮询该任务的检测结果。返回其他值均表示该语音检测任务已结束。如果实际上该语音检测没有结束,而是因为网络异常等原因异常结束,您可以重新提交语音异步检测任务。 |
|||
*/ |
|||
private Integer code; |
|||
|
|||
/** |
|||
* 请求参数的响应信息。 |
|||
*/ |
|||
private String msg; |
|||
|
|||
/** |
|||
* 检测对象对应的数据ID。 |
|||
* 说明 如果在检测请求参数中传入了dataId,则此处返回对应的dataId。 |
|||
*/ |
|||
private String dataId; |
|||
|
|||
/** |
|||
* 该检测任务的ID。 |
|||
*/ |
|||
private String taskId; |
|||
|
|||
/** |
|||
* 检测对象的URL。 |
|||
*/ |
|||
private String url; |
|||
|
|||
/** |
|||
* 检测成功(code=200)时,返回的检测结果。该结果包含一个或多个元素,每个元素是个结构体,对应一个场景。关于每个元素的结构描述,请参见result。 |
|||
*/ |
|||
private List<ResultDTO> results; |
|||
|
|||
|
|||
@Data |
|||
private static class ResultDTO{ |
|||
/** |
|||
* 检测结果的分类。取值: |
|||
* normal:正常文本 |
|||
* spam:含垃圾信息 |
|||
* ad:广告 |
|||
* politics:涉政 |
|||
* terrorism:暴恐 |
|||
* abuse:辱骂 |
|||
* porn:色情 |
|||
* flood:灌水 |
|||
* contraband:违禁 |
|||
* meaningless:无意义 |
|||
* customized:自定义(例如命中自定义关键词) |
|||
*/ |
|||
private String label; |
|||
|
|||
/** |
|||
* 检测场景,和调用请求中的场景对应。唯一取值:antispam。 |
|||
*/ |
|||
private String scene; |
|||
|
|||
/** |
|||
* 建议您执行的后续操作。取值: |
|||
* pass:结果正常,无需进行其余操作。 |
|||
* review:结果不确定,需要进行人工审核。 |
|||
* block:结果违规,建议直接删除或者限制公开。 |
|||
*/ |
|||
private String suggestion; |
|||
|
|||
/** |
|||
* 置信度分数,取值范围:0(表示置信度最低)~100(表示置信度最高)。 |
|||
* 如果suggestion为pass,则置信度越高,表示内容正常的可能性越高;如果suggestion为review或block,则置信度越高,表示内容违规的可能性越高。 |
|||
* 注意 该值仅作为参考,强烈建议您不要在业务中使用。建议您参考suggestion和label(或者部分接口返回的sublabel)结果用于内容违规判定。 |
|||
*/ |
|||
private Float rate; |
|||
//下面还有个details 语音对应的文本详情。每一句文本对应一个元素,包含一个或者多个元素。关于每个元素的结构描述,请参见detail。
|
|||
//暂时不解析了。
|
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,122 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.resi.group.dto.topic; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 话题草稿附件表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-12-17 |
|||
*/ |
|||
@Data |
|||
public class TopicDraftAttachmentDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 附件id |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 话题草稿id |
|||
*/ |
|||
private String topicDraftId; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 附件名(uuid随机生成) |
|||
*/ |
|||
private String attachmentName; |
|||
|
|||
/** |
|||
* 文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS) |
|||
*/ |
|||
private String attachmentFormat; |
|||
|
|||
/** |
|||
* 附件类型((图片 - image、视频 - video、 语音 - voice、 文档 - doc)) |
|||
*/ |
|||
private String attachmentType; |
|||
|
|||
/** |
|||
* 附件地址url |
|||
*/ |
|||
private String attachmentUrl; |
|||
|
|||
/** |
|||
* 排序字段(按附件类型分组排序) |
|||
*/ |
|||
private Integer sort; |
|||
|
|||
/** |
|||
* 附件状态(审核中:auditing; |
|||
auto_passed: 自动通过; |
|||
review:结果不确定,需要人工审核; |
|||
block: 结果违规; |
|||
rejected:人工审核驳回; |
|||
approved:人工审核通过) |
|||
现在图片是同步审核的,所以图片只有auto_passed一种状态 |
|||
*/ |
|||
private String status; |
|||
|
|||
/** |
|||
* 语音或视频时长,秒 |
|||
* */ |
|||
private Integer duration; |
|||
|
|||
/** |
|||
* 删除标记 0:未删除,1:已删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,146 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.resi.group.dto.topic; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 话题草稿内容表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-12-17 |
|||
*/ |
|||
@Data |
|||
public class TopicDraftDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 话题草稿id |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 网格ID |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 小组Id |
|||
*/ |
|||
private String groupId; |
|||
|
|||
/** |
|||
* 话题内容 |
|||
*/ |
|||
private String topicContent; |
|||
|
|||
/** |
|||
* 话题草稿状态(审核中:auditing; |
|||
auto_passed: 自动通过; |
|||
review:结果不确定,需要人工审核; |
|||
block: 结果违规; |
|||
rejected:人工审核驳回; |
|||
approved:人工审核通过) |
|||
*/ |
|||
private String draftStatus; |
|||
|
|||
/** |
|||
* 草稿审核理由 |
|||
*/ |
|||
private String draftReason; |
|||
|
|||
/** |
|||
* 省 |
|||
*/ |
|||
private String province; |
|||
|
|||
/** |
|||
* 市 |
|||
*/ |
|||
private String city; |
|||
|
|||
/** |
|||
* 区 |
|||
*/ |
|||
private String area; |
|||
|
|||
/** |
|||
* 地址 |
|||
*/ |
|||
private String address; |
|||
|
|||
/** |
|||
* 经度 |
|||
*/ |
|||
private String longitude; |
|||
|
|||
/** |
|||
* 维度 |
|||
*/ |
|||
private String dimension; |
|||
|
|||
/** |
|||
* 发布成功后的话题id |
|||
*/ |
|||
private String topicId; |
|||
|
|||
/** |
|||
* 创建者是否可见(0是 1否) |
|||
*/ |
|||
private String isSee; |
|||
|
|||
/** |
|||
* 删除标记 0:未删除,1:已删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 话题发布人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,96 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.resi.group.dto.topic; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 话题草稿操作日志表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-12-17 |
|||
*/ |
|||
@Data |
|||
public class TopicDraftOperationDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 话题草稿操作日志id |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 话题草稿id |
|||
*/ |
|||
private String topicDraftId; |
|||
|
|||
/** |
|||
* 操作类型:submit:提交发布; |
|||
auto_passed: 自动审核-通过; |
|||
review:自动审核-结果不确定,需要人工审核; |
|||
block: 自动审核-结果违规; |
|||
rejected:人工审核驳回; |
|||
approved:人工审核通过 |
|||
*/ |
|||
private String operateType; |
|||
|
|||
/** |
|||
* 操作时的备注,比如驳回理由 |
|||
*/ |
|||
private String remark; |
|||
|
|||
/** |
|||
* 删除标记 0:未删除,1:已删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 操作人,API审核结果,存储为SCAN_USER或者APP_USER |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,104 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.resi.group.dto.topic; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 话题附件检测任务表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-12-18 |
|||
*/ |
|||
@Data |
|||
public class TopicDraftScanTaskDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 话题草稿Id |
|||
*/ |
|||
private String topicDraftId; |
|||
|
|||
/** |
|||
* 话题草稿附件表Id,对应dataId |
|||
*/ |
|||
private String topicDraftAttachmentId; |
|||
|
|||
/** |
|||
* 阿里云审核任务Id |
|||
*/ |
|||
private String taskId; |
|||
|
|||
/** |
|||
* 审核状态【auditing: 审核中; |
|||
auto_passed: 自动通过; |
|||
review:结果不确定,需要人工审核; |
|||
block: 结果违规;】 |
|||
*/ |
|||
private String status; |
|||
|
|||
/** |
|||
* 附件类型(视频 - video、 语音 - voice) |
|||
*/ |
|||
private String attachmentType; |
|||
|
|||
/** |
|||
* 删除标记 0:未删除,1:已删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 操作人,API审核结果,存储为SCAN_USER或者APP_USER |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,102 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.resi.group.dto.topic; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 话题分享链接表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-12-18 |
|||
*/ |
|||
@Data |
|||
public class TopicShareLinkRecordDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 邀请ID |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 话题所属网格ID |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 小组ID |
|||
*/ |
|||
private String groupId; |
|||
|
|||
/** |
|||
* 话题ID |
|||
*/ |
|||
private String topicId; |
|||
|
|||
/** |
|||
* 分享人ID(当前登录用户) |
|||
*/ |
|||
private String shareUserId; |
|||
|
|||
/** |
|||
* 邀请内容 |
|||
*/ |
|||
private String inviteContent; |
|||
|
|||
/** |
|||
* 删除状态 0:正常,1:删除 |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,96 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.resi.group.dto.topic; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 话题分享链接访问记录表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-12-18 |
|||
*/ |
|||
@Data |
|||
public class TopicShareLinkVisitRecordDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 分享人【邀请人】ID |
|||
*/ |
|||
private String shareUserId; |
|||
|
|||
/** |
|||
* 被邀请人ID |
|||
*/ |
|||
private String inviteeUserId; |
|||
|
|||
/** |
|||
* 话题分享链接表id |
|||
*/ |
|||
private String shareLinkRecId; |
|||
|
|||
/** |
|||
* 是否邀请注册:0:是,1:不是 |
|||
*/ |
|||
private Integer isInviteRegister; |
|||
|
|||
/** |
|||
* 删除状态,0:正常,1:删除 |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,33 @@ |
|||
package com.epmet.resi.group.dto.topic.form; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/12/18 15:03 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class AuditDraftTopicFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -4766725540339231386L; |
|||
/** |
|||
* 草稿话题Id |
|||
*/ |
|||
@NotBlank(message = "话题id不能为空") |
|||
private String topicDraftId; |
|||
/** |
|||
* 审核状态(通过:approved 驳回:rejected) |
|||
*/ |
|||
@NotBlank(message = "审核状态不能为空") |
|||
private String auditType; |
|||
/** |
|||
* 审核原因 |
|||
*/ |
|||
private String reason; |
|||
} |
@ -0,0 +1,78 @@ |
|||
package com.epmet.resi.group.dto.topic.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/12/17 15:08 |
|||
*/ |
|||
@Data |
|||
public class CreateTopicFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
private String customerId; |
|||
|
|||
private String gridId; |
|||
/** |
|||
* 小组Id |
|||
* */ |
|||
@NotBlank(message = "小组Id不能为空") |
|||
private String groupId; |
|||
|
|||
private String topicDraftId; |
|||
|
|||
private String topicContent; |
|||
|
|||
/** |
|||
* 经度 |
|||
* */ |
|||
private String longitude; |
|||
|
|||
/** |
|||
* 纬度 |
|||
* */ |
|||
private String dimension; |
|||
|
|||
/** |
|||
* 地址 |
|||
* */ |
|||
@NotBlank(message = "地址信息不能为空") |
|||
private String address; |
|||
|
|||
/** |
|||
* 省份 |
|||
* */ |
|||
private String province; |
|||
|
|||
/** |
|||
* 城市 |
|||
* */ |
|||
private String city; |
|||
|
|||
/** |
|||
* 地区 |
|||
* */ |
|||
private String area; |
|||
|
|||
/** |
|||
* 图片附件 |
|||
*/ |
|||
private List<String> imageList; |
|||
/** |
|||
* 文件附件 |
|||
*/ |
|||
private List<String> docList; |
|||
/** |
|||
* 语音附件 |
|||
*/ |
|||
private List<String> voiceList; |
|||
/** |
|||
* 视频附件 |
|||
*/ |
|||
private List<String> videoList; |
|||
} |
@ -0,0 +1,24 @@ |
|||
package com.epmet.resi.group.dto.topic.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/12/18 上午10:02 |
|||
*/ |
|||
@Data |
|||
public class CreateUrlFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -7661839148530902018L; |
|||
|
|||
public interface CreateUrlForm{} |
|||
|
|||
/** |
|||
* 话题ID |
|||
*/ |
|||
@NotBlank(message = "话题ID不能为空",groups = {CreateUrlForm.class}) |
|||
private String topicId; |
|||
} |
@ -0,0 +1,18 @@ |
|||
package com.epmet.resi.group.dto.topic.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/12/18 14:53 |
|||
*/ |
|||
@Data |
|||
public class DraftDetailFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -240658534604688292L; |
|||
@NotBlank(message = "话题id不能为空") |
|||
private String topicDraftId; |
|||
} |
@ -0,0 +1,37 @@ |
|||
package com.epmet.resi.group.dto.topic.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.Min; |
|||
import javax.validation.constraints.NotBlank; |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 个人中心-我发表的话题-审核中列表-接口入参 |
|||
*/ |
|||
@Data |
|||
public class MyAuditingListFormDTO { |
|||
|
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
@NotBlank(message = "客户ID不能为空",groups = {MyAuditingListFormDTO.AuditingTopicForm.class}) |
|||
private String customerId; |
|||
/** |
|||
* 页码,从1开始 |
|||
*/ |
|||
@Min(value = 1, message = "页码必须大于0", groups = { MyAuditingListFormDTO.AuditingTopicForm.class }) |
|||
private Integer pageNo; |
|||
/** |
|||
* 页容量,默认10页 |
|||
*/ |
|||
@Min(value = 1, message = "每页条数必须大于0", groups = { MyAuditingListFormDTO.AuditingTopicForm.class }) |
|||
private Integer pageSize; |
|||
/** |
|||
* token中用户Id |
|||
*/ |
|||
private String userId; |
|||
|
|||
public interface AuditingTopicForm{} |
|||
|
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.epmet.resi.group.dto.topic.form; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/12/18 14:44 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class MyAuditingTopicFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 9154103669944393282L; |
|||
private String customerId; |
|||
private String userId; |
|||
private Integer pageNo = 1; |
|||
private Integer pageSize = 20; |
|||
} |
@ -0,0 +1,27 @@ |
|||
package com.epmet.resi.group.dto.topic.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description 话题分享链接和被邀请人入参Dto |
|||
* @ClassName SharableTopicAndInviteeFormDTO |
|||
* @Auth wangc |
|||
* @Date 2020-12-18 13:43 |
|||
*/ |
|||
@Data |
|||
public class SharableTopicAndInviteeFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 4943940805360726855L; |
|||
|
|||
/** |
|||
* 话题分享链接 |
|||
*/ |
|||
private String shareLinkId; |
|||
|
|||
/** |
|||
* 通过链接进入话题页面用户的Id |
|||
*/ |
|||
private String inviteeId; |
|||
} |
@ -0,0 +1,23 @@ |
|||
package com.epmet.resi.group.dto.topic.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 获取话题附件信息-接口入参 |
|||
*/ |
|||
@Data |
|||
public class TopicAttachmentFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -7661839148530902018L; |
|||
/** |
|||
* 话题ID |
|||
*/ |
|||
@NotBlank(message = "话题ID不能为空",groups = {TopicForm.class}) |
|||
private String topicId; |
|||
|
|||
public interface TopicForm{} |
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.epmet.resi.group.dto.topic.form; |
|||
|
|||
import com.epmet.commons.tools.dto.form.PageFormDTO; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/12/18 14:22 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class TopicAuditFormDTO extends PageFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 2013373278734345918L; |
|||
/** |
|||
* 小组ID |
|||
*/ |
|||
@NotBlank(message = "小组id不能为空") |
|||
private String groupId; |
|||
/** |
|||
* 审核状态(待审核:review 已驳回:rejected) |
|||
*/ |
|||
@NotBlank(message = "审核状态不能为空") |
|||
private String status; |
|||
} |
@ -0,0 +1,17 @@ |
|||
package com.epmet.resi.group.dto.topic.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/12/18 下午2:06 |
|||
*/ |
|||
@Data |
|||
public class TopicBelongGroupFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -1257699096393262959L; |
|||
|
|||
private String topicId; |
|||
} |
@ -0,0 +1,24 @@ |
|||
package com.epmet.resi.group.dto.topic.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/12/18 下午3:12 |
|||
*/ |
|||
@Data |
|||
public class TopicVisitFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -7231684507046042401L; |
|||
|
|||
public interface TopicVisitForm{} |
|||
|
|||
/** |
|||
* 分享ID |
|||
*/ |
|||
@NotBlank(message = "分享ID不能为空",groups = {TopicVisitForm.class}) |
|||
private String shareLinkId; |
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.epmet.resi.group.dto.topic.result; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/12/18 上午10:01 |
|||
*/ |
|||
@Data |
|||
@AllArgsConstructor |
|||
public class CreateUrlResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -8606257390921799432L; |
|||
|
|||
/** |
|||
* 分享链接ID |
|||
*/ |
|||
private String shareLinkId; |
|||
} |
@ -0,0 +1,59 @@ |
|||
package com.epmet.resi.group.dto.topic.result; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/12/18 14:50 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class DraftDetailResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -7445417689558651158L; |
|||
/** |
|||
* 话题草稿id |
|||
*/ |
|||
private String topicDraftId; |
|||
/** |
|||
* 话题内容 |
|||
*/ |
|||
private String topicContent; |
|||
/** |
|||
* 发布时间yyyy-MM-dd HH:mm |
|||
*/ |
|||
private String releaseTime; |
|||
/** |
|||
* 发布人头像 |
|||
*/ |
|||
private String releaseUserHeadPhoto; |
|||
/** |
|||
* 发布人名称 |
|||
*/ |
|||
private String releaseUserName; |
|||
/** |
|||
* 发布地址 |
|||
*/ |
|||
private String releaseAddress; |
|||
/** |
|||
* 驳回理由 |
|||
*/ |
|||
private String reason; |
|||
private String status; |
|||
private String topicId; |
|||
/** |
|||
* 图片附件集合 |
|||
*/ |
|||
private List<String> imageList; |
|||
private List<String> docList; |
|||
/** |
|||
* 音频附件集合 |
|||
*/ |
|||
private List<String> voiceList; |
|||
private List<String> videoList; |
|||
} |
@ -0,0 +1,49 @@ |
|||
package com.epmet.resi.group.dto.topic.result; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 个人中心-我发表的话题-审核中列表-接口返参 |
|||
*/ |
|||
@Data |
|||
public class MyAuditingListResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -703102629653169023L; |
|||
|
|||
/** |
|||
* 话题草稿id |
|||
*/ |
|||
private String topicDraftId; |
|||
|
|||
/** |
|||
* 话题来源网格名称 |
|||
*/ |
|||
private String releaseGridName; |
|||
@JsonIgnore |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 发布时间戳 |
|||
*/ |
|||
private Long releaseTime; |
|||
|
|||
/** |
|||
* 话题内容 |
|||
*/ |
|||
private String topicContent; |
|||
|
|||
/** |
|||
* 小组名称 |
|||
*/ |
|||
private String releaseGroupName; |
|||
|
|||
/** |
|||
* 状态 |
|||
*/ |
|||
private String status; |
|||
|
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.epmet.resi.group.dto.topic.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/12/18 14:41 |
|||
*/ |
|||
@Data |
|||
public class MyAuditingTopicResultDTO implements Serializable { |
|||
private static final long serialVersionUID = -2876904175308968430L; |
|||
private String topicDraftId; |
|||
private String groupId; |
|||
private Long releaseTime; |
|||
private String topicContent; |
|||
private String releaseGroupName; |
|||
private String releaseGridId; |
|||
private String releaseGridName; |
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.epmet.resi.group.dto.topic.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.LinkedList; |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 获取话题附件信息-接口返参 |
|||
*/ |
|||
@Data |
|||
public class TopicAttachmentResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -8606257390921799432L; |
|||
|
|||
/** |
|||
* 文件附件Url集合 |
|||
*/ |
|||
private LinkedList<String> docList; |
|||
/** |
|||
* 语音附件Url集合 |
|||
*/ |
|||
private LinkedList<String> voiceList; |
|||
/** |
|||
* 视频附件Url集合 |
|||
*/ |
|||
private LinkedList<String> videoList; |
|||
|
|||
} |
@ -0,0 +1,31 @@ |
|||
package com.epmet.resi.group.dto.topic.result; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/12/18 14:28 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class TopicAuditResultDTO { |
|||
|
|||
/** |
|||
* 话题草稿id |
|||
*/ |
|||
private String topicDraftId; |
|||
/** |
|||
* 话题内容 |
|||
*/ |
|||
private String topicContent; |
|||
/** |
|||
* 组成员显示名称 |
|||
*/ |
|||
private String userName; |
|||
/** |
|||
* 话题草稿的发布时间戳 |
|||
*/ |
|||
private Long releaseTime; |
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.epmet.resi.group.dto.topic.result; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/12/18 下午2:12 |
|||
*/ |
|||
@Data |
|||
@AllArgsConstructor |
|||
@NoArgsConstructor |
|||
public class TopicBelongGroupResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 8180287697221964032L; |
|||
|
|||
private String groupId; |
|||
} |
@ -0,0 +1,50 @@ |
|||
package com.epmet.resi.group.dto.topic.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/12/18 下午3:15 |
|||
*/ |
|||
@Data |
|||
public class TopicVisitResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -8053248999188056579L; |
|||
|
|||
/** |
|||
* 是否存在入组待审核记录,true:存在,false:不存在 |
|||
*/ |
|||
private Boolean awaitAudit; |
|||
|
|||
/** |
|||
* 是否在群内标志,已经在群内:true, 不在群内:false |
|||
*/ |
|||
private Boolean inGroup; |
|||
|
|||
/** |
|||
* 小组ID |
|||
*/ |
|||
private String groupId; |
|||
|
|||
/** |
|||
* 网格ID |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 话题ID |
|||
*/ |
|||
private String topicId; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 话题屏蔽状态,true:已屏蔽,false:未屏蔽 |
|||
*/ |
|||
private Boolean shieldStatus; |
|||
} |
@ -0,0 +1,183 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.modules.topic.controller; |
|||
|
|||
import com.epmet.commons.tools.annotation.LoginUser; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.ExcelUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.AssertUtils; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.commons.tools.validator.group.AddGroup; |
|||
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|||
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|||
import com.epmet.modules.topic.excel.TopicDraftExcel; |
|||
import com.epmet.modules.topic.service.TopicDraftService; |
|||
import com.epmet.resi.group.dto.topic.TopicDraftDTO; |
|||
import com.epmet.resi.group.dto.topic.form.*; |
|||
import com.epmet.resi.group.dto.topic.result.DraftDetailResultDTO; |
|||
import com.epmet.resi.group.dto.topic.result.MyAuditingListResultDTO; |
|||
import com.epmet.resi.group.dto.topic.result.TopicAuditResultDTO; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 话题草稿内容表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-12-17 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("topicdraft") |
|||
public class TopicDraftController { |
|||
|
|||
@Autowired |
|||
private TopicDraftService topicDraftService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<TopicDraftDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<TopicDraftDTO> page = topicDraftService.page(params); |
|||
return new Result<PageData<TopicDraftDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<TopicDraftDTO> get(@PathVariable("id") String id){ |
|||
TopicDraftDTO data = topicDraftService.get(id); |
|||
return new Result<TopicDraftDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody TopicDraftDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
topicDraftService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody TopicDraftDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
topicDraftService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
topicDraftService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<TopicDraftDTO> list = topicDraftService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, TopicDraftExcel.class); |
|||
} |
|||
|
|||
/** |
|||
* 发布话题 |
|||
* @author zhaoqifeng |
|||
* @date 2020/12/17 15:49 |
|||
* @param tokenDto |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
*/ |
|||
@PostMapping("createtopic") |
|||
public Result createTopic(@LoginUser TokenDto tokenDto, @RequestBody CreateTopicFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO); |
|||
topicDraftService.createTopic(tokenDto, formDTO); |
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* 组管理界面-待审核/已驳回列表 |
|||
* @author zhaoqifeng |
|||
* @date 2020/12/18 14:32 |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result<com.epmet.resi.group.dto.topic.result.TopicAuditResultDTO> |
|||
*/ |
|||
@PostMapping("auditlist") |
|||
public Result<List<TopicAuditResultDTO>> auditList(@RequestBody TopicAuditFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO); |
|||
List<TopicAuditResultDTO> result = topicDraftService.auditList(formDTO); |
|||
return new Result<List<TopicAuditResultDTO>>().ok(result); |
|||
} |
|||
|
|||
/** |
|||
* 话题草稿详情 |
|||
* @author zhaoqifeng |
|||
* @date 2020/12/18 14:55 |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result<com.epmet.resi.group.dto.topic.result.DraftDetailResultDTO> |
|||
*/ |
|||
@PostMapping("detail") |
|||
public Result<DraftDetailResultDTO> detail(@RequestBody DraftDetailFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO); |
|||
DraftDetailResultDTO result = topicDraftService.detail(formDTO); |
|||
return new Result<DraftDetailResultDTO>().ok(result); |
|||
} |
|||
|
|||
/** |
|||
* 删除已驳回话题 |
|||
* @author zhaoqifeng |
|||
* @date 2020/12/18 14:57 |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
*/ |
|||
@PostMapping("del") |
|||
public Result deleteDraft(@RequestBody DraftDetailFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO); |
|||
topicDraftService.deleteDraft(formDTO); |
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* 组长审核 |
|||
* @author zhaoqifeng |
|||
* @date 2020/12/18 15:06 |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
*/ |
|||
@PostMapping("audit") |
|||
public Result audit(@LoginUser TokenDto tokenDto, @RequestBody AuditDraftTopicFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO); |
|||
topicDraftService.audit(tokenDto, formDTO); |
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @return |
|||
* @Author sun |
|||
* @Description 个人中心-我发表的话题-审核中列表 |
|||
**/ |
|||
@PostMapping(value = "myauditinglist") |
|||
public Result<List<MyAuditingListResultDTO>> myAuditingList(@LoginUser TokenDto tokenDto, @RequestBody MyAuditingListFormDTO formDTO){ |
|||
ValidatorUtils.validateEntity(formDTO, MyAuditingListFormDTO.AuditingTopicForm.class); |
|||
formDTO.setUserId(tokenDto.getUserId()); |
|||
return new Result<List<MyAuditingListResultDTO>>().ok(topicDraftService.myAuditingList(formDTO)); |
|||
} |
|||
} |
@ -0,0 +1,111 @@ |
|||
package com.epmet.modules.topic.controller; |
|||
|
|||
import com.epmet.commons.tools.annotation.LoginUser; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.AssertUtils; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.commons.tools.validator.group.AddGroup; |
|||
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|||
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|||
import com.epmet.modules.topic.service.TopicShareLinkRecordService; |
|||
import com.epmet.resi.group.dto.topic.TopicShareLinkRecordDTO; |
|||
import com.epmet.resi.group.dto.topic.form.CreateUrlFormDTO; |
|||
import com.epmet.resi.group.dto.topic.form.TopicBelongGroupFormDTO; |
|||
import com.epmet.resi.group.dto.topic.form.TopicVisitFormDTO; |
|||
import com.epmet.resi.group.dto.topic.result.CreateUrlResultDTO; |
|||
import com.epmet.resi.group.dto.topic.result.TopicBelongGroupResultDTO; |
|||
import com.epmet.resi.group.dto.topic.result.TopicVisitResultDTO; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 话题分享链接表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-12-18 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("topicsharelink") |
|||
public class TopicShareLinkRecordController { |
|||
|
|||
@Autowired |
|||
private TopicShareLinkRecordService topicShareLinkRecordService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<TopicShareLinkRecordDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<TopicShareLinkRecordDTO> page = topicShareLinkRecordService.page(params); |
|||
return new Result<PageData<TopicShareLinkRecordDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<TopicShareLinkRecordDTO> get(@PathVariable("id") String id){ |
|||
TopicShareLinkRecordDTO data = topicShareLinkRecordService.get(id); |
|||
return new Result<TopicShareLinkRecordDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody TopicShareLinkRecordDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
topicShareLinkRecordService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody TopicShareLinkRecordDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
topicShareLinkRecordService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
topicShareLinkRecordService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* @Description 分享话题邀请ID |
|||
* @Param createUrlFormDTO |
|||
* @author zxc |
|||
* @date 2020/12/18 上午10:14 |
|||
*/ |
|||
@PostMapping("createurl") |
|||
public Result<CreateUrlResultDTO> getCreateUrlId(@RequestBody CreateUrlFormDTO createUrlFormDTO, @LoginUser TokenDto tokenDto){ |
|||
ValidatorUtils.validateEntity(createUrlFormDTO, CreateUrlFormDTO.CreateUrlForm.class); |
|||
return new Result<CreateUrlResultDTO>().ok(topicShareLinkRecordService.getCreateUrlId(createUrlFormDTO,tokenDto)); |
|||
} |
|||
|
|||
/** |
|||
* @Description 查询话题所属小组 |
|||
* @Param formDTO |
|||
* @author zxc |
|||
* @date 2020/12/18 下午2:08 |
|||
*/ |
|||
@PostMapping("topicbelonggroup") |
|||
public Result<TopicBelongGroupResultDTO> selectTopicBelongGroup(@RequestBody TopicBelongGroupFormDTO formDTO){ |
|||
return new Result<TopicBelongGroupResultDTO>().ok(topicShareLinkRecordService.selectTopicBelongGroup(formDTO)); |
|||
} |
|||
|
|||
/** |
|||
* @Description 分享话题id获取信息 |
|||
* @Param formDTO |
|||
* @Param tokenDto |
|||
* @author zxc |
|||
* @date 2020/12/18 下午3:34 |
|||
*/ |
|||
@PostMapping("visit") |
|||
public Result<TopicVisitResultDTO> topicVisit(@RequestBody TopicVisitFormDTO formDTO,@LoginUser TokenDto tokenDto){ |
|||
ValidatorUtils.validateEntity(formDTO, TopicVisitFormDTO.TopicVisitForm.class); |
|||
return new Result<TopicVisitResultDTO>().ok(topicShareLinkRecordService.topicVisit(formDTO,tokenDto)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,83 @@ |
|||
package com.epmet.modules.topic.controller; |
|||
|
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.AssertUtils; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.commons.tools.validator.group.AddGroup; |
|||
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|||
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|||
import com.epmet.modules.topic.service.TopicShareLinkVisitRecordService; |
|||
import com.epmet.resi.group.dto.topic.TopicShareLinkVisitRecordDTO; |
|||
import com.epmet.resi.group.dto.topic.form.SharableTopicAndInviteeFormDTO; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 话题分享链接访问记录表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-12-18 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("topicsharelinkvisitrecord") |
|||
public class TopicShareLinkVisitRecordController { |
|||
|
|||
@Autowired |
|||
private TopicShareLinkVisitRecordService topicShareLinkVisitRecordService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<TopicShareLinkVisitRecordDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<TopicShareLinkVisitRecordDTO> page = topicShareLinkVisitRecordService.page(params); |
|||
return new Result<PageData<TopicShareLinkVisitRecordDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<TopicShareLinkVisitRecordDTO> get(@PathVariable("id") String id){ |
|||
TopicShareLinkVisitRecordDTO data = topicShareLinkVisitRecordService.get(id); |
|||
return new Result<TopicShareLinkVisitRecordDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody TopicShareLinkVisitRecordDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
topicShareLinkVisitRecordService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody TopicShareLinkVisitRecordDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
topicShareLinkVisitRecordService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
topicShareLinkVisitRecordService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* @Description 检查邀请关系,如果确实存在邀请关系则返回邀请人Id |
|||
* 符合条件: |
|||
* ① 链接Id对应 |
|||
* ② 邀请人Id对应 |
|||
* ③ 邀请人在被邀请时的状态为陌生人 |
|||
* @param param |
|||
* @return com.epmet.commons.tools.utils.Result<java.lang.String> |
|||
* @author wangc |
|||
* @date 2020.12.18 14:53 |
|||
*/ |
|||
@PostMapping("checkinviterelationship") |
|||
public Result<String> checkInviteRelationship(@RequestBody SharableTopicAndInviteeFormDTO param){ |
|||
return new Result<String>().ok(topicShareLinkVisitRecordService.checkInviteRelationship(param)); |
|||
} |
|||
} |
@ -0,0 +1,45 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.modules.topic.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.modules.topic.entity.TopicDraftAttachmentEntity; |
|||
import com.epmet.resi.group.dto.topic.TopicDraftAttachmentDTO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 话题草稿附件表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-12-17 |
|||
*/ |
|||
@Mapper |
|||
public interface TopicDraftAttachmentDao extends BaseDao<TopicDraftAttachmentEntity> { |
|||
/** |
|||
* 获取附件列表 |
|||
* @author zhaoqifeng |
|||
* @date 2020/12/18 16:44 |
|||
* @param topicDraftId |
|||
* @param type |
|||
* @return java.util.List<java.lang.String> |
|||
*/ |
|||
List<TopicDraftAttachmentDTO> selectFileList(@Param("topicDraftId") String topicDraftId, @Param("type") String type); |
|||
} |
@ -0,0 +1,68 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.modules.topic.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.modules.topic.entity.TopicDraftEntity; |
|||
import com.epmet.resi.group.dto.topic.TopicDraftDTO; |
|||
import com.epmet.resi.group.dto.topic.result.DraftDetailResultDTO; |
|||
import com.epmet.resi.group.dto.topic.result.TopicAuditResultDTO; |
|||
import com.epmet.resi.group.dto.topic.form.MyAuditingListFormDTO; |
|||
import com.epmet.resi.group.dto.topic.result.MyAuditingListResultDTO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 话题草稿内容表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-12-17 |
|||
*/ |
|||
@Mapper |
|||
public interface TopicDraftDao extends BaseDao<TopicDraftEntity> { |
|||
/** |
|||
* 获取小组待审核/已驳回列表 |
|||
* @author zhaoqifeng |
|||
* @date 2020/12/18 15:47 |
|||
* @param groupId |
|||
* @param status |
|||
* @return com.epmet.resi.group.dto.topic.TopicDraftDTO |
|||
*/ |
|||
List<TopicAuditResultDTO> selectTopicDraftByGroup(@Param("groupId") String groupId, @Param("status") String status); |
|||
|
|||
/** |
|||
* 话题草稿详情 |
|||
* @author zhaoqifeng |
|||
* @date 2020/12/18 16:19 |
|||
* @param topicDraftId |
|||
* @return com.epmet.resi.group.dto.topic.result.DraftDetailResultDTO |
|||
*/ |
|||
DraftDetailResultDTO selectTopicDraftDetail(@Param("topicDraftId") String topicDraftId); |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @return |
|||
* @Author sun |
|||
* @Description 个人中心-我发表的话题-审核中列表 |
|||
**/ |
|||
List<MyAuditingListResultDTO> selectAuditingList(MyAuditingListFormDTO formDTO); |
|||
} |
@ -0,0 +1,33 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.modules.topic.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.modules.topic.entity.TopicDraftOperationEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 话题草稿操作日志表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-12-17 |
|||
*/ |
|||
@Mapper |
|||
public interface TopicDraftOperationDao extends BaseDao<TopicDraftOperationEntity> { |
|||
|
|||
} |
@ -0,0 +1,33 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.modules.topic.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.modules.topic.entity.TopicDraftScanTaskEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 话题附件检测任务表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-12-18 |
|||
*/ |
|||
@Mapper |
|||
public interface TopicDraftScanTaskDao extends BaseDao<TopicDraftScanTaskEntity> { |
|||
|
|||
} |
@ -0,0 +1,35 @@ |
|||
package com.epmet.modules.topic.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.modules.topic.entity.TopicShareLinkRecordEntity; |
|||
import com.epmet.resi.group.dto.topic.result.TopicVisitResultDTO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
/** |
|||
* 话题分享链接表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-12-18 |
|||
*/ |
|||
@Mapper |
|||
public interface TopicShareLinkRecordDao extends BaseDao<TopicShareLinkRecordEntity> { |
|||
|
|||
/** |
|||
* @Description 根据话题ID查询对应信息 |
|||
* @Param topicId |
|||
* @author zxc |
|||
* @date 2020/12/18 上午10:28 |
|||
*/ |
|||
TopicVisitResultDTO selectTopicInfoById(@Param("topicId") String topicId); |
|||
|
|||
/** |
|||
* @Description 校验此人此话题是否存在邀请记录 |
|||
* @Param topicId |
|||
* @Param userId |
|||
* @author zxc |
|||
* @date 2020/12/18 上午11:10 |
|||
*/ |
|||
String checkRecord(@Param("topicId") String topicId,@Param("userId") String userId); |
|||
|
|||
} |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue