+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+
+/**
+ * 启动页管理 启动页管理
+ *
+ * @author elink elink@elink-cn.com
+ * @since v1.0.0 2020-03-24
+ */
+@Data
+public class StartupPageDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键
+ */
+ private String id;
+
+ /**
+ * 图片地址
+ */
+ private String imgUrl;
+
+ /**
+ * 图片地址 - 前台展示使用
+ */
+ private List imgUrlList;
+
+ /**
+ * 停留时长 单位:秒
+ */
+ private Integer duration;
+
+ /**
+ * 启用标识 0:否,1:是
+ */
+ private String enableFlag;
+
+ /**
+ * 备注
+ */
+ private String remark;
+
+ /**
+ * 乐观锁
+ */
+ private Integer revision;
+
+ /**
+ * 创建人
+ */
+ private String createdBy;
+
+ /**
+ * 创建时间
+ */
+ private Date createdTime;
+
+ /**
+ * 更新人
+ */
+ private String updatedBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updatedTime;
+
+ /**
+ * 删除标记
+ */
+ private String delFlag;
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/StartupPageResultDTO.java b/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/StartupPageResultDTO.java
new file mode 100755
index 00000000..1d1ed0d5
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/StartupPageResultDTO.java
@@ -0,0 +1,53 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+
+/**
+ * 欢迎页结果
+ *
+ * @author elink elink@elink-cn.com
+ * @since v1.0.0 2020-03-24
+ */
+@Data
+public class StartupPageResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 启动页ID
+ */
+ private String id;
+
+ /**
+ * 图片地址
+ */
+ private String imgUrl;
+
+ /**
+ * 停留时长 单位:秒
+ */
+ private Integer duration;
+
+
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/StartupController.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/StartupController.java
new file mode 100755
index 00000000..d0abb9ff
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/StartupController.java
@@ -0,0 +1,54 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.controller;
+
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.dto.result.StartupPageResultDTO;
+import com.elink.esua.epdc.service.StartupPageService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+
+/**
+ * 启动页管理 启动页管理
+ *
+ * @author elink elink@elink-cn.com
+ * @since v1.0.0 2020-03-24
+ */
+@RestController
+@RequestMapping("startup")
+public class StartupController {
+
+ @Autowired
+ private StartupPageService startupPageService;
+
+ /**
+ * @Description 获取欢迎页信息
+ * @Author songyunpeng
+ * @Date 2020/3/25
+ * @Param []
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ **/
+ @GetMapping("getStartupPage")
+ public Result getStartupPage(){
+ StartupPageResultDTO data = startupPageService.getStartupPage();
+ return new Result().ok(data);
+ }
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/StartupPageController.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/StartupPageController.java
new file mode 100755
index 00000000..aadbd4a8
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/StartupPageController.java
@@ -0,0 +1,93 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.controller;
+
+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.StartupPageDTO;
+import com.elink.esua.epdc.excel.StartupPageExcel;
+import com.elink.esua.epdc.service.StartupPageService;
+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 elink elink@elink-cn.com
+ * @since v1.0.0 2020-03-24
+ */
+@RestController
+@RequestMapping("startuppage")
+public class StartupPageController {
+
+ @Autowired
+ private StartupPageService startupPageService;
+
+ @GetMapping("page")
+ public Result> page(@RequestParam Map params){
+ PageData page = startupPageService.listPage(params);
+ return new Result>().ok(page);
+ }
+
+ @GetMapping("{id}")
+ public Result get(@PathVariable("id") String id){
+ StartupPageDTO data = startupPageService.get(id);
+ return new Result().ok(data);
+ }
+
+ @PostMapping
+ public Result save(@RequestBody StartupPageDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
+ startupPageService.save(dto);
+ return new Result();
+ }
+
+ @PutMapping
+ public Result update(@RequestBody StartupPageDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
+ startupPageService.update(dto);
+ return new Result();
+ }
+
+ @DeleteMapping
+ public Result delete(@RequestBody String[] ids){
+ //效验数据
+ AssertUtils.isArrayEmpty(ids, "id");
+ startupPageService.delete(ids);
+ return new Result();
+ }
+
+ @GetMapping("export")
+ public void export(@RequestParam Map params, HttpServletResponse response) throws Exception {
+ List list = startupPageService.list(params);
+ ExcelUtils.exportExcelToTarget(response, null, list, StartupPageExcel.class);
+ }
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/dao/StartupPageDao.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/dao/StartupPageDao.java
new file mode 100755
index 00000000..da4823c8
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/dao/StartupPageDao.java
@@ -0,0 +1,53 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.dao;
+
+import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
+import com.elink.esua.epdc.dto.StartupPageDTO;
+import com.elink.esua.epdc.dto.result.StartupPageResultDTO;
+import com.elink.esua.epdc.entity.StartupPageEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 启动页管理 启动页管理
+ *
+ * @author elink elink@elink-cn.com
+ * @since v1.0.0 2020-03-24
+ */
+@Mapper
+public interface StartupPageDao extends BaseDao {
+ /**
+ * @Description pc端获取列表
+ * @Author songyunpeng
+ * @Date 2020/3/24
+ * @Param [params]
+ * @return java.util.List
+ **/
+ List selectListOfStartupPageDTO(Map params);
+ /**
+ * @Description 获取欢迎页信息
+ * @Author songyunpeng
+ * @Date 2020/3/24
+ * @Param []
+ * @return com.elink.esua.dto.StartupPageDTO
+ **/
+ StartupPageResultDTO getStartupPage();
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/entity/StartupPageEntity.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/entity/StartupPageEntity.java
new file mode 100755
index 00000000..de24d750
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/entity/StartupPageEntity.java
@@ -0,0 +1,58 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 启动页管理 启动页管理
+ *
+ * @author elink elink@elink-cn.com
+ * @since v1.0.0 2020-03-24
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("epdc_startup_page")
+public class StartupPageEntity extends BaseEpdcEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 图片地址
+ */
+ private String imgUrl;
+
+ /**
+ * 停留时长 单位:秒
+ */
+ private Integer duration;
+
+ /**
+ * 启用标识 0:否,1:是
+ */
+ private String enableFlag;
+
+ /**
+ * 备注
+ */
+ private String remark;
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/excel/StartupPageExcel.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/excel/StartupPageExcel.java
new file mode 100755
index 00000000..9b81d2b4
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/excel/StartupPageExcel.java
@@ -0,0 +1,68 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.excel;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 启动页管理 启动页管理
+ *
+ * @author elink elink@elink-cn.com
+ * @since v1.0.0 2020-03-24
+ */
+@Data
+public class StartupPageExcel {
+
+ @Excel(name = "主键")
+ private String id;
+
+ @Excel(name = "图片地址")
+ private String imgUrl;
+
+ @Excel(name = "停留时长 单位:秒")
+ private Integer duration;
+
+ @Excel(name = "启用标识 0:否,1:是")
+ private String enableFlag;
+
+ @Excel(name = "备注")
+ private String remark;
+
+ @Excel(name = "乐观锁")
+ private Integer revision;
+
+ @Excel(name = "创建人")
+ private String createdBy;
+
+ @Excel(name = "创建时间")
+ private Date createdTime;
+
+ @Excel(name = "更新人")
+ private String updatedBy;
+
+ @Excel(name = "更新时间")
+ private Date updatedTime;
+
+ @Excel(name = "删除标记")
+ private String delFlag;
+
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/StartupPageService.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/StartupPageService.java
new file mode 100755
index 00000000..72ad551c
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/StartupPageService.java
@@ -0,0 +1,112 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
+import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
+import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
+import com.elink.esua.epdc.dao.StartupPageDao;
+import com.elink.esua.epdc.dto.StartupPageDTO;
+import com.elink.esua.epdc.dto.result.StartupPageResultDTO;
+import com.elink.esua.epdc.entity.StartupPageEntity;
+import com.elink.esua.epdc.service.StartupPageService;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 启动页管理 启动页管理
+ *
+ * @author elink elink@elink-cn.com
+ * @since v1.0.0 2020-03-24
+ */
+@Service
+public class StartupPageServiceImpl extends BaseServiceImpl implements StartupPageService {
+
+
+ @Override
+ public PageData page(Map params) {
+ IPage page = baseDao.selectPage(
+ getPage(params, FieldConstant.CREATED_TIME, false),
+ getWrapper(params)
+ );
+ return getPageData(page, StartupPageDTO.class);
+ }
+
+ @Override
+ public List list(Map params) {
+ List entityList = baseDao.selectList(getWrapper(params));
+
+ return ConvertUtils.sourceToTarget(entityList, StartupPageDTO.class);
+ }
+
+ private QueryWrapper getWrapper(Map params){
+ String id = (String)params.get(FieldConstant.ID_HUMP);
+
+ QueryWrapper wrapper = new QueryWrapper<>();
+ wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
+
+ return wrapper;
+ }
+
+ @Override
+ public StartupPageDTO get(String id) {
+ StartupPageEntity entity = baseDao.selectById(id);
+ return ConvertUtils.sourceToTarget(entity, StartupPageDTO.class);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void save(StartupPageDTO dto) {
+ StartupPageEntity entity = ConvertUtils.sourceToTarget(dto, StartupPageEntity.class);
+ insert(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void update(StartupPageDTO dto) {
+ StartupPageEntity entity = ConvertUtils.sourceToTarget(dto, StartupPageEntity.class);
+ updateById(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void delete(String[] ids) {
+ // 逻辑删除(@TableLogic 注解)
+ baseDao.deleteBatchIds(Arrays.asList(ids));
+ }
+
+ @Override
+ public PageData listPage(Map params) {
+ IPage page = getPage(params);
+ List list = baseDao.selectListOfStartupPageDTO(params);
+ //修改图片
+ list.forEach(startupPageDTO -> {
+ List imgList = Collections.singletonList(startupPageDTO.getImgUrl());
+ startupPageDTO.setImgUrlList(imgList);
+ });
+ return new PageData<>(list, page.getTotal());
+ }
+
+ @Override
+ public StartupPageResultDTO getStartupPage() {
+ return baseDao.getStartupPage();
+ }
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/resources/mapper/StartupPageDao.xml b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/resources/mapper/StartupPageDao.xml
new file mode 100755
index 00000000..1b92d9cd
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/resources/mapper/StartupPageDao.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file