|
|
@ -1,20 +1,23 @@ |
|
|
|
package com.epmet.modules.partyOrg.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.ValidatorUtils; |
|
|
|
import com.epmet.modules.partyOrg.service.IcPartyActService; |
|
|
|
import com.epmet.resi.partymember.dto.icpartyact.IcPartActTypeDTO; |
|
|
|
import com.epmet.resi.partymember.dto.icpartyact.form.IcPartyActAddOrUpdateFormDTO; |
|
|
|
import com.epmet.resi.partymember.dto.icpartyact.form.IcPartyActPageFormDTO; |
|
|
|
import com.epmet.resi.partymember.dto.icpartyact.result.IcPartActTypeDTO; |
|
|
|
import com.epmet.resi.partymember.dto.icpartyact.result.IcPartyActDetailResDTO; |
|
|
|
import com.epmet.resi.partymember.dto.icpartyact.result.IcPartyActPageResultDTO; |
|
|
|
import com.epmet.resi.partymember.dto.partyOrg.form.HomeMonthTotalFormDTO; |
|
|
|
import com.epmet.resi.partymember.dto.partyOrg.result.HomeMonthTotalResultDTO; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.PostMapping; |
|
|
|
import org.springframework.web.bind.annotation.RequestBody; |
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
@ -30,6 +33,45 @@ public class IcPartyActController { |
|
|
|
@Autowired |
|
|
|
private IcPartyActService icPartyActService; |
|
|
|
|
|
|
|
/** |
|
|
|
* 添加、修改活动 |
|
|
|
* @param tokenDto |
|
|
|
* @param formDTO |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@PostMapping("addOrUpdate") |
|
|
|
public Result<Map<String,String>> addOrUpdate(@LoginUser TokenDto tokenDto,@RequestBody IcPartyActAddOrUpdateFormDTO formDTO){ |
|
|
|
formDTO.setCustomerId(tokenDto.getCustomerId()); |
|
|
|
formDTO.setPublishStaffId(tokenDto.getUserId()); |
|
|
|
Map<String,String> map=icPartyActService.addOrUpdate(formDTO); |
|
|
|
return new Result<Map<String, String>>().ok(map); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 活动列表分页 |
|
|
|
* @param tokenDto |
|
|
|
* @param formDTO |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@PostMapping("page-list") |
|
|
|
public Result<PageData<IcPartyActPageResultDTO>> pageList(@LoginUser TokenDto tokenDto, @RequestBody IcPartyActPageFormDTO formDTO){ |
|
|
|
formDTO.setCustomerId(tokenDto.getCustomerId()); |
|
|
|
formDTO.setPublishStaffId(tokenDto.getUserId()); |
|
|
|
return new Result<PageData<IcPartyActPageResultDTO>>().ok(icPartyActService.pageList(formDTO)); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 活动列表活动详情 |
|
|
|
* @param tokenDto |
|
|
|
* @param icPartyActId |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@PostMapping("act-detail/{icPartyActId}") |
|
|
|
public Result<IcPartyActDetailResDTO> actDetail(@LoginUser TokenDto tokenDto, @PathVariable("icPartyActId")String icPartyActId){ |
|
|
|
return new Result<IcPartyActDetailResDTO>().ok(icPartyActService.queryActDetail(tokenDto.getCustomerId(),tokenDto.getUserId(),icPartyActId)); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 活动类型 |
|
|
|
* @param tokenDto |
|
|
|