7 changed files with 158 additions and 1 deletions
@ -0,0 +1,69 @@ |
|||||
|
/** |
||||
|
* 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.elink.esua.epdc.modules.activity.controller; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.tools.constant.Constant; |
||||
|
import com.elink.esua.epdc.commons.tools.page.PageData; |
||||
|
import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; |
||||
|
import com.elink.esua.epdc.commons.tools.utils.Result; |
||||
|
import com.elink.esua.epdc.commons.tools.validator.AssertUtils; |
||||
|
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; |
||||
|
import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; |
||||
|
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; |
||||
|
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; |
||||
|
import com.elink.esua.epdc.dto.activity.ActivityInfoDTO; |
||||
|
import com.elink.esua.epdc.dto.activity.form.ActivityInfoFormDTO; |
||||
|
import com.elink.esua.epdc.dto.activity.result.ActivityInfoResultDTO; |
||||
|
import com.elink.esua.epdc.modules.activity.excel.ActivityInfoExcel; |
||||
|
import com.elink.esua.epdc.modules.activity.service.ActivityInfoService; |
||||
|
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 zhangyuan qu@elink-cn.com |
||||
|
* @since v1.0.0 2020-06-22 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping(Constant.EPDC_APP + "activityinfo") |
||||
|
public class AppActivityInfoController { |
||||
|
|
||||
|
@Autowired |
||||
|
private ActivityInfoService activityInfoService; |
||||
|
|
||||
|
@GetMapping("listActivity") |
||||
|
public Result<List<ActivityInfoResultDTO>> listActivity(@RequestBody ActivityInfoFormDTO formDto) { |
||||
|
List<ActivityInfoResultDTO> page = activityInfoService.listActivity(formDto); |
||||
|
return new Result<List<ActivityInfoResultDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@PostMapping |
||||
|
public Result save(@RequestBody ActivityInfoDTO dto) { |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
activityInfoService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
} |
||||
Loading…
Reference in new issue