|
|
@ -1,13 +1,10 @@ |
|
|
|
package com.epmet.datareport.controller.screen; |
|
|
|
|
|
|
|
import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; |
|
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
|
|
|
import com.epmet.screen.dto.form.BranchFormDTO; |
|
|
|
import com.epmet.screen.dto.form.ParymemberFormDTO; |
|
|
|
import com.epmet.screen.dto.form.UserFormDTO; |
|
|
|
import com.epmet.screen.dto.result.BranchResultDTO; |
|
|
|
import com.epmet.screen.dto.result.ParymemberResultDTO; |
|
|
|
import com.epmet.screen.dto.result.UserResultDTO; |
|
|
|
import com.epmet.screen.dto.form.*; |
|
|
|
import com.epmet.screen.dto.result.*; |
|
|
|
import com.epmet.datareport.service.screen.DistributionService; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.PostMapping; |
|
|
@ -36,6 +33,7 @@ public class DistributionController { |
|
|
|
* @author zxc |
|
|
|
* @date 2020/8/18 10:59 上午 |
|
|
|
*/ |
|
|
|
@ExternalAppRequestAuth |
|
|
|
@PostMapping("branch") |
|
|
|
public Result<List<BranchResultDTO>> branch(@RequestBody BranchFormDTO formDTO){ |
|
|
|
ValidatorUtils.validateEntity(formDTO, BranchFormDTO.Branch.class); |
|
|
@ -48,6 +46,7 @@ public class DistributionController { |
|
|
|
* @author zxc |
|
|
|
* @date 2020/8/18 11:10 上午 |
|
|
|
*/ |
|
|
|
@ExternalAppRequestAuth |
|
|
|
@PostMapping("user") |
|
|
|
public Result<UserResultDTO> user(@RequestBody UserFormDTO userFormDTO){ |
|
|
|
ValidatorUtils.validateEntity(userFormDTO, UserFormDTO.User.class); |
|
|
@ -60,10 +59,37 @@ public class DistributionController { |
|
|
|
* @author zxc |
|
|
|
* @date 2020/8/18 11:20 上午 |
|
|
|
*/ |
|
|
|
@ExternalAppRequestAuth |
|
|
|
@PostMapping("parymember") |
|
|
|
public Result<ParymemberResultDTO> parymember(@RequestBody ParymemberFormDTO parymemberFormDTO){ |
|
|
|
ValidatorUtils.validateEntity(parymemberFormDTO, ParymemberFormDTO.Parymember.class); |
|
|
|
return new Result<ParymemberResultDTO>().ok(distributionService.parymember(parymemberFormDTO)); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 4、事件 |
|
|
|
* @param projectFormDTO |
|
|
|
* @author zxc |
|
|
|
* @date 2020/8/19 1:29 下午 |
|
|
|
*/ |
|
|
|
// @ExternalAppRequestAuth
|
|
|
|
@PostMapping("project") |
|
|
|
public Result<List<ProjectResultDTO>> project(@RequestBody ProjectFormDTO projectFormDTO){ |
|
|
|
ValidatorUtils.validateEntity(projectFormDTO, ProjectFormDTO.Project.class); |
|
|
|
return new Result<List<ProjectResultDTO>>().ok(distributionService.project(projectFormDTO)); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 5、top区概况 |
|
|
|
* @param topProfileFormDTO |
|
|
|
* @author zxc |
|
|
|
* @date 2020/8/19 1:52 下午 |
|
|
|
*/ |
|
|
|
// @ExternalAppRequestAuth
|
|
|
|
@PostMapping("topprofile") |
|
|
|
public Result<TopProfileResultDTO> topProfile(@RequestBody TopProfileFormDTO topProfileFormDTO){ |
|
|
|
ValidatorUtils.validateEntity(topProfileFormDTO, TopProfileFormDTO.TopProfile.class); |
|
|
|
return new Result<TopProfileResultDTO>().ok(distributionService.topProfile(topProfileFormDTO)); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|