forked from rongchao/epmet-cloud-rizhao
6 changed files with 158 additions and 0 deletions
@ -0,0 +1,25 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2020/11/10 10:04 上午 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class MyPartIssuesFormDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 265005061427415836L; |
||||
|
|
||||
|
public interface MyPartIssues{} |
||||
|
|
||||
|
/** |
||||
|
* 用户ID |
||||
|
*/ |
||||
|
@NotBlank(message = "userId不能为空",groups = MyPartIssues.class) |
||||
|
private String userId; |
||||
|
|
||||
|
} |
@ -0,0 +1,37 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2020/11/10 9:50 上午 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class MyPartIssuesResultDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 2081387920547808112L; |
||||
|
|
||||
|
private String issueId; |
||||
|
|
||||
|
/** |
||||
|
* 建议 |
||||
|
*/ |
||||
|
private String suggestion; |
||||
|
|
||||
|
/** |
||||
|
* 议题标题 |
||||
|
*/ |
||||
|
private String issueTitle; |
||||
|
|
||||
|
/** |
||||
|
* 转议题时间 |
||||
|
*/ |
||||
|
private Long shiftIssueTime; |
||||
|
|
||||
|
/** |
||||
|
* 发表网格名称 |
||||
|
*/ |
||||
|
private String topicReleaseGridName; |
||||
|
} |
@ -0,0 +1,37 @@ |
|||||
|
package com.epmet.modules.person.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.annotation.LoginUser; |
||||
|
import com.epmet.commons.tools.security.dto.TokenDto; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.dto.result.MyPartIssuesResultDTO; |
||||
|
import com.epmet.modules.person.service.IssueService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2020/11/10 9:37 上午 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("issue") |
||||
|
public class IssueController { |
||||
|
|
||||
|
@Autowired |
||||
|
private IssueService issueService; |
||||
|
|
||||
|
/** |
||||
|
* @Description 个人中心-我参与的议题列表 |
||||
|
* @Param tokenDto |
||||
|
* @author zxc |
||||
|
* @date 2020/11/10 10:01 上午 |
||||
|
*/ |
||||
|
@PostMapping("my-part-issues") |
||||
|
public Result<List<MyPartIssuesResultDTO>> myPartIssues(@LoginUser TokenDto tokenDto){ |
||||
|
return new Result<List<MyPartIssuesResultDTO>>().ok(issueService.myPartIssues(tokenDto)); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,22 @@ |
|||||
|
package com.epmet.modules.person.service; |
||||
|
|
||||
|
import com.epmet.commons.tools.security.dto.TokenDto; |
||||
|
import com.epmet.dto.result.MyPartIssuesResultDTO; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2020/11/10 9:59 上午 |
||||
|
*/ |
||||
|
public interface IssueService { |
||||
|
|
||||
|
/** |
||||
|
* @Description 个人中心-我参与的议题列表 |
||||
|
* @Param tokenDto |
||||
|
* @author zxc |
||||
|
* @date 2020/11/10 10:01 上午 |
||||
|
*/ |
||||
|
List<MyPartIssuesResultDTO> myPartIssues(TokenDto tokenDto); |
||||
|
|
||||
|
} |
@ -0,0 +1,32 @@ |
|||||
|
package com.epmet.modules.person.service.impl; |
||||
|
|
||||
|
import com.epmet.commons.tools.security.dto.TokenDto; |
||||
|
import com.epmet.dto.form.MyPartIssuesFormDTO; |
||||
|
import com.epmet.dto.result.MyPartIssuesResultDTO; |
||||
|
import com.epmet.modules.person.service.IssueService; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2020/11/10 10:00 上午 |
||||
|
*/ |
||||
|
@Service |
||||
|
@Slf4j |
||||
|
public class IssueServiceImpl implements IssueService { |
||||
|
|
||||
|
/** |
||||
|
* @Description 个人中心-我参与的议题列表 |
||||
|
* @Param tokenDto |
||||
|
* @author zxc |
||||
|
* @date 2020/11/10 10:01 上午 |
||||
|
*/ |
||||
|
@Override |
||||
|
public List<MyPartIssuesResultDTO> myPartIssues(TokenDto tokenDto) { |
||||
|
MyPartIssuesFormDTO form = new MyPartIssuesFormDTO(); |
||||
|
form.setUserId(tokenDto.getUserId()); |
||||
|
return null; |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue