From 0b7b690e8ebe67fa7c9ff278960c1a1587fded6e Mon Sep 17 00:00:00 2001 From: "kuang.yife" Date: Wed, 20 Mar 2024 14:50:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AE=A2=E6=9C=8D=E6=A8=A1?= =?UTF-8?q?=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PlayletCustomerServiceAppController.java | 36 +++++ .../PlayletCustomerServiceController.java | 127 ++++++++++++++++++ .../app/PlayletCustomerServiceAppService.java | 11 ++ .../PlayletCustomerServiceAppServiceImpl.java | 29 ++++ .../templates/system/playlet/service/add.html | 43 ++++++ .../system/playlet/service/edit.html | 44 ++++++ .../system/playlet/service/service.html | 114 ++++++++++++++++ .../system/domain/PlayletCustomerService.java | 46 +++++++ .../mapper/PlayletCustomerServiceMapper.java | 62 +++++++++ .../IPlayletCustomerServiceService.java | 62 +++++++++ .../PlayletCustomerServiceServiceImpl.java | 98 ++++++++++++++ .../system/PlayletCustomerServiceMapper.xml | 92 +++++++++++++ 12 files changed, 764 insertions(+) create mode 100644 playlet-admin/src/main/java/com/playlet/web/controller/app/PlayletCustomerServiceAppController.java create mode 100644 playlet-admin/src/main/java/com/playlet/web/controller/system/PlayletCustomerServiceController.java create mode 100644 playlet-admin/src/main/java/com/playlet/web/service/app/PlayletCustomerServiceAppService.java create mode 100644 playlet-admin/src/main/java/com/playlet/web/service/app/impl/PlayletCustomerServiceAppServiceImpl.java create mode 100644 playlet-admin/src/main/resources/templates/system/playlet/service/add.html create mode 100644 playlet-admin/src/main/resources/templates/system/playlet/service/edit.html create mode 100644 playlet-admin/src/main/resources/templates/system/playlet/service/service.html create mode 100644 playlet-system/src/main/java/com/playlet/system/domain/PlayletCustomerService.java create mode 100644 playlet-system/src/main/java/com/playlet/system/mapper/PlayletCustomerServiceMapper.java create mode 100644 playlet-system/src/main/java/com/playlet/system/service/IPlayletCustomerServiceService.java create mode 100644 playlet-system/src/main/java/com/playlet/system/service/impl/PlayletCustomerServiceServiceImpl.java create mode 100644 playlet-system/src/main/resources/mapper/system/PlayletCustomerServiceMapper.xml diff --git a/playlet-admin/src/main/java/com/playlet/web/controller/app/PlayletCustomerServiceAppController.java b/playlet-admin/src/main/java/com/playlet/web/controller/app/PlayletCustomerServiceAppController.java new file mode 100644 index 0000000..5e78a26 --- /dev/null +++ b/playlet-admin/src/main/java/com/playlet/web/controller/app/PlayletCustomerServiceAppController.java @@ -0,0 +1,36 @@ +package com.playlet.web.controller.app; + + +import com.playlet.common.core.domain.Result; +import com.playlet.system.domain.PlayletCustomerService; +import com.playlet.web.service.app.PlayletCustomerServiceAppService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +@Slf4j +@Api(tags = "小程序*客服接口") +@RestController +@RequestMapping(value = "/app/customer") +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +public class PlayletCustomerServiceAppController { + + private final PlayletCustomerServiceAppService playletCustomerServiceAppService; + + /** + * 查询客服基础列表 + */ + @ResponseBody + @PostMapping("/getCustomerList") + @ApiOperation(value = "查询客服列表") + public Result> getCustomerList(@RequestBody PlayletCustomerService customerService) { + return Result.success(playletCustomerServiceAppService.getCustomerList(customerService)); + } + + +} diff --git a/playlet-admin/src/main/java/com/playlet/web/controller/system/PlayletCustomerServiceController.java b/playlet-admin/src/main/java/com/playlet/web/controller/system/PlayletCustomerServiceController.java new file mode 100644 index 0000000..de901da --- /dev/null +++ b/playlet-admin/src/main/java/com/playlet/web/controller/system/PlayletCustomerServiceController.java @@ -0,0 +1,127 @@ +package com.playlet.web.controller.system; + +import java.util.List; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import com.playlet.common.annotation.Log; +import com.playlet.common.enums.BusinessType; +import com.playlet.system.domain.PlayletCustomerService; +import com.playlet.system.service.IPlayletCustomerServiceService; +import com.playlet.common.core.controller.BaseController; +import com.playlet.common.core.domain.AjaxResult; +import com.playlet.common.utils.poi.ExcelUtil; +import com.playlet.common.core.page.TableDataInfo; + +/** + * 短剧客服管理Controller + * + * @author ruoyi + * @date 2024-03-20 + */ +@Controller +@RequestMapping("/system/playlet/service") +public class PlayletCustomerServiceController extends BaseController +{ + private String prefix = "system/playlet/service"; + + @Autowired + private IPlayletCustomerServiceService playletCustomerServiceService; + + @RequiresPermissions("playlet:service:view") + @GetMapping() + public String service() + { + return prefix + "/service"; + } + + /** + * 查询短剧客服管理列表 + */ + @RequiresPermissions("playlet:service:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(PlayletCustomerService playletCustomerService) + { + startPage(); + List list = playletCustomerServiceService.selectPlayletCustomerServiceList(playletCustomerService); + return getDataTable(list); + } + + /** + * 导出短剧客服管理列表 + */ + @RequiresPermissions("playlet:service:export") + @Log(title = "短剧客服管理", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(PlayletCustomerService playletCustomerService) + { + List list = playletCustomerServiceService.selectPlayletCustomerServiceList(playletCustomerService); + ExcelUtil util = new ExcelUtil(PlayletCustomerService.class); + return util.exportExcel(list, "短剧客服管理数据"); + } + + /** + * 新增短剧客服管理 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存短剧客服管理 + */ + @RequiresPermissions("playlet:service:add") + @Log(title = "短剧客服管理", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(PlayletCustomerService playletCustomerService) + { + return toAjax(playletCustomerServiceService.insertPlayletCustomerService(playletCustomerService)); + } + + /** + * 修改短剧客服管理 + */ + @RequiresPermissions("playlet:service:edit") + @GetMapping("/edit/{id}") + public String edit(@PathVariable("id") Long id, ModelMap mmap) + { + PlayletCustomerService playletCustomerService = playletCustomerServiceService.selectPlayletCustomerServiceById(id); + mmap.put("playletCustomerService", playletCustomerService); + return prefix + "/edit"; + } + + /** + * 修改保存短剧客服管理 + */ + @RequiresPermissions("playlet:service:edit") + @Log(title = "短剧客服管理", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(PlayletCustomerService playletCustomerService) + { + return toAjax(playletCustomerServiceService.updatePlayletCustomerService(playletCustomerService)); + } + + /** + * 删除短剧客服管理 + */ + @RequiresPermissions("playlet:service:remove") + @Log(title = "短剧客服管理", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(playletCustomerServiceService.deletePlayletCustomerServiceByIds(ids)); + } +} diff --git a/playlet-admin/src/main/java/com/playlet/web/service/app/PlayletCustomerServiceAppService.java b/playlet-admin/src/main/java/com/playlet/web/service/app/PlayletCustomerServiceAppService.java new file mode 100644 index 0000000..1ed419a --- /dev/null +++ b/playlet-admin/src/main/java/com/playlet/web/service/app/PlayletCustomerServiceAppService.java @@ -0,0 +1,11 @@ +package com.playlet.web.service.app; + +import com.playlet.system.domain.PlayletCustomerService; + +import java.util.List; + +public interface PlayletCustomerServiceAppService { + + List getCustomerList(PlayletCustomerService customerService); + +} diff --git a/playlet-admin/src/main/java/com/playlet/web/service/app/impl/PlayletCustomerServiceAppServiceImpl.java b/playlet-admin/src/main/java/com/playlet/web/service/app/impl/PlayletCustomerServiceAppServiceImpl.java new file mode 100644 index 0000000..d386b55 --- /dev/null +++ b/playlet-admin/src/main/java/com/playlet/web/service/app/impl/PlayletCustomerServiceAppServiceImpl.java @@ -0,0 +1,29 @@ +package com.playlet.web.service.app.impl; + +import com.playlet.system.domain.PlayletCustomerService; +import com.playlet.system.service.IPlayletCustomerServiceService; +import com.playlet.web.service.app.PlayletCustomerServiceAppService; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @author clunt + */ + +@Slf4j +@Service +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +public class PlayletCustomerServiceAppServiceImpl implements PlayletCustomerServiceAppService { + + private final IPlayletCustomerServiceService iPlayletCustomerServiceService; + + @Override + public List getCustomerList(PlayletCustomerService customerService) { + return iPlayletCustomerServiceService.selectPlayletCustomerServiceList(customerService); + } + +} diff --git a/playlet-admin/src/main/resources/templates/system/playlet/service/add.html b/playlet-admin/src/main/resources/templates/system/playlet/service/add.html new file mode 100644 index 0000000..eda6655 --- /dev/null +++ b/playlet-admin/src/main/resources/templates/system/playlet/service/add.html @@ -0,0 +1,43 @@ + + + + + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/playlet-admin/src/main/resources/templates/system/playlet/service/edit.html b/playlet-admin/src/main/resources/templates/system/playlet/service/edit.html new file mode 100644 index 0000000..dc6eea4 --- /dev/null +++ b/playlet-admin/src/main/resources/templates/system/playlet/service/edit.html @@ -0,0 +1,44 @@ + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/playlet-admin/src/main/resources/templates/system/playlet/service/service.html b/playlet-admin/src/main/resources/templates/system/playlet/service/service.html new file mode 100644 index 0000000..507fac6 --- /dev/null +++ b/playlet-admin/src/main/resources/templates/system/playlet/service/service.html @@ -0,0 +1,114 @@ + + + + + + +
+
+
+
+
+ +
+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/playlet-system/src/main/java/com/playlet/system/domain/PlayletCustomerService.java b/playlet-system/src/main/java/com/playlet/system/domain/PlayletCustomerService.java new file mode 100644 index 0000000..b3489b1 --- /dev/null +++ b/playlet-system/src/main/java/com/playlet/system/domain/PlayletCustomerService.java @@ -0,0 +1,46 @@ +package com.playlet.system.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.playlet.common.core.domain.BaseEntity; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import com.playlet.common.annotation.Excel; + +/** + * 短剧客服管理对象 playlet_customer_service + * + * @author ruoyi + * @date 2024-03-20 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@TableName(value = "playlet_customer_service") +@ApiModel(value = "短剧客服管理对象") +public class PlayletCustomerService extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** 客服名称 */ + @Excel(name = "客服名称") + @ApiModelProperty(value = "客服名称") + private String name; + + /** 添加图片地址 */ + @Excel(name = "添加图片地址") + @ApiModelProperty(value = "添加图片地址") + private String url; + + /** 启用状态 */ + @Excel(name = "启用状态") + @ApiModelProperty(value = "启用状态") + private String status; + +} diff --git a/playlet-system/src/main/java/com/playlet/system/mapper/PlayletCustomerServiceMapper.java b/playlet-system/src/main/java/com/playlet/system/mapper/PlayletCustomerServiceMapper.java new file mode 100644 index 0000000..f8438e1 --- /dev/null +++ b/playlet-system/src/main/java/com/playlet/system/mapper/PlayletCustomerServiceMapper.java @@ -0,0 +1,62 @@ +package com.playlet.system.mapper; + +import java.util.List; +import com.playlet.system.domain.PlayletCustomerService; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * 短剧客服管理Mapper接口 + * + * @author ruoyi + * @date 2024-03-20 + */ +public interface PlayletCustomerServiceMapper extends BaseMapper +{ + /** + * 查询短剧客服管理 + * + * @param id 短剧客服管理主键 + * @return 短剧客服管理 + */ + public PlayletCustomerService selectPlayletCustomerServiceById(Long id); + + /** + * 查询短剧客服管理列表 + * + * @param playletCustomerService 短剧客服管理 + * @return 短剧客服管理集合 + */ + public List selectPlayletCustomerServiceList(PlayletCustomerService playletCustomerService); + + /** + * 新增短剧客服管理 + * + * @param playletCustomerService 短剧客服管理 + * @return 结果 + */ + public int insertPlayletCustomerService(PlayletCustomerService playletCustomerService); + + /** + * 修改短剧客服管理 + * + * @param playletCustomerService 短剧客服管理 + * @return 结果 + */ + public int updatePlayletCustomerService(PlayletCustomerService playletCustomerService); + + /** + * 删除短剧客服管理 + * + * @param id 短剧客服管理主键 + * @return 结果 + */ + public int deletePlayletCustomerServiceById(Long id); + + /** + * 批量删除短剧客服管理 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deletePlayletCustomerServiceByIds(String[] ids); +} diff --git a/playlet-system/src/main/java/com/playlet/system/service/IPlayletCustomerServiceService.java b/playlet-system/src/main/java/com/playlet/system/service/IPlayletCustomerServiceService.java new file mode 100644 index 0000000..0733d96 --- /dev/null +++ b/playlet-system/src/main/java/com/playlet/system/service/IPlayletCustomerServiceService.java @@ -0,0 +1,62 @@ +package com.playlet.system.service; + +import java.util.List; +import com.playlet.system.domain.PlayletCustomerService; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * 短剧客服管理Service接口 + * + * @author ruoyi + * @date 2024-03-20 + */ +public interface IPlayletCustomerServiceService extends IService +{ + /** + * 查询短剧客服管理 + * + * @param id 短剧客服管理主键 + * @return 短剧客服管理 + */ + public PlayletCustomerService selectPlayletCustomerServiceById(Long id); + + /** + * 查询短剧客服管理列表 + * + * @param playletCustomerService 短剧客服管理 + * @return 短剧客服管理集合 + */ + public List selectPlayletCustomerServiceList(PlayletCustomerService playletCustomerService); + + /** + * 新增短剧客服管理 + * + * @param playletCustomerService 短剧客服管理 + * @return 结果 + */ + public int insertPlayletCustomerService(PlayletCustomerService playletCustomerService); + + /** + * 修改短剧客服管理 + * + * @param playletCustomerService 短剧客服管理 + * @return 结果 + */ + public int updatePlayletCustomerService(PlayletCustomerService playletCustomerService); + + /** + * 批量删除短剧客服管理 + * + * @param ids 需要删除的短剧客服管理主键集合 + * @return 结果 + */ + public int deletePlayletCustomerServiceByIds(String ids); + + /** + * 删除短剧客服管理信息 + * + * @param id 短剧客服管理主键 + * @return 结果 + */ + public int deletePlayletCustomerServiceById(Long id); +} diff --git a/playlet-system/src/main/java/com/playlet/system/service/impl/PlayletCustomerServiceServiceImpl.java b/playlet-system/src/main/java/com/playlet/system/service/impl/PlayletCustomerServiceServiceImpl.java new file mode 100644 index 0000000..5ef7637 --- /dev/null +++ b/playlet-system/src/main/java/com/playlet/system/service/impl/PlayletCustomerServiceServiceImpl.java @@ -0,0 +1,98 @@ +package com.playlet.system.service.impl; + +import java.util.List; +import com.playlet.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.playlet.system.mapper.PlayletCustomerServiceMapper; +import com.playlet.system.domain.PlayletCustomerService; +import com.playlet.system.service.IPlayletCustomerServiceService; +import com.playlet.common.core.text.Convert; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * 短剧客服管理Service业务层处理 + * + * @author ruoyi + * @date 2024-03-20 + */ +@Service +public class PlayletCustomerServiceServiceImpl extends ServiceImpl implements IPlayletCustomerServiceService +{ + @Autowired + private PlayletCustomerServiceMapper playletCustomerServiceMapper; + + /** + * 查询短剧客服管理 + * + * @param id 短剧客服管理主键 + * @return 短剧客服管理 + */ + @Override + public PlayletCustomerService selectPlayletCustomerServiceById(Long id) + { + return playletCustomerServiceMapper.selectPlayletCustomerServiceById(id); + } + + /** + * 查询短剧客服管理列表 + * + * @param playletCustomerService 短剧客服管理 + * @return 短剧客服管理 + */ + @Override + public List selectPlayletCustomerServiceList(PlayletCustomerService playletCustomerService) + { + return playletCustomerServiceMapper.selectPlayletCustomerServiceList(playletCustomerService); + } + + /** + * 新增短剧客服管理 + * + * @param playletCustomerService 短剧客服管理 + * @return 结果 + */ + @Override + public int insertPlayletCustomerService(PlayletCustomerService playletCustomerService) + { + playletCustomerService.setCreateTime(DateUtils.getNowDate()); + return playletCustomerServiceMapper.insertPlayletCustomerService(playletCustomerService); + } + + /** + * 修改短剧客服管理 + * + * @param playletCustomerService 短剧客服管理 + * @return 结果 + */ + @Override + public int updatePlayletCustomerService(PlayletCustomerService playletCustomerService) + { + playletCustomerService.setUpdateTime(DateUtils.getNowDate()); + return playletCustomerServiceMapper.updatePlayletCustomerService(playletCustomerService); + } + + /** + * 批量删除短剧客服管理 + * + * @param ids 需要删除的短剧客服管理主键 + * @return 结果 + */ + @Override + public int deletePlayletCustomerServiceByIds(String ids) + { + return playletCustomerServiceMapper.deletePlayletCustomerServiceByIds(Convert.toStrArray(ids)); + } + + /** + * 删除短剧客服管理信息 + * + * @param id 短剧客服管理主键 + * @return 结果 + */ + @Override + public int deletePlayletCustomerServiceById(Long id) + { + return playletCustomerServiceMapper.deletePlayletCustomerServiceById(id); + } +} diff --git a/playlet-system/src/main/resources/mapper/system/PlayletCustomerServiceMapper.xml b/playlet-system/src/main/resources/mapper/system/PlayletCustomerServiceMapper.xml new file mode 100644 index 0000000..1e11c57 --- /dev/null +++ b/playlet-system/src/main/resources/mapper/system/PlayletCustomerServiceMapper.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + select ID, name, url, status, CREATE_BY, CREATE_TIME, UPDATE_BY, UPDATE_TIME, REMARK from playlet_customer_service + + + + + + + + insert into playlet_customer_service + + name, + url, + status, + CREATE_BY, + CREATE_TIME, + UPDATE_BY, + UPDATE_TIME, + REMARK, + + + #{name}, + #{url}, + #{status}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + + + + + update playlet_customer_service + + name = #{name}, + url = #{url}, + status = #{status}, + CREATE_BY = #{createBy}, + CREATE_TIME = #{createTime}, + UPDATE_BY = #{updateBy}, + UPDATE_TIME = #{updateTime}, + REMARK = #{remark}, + + where ID = #{id} + + + + delete from playlet_customer_service where ID = #{id} + + + + delete from playlet_customer_service where ID in + + #{id} + + + + \ No newline at end of file