12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- package com.simuwang.manage.api.channel;
- import com.simuwang.base.common.support.MybatisPage;
- import com.simuwang.base.pojo.dto.GetByIdQuery;
- import com.simuwang.base.pojo.dto.query.ChannelIdPageQuery;
- import com.simuwang.base.pojo.dto.query.ChannelPageQuery;
- import com.simuwang.base.pojo.vo.*;
- import com.simuwang.logging.SystemLog;
- import com.simuwang.manage.service.ChannelService;
- import com.smppw.common.pojo.ResultVo;
- 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 java.util.List;
- @SystemLog(value = "渠道管理")
- @RestController
- @RequestMapping("/v1/channel")
- public class ChannelController {
- @Autowired
- private ChannelService channelService;
- /**
- * 保存渠道信息
- * @param channel
- * @return
- */
- @SystemLog(value = "保存渠道信息", type = SystemLog.Type.INSERT)
- @PostMapping("save-channel")
- public ResultVo saveChannel(@RequestBody ChannelInfoVO channel) {
- ResultVo vo = channelService.saveChannel(channel);
- return vo;
- }
- /**
- * 保存渠道邮件信息
- * @param channelEmailInfoVOList
- * @return
- */
- @SystemLog(value = "保存渠道邮件信息", type = SystemLog.Type.INSERT)
- @PostMapping("save-channel-email")
- public ResultVo saveChannelEmail(@RequestBody List<ChannelEmailInfoVO> channelEmailInfoVOList) {
- ResultVo vo = channelService.saveChannelEmail(channelEmailInfoVOList);
- return vo;
- }
- /**
- * 删除渠道信息
- * @param idListVO
- * @return
- */
- @SystemLog(value = "删除渠道信息", type = SystemLog.Type.INSERT)
- @PostMapping("delete-channel")
- public ResultVo deleteChannel(@RequestBody IdListVO idListVO) {
- ResultVo vo = channelService.deleteChannel(idListVO.getIdList());
- return vo;
- }
- /**
- * 删除渠道邮件
- * @param idVO
- * @return
- */
- @SystemLog(value = "删除渠道邮件", type = SystemLog.Type.INSERT)
- @PostMapping("delete-channel-email")
- public ResultVo deleteChannelEmail(@RequestBody IdVO idVO) {
- ResultVo vo = channelService.deleteChannelEmail(idVO.getId());
- return vo;
- }
- /**
- * 查询渠道信息
- * @param channelPageQuery
- * @return
- */
- @SystemLog(value = "查询渠道信息")
- @RequestMapping("search-channel-list")
- public MybatisPage<ChannelPageInfoVO> searchChannelList(ChannelPageQuery channelPageQuery){
- MybatisPage<ChannelPageInfoVO> result = channelService.searchChannelList(channelPageQuery);
- return result;
- }
- /**
- * 查询渠道邮件
- * @param channelIdPageQuery
- * @return
- */
- @SystemLog(value = "查询渠道邮件信息")
- @RequestMapping("search-channel-email")
- public MybatisPage<ChannelEmailInfoVO> searchChannelEmail(ChannelIdPageQuery channelIdPageQuery){
- MybatisPage<ChannelEmailInfoVO> result = channelService.searchChannelEmailList(channelIdPageQuery);
- return result;
- }
- }
|