diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/ActInfoDTO.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/ActInfoDTO.java
new file mode 100644
index 000000000..4ca82872f
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/ActInfoDTO.java
@@ -0,0 +1,207 @@
+/**
+ * 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.activity;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * 活动信息表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2019-12-11
+ */
+@Data
+public class ActInfoDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键
+ */
+ private String id;
+
+ /**
+ * 标题
+ */
+ private String title;
+
+ /**
+ * 活动头图
+ */
+ private String headPic;
+
+ /**
+ * 报名开始时间
+ */
+ private Date signupStartTime;
+
+ /**
+ * 报名截止时间
+ */
+ private Date signupEndTime;
+
+ /**
+ * 活动开始时间
+ */
+ private Date actStartTime;
+
+ /**
+ * 活动结束时间
+ */
+ private Date actEndTime;
+
+ /**
+ * 活动地点
+ */
+ private String actAddress;
+
+ /**
+ * 活动位置经度
+ */
+ private BigDecimal actLongitude;
+
+ /**
+ * 活动位置纬度
+ */
+ private BigDecimal actLatitude;
+
+ /**
+ * 活动签到打卡地点
+ */
+ private String signinAddress;
+
+ /**
+ * 活动签到打卡位置经度
+ */
+ private BigDecimal signinLongitude;
+
+ /**
+ * 活动签到打卡位置纬度
+ */
+ private BigDecimal signinLatitude;
+
+ /**
+ * 活动签到打卡半径(单位:米)
+ */
+ private Integer clockRadius;
+
+ /**
+ * 活动名额
+ */
+ private Integer actQuota;
+
+ /**
+ * 已报名人数
+ */
+ private Integer signupNum;
+
+ /**
+ * 活动打卡人数
+ */
+ private Integer clockNum;
+
+ /**
+ * 活动分享数
+ */
+ private Integer actShareNum;
+
+ /**
+ * 活动浏览数
+ */
+ private Integer actBrowseNum;
+
+ /**
+ * 联系人
+ */
+ private String contacts;
+
+ /**
+ * 联系电话
+ */
+ private String tel;
+
+ /**
+ * 招募要求
+ */
+ private String requirement;
+
+ /**
+ * 活动内容
+ */
+ private String actContent;
+
+ /**
+ * 活动发布状态(0-下架,1上架)
+ */
+ private String actStatus;
+
+ /**
+ * 活动发布时间
+ */
+ private Date publishTime;
+
+ /**
+ * 活动主办方
+ */
+ private String sponsor;
+
+ /**
+ * 创建部门ID
+ */
+ private Long deptId;
+
+ /**
+ * 活动惩罚积分
+ */
+ private Integer punishmentPoints;
+
+ /**
+ * 活动奖励积分
+ */
+ private Integer reward;
+
+ /**
+ * 乐观锁
+ */
+ private Integer revision;
+
+ /**
+ * 创建人
+ */
+ private String createdBy;
+
+ /**
+ * 创建时间
+ */
+ private Date createdTime;
+
+ /**
+ * 更新人
+ */
+ private String updatedBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updatedTime;
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/pom.xml b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/pom.xml
index 1c11c8921..4e07823e5 100644
--- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/pom.xml
+++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/pom.xml
@@ -98,7 +98,7 @@
elink@888
-
+
root
shibei@888
@@ -123,7 +123,7 @@
elink@888
-
+
epdc
elink888
@@ -148,7 +148,7 @@
elink@888
-
+
epdc
elink888
diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/controller/DemoController.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/controller/DemoController.java
deleted file mode 100644
index 48e87c871..000000000
--- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/controller/DemoController.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package com.elink.esua.epdc.controller;
-
-import com.elink.esua.epdc.commons.tools.utils.Result;
-import com.elink.esua.epdc.dto.DemoDto;
-import com.elink.esua.epdc.feign.DemoFeignClient;
-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;
-
-import java.util.List;
-
-/**
- *
- * @author yujintao
- * @email yujintao@elink-cn.com
- * @date 2019/8/23 10:59
- */
-@RestController
-@RequestMapping("demo")
-public class DemoController {
-
-
- @Autowired
- private DemoFeignClient demoFeignClient;
-
-
- @GetMapping("listAll")
- public Result> listDemo(){
- Result> listResult = demoFeignClient.listDemo();
- return listResult;
- }
-}
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiScanSwitchController.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/controller/ActInfoController.java
similarity index 54%
rename from esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiScanSwitchController.java
rename to esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/controller/ActInfoController.java
index 137b8ffb6..f9cb51a8d 100644
--- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiScanSwitchController.java
+++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/controller/ActInfoController.java
@@ -15,63 +15,65 @@
* along with this program. If not, see .
*/
-package com.elink.esua.epdc.controller;
+package com.elink.esua.epdc.modules.activity.controller;
+import com.elink.esua.epdc.activity.ActInfoDTO;
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.ScanSwitchDTO;
-import com.elink.esua.epdc.dto.form.EpdcAppScanVersionNumDTO;
-import com.elink.esua.epdc.dto.result.EpdcAppScanFlagDTO;
-import com.elink.esua.epdc.service.ScanSwitchService;
+import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
+import com.elink.esua.epdc.modules.activity.excel.ActInfoExcel;
+import com.elink.esua.epdc.modules.activity.service.ActInfoService;
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 qu qu@elink-cn.com
- * @since v1.0.0 2019-10-10
+ * @since v1.0.0 2019-12-11
*/
@RestController
-@RequestMapping("ma")
-public class ApiScanSwitchController {
+@RequestMapping("actinfo")
+public class ActInfoController {
@Autowired
- private ScanSwitchService scanSwitchService;
+ private ActInfoService actInfoService;
@GetMapping("page")
- public Result> page(@RequestParam Map params){
- PageData page = scanSwitchService.page(params);
- return new Result>().ok(page);
+ public Result> page(@RequestParam Map params){
+ PageData page = actInfoService.page(params);
+ return new Result>().ok(page);
}
@GetMapping("{id}")
- public Result get(@PathVariable("id") String id){
- ScanSwitchDTO data = scanSwitchService.get(id);
- return new Result().ok(data);
+ public Result get(@PathVariable("id") String id){
+ ActInfoDTO data = actInfoService.get(id);
+ return new Result().ok(data);
}
@PostMapping
- public Result save(@RequestBody ScanSwitchDTO dto){
+ public Result save(@RequestBody ActInfoDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
- scanSwitchService.save(dto);
+ actInfoService.save(dto);
return new Result();
}
@PutMapping
- public Result update(@RequestBody ScanSwitchDTO dto){
+ public Result update(@RequestBody ActInfoDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
- scanSwitchService.update(dto);
+ actInfoService.update(dto);
return new Result();
}
@@ -79,22 +81,14 @@ public class ApiScanSwitchController {
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
- scanSwitchService.delete(ids);
+ actInfoService.delete(ids);
return new Result();
}
-
- /***
- * 前端接口开关
- * @return com.elink.esua.epdc.commons.tools.utils.Result
- * @author qushutong
- * @date 2019/10/10 11:58
- */
- @GetMapping("scanSwitch")
- public Result get(EpdcAppScanVersionNumDTO scanVersionNumDTO){
- //效验数据
- ValidatorUtils.validateEntity(scanVersionNumDTO);
- EpdcAppScanFlagDTO data = scanSwitchService.getOneScanInfo(scanVersionNumDTO);
- return new Result().ok(data);
+ @GetMapping("export")
+ public void export(@RequestParam Map params, HttpServletResponse response) throws Exception {
+ List list = actInfoService.list(params);
+ ExcelUtils.exportExcelToTarget(response, null, list, ActInfoExcel.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/ScanSwitchDao.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActInfoDao.java
similarity index 59%
rename from esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/dao/ScanSwitchDao.java
rename to esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActInfoDao.java
index c73d1dbf3..cbe71c78f 100644
--- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/dao/ScanSwitchDao.java
+++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActInfoDao.java
@@ -15,30 +15,19 @@
* along with this program. If not, see .
*/
-package com.elink.esua.epdc.dao;
+package com.elink.esua.epdc.modules.activity.dao;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
-import com.elink.esua.epdc.dto.form.EpdcAppScanVersionNumDTO;
-import com.elink.esua.epdc.dto.result.EpdcAppScanFlagDTO;
-import com.elink.esua.epdc.entity.ScanSwitchEntity;
+import com.elink.esua.epdc.modules.activity.entity.ActInfoEntity;
import org.apache.ibatis.annotations.Mapper;
/**
- * 扫码开关
+ * 活动信息表
*
* @author qu qu@elink-cn.com
- * @since v1.0.0 2019-10-10
+ * @since v1.0.0 2019-12-11
*/
@Mapper
-public interface ScanSwitchDao extends BaseDao {
-
- /***
- * 前端获取开关
- * @param
- * @return com.elink.esua.epdc.dto.form.EpdcAppScanVersionNumDTO
- * @author qushutong
- * @date 2019/10/10 12:01
- */
- EpdcAppScanFlagDTO selectOneOfScanInfo(EpdcAppScanVersionNumDTO scanVersionNumDTO);
+public interface ActInfoDao extends BaseDao {
}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/entity/ActInfoEntity.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/entity/ActInfoEntity.java
new file mode 100644
index 000000000..c0570d0c4
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/entity/ActInfoEntity.java
@@ -0,0 +1,182 @@
+/**
+ * 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.modules.activity.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 活动信息表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2019-12-11
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("epdc_act_info")
+public class ActInfoEntity extends BaseEpdcEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 标题
+ */
+ private String title;
+
+ /**
+ * 活动头图
+ */
+ private String headPic;
+
+ /**
+ * 报名开始时间
+ */
+ private Date signupStartTime;
+
+ /**
+ * 报名截止时间
+ */
+ private Date signupEndTime;
+
+ /**
+ * 活动开始时间
+ */
+ private Date actStartTime;
+
+ /**
+ * 活动结束时间
+ */
+ private Date actEndTime;
+
+ /**
+ * 活动地点
+ */
+ private String actAddress;
+
+ /**
+ * 活动位置经度
+ */
+ private BigDecimal actLongitude;
+
+ /**
+ * 活动位置纬度
+ */
+ private BigDecimal actLatitude;
+
+ /**
+ * 活动签到打卡地点
+ */
+ private String signinAddress;
+
+ /**
+ * 活动签到打卡位置经度
+ */
+ private BigDecimal signinLongitude;
+
+ /**
+ * 活动签到打卡位置纬度
+ */
+ private BigDecimal signinLatitude;
+
+ /**
+ * 活动签到打卡半径(单位:米)
+ */
+ private Integer clockRadius;
+
+ /**
+ * 活动名额
+ */
+ private Integer actQuota;
+
+ /**
+ * 已报名人数
+ */
+ private Integer signupNum;
+
+ /**
+ * 活动打卡人数
+ */
+ private Integer clockNum;
+
+ /**
+ * 活动分享数
+ */
+ private Integer actShareNum;
+
+ /**
+ * 活动浏览数
+ */
+ private Integer actBrowseNum;
+
+ /**
+ * 联系人
+ */
+ private String contacts;
+
+ /**
+ * 联系电话
+ */
+ private String tel;
+
+ /**
+ * 招募要求
+ */
+ private String requirement;
+
+ /**
+ * 活动内容
+ */
+ private String actContent;
+
+ /**
+ * 活动发布状态(0-下架,1上架)
+ */
+ private String actStatus;
+
+ /**
+ * 活动发布时间
+ */
+ private Date publishTime;
+
+ /**
+ * 活动主办方
+ */
+ private String sponsor;
+
+ /**
+ * 创建部门ID
+ */
+ private Long deptId;
+
+ /**
+ * 活动惩罚积分
+ */
+ private Integer punishmentPoints;
+
+ /**
+ * 活动奖励积分
+ */
+ private Integer reward;
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/excel/ActInfoExcel.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/excel/ActInfoExcel.java
new file mode 100644
index 000000000..c34943fc3
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/excel/ActInfoExcel.java
@@ -0,0 +1,138 @@
+/**
+ * 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.modules.activity.excel;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 活动信息表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2019-12-11
+ */
+@Data
+public class ActInfoExcel {
+
+ @Excel(name = "主键")
+ private String id;
+
+ @Excel(name = "标题")
+ private String title;
+
+ @Excel(name = "活动头图")
+ private String headPic;
+
+ @Excel(name = "报名开始时间")
+ private Date signupStartTime;
+
+ @Excel(name = "报名截止时间")
+ private Date signupEndTime;
+
+ @Excel(name = "活动开始时间")
+ private Date actStartTime;
+
+ @Excel(name = "活动结束时间")
+ private Date actEndTime;
+
+ @Excel(name = "活动地点")
+ private String actAddress;
+
+ @Excel(name = "活动位置经度")
+ private BigDecimal actLongitude;
+
+ @Excel(name = "活动位置纬度")
+ private BigDecimal actLatitude;
+
+ @Excel(name = "活动签到打卡地点")
+ private String signinAddress;
+
+ @Excel(name = "活动签到打卡位置经度")
+ private BigDecimal signinLongitude;
+
+ @Excel(name = "活动签到打卡位置纬度")
+ private BigDecimal signinLatitude;
+
+ @Excel(name = "活动签到打卡半径(单位:米)")
+ private Integer clockRadius;
+
+ @Excel(name = "活动名额")
+ private Integer actQuota;
+
+ @Excel(name = "已报名人数")
+ private Integer signupNum;
+
+ @Excel(name = "活动打卡人数")
+ private Integer clockNum;
+
+ @Excel(name = "活动分享数")
+ private Integer actShareNum;
+
+ @Excel(name = "活动浏览数")
+ private Integer actBrowseNum;
+
+ @Excel(name = "联系人")
+ private String contacts;
+
+ @Excel(name = "联系电话")
+ private String tel;
+
+ @Excel(name = "招募要求")
+ private String requirement;
+
+ @Excel(name = "活动内容")
+ private String actContent;
+
+ @Excel(name = "活动发布状态(0-下架,1上架)")
+ private String actStatus;
+
+ @Excel(name = "活动发布时间")
+ private Date publishTime;
+
+ @Excel(name = "活动主办方")
+ private String sponsor;
+
+ @Excel(name = "创建部门ID")
+ private Long deptId;
+
+ @Excel(name = "活动惩罚积分")
+ private Integer punishmentPoints;
+
+ @Excel(name = "活动奖励积分")
+ private Integer reward;
+
+ @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;
+
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/redis/ActInfoRedis.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/redis/ActInfoRedis.java
new file mode 100644
index 000000000..8d00799c6
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/redis/ActInfoRedis.java
@@ -0,0 +1,47 @@
+/**
+ * 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.modules.activity.redis;
+
+import com.elink.esua.epdc.commons.tools.redis.RedisUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+/**
+ * 活动信息表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2019-12-11
+ */
+@Component
+public class ActInfoRedis {
+ @Autowired
+ private RedisUtils redisUtils;
+
+ public void delete(Object[] ids) {
+
+ }
+
+ public void set(){
+
+ }
+
+ public String get(String id){
+ return null;
+ }
+
+}
\ 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/ScanSwitchService.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/ActInfoService.java
similarity index 58%
rename from esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/ScanSwitchService.java
rename to esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/ActInfoService.java
index 327a31b87..5020ca039 100644
--- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/ScanSwitchService.java
+++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/ActInfoService.java
@@ -15,55 +15,53 @@
* along with this program. If not, see .
*/
-package com.elink.esua.epdc.service;
+package com.elink.esua.epdc.modules.activity.service;
+import com.elink.esua.epdc.activity.ActInfoDTO;
import com.elink.esua.epdc.commons.mybatis.service.BaseService;
import com.elink.esua.epdc.commons.tools.page.PageData;
-import com.elink.esua.epdc.dto.ScanSwitchDTO;
-import com.elink.esua.epdc.dto.form.EpdcAppScanVersionNumDTO;
-import com.elink.esua.epdc.dto.result.EpdcAppScanFlagDTO;
-import com.elink.esua.epdc.entity.ScanSwitchEntity;
+import com.elink.esua.epdc.modules.activity.entity.ActInfoEntity;
import java.util.List;
import java.util.Map;
/**
- * 扫码开关
+ * 活动信息表
*
* @author qu qu@elink-cn.com
- * @since v1.0.0 2019-10-10
+ * @since v1.0.0 2019-12-11
*/
-public interface ScanSwitchService extends BaseService {
+public interface ActInfoService extends BaseService {
/**
* 默认分页
*
* @param params
- * @return PageData
+ * @return PageData
* @author generator
- * @date 2019-10-10
+ * @date 2019-12-11
*/
- PageData page(Map params);
+ PageData page(Map params);
/**
* 默认查询
*
* @param params
- * @return java.util.List
+ * @return java.util.List
* @author generator
- * @date 2019-10-10
+ * @date 2019-12-11
*/
- List list(Map params);
+ List list(Map params);
/**
* 单条查询
*
* @param id
- * @return ScanSwitchDTO
+ * @return ActInfoDTO
* @author generator
- * @date 2019-10-10
+ * @date 2019-12-11
*/
- ScanSwitchDTO get(String id);
+ ActInfoDTO get(String id);
/**
* 默认保存
@@ -71,9 +69,9 @@ public interface ScanSwitchService extends BaseService {
* @param dto
* @return void
* @author generator
- * @date 2019-10-10
+ * @date 2019-12-11
*/
- void save(ScanSwitchDTO dto);
+ void save(ActInfoDTO dto);
/**
* 默认更新
@@ -81,9 +79,9 @@ public interface ScanSwitchService extends BaseService {
* @param dto
* @return void
* @author generator
- * @date 2019-10-10
+ * @date 2019-12-11
*/
- void update(ScanSwitchDTO dto);
+ void update(ActInfoDTO dto);
/**
* 批量删除
@@ -91,17 +89,7 @@ public interface ScanSwitchService extends BaseService {
* @param ids
* @return void
* @author generator
- * @date 2019-10-10
+ * @date 2019-12-11
*/
void delete(String[] ids);
-
-
- /***
- * 前端获取开关
- * @param
- * @return com.elink.esua.epdc.dto.form.EpdcAppScanVersionNumDTO
- * @author qushutong
- * @date 2019/10/10 12:01
- */
- EpdcAppScanFlagDTO getOneScanInfo(EpdcAppScanVersionNumDTO scanVersionNumDTO);
}
\ 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/impl/ScanSwitchServiceImpl.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActInfoServiceImpl.java
similarity index 56%
rename from esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/ScanSwitchServiceImpl.java
rename to esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActInfoServiceImpl.java
index b7787f550..9497e5efe 100644
--- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/ScanSwitchServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActInfoServiceImpl.java
@@ -15,20 +15,21 @@
* along with this program. If not, see .
*/
-package com.elink.esua.epdc.service.impl;
+package com.elink.esua.epdc.modules.activity.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.elink.esua.epdc.activity.ActInfoDTO;
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.ScanSwitchDao;
-import com.elink.esua.epdc.dto.ScanSwitchDTO;
-import com.elink.esua.epdc.dto.form.EpdcAppScanVersionNumDTO;
-import com.elink.esua.epdc.dto.result.EpdcAppScanFlagDTO;
-import com.elink.esua.epdc.entity.ScanSwitchEntity;
-import com.elink.esua.epdc.service.ScanSwitchService;
+import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
+
+import com.elink.esua.epdc.modules.activity.dao.ActInfoDao;
+import com.elink.esua.epdc.modules.activity.entity.ActInfoEntity;
+import com.elink.esua.epdc.modules.activity.redis.ActInfoRedis;
+
+import com.elink.esua.epdc.modules.activity.service.ActInfoService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -39,58 +40,59 @@ import java.util.List;
import java.util.Map;
/**
- * 扫码开关
+ * 活动信息表
*
* @author qu qu@elink-cn.com
- * @since v1.0.0 2019-10-10
+ * @since v1.0.0 2019-12-11
*/
@Service
-public class ScanSwitchServiceImpl extends BaseServiceImpl implements ScanSwitchService {
+public class ActInfoServiceImpl extends BaseServiceImpl implements ActInfoService {
@Autowired
+ private ActInfoRedis actInfoRedis;
@Override
- public PageData page(Map params) {
- IPage page = baseDao.selectPage(
+ public PageData page(Map params) {
+ IPage page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
- return getPageData(page, ScanSwitchDTO.class);
+ return getPageData(page, ActInfoDTO.class);
}
@Override
- public List list(Map params) {
- List entityList = baseDao.selectList(getWrapper(params));
+ public List list(Map params) {
+ List entityList = baseDao.selectList(getWrapper(params));
- return ConvertUtils.sourceToTarget(entityList, ScanSwitchDTO.class);
+ return ConvertUtils.sourceToTarget(entityList, ActInfoDTO.class);
}
- private QueryWrapper getWrapper(Map params){
+ private QueryWrapper getWrapper(Map params){
String id = (String)params.get(FieldConstant.ID_HUMP);
- QueryWrapper wrapper = new QueryWrapper<>();
+ QueryWrapper wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
- public ScanSwitchDTO get(String id) {
- ScanSwitchEntity entity = baseDao.selectById(id);
- return ConvertUtils.sourceToTarget(entity, ScanSwitchDTO.class);
+ public ActInfoDTO get(String id) {
+ ActInfoEntity entity = baseDao.selectById(id);
+ return ConvertUtils.sourceToTarget(entity, ActInfoDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
- public void save(ScanSwitchDTO dto) {
- ScanSwitchEntity entity = ConvertUtils.sourceToTarget(dto, ScanSwitchEntity.class);
+ public void save(ActInfoDTO dto) {
+ ActInfoEntity entity = ConvertUtils.sourceToTarget(dto, ActInfoEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
- public void update(ScanSwitchDTO dto) {
- ScanSwitchEntity entity = ConvertUtils.sourceToTarget(dto, ScanSwitchEntity.class);
+ public void update(ActInfoDTO dto) {
+ ActInfoEntity entity = ConvertUtils.sourceToTarget(dto, ActInfoEntity.class);
updateById(entity);
}
@@ -101,9 +103,4 @@ public class ScanSwitchServiceImpl extends BaseServiceImpl
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file