diff --git a/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/ActivityChannelInfo.java b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/ActivityChannelInfo.java new file mode 100644 index 0000000..3ee76b0 --- /dev/null +++ b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/ActivityChannelInfo.java @@ -0,0 +1,67 @@ +package com.flossom.common.core.domain.entity; + +import com.flossom.common.core.annotation.Excel; +import com.flossom.common.core.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 活动渠道信息对象 activity_channel_info + * + * @author flossom + * @date 2023-12-20 + */ +public class ActivityChannelInfo extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 渠道ID */ + private Long id; + + /** 渠道类型 */ + @Excel(name = "渠道类型") + private Integer channelType; + + /** 渠道名称 */ + @Excel(name = "渠道名称") + private String channelName; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setChannelType(Integer channelType) + { + this.channelType = channelType; + } + + public Integer getChannelType() + { + return channelType; + } + public void setChannelName(String channelName) + { + this.channelName = channelName; + } + + public String getChannelName() + { + return channelName; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("channelType", getChannelType()) + .append("channelName", getChannelName()) + .append("createTime", getCreateTime()) + .append("createBy", getCreateBy()) + .toString(); + } +} diff --git a/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/mapper/ActivityChannelInfoMapper.java b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/mapper/ActivityChannelInfoMapper.java new file mode 100644 index 0000000..dd2912b --- /dev/null +++ b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/mapper/ActivityChannelInfoMapper.java @@ -0,0 +1,62 @@ +package com.flossom.common.core.mapper; + +import com.flossom.common.core.domain.entity.ActivityChannelInfo; + +import java.util.List; + +/** + * 活动渠道信息Mapper接口 + * + * @author flossom + * @date 2023-12-20 + */ +public interface ActivityChannelInfoMapper +{ + /** + * 查询活动渠道信息 + * + * @param id 活动渠道信息主键 + * @return 活动渠道信息 + */ + public ActivityChannelInfo selectActivityChannelInfoById(Long id); + + /** + * 查询活动渠道信息列表 + * + * @param activityChannelInfo 活动渠道信息 + * @return 活动渠道信息集合 + */ + public List selectActivityChannelInfoList(ActivityChannelInfo activityChannelInfo); + + /** + * 新增活动渠道信息 + * + * @param activityChannelInfo 活动渠道信息 + * @return 结果 + */ + public int insertActivityChannelInfo(ActivityChannelInfo activityChannelInfo); + + /** + * 修改活动渠道信息 + * + * @param activityChannelInfo 活动渠道信息 + * @return 结果 + */ + public int updateActivityChannelInfo(ActivityChannelInfo activityChannelInfo); + + /** + * 删除活动渠道信息 + * + * @param id 活动渠道信息主键 + * @return 结果 + */ + public int deleteActivityChannelInfoById(Long id); + + /** + * 批量删除活动渠道信息 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteActivityChannelInfoByIds(Long[] ids); +} diff --git a/flossom-common/flossom-common-core/src/main/resources/mapper/ActivityChannelInfoMapper.xml b/flossom-common/flossom-common-core/src/main/resources/mapper/ActivityChannelInfoMapper.xml new file mode 100644 index 0000000..0f7b26c --- /dev/null +++ b/flossom-common/flossom-common-core/src/main/resources/mapper/ActivityChannelInfoMapper.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + select id, channel_type, channel_name, create_time, create_by from activity_channel_info + + + + + + + + insert into activity_channel_info + + id, + channel_type, + channel_name, + create_time, + create_by, + + + #{id}, + #{channelType}, + #{channelName}, + #{createTime}, + #{createBy}, + + + + + update activity_channel_info + + channel_type = #{channelType}, + channel_name = #{channelName}, + create_time = #{createTime}, + create_by = #{createBy}, + + where id = #{id} + + + + delete from activity_channel_info where id = #{id} + + + + delete from activity_channel_info where id in + + #{id} + + + diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/ActivityChannelInfoController.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/ActivityChannelInfoController.java new file mode 100644 index 0000000..c52ad35 --- /dev/null +++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/ActivityChannelInfoController.java @@ -0,0 +1,106 @@ +package com.flossom.system.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; + +import com.flossom.common.core.domain.entity.ActivityChannelInfo; +import com.flossom.common.core.utils.poi.ExcelUtil; +import com.flossom.common.core.web.controller.BaseController; +import com.flossom.common.core.web.domain.AjaxResult; +import com.flossom.common.core.web.page.TableDataInfo; +import com.flossom.common.log.annotation.Log; +import com.flossom.common.log.enums.BusinessType; +import com.flossom.common.security.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.flossom.system.service.IActivityChannelInfoService; + +/** + * 活动渠道信息Controller + * + * @author flossom + * @date 2023-12-20 + */ +@RestController +@RequestMapping("/channelInfo") +public class ActivityChannelInfoController extends BaseController +{ + @Autowired + private IActivityChannelInfoService activityChannelInfoService; + + /** + * 查询活动渠道信息列表 + */ + @RequiresPermissions("system:channelInfo:list") + @GetMapping("/list") + public TableDataInfo list(ActivityChannelInfo activityChannelInfo) + { + startPage(); + List list = activityChannelInfoService.selectActivityChannelInfoList(activityChannelInfo); + return getDataTable(list); + } + + /** + * 导出活动渠道信息列表 + */ + @RequiresPermissions("system:channelInfo:export") + @Log(title = "活动渠道信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, ActivityChannelInfo activityChannelInfo) + { + List list = activityChannelInfoService.selectActivityChannelInfoList(activityChannelInfo); + ExcelUtil util = new ExcelUtil(ActivityChannelInfo.class); + util.exportExcel(response, list, "活动渠道信息数据"); + } + + /** + * 获取活动渠道信息详细信息 + */ + @RequiresPermissions("system:channelInfo:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(activityChannelInfoService.selectActivityChannelInfoById(id)); + } + + /** + * 新增活动渠道信息 + */ + @RequiresPermissions("system:channelInfo:add") + @Log(title = "活动渠道信息", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody ActivityChannelInfo activityChannelInfo) + { + return toAjax(activityChannelInfoService.insertActivityChannelInfo(activityChannelInfo)); + } + + /** + * 修改活动渠道信息 + */ + @RequiresPermissions("system:channelInfo:edit") + @Log(title = "活动渠道信息", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody ActivityChannelInfo activityChannelInfo) + { + return toAjax(activityChannelInfoService.updateActivityChannelInfo(activityChannelInfo)); + } + + /** + * 删除活动渠道信息 + */ + @RequiresPermissions("system:channelInfo:remove") + @Log(title = "活动渠道信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(activityChannelInfoService.deleteActivityChannelInfoByIds(ids)); + } +} diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IActivityChannelInfoService.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IActivityChannelInfoService.java new file mode 100644 index 0000000..9a0e029 --- /dev/null +++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IActivityChannelInfoService.java @@ -0,0 +1,62 @@ +package com.flossom.system.service; + +import com.flossom.common.core.domain.entity.ActivityChannelInfo; + +import java.util.List; + +/** + * 活动渠道信息Service接口 + * + * @author flossom + * @date 2023-12-20 + */ +public interface IActivityChannelInfoService +{ + /** + * 查询活动渠道信息 + * + * @param id 活动渠道信息主键 + * @return 活动渠道信息 + */ + public ActivityChannelInfo selectActivityChannelInfoById(Long id); + + /** + * 查询活动渠道信息列表 + * + * @param activityChannelInfo 活动渠道信息 + * @return 活动渠道信息集合 + */ + public List selectActivityChannelInfoList(ActivityChannelInfo activityChannelInfo); + + /** + * 新增活动渠道信息 + * + * @param activityChannelInfo 活动渠道信息 + * @return 结果 + */ + public int insertActivityChannelInfo(ActivityChannelInfo activityChannelInfo); + + /** + * 修改活动渠道信息 + * + * @param activityChannelInfo 活动渠道信息 + * @return 结果 + */ + public int updateActivityChannelInfo(ActivityChannelInfo activityChannelInfo); + + /** + * 批量删除活动渠道信息 + * + * @param ids 需要删除的活动渠道信息主键集合 + * @return 结果 + */ + public int deleteActivityChannelInfoByIds(Long[] ids); + + /** + * 删除活动渠道信息信息 + * + * @param id 活动渠道信息主键 + * @return 结果 + */ + public int deleteActivityChannelInfoById(Long id); +} diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/ActivityChannelInfoServiceImpl.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/ActivityChannelInfoServiceImpl.java new file mode 100644 index 0000000..2b5be8e --- /dev/null +++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/ActivityChannelInfoServiceImpl.java @@ -0,0 +1,96 @@ +package com.flossom.system.service.impl; + +import java.util.List; + +import com.flossom.common.core.domain.entity.ActivityChannelInfo; +import com.flossom.common.core.mapper.ActivityChannelInfoMapper; +import com.flossom.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.flossom.system.service.IActivityChannelInfoService; + +/** + * 活动渠道信息Service业务层处理 + * + * @author flossom + * @date 2023-12-20 + */ +@Service +public class ActivityChannelInfoServiceImpl implements IActivityChannelInfoService +{ + @Autowired + private ActivityChannelInfoMapper activityChannelInfoMapper; + + /** + * 查询活动渠道信息 + * + * @param id 活动渠道信息主键 + * @return 活动渠道信息 + */ + @Override + public ActivityChannelInfo selectActivityChannelInfoById(Long id) + { + return activityChannelInfoMapper.selectActivityChannelInfoById(id); + } + + /** + * 查询活动渠道信息列表 + * + * @param activityChannelInfo 活动渠道信息 + * @return 活动渠道信息 + */ + @Override + public List selectActivityChannelInfoList(ActivityChannelInfo activityChannelInfo) + { + return activityChannelInfoMapper.selectActivityChannelInfoList(activityChannelInfo); + } + + /** + * 新增活动渠道信息 + * + * @param activityChannelInfo 活动渠道信息 + * @return 结果 + */ + @Override + public int insertActivityChannelInfo(ActivityChannelInfo activityChannelInfo) + { + activityChannelInfo.setCreateTime(DateUtils.getNowDate()); + return activityChannelInfoMapper.insertActivityChannelInfo(activityChannelInfo); + } + + /** + * 修改活动渠道信息 + * + * @param activityChannelInfo 活动渠道信息 + * @return 结果 + */ + @Override + public int updateActivityChannelInfo(ActivityChannelInfo activityChannelInfo) + { + return activityChannelInfoMapper.updateActivityChannelInfo(activityChannelInfo); + } + + /** + * 批量删除活动渠道信息 + * + * @param ids 需要删除的活动渠道信息主键 + * @return 结果 + */ + @Override + public int deleteActivityChannelInfoByIds(Long[] ids) + { + return activityChannelInfoMapper.deleteActivityChannelInfoByIds(ids); + } + + /** + * 删除活动渠道信息信息 + * + * @param id 活动渠道信息主键 + * @return 结果 + */ + @Override + public int deleteActivityChannelInfoById(Long id) + { + return activityChannelInfoMapper.deleteActivityChannelInfoById(id); + } +} diff --git a/flossom-ui/src/api/system/channelInfo.js b/flossom-ui/src/api/system/channelInfo.js new file mode 100644 index 0000000..78409aa --- /dev/null +++ b/flossom-ui/src/api/system/channelInfo.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询【请填写功能名称】列表 +export function listInfo(query) { + return request({ + url: '/system/channelInfo/list', + method: 'get', + params: query + }) +} + +// 查询【请填写功能名称】详细 +export function getInfo(id) { + return request({ + url: '/system/channelInfo/' + id, + method: 'get' + }) +} + +// 新增【请填写功能名称】 +export function addInfo(data) { + return request({ + url: '/system/channelInfo', + method: 'post', + data: data + }) +} + +// 修改【请填写功能名称】 +export function updateInfo(data) { + return request({ + url: '/system/channelInfo', + method: 'put', + data: data + }) +} + +// 删除【请填写功能名称】 +export function delInfo(id) { + return request({ + url: '/system/channelInfo/' + id, + method: 'delete' + }) +} diff --git a/flossom-ui/src/views/system/channelInfo/index.vue b/flossom-ui/src/views/system/channelInfo/index.vue new file mode 100644 index 0000000..0f85881 --- /dev/null +++ b/flossom-ui/src/views/system/channelInfo/index.vue @@ -0,0 +1,249 @@ + + +