5 changed files with 119 additions and 0 deletions
@ -0,0 +1,115 @@ |
|||
package com.elink.esua.epdc.controller; |
|||
|
|||
import com.elink.esua.epdc.activity.ActBannerDTO; |
|||
import com.elink.esua.epdc.activity.form.ActInfoAppFormDTO; |
|||
import com.elink.esua.epdc.activity.result.ActInfoAppResultDTO; |
|||
import com.elink.esua.epdc.activity.result.ActInfoDetailAppResultDTO; |
|||
import com.elink.esua.epdc.common.token.dto.TokenDto; |
|||
import com.elink.esua.epdc.commons.tools.annotation.LoginUser; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.service.ActInfoService; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.PathVariable; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 移动端接口-项目模块 |
|||
* |
|||
* @Author LPF |
|||
* @Date 2019/11/18 13:32 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("heart/act") |
|||
public class ApiAppActInfoController { |
|||
|
|||
@Autowired |
|||
private ActInfoService actInfoService; |
|||
|
|||
|
|||
/** |
|||
* 活动列表 |
|||
* |
|||
* @Params: [ formDto] |
|||
* @Return: com.elink.esua.epdc.commons.tools.utils.Result<java.util.List < com.elink.esua.epdc.dto.item.result.ItemResultDTO>> |
|||
* @Author: lipengfei |
|||
* @Date: 2019/11/19 16:34 |
|||
*/ |
|||
@GetMapping("list") |
|||
public Result<List<ActInfoAppResultDTO>> listItems(ActInfoAppFormDTO formDto, @LoginUser TokenDto tokenDto) { |
|||
formDto.setUserId(tokenDto.getUserId()); |
|||
return actInfoService.listItems(formDto); |
|||
} |
|||
|
|||
/** |
|||
* 活动列表 |
|||
* |
|||
* @Params: [ formDto] |
|||
* @Return: com.elink.esua.epdc.commons.tools.utils.Result<java.util.List < com.elink.esua.epdc.dto.item.result.ItemResultDTO>> |
|||
* @Author: lipengfei |
|||
* @Date: 2019/11/19 16:34 |
|||
*/ |
|||
@GetMapping("signupList") |
|||
public Result<List<ActInfoAppResultDTO>> signupListItems(ActInfoAppFormDTO formDto, @LoginUser TokenDto tokenDto) { |
|||
formDto.setUserId(tokenDto.getUserId()); |
|||
return actInfoService.signupListItems(formDto); |
|||
} |
|||
|
|||
/** |
|||
* 项目详情 |
|||
* |
|||
* @Params: [id] |
|||
* @Return: com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.item.result.ItemDetailResultDTO> |
|||
* @Author: lipengfei |
|||
* @Date: 2019/11/19 16:34 |
|||
*/ |
|||
@GetMapping("detail/{id}") |
|||
public Result<ActInfoDetailAppResultDTO> detail(@PathVariable String id, @LoginUser TokenDto tokenDto) { |
|||
if (StringUtils.isBlank(id)) { |
|||
return new Result<ActInfoDetailAppResultDTO>().error("id不能为空"); |
|||
} |
|||
ActInfoAppFormDTO formDto = new ActInfoAppFormDTO(); |
|||
formDto.setId(id); |
|||
formDto.setUserId(tokenDto.getUserId()); |
|||
return actInfoService.getDetail(formDto); |
|||
} |
|||
|
|||
/** |
|||
* 获取活动报名审核失败记录 |
|||
* |
|||
* @param id |
|||
* @param tokenDto |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.activity.result.ActInfoDetailAppResultDTO> |
|||
* @author work@yujt.net.cn |
|||
* @date 2020/4/7 10:08 |
|||
*/ |
|||
@GetMapping("rejectDetail/{id}") |
|||
public Result<ActInfoDetailAppResultDTO> rejectDetail(@PathVariable String id, @LoginUser TokenDto tokenDto) { |
|||
ActInfoAppFormDTO formDto = new ActInfoAppFormDTO(); |
|||
formDto.setId(id); |
|||
formDto.setUserId(tokenDto.getUserId()); |
|||
return actInfoService.getRejectDetail(formDto); |
|||
} |
|||
|
|||
/** |
|||
* 项目详情 |
|||
* |
|||
* @Params: [id] |
|||
* @Return: com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.item.result.ItemDetailResultDTO> |
|||
* @Author: lipengfei |
|||
* @Date: 2019/11/19 16:34 |
|||
*/ |
|||
@GetMapping("cancelDetail/{id}") |
|||
public Result<ActInfoDetailAppResultDTO> cancelDetail(@PathVariable String id) { |
|||
return actInfoService.getCancelDetail(id); |
|||
} |
|||
|
|||
@GetMapping("banner/list") |
|||
public Result<List<ActBannerDTO>> bannerList() { |
|||
return actInfoService.getBannerList(); |
|||
} |
|||
} |
|||
Loading…
Reference in new issue