From 3ff987764b022a66eb3c6a764a7b32ea25206a51 Mon Sep 17 00:00:00 2001 From: wangchao Date: Mon, 20 Jul 2020 18:08:46 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=A7=AF=E5=88=86=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dto/PointRuleDTO.java | 126 +++++++++++++++++ .../epmet/dto/PointVerificationLogDTO.java | 131 ++++++++++++++++++ .../PointVerificationStatisticalDailyDTO.java | 121 ++++++++++++++++ .../java/com/epmet/dto/SysOperateLogDTO.java | 106 ++++++++++++++ .../com/epmet/dto/UserPointActionLogDTO.java | 112 +++++++++++++++ .../dto/UserPointStatisticalDailyDTO.java | 111 +++++++++++++++ .../java/com/epmet/dto/UserPointTotalDTO.java | 96 +++++++++++++ .../java/{ => com/epmet}/dto/form/.gitkeep | 0 .../java/{ => com/epmet}/dto/result/.gitkeep | 0 .../feign/EpmetPointOpenFeignClient.java | 4 +- .../EpmetPointOpenFeignClientFallback.java | 4 +- .../epmet-point/epmet-point-server/pom.xml | 6 + .../controller/AdjustmentController.java | 14 ++ .../epmet/controller/ExchangeController.java | 14 ++ .../epmet/controller/ResiPointController.java | 14 ++ .../main/java/com/epmet/dao/PointRuleDao.java | 33 +++++ .../epmet/dao/PointVerificationLogDao.java | 33 +++++ .../PointVerificationStatisticalDailyDao.java | 33 +++++ .../java/com/epmet/dao/SysOperateLogDao.java | 33 +++++ .../com/epmet/dao/UserPointActionLogDao.java | 33 +++++ .../dao/UserPointStatisticalDailyDao.java | 33 +++++ .../java/com/epmet/dao/UserPointTotalDao.java | 33 +++++ .../com/epmet/entity/PointRuleEntity.java | 96 +++++++++++++ .../entity/PointVerificationLogEntity.java | 101 ++++++++++++++ ...intVerificationStatisticalDailyEntity.java | 91 ++++++++++++ .../com/epmet/entity/SysOperateLogEntity.java | 76 ++++++++++ .../entity/UserPointActionLogEntity.java | 82 +++++++++++ .../UserPointStatisticalDailyEntity.java | 81 +++++++++++ .../epmet/entity/UserPointTotalEntity.java | 66 +++++++++ .../java/com/epmet/excel/PointRuleExcel.java | 89 ++++++++++++ .../excel/PointVerificationLogExcel.java | 92 ++++++++++++ ...ointVerificationStatisticalDailyExcel.java | 86 ++++++++++++ .../com/epmet/excel/SysOperateLogExcel.java | 77 ++++++++++ .../epmet/excel/UserPointActionLogExcel.java | 80 +++++++++++ .../excel/UserPointStatisticalDailyExcel.java | 80 +++++++++++ .../com/epmet/excel/UserPointTotalExcel.java | 71 ++++++++++ .../com/epmet/service/PointRuleService.java | 95 +++++++++++++ .../service/PointVerificationLogService.java | 95 +++++++++++++ ...ntVerificationStatisticalDailyService.java | 95 +++++++++++++ .../epmet/service/SysOperateLogService.java | 95 +++++++++++++ .../service/UserPointActionLogService.java | 95 +++++++++++++ .../UserPointStatisticalDailyService.java | 95 +++++++++++++ .../epmet/service/UserPointTotalService.java | 95 +++++++++++++ .../service/impl/PointRuleServiceImpl.java | 100 +++++++++++++ .../impl/PointVerificationLogServiceImpl.java | 99 +++++++++++++ ...rificationStatisticalDailyServiceImpl.java | 100 +++++++++++++ .../impl/SysOperateLogServiceImpl.java | 99 +++++++++++++ .../impl/UserPointActionLogServiceImpl.java | 100 +++++++++++++ .../UserPointStatisticalDailyServiceImpl.java | 100 +++++++++++++ .../impl/UserPointTotalServiceImpl.java | 100 +++++++++++++ .../main/resources/mapper/PointRuleDao.xml | 28 ++++ .../mapper/PointVerificationLogDao.xml | 29 ++++ .../PointVerificationStatisticalDailyDao.xml | 27 ++++ .../resources/mapper/SysOperateLogDao.xml | 24 ++++ .../mapper/UserPointActionLogDao.xml | 25 ++++ .../mapper/UserPointStatisticalDailyDao.xml | 25 ++++ .../resources/mapper/UserPointTotalDao.xml | 22 +++ 57 files changed, 3797 insertions(+), 4 deletions(-) create mode 100644 epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/PointRuleDTO.java create mode 100644 epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/PointVerificationLogDTO.java create mode 100644 epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/PointVerificationStatisticalDailyDTO.java create mode 100644 epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/SysOperateLogDTO.java create mode 100644 epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/UserPointActionLogDTO.java create mode 100644 epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/UserPointStatisticalDailyDTO.java create mode 100644 epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/UserPointTotalDTO.java rename epmet-module/epmet-point/epmet-point-client/src/main/java/{ => com/epmet}/dto/form/.gitkeep (100%) rename epmet-module/epmet-point/epmet-point-client/src/main/java/{ => com/epmet}/dto/result/.gitkeep (100%) rename epmet-module/epmet-point/epmet-point-client/src/main/java/{ => com/epmet}/feign/EpmetPointOpenFeignClient.java (81%) rename epmet-module/epmet-point/epmet-point-client/src/main/java/{ => com/epmet}/feign/fallback/EpmetPointOpenFeignClientFallback.java (75%) create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/AdjustmentController.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ExchangeController.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ResiPointController.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointRuleDao.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointVerificationLogDao.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointVerificationStatisticalDailyDao.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/SysOperateLogDao.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/UserPointActionLogDao.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/UserPointStatisticalDailyDao.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/UserPointTotalDao.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointRuleEntity.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointVerificationLogEntity.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointVerificationStatisticalDailyEntity.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/SysOperateLogEntity.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/UserPointActionLogEntity.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/UserPointStatisticalDailyEntity.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/UserPointTotalEntity.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/excel/PointRuleExcel.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/excel/PointVerificationLogExcel.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/excel/PointVerificationStatisticalDailyExcel.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/excel/SysOperateLogExcel.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/excel/UserPointActionLogExcel.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/excel/UserPointStatisticalDailyExcel.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/excel/UserPointTotalExcel.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointRuleService.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointVerificationLogService.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointVerificationStatisticalDailyService.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/SysOperateLogService.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointActionLogService.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointStatisticalDailyService.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointTotalService.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointRuleServiceImpl.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointVerificationLogServiceImpl.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointVerificationStatisticalDailyServiceImpl.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/SysOperateLogServiceImpl.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointActionLogServiceImpl.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointStatisticalDailyServiceImpl.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointTotalServiceImpl.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointRuleDao.xml create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointVerificationLogDao.xml create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointVerificationStatisticalDailyDao.xml create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/SysOperateLogDao.xml create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointActionLogDao.xml create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointStatisticalDailyDao.xml create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointTotalDao.xml diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/PointRuleDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/PointRuleDTO.java new file mode 100644 index 0000000000..25251dd36a --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/PointRuleDTO.java @@ -0,0 +1,126 @@ +/** + * 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.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 积分规则表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +@Data +public class PointRuleDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 规则名称 与事件名称保持一致即可 + */ + private String ruleName; + + /** + * 规则说明 事件说明 + */ + private String ruleDesc; + + /** + * 事件CODE 来自事件表 + */ + private String eventCode; + + /** + * 事件名称 来自事件表 + */ + private String eventName; + + /** + * 操作类型 加积分:add;减积分:subtract + */ + private String operateType; + + /** + * 积分上限 + */ + private Integer upLimit; + + /** + * 积分上限描述 + */ + private String upLimitDesc; + + /** + * 获得积分值 + */ + private Integer pointNum; + + /** + * 获得积分单位 次:time;分钟:minute;小时:hour + */ + private String pointUnit; + + /** + * 是否启用 0-否,1-是 + */ + private String enabledFlag; + + /** + * 删除标识 0-否,1-是 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/PointVerificationLogDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/PointVerificationLogDTO.java new file mode 100644 index 0000000000..8c8c1a6db1 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/PointVerificationLogDTO.java @@ -0,0 +1,131 @@ +/** + * 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.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 核销记录/确认表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +@Data +public class PointVerificationLogDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 积分行为记录表ID 关联用户积分行为记录表 + */ + private String actionId; + + /** + * 核销对象 + */ + private String userId; + + /** + * 核销对象首次注册网格 + */ + private String userRegistedGridId; + + /** + * 核销对象首次注册网格所在机关 + */ + private String userRegistedAgnecyId; + + /** + * 核销人员ID + */ + private String operatorId; + + /** + * 核销人员名称 工作人员的昵称,在和核销记录里显示,兑换人、核销人都要显示,核销人昵称格式【xx机关-xxx】(ORG必须是机关级别?),若工作人员日后修改昵称,此项不变 + */ + private String operatorName; + + /** + * 核销人员所属机关ID + */ + private String operatorAgencyId; + + /** + * 核销物品 目前没有做商城,所以商品的信息统一记录并展示核销人员手动输入的信息,必填项,为商品描述,以后如果开发商城体系,此项关联商品的ID + */ + private String exchangedItem; + + /** + * 使用积分 需要多少积分 + */ + private Integer point; + + /** + * 核销人所在位置经度 + */ + private String longitude; + + /** + * 核销人所在位置维度 + */ + private String dimension; + + /** + * 核销人所在位置详细地址 + */ + private String address; + + /** + * 删除标识 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/PointVerificationStatisticalDailyDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/PointVerificationStatisticalDailyDTO.java new file mode 100644 index 0000000000..94ccf1963a --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/PointVerificationStatisticalDailyDTO.java @@ -0,0 +1,121 @@ +/** + * 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.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 工作人员核销数据统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +@Data +public class PointVerificationStatisticalDailyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + private String id; + + /** + * 日 + */ + private String dateId; + + /** + * 周 + */ + private String weekId; + + /** + * 月 + */ + private String monthId; + + /** + * 季 + */ + private String quarterId; + + /** + * 年 + */ + private String yearId; + + /** + * 客户ID + */ + private String customerId; + + /** + * 核销分数 这一天内核销了多少积分,一次insert,多次update + */ + private Integer verificatedPoint; + + /** + * 工作人员机关ID + */ + private String agencyId; + + /** + * 父级机关ID + */ + private String pid; + + /** + * 父级机关ID集合 + */ + private String pids; + + /** + * 删除标识 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 核销工作人员ID + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/SysOperateLogDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/SysOperateLogDTO.java new file mode 100644 index 0000000000..9d0344e07d --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/SysOperateLogDTO.java @@ -0,0 +1,106 @@ +/** + * 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.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 积分系统操作记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +@Data +public class SysOperateLogDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 操作对象ID + */ + private String objectId; + + /** + * 对象类型 规则:rule + */ + private String objectType; + + /** + * 操作类型 新建:add,编辑:edit,删除:del; + */ + private String opType; + + /** + * 操作用户 操作人 + */ + private String opUser; + + /** + * 变更前数据 JSON串 + */ + private String befordData; + + /** + * 变更后数据 JSON串 + */ + private String afterData; + + /** + * 删除标识 0-否,1-是 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/UserPointActionLogDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/UserPointActionLogDTO.java new file mode 100644 index 0000000000..254e53bbd6 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/UserPointActionLogDTO.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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 用户积分行为记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +@Data +public class UserPointActionLogDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 用户ID + */ + private String userId; + + /** + * 客户ID + */ + private String customerId; + + /** + * 加减分标识 plus/minus + */ + private String actionFlag; + + /** + * 来源ID 当来源为积分调整时 通过事件Id查找规则ID计算出分数 通过EVENT_ID能查出RUIE_ID + */ + private String eventId; + + /** + * 活动描述 获取积分的原因,相关内容,用来拼接【用户参加了xxx活动获取?积分】的文案,取活动的名称;【积分调整文案】;其他…… +如果是管理员手动调整扣减积分,ACTION_FLAG为"minus",但是不会生成核销记录,核销记录只保存用户使用积分兑换商品的核销详情 + */ + private String eventStatement; + + /** + * 事件名称 在积分记录里,对应的每一个明细都有一个标题和备注,该项为【标题】 value:活动、阅读文章、首次注册、评论、积分调整(手动)…… + */ + private String eventName; + + /** + * 分值 获取/核销的积分分值 + */ + private Integer point; + + /** + * 操作人所属机关ID 用户获取/核销积分的途径,1.工作人员手动审核积分发放、2.系统事件自动响应,所以CREATED_BY会可能是SYSTEM和工作人员的ID,当CREATED_BY是工作人员ID时,AGENCY_ID为这个工作人员所属的机关ID + */ + private String operatorAgencyId; + + /** + * 删除标识 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 SYSTEM或工作人员ID + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/UserPointStatisticalDailyDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/UserPointStatisticalDailyDTO.java new file mode 100644 index 0000000000..51291b89ef --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/UserPointStatisticalDailyDTO.java @@ -0,0 +1,111 @@ +/** + * 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.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 用户积分统计情况 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +@Data +public class UserPointStatisticalDailyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 日 yyyy-MM-dd + */ + private String dateId; + + /** + * 周 yyyyWcc + */ + private String weekId; + + /** + * 月 yyyy-MM + */ + private String monthId; + + /** + * 季 yyyyQc + */ + private String quarterId; + + /** + * 年 yyyy + */ + private String yearId; + + /** + * 加减积分 plus/minus + */ + private String actionFlag; + + /** + * 客户ID + */ + private String customerId; + + /** + * 积分变动 当获取/核销标识为【plus】时,为这一日的积分增量,为 【miuns】时,为这一日的总的兑换积分数 + */ + private Integer pointChange; + + /** + * 删除标识 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/UserPointTotalDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/UserPointTotalDTO.java new file mode 100644 index 0000000000..bb92d7f476 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/UserPointTotalDTO.java @@ -0,0 +1,96 @@ +/** + * 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.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 用户积分总计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +@Data +public class UserPointTotalDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 用户ID + */ + private String userId; + + /** + * 客户ID + */ + private String customerId; + + /** + * 已兑积分 + */ + private Integer usedPoint; + + /** + * 可用积分 + */ + private Integer usablePoint; + + /** + * 总积分 总积分=已兑积分+剩余积分 + */ + private Integer totalPoint; + + /** + * 删除标识 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/dto/form/.gitkeep b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/.gitkeep similarity index 100% rename from epmet-module/epmet-point/epmet-point-client/src/main/java/dto/form/.gitkeep rename to epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/.gitkeep diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/dto/result/.gitkeep b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/.gitkeep similarity index 100% rename from epmet-module/epmet-point/epmet-point-client/src/main/java/dto/result/.gitkeep rename to epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/.gitkeep diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/feign/EpmetPointOpenFeignClient.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/EpmetPointOpenFeignClient.java similarity index 81% rename from epmet-module/epmet-point/epmet-point-client/src/main/java/feign/EpmetPointOpenFeignClient.java rename to epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/EpmetPointOpenFeignClient.java index 34d20263a2..643542bddc 100644 --- a/epmet-module/epmet-point/epmet-point-client/src/main/java/feign/EpmetPointOpenFeignClient.java +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/EpmetPointOpenFeignClient.java @@ -1,7 +1,7 @@ -package feign; +package com.epmet.feign; import com.epmet.commons.tools.constant.ServiceConstant; -import feign.fallback.EpmetPointOpenFeignClientFallback; +import com.epmet.feign.fallback.EpmetPointOpenFeignClientFallback; import org.springframework.cloud.openfeign.FeignClient; /** diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/feign/fallback/EpmetPointOpenFeignClientFallback.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/fallback/EpmetPointOpenFeignClientFallback.java similarity index 75% rename from epmet-module/epmet-point/epmet-point-client/src/main/java/feign/fallback/EpmetPointOpenFeignClientFallback.java rename to epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/fallback/EpmetPointOpenFeignClientFallback.java index 164d7256d1..7dfd5ee983 100644 --- a/epmet-module/epmet-point/epmet-point-client/src/main/java/feign/fallback/EpmetPointOpenFeignClientFallback.java +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/fallback/EpmetPointOpenFeignClientFallback.java @@ -1,6 +1,6 @@ -package feign.fallback; +package com.epmet.feign.fallback; -import feign.EpmetPointOpenFeignClient; +import com.epmet.feign.EpmetPointOpenFeignClient; import org.springframework.stereotype.Component; /** diff --git a/epmet-module/epmet-point/epmet-point-server/pom.xml b/epmet-module/epmet-point/epmet-point-server/pom.xml index 780c5f7382..962ba4984e 100644 --- a/epmet-module/epmet-point/epmet-point-server/pom.xml +++ b/epmet-module/epmet-point/epmet-point-server/pom.xml @@ -63,6 +63,12 @@ 2.0.0 compile + + com.epmet + epmet-point-client + 2.0.0 + compile + diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/AdjustmentController.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/AdjustmentController.java new file mode 100644 index 0000000000..04d9f2c4b4 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/AdjustmentController.java @@ -0,0 +1,14 @@ +package com.epmet.controller; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @description: 工作人员积分调整Controller + * @date: Created in 2020-07-20 16:38 + * @author: wangc + */ +@RestController +@RequestMapping("work/adjustment") +public class AdjustmentController { +} diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ExchangeController.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ExchangeController.java new file mode 100644 index 0000000000..c3bf13d4ba --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ExchangeController.java @@ -0,0 +1,14 @@ +package com.epmet.controller; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @description: 工作人员积分核销Controller + * @date: Created in 2020-07-20 16:37 + * @author: wangc + */ +@RestController +@RequestMapping("work/exchange") +public class ExchangeController { +} diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ResiPointController.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ResiPointController.java new file mode 100644 index 0000000000..9a935771cb --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ResiPointController.java @@ -0,0 +1,14 @@ +package com.epmet.controller; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @description: 居民端积分信息controller + * @date: Created in 2020-07-20 16:39 + * @author: wangc + */ +@RestController +@RequestMapping("resi/point") +public class ResiPointController { +} diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointRuleDao.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointRuleDao.java new file mode 100644 index 0000000000..3ab8e48b42 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointRuleDao.java @@ -0,0 +1,33 @@ +/** + * 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.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.PointRuleEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 积分规则表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +@Mapper +public interface PointRuleDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointVerificationLogDao.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointVerificationLogDao.java new file mode 100644 index 0000000000..de8e7a2aab --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointVerificationLogDao.java @@ -0,0 +1,33 @@ +/** + * 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.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.PointVerificationLogEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 核销记录/确认表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +@Mapper +public interface PointVerificationLogDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointVerificationStatisticalDailyDao.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointVerificationStatisticalDailyDao.java new file mode 100644 index 0000000000..d123b66210 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointVerificationStatisticalDailyDao.java @@ -0,0 +1,33 @@ +/** + * 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.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.PointVerificationStatisticalDailyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 工作人员核销数据统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +@Mapper +public interface PointVerificationStatisticalDailyDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/SysOperateLogDao.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/SysOperateLogDao.java new file mode 100644 index 0000000000..2721c88716 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/SysOperateLogDao.java @@ -0,0 +1,33 @@ +/** + * 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.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.SysOperateLogEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 积分系统操作记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +@Mapper +public interface SysOperateLogDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/UserPointActionLogDao.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/UserPointActionLogDao.java new file mode 100644 index 0000000000..a611054609 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/UserPointActionLogDao.java @@ -0,0 +1,33 @@ +/** + * 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.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.UserPointActionLogEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 用户积分行为记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +@Mapper +public interface UserPointActionLogDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/UserPointStatisticalDailyDao.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/UserPointStatisticalDailyDao.java new file mode 100644 index 0000000000..9600a5ed9c --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/UserPointStatisticalDailyDao.java @@ -0,0 +1,33 @@ +/** + * 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.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.UserPointStatisticalDailyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 用户积分统计情况 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +@Mapper +public interface UserPointStatisticalDailyDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/UserPointTotalDao.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/UserPointTotalDao.java new file mode 100644 index 0000000000..082dfb12e6 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/UserPointTotalDao.java @@ -0,0 +1,33 @@ +/** + * 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.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.UserPointTotalEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 用户积分总计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +@Mapper +public interface UserPointTotalDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointRuleEntity.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointRuleEntity.java new file mode 100644 index 0000000000..affd55595e --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointRuleEntity.java @@ -0,0 +1,96 @@ +/** + * 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.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 积分规则表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("point_rule") +public class PointRuleEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 规则名称 与事件名称保持一致即可 + */ + private String ruleName; + + /** + * 规则说明 事件说明 + */ + private String ruleDesc; + + /** + * 事件CODE 来自事件表 + */ + private String eventCode; + + /** + * 事件名称 来自事件表 + */ + private String eventName; + + /** + * 操作类型 加积分:add;减积分:subtract + */ + private String operateType; + + /** + * 积分上限 + */ + private Integer upLimit; + + /** + * 积分上限描述 + */ + private String upLimitDesc; + + /** + * 获得积分值 + */ + private Integer pointNum; + + /** + * 获得积分单位 次:time;分钟:minute;小时:hour + */ + private String pointUnit; + + /** + * 是否启用 0-否,1-是 + */ + private String enabledFlag; + +} diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointVerificationLogEntity.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointVerificationLogEntity.java new file mode 100644 index 0000000000..5e9de373e1 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointVerificationLogEntity.java @@ -0,0 +1,101 @@ +/** + * 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.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 核销记录/确认表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("point_verification_log") +public class PointVerificationLogEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 积分行为记录表ID 关联用户积分行为记录表 + */ + private String actionId; + + /** + * 核销对象 + */ + private String userId; + + /** + * 核销对象首次注册网格 + */ + private String userRegistedGridId; + + /** + * 核销对象首次注册网格所在机关 + */ + private String userRegistedAgnecyId; + + /** + * 核销人员ID + */ + private String operatorId; + + /** + * 核销人员名称 工作人员的昵称,在和核销记录里显示,兑换人、核销人都要显示,核销人昵称格式【xx机关-xxx】(ORG必须是机关级别?),若工作人员日后修改昵称,此项不变 + */ + private String operatorName; + + /** + * 核销人员所属机关ID + */ + private String operatorAgencyId; + + /** + * 核销物品 目前没有做商城,所以商品的信息统一记录并展示核销人员手动输入的信息,必填项,为商品描述,以后如果开发商城体系,此项关联商品的ID + */ + private String exchangedItem; + + /** + * 使用积分 需要多少积分 + */ + private Integer point; + + /** + * 核销人所在位置经度 + */ + private String longitude; + + /** + * 核销人所在位置维度 + */ + private String dimension; + + /** + * 核销人所在位置详细地址 + */ + private String address; + +} diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointVerificationStatisticalDailyEntity.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointVerificationStatisticalDailyEntity.java new file mode 100644 index 0000000000..b2b752d052 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointVerificationStatisticalDailyEntity.java @@ -0,0 +1,91 @@ +/** + * 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.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 工作人员核销数据统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("point_verification_statistical_daily") +public class PointVerificationStatisticalDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 日 + */ + private String dateId; + + /** + * 周 + */ + private String weekId; + + /** + * 月 + */ + private String monthId; + + /** + * 季 + */ + private String quarterId; + + /** + * 年 + */ + private String yearId; + + /** + * 客户ID + */ + private String customerId; + + /** + * 核销分数 这一天内核销了多少积分,一次insert,多次update + */ + private Integer verificatedPoint; + + /** + * 工作人员机关ID + */ + private String agencyId; + + /** + * 父级机关ID + */ + private String pid; + + /** + * 父级机关ID集合 + */ + private String pids; + +} diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/SysOperateLogEntity.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/SysOperateLogEntity.java new file mode 100644 index 0000000000..4068bba53b --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/SysOperateLogEntity.java @@ -0,0 +1,76 @@ +/** + * 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.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 积分系统操作记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("sys_operate_log") +public class SysOperateLogEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 操作对象ID + */ + private String objectId; + + /** + * 对象类型 规则:rule + */ + private String objectType; + + /** + * 操作类型 新建:add,编辑:edit,删除:del; + */ + private String opType; + + /** + * 操作用户 操作人 + */ + private String opUser; + + /** + * 变更前数据 JSON串 + */ + private String befordData; + + /** + * 变更后数据 JSON串 + */ + private String afterData; + +} diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/UserPointActionLogEntity.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/UserPointActionLogEntity.java new file mode 100644 index 0000000000..4c72c5659a --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/UserPointActionLogEntity.java @@ -0,0 +1,82 @@ +/** + * 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.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 用户积分行为记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("user_point_action_log") +public class UserPointActionLogEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 用户ID + */ + private String userId; + + /** + * 客户ID + */ + private String customerId; + + /** + * 加减分标识 plus/minus + */ + private String actionFlag; + + /** + * 来源ID 当来源为积分调整时 通过事件Id查找规则ID计算出分数 通过EVENT_ID能查出RUIE_ID + */ + private String eventId; + + /** + * 活动描述 获取积分的原因,相关内容,用来拼接【用户参加了xxx活动获取?积分】的文案,取活动的名称;【积分调整文案】;其他…… +如果是管理员手动调整扣减积分,ACTION_FLAG为"minus",但是不会生成核销记录,核销记录只保存用户使用积分兑换商品的核销详情 + */ + private String eventStatement; + + /** + * 事件名称 在积分记录里,对应的每一个明细都有一个标题和备注,该项为【标题】 value:活动、阅读文章、首次注册、评论、积分调整(手动)…… + */ + private String eventName; + + /** + * 分值 获取/核销的积分分值 + */ + private Integer point; + + /** + * 操作人所属机关ID 用户获取/核销积分的途径,1.工作人员手动审核积分发放、2.系统事件自动响应,所以CREATED_BY会可能是SYSTEM和工作人员的ID,当CREATED_BY是工作人员ID时,AGENCY_ID为这个工作人员所属的机关ID + */ + private String operatorAgencyId; + +} diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/UserPointStatisticalDailyEntity.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/UserPointStatisticalDailyEntity.java new file mode 100644 index 0000000000..f83dec624b --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/UserPointStatisticalDailyEntity.java @@ -0,0 +1,81 @@ +/** + * 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.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 用户积分统计情况 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("user_point_statistical_daily") +public class UserPointStatisticalDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 日 yyyy-MM-dd + */ + private String dateId; + + /** + * 周 yyyyWcc + */ + private String weekId; + + /** + * 月 yyyy-MM + */ + private String monthId; + + /** + * 季 yyyyQc + */ + private String quarterId; + + /** + * 年 yyyy + */ + private String yearId; + + /** + * 加减积分 plus/minus + */ + private String actionFlag; + + /** + * 客户ID + */ + private String customerId; + + /** + * 积分变动 当获取/核销标识为【plus】时,为这一日的积分增量,为 【miuns】时,为这一日的总的兑换积分数 + */ + private Integer pointChange; + +} diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/UserPointTotalEntity.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/UserPointTotalEntity.java new file mode 100644 index 0000000000..6d8a3c6174 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/UserPointTotalEntity.java @@ -0,0 +1,66 @@ +/** + * 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.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 用户积分总计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("user_point_total") +public class UserPointTotalEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 用户ID + */ + private String userId; + + /** + * 客户ID + */ + private String customerId; + + /** + * 已兑积分 + */ + private Integer usedPoint; + + /** + * 可用积分 + */ + private Integer usablePoint; + + /** + * 总积分 总积分=已兑积分+剩余积分 + */ + private Integer totalPoint; + +} diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/excel/PointRuleExcel.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/excel/PointRuleExcel.java new file mode 100644 index 0000000000..c5c26801e5 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/excel/PointRuleExcel.java @@ -0,0 +1,89 @@ +/** + * 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.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 积分规则表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +@Data +public class PointRuleExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "客户ID") + private String customerId; + + @Excel(name = "规则名称 与事件名称保持一致即可") + private String ruleName; + + @Excel(name = "规则说明 事件说明") + private String ruleDesc; + + @Excel(name = "事件CODE 来自事件表") + private String eventCode; + + @Excel(name = "事件名称 来自事件表") + private String eventName; + + @Excel(name = "操作类型 加积分:add;减积分:subtract") + private String operateType; + + @Excel(name = "积分上限") + private Integer upLimit; + + @Excel(name = "积分上限描述") + private String upLimitDesc; + + @Excel(name = "获得积分值") + private Integer pointNum; + + @Excel(name = "获得积分单位 次:time;分钟:minute;小时:hour") + private String pointUnit; + + @Excel(name = "是否启用 0-否,1-是") + private String enabledFlag; + + @Excel(name = "删除标识 0-否,1-是") + private String delFlag; + + @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/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/excel/PointVerificationLogExcel.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/excel/PointVerificationLogExcel.java new file mode 100644 index 0000000000..f5cf3f8f79 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/excel/PointVerificationLogExcel.java @@ -0,0 +1,92 @@ +/** + * 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.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 核销记录/确认表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +@Data +public class PointVerificationLogExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "积分行为记录表ID 关联用户积分行为记录表") + private String actionId; + + @Excel(name = "核销对象") + private String userId; + + @Excel(name = "核销对象首次注册网格") + private String userRegistedGridId; + + @Excel(name = "核销对象首次注册网格所在机关") + private String userRegistedAgnecyId; + + @Excel(name = "核销人员ID") + private String operatorId; + + @Excel(name = "核销人员名称 工作人员的昵称,在和核销记录里显示,兑换人、核销人都要显示,核销人昵称格式【xx机关-xxx】(ORG必须是机关级别?),若工作人员日后修改昵称,此项不变") + private String operatorName; + + @Excel(name = "核销人员所属机关ID") + private String operatorAgencyId; + + @Excel(name = "核销物品 目前没有做商城,所以商品的信息统一记录并展示核销人员手动输入的信息,必填项,为商品描述,以后如果开发商城体系,此项关联商品的ID") + private String exchangedItem; + + @Excel(name = "使用积分 需要多少积分") + private Integer point; + + @Excel(name = "核销人所在位置经度") + private String longitude; + + @Excel(name = "核销人所在位置维度") + private String dimension; + + @Excel(name = "核销人所在位置详细地址") + private String address; + + @Excel(name = "删除标识") + private String delFlag; + + @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/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/excel/PointVerificationStatisticalDailyExcel.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/excel/PointVerificationStatisticalDailyExcel.java new file mode 100644 index 0000000000..10a719da98 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/excel/PointVerificationStatisticalDailyExcel.java @@ -0,0 +1,86 @@ +/** + * 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.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 工作人员核销数据统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +@Data +public class PointVerificationStatisticalDailyExcel { + + @Excel(name = "主键ID") + private String id; + + @Excel(name = "日") + private String dateId; + + @Excel(name = "周") + private String weekId; + + @Excel(name = "月") + private String monthId; + + @Excel(name = "季") + private String quarterId; + + @Excel(name = "年") + private String yearId; + + @Excel(name = "客户ID") + private String customerId; + + @Excel(name = "核销分数 这一天内核销了多少积分,一次insert,多次update") + private Integer verificatedPoint; + + @Excel(name = "工作人员机关ID") + private String agencyId; + + @Excel(name = "父级机关ID") + private String pid; + + @Excel(name = "父级机关ID集合") + private String pids; + + @Excel(name = "删除标识") + private String delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人 核销工作人员ID") + 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/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/excel/SysOperateLogExcel.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/excel/SysOperateLogExcel.java new file mode 100644 index 0000000000..a61756012f --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/excel/SysOperateLogExcel.java @@ -0,0 +1,77 @@ +/** + * 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.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 积分系统操作记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +@Data +public class SysOperateLogExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "客户ID") + private String customerId; + + @Excel(name = "操作对象ID") + private String objectId; + + @Excel(name = "对象类型 规则:rule") + private String objectType; + + @Excel(name = "操作类型 新建:add,编辑:edit,删除:del;") + private String opType; + + @Excel(name = "操作用户 操作人") + private String opUser; + + @Excel(name = "变更前数据 JSON串") + private String befordData; + + @Excel(name = "变更后数据 JSON串") + private String afterData; + + @Excel(name = "删除标识 0-否,1-是") + private String delFlag; + + @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/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/excel/UserPointActionLogExcel.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/excel/UserPointActionLogExcel.java new file mode 100644 index 0000000000..6baf9de332 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/excel/UserPointActionLogExcel.java @@ -0,0 +1,80 @@ +/** + * 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.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 用户积分行为记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +@Data +public class UserPointActionLogExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "用户ID") + private String userId; + + @Excel(name = "客户ID") + private String customerId; + + @Excel(name = "加减分标识 plus/minus") + private String actionFlag; + + @Excel(name = "来源ID 当来源为积分调整时 通过事件Id查找规则ID计算出分数 通过EVENT_ID能查出RUIE_ID") + private String eventId; + + @Excel(name = "活动描述 获取积分的原因,相关内容,用来拼接【用户参加了xxx活动获取?积分】的文案,取活动的名称;【积分调整文案】;其他…… 如果是管理员手动调整扣减积分,ACTION_FLAG为\"minus\",但是不会生成核销记录,核销记录只保存用户使用积分兑换商品的核销详情") + private String eventStatement; + + @Excel(name = "事件名称 在积分记录里,对应的每一个明细都有一个标题和备注,该项为【标题】 value:活动、阅读文章、首次注册、评论、积分调整(手动)……") + private String eventName; + + @Excel(name = "分值 获取/核销的积分分值") + private Integer point; + + @Excel(name = "操作人所属机关ID 用户获取/核销积分的途径,1.工作人员手动审核积分发放、2.系统事件自动响应,所以CREATED_BY会可能是SYSTEM和工作人员的ID,当CREATED_BY是工作人员ID时,AGENCY_ID为这个工作人员所属的机关ID") + private String operatorAgencyId; + + @Excel(name = "删除标识") + private String delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人 SYSTEM或工作人员ID") + 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/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/excel/UserPointStatisticalDailyExcel.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/excel/UserPointStatisticalDailyExcel.java new file mode 100644 index 0000000000..372a990500 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/excel/UserPointStatisticalDailyExcel.java @@ -0,0 +1,80 @@ +/** + * 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.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 用户积分统计情况 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +@Data +public class UserPointStatisticalDailyExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "日 yyyy-MM-dd") + private String dateId; + + @Excel(name = "周 yyyyWcc") + private String weekId; + + @Excel(name = "月 yyyy-MM") + private String monthId; + + @Excel(name = "季 yyyyQc") + private String quarterId; + + @Excel(name = "年 yyyy") + private String yearId; + + @Excel(name = "加减积分 plus/minus") + private String actionFlag; + + @Excel(name = "客户ID") + private String customerId; + + @Excel(name = "积分变动 当获取/核销标识为【plus】时,为这一日的积分增量,为 【miuns】时,为这一日的总的兑换积分数") + private Integer pointChange; + + @Excel(name = "删除标识") + private String delFlag; + + @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/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/excel/UserPointTotalExcel.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/excel/UserPointTotalExcel.java new file mode 100644 index 0000000000..2266e332b1 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/excel/UserPointTotalExcel.java @@ -0,0 +1,71 @@ +/** + * 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.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 用户积分总计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +@Data +public class UserPointTotalExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "用户ID") + private String userId; + + @Excel(name = "客户ID") + private String customerId; + + @Excel(name = "已兑积分") + private Integer usedPoint; + + @Excel(name = "可用积分") + private Integer usablePoint; + + @Excel(name = "总积分 总积分=已兑积分+剩余积分") + private Integer totalPoint; + + @Excel(name = "删除标识") + private String delFlag; + + @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/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointRuleService.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointRuleService.java new file mode 100644 index 0000000000..3c84c43cad --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointRuleService.java @@ -0,0 +1,95 @@ +/** + * 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.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.PointRuleDTO; +import com.epmet.entity.PointRuleEntity; + +import java.util.List; +import java.util.Map; + +/** + * 积分规则表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +public interface PointRuleService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-07-20 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-07-20 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return PointRuleDTO + * @author generator + * @date 2020-07-20 + */ + PointRuleDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-07-20 + */ + void save(PointRuleDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-07-20 + */ + void update(PointRuleDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-07-20 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointVerificationLogService.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointVerificationLogService.java new file mode 100644 index 0000000000..55cd81a0d4 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointVerificationLogService.java @@ -0,0 +1,95 @@ +/** + * 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.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.PointVerificationLogDTO; +import com.epmet.entity.PointVerificationLogEntity; + +import java.util.List; +import java.util.Map; + +/** + * 核销记录/确认表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +public interface PointVerificationLogService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-07-20 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-07-20 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return PointVerificationLogDTO + * @author generator + * @date 2020-07-20 + */ + PointVerificationLogDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-07-20 + */ + void save(PointVerificationLogDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-07-20 + */ + void update(PointVerificationLogDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-07-20 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointVerificationStatisticalDailyService.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointVerificationStatisticalDailyService.java new file mode 100644 index 0000000000..5c7b8903b3 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointVerificationStatisticalDailyService.java @@ -0,0 +1,95 @@ +/** + * 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.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.PointVerificationStatisticalDailyDTO; +import com.epmet.entity.PointVerificationStatisticalDailyEntity; + +import java.util.List; +import java.util.Map; + +/** + * 工作人员核销数据统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +public interface PointVerificationStatisticalDailyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-07-20 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-07-20 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return PointVerificationStatisticalDailyDTO + * @author generator + * @date 2020-07-20 + */ + PointVerificationStatisticalDailyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-07-20 + */ + void save(PointVerificationStatisticalDailyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-07-20 + */ + void update(PointVerificationStatisticalDailyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-07-20 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/SysOperateLogService.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/SysOperateLogService.java new file mode 100644 index 0000000000..962df38027 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/SysOperateLogService.java @@ -0,0 +1,95 @@ +/** + * 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.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.SysOperateLogDTO; +import com.epmet.entity.SysOperateLogEntity; + +import java.util.List; +import java.util.Map; + +/** + * 积分系统操作记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +public interface SysOperateLogService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-07-20 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-07-20 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return SysOperateLogDTO + * @author generator + * @date 2020-07-20 + */ + SysOperateLogDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-07-20 + */ + void save(SysOperateLogDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-07-20 + */ + void update(SysOperateLogDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-07-20 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointActionLogService.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointActionLogService.java new file mode 100644 index 0000000000..895442c190 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointActionLogService.java @@ -0,0 +1,95 @@ +/** + * 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.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.UserPointActionLogDTO; +import com.epmet.entity.UserPointActionLogEntity; + +import java.util.List; +import java.util.Map; + +/** + * 用户积分行为记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +public interface UserPointActionLogService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-07-20 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-07-20 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return UserPointActionLogDTO + * @author generator + * @date 2020-07-20 + */ + UserPointActionLogDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-07-20 + */ + void save(UserPointActionLogDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-07-20 + */ + void update(UserPointActionLogDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-07-20 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointStatisticalDailyService.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointStatisticalDailyService.java new file mode 100644 index 0000000000..cd9d329154 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointStatisticalDailyService.java @@ -0,0 +1,95 @@ +/** + * 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.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.UserPointStatisticalDailyDTO; +import com.epmet.entity.UserPointStatisticalDailyEntity; + +import java.util.List; +import java.util.Map; + +/** + * 用户积分统计情况 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +public interface UserPointStatisticalDailyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-07-20 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-07-20 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return UserPointStatisticalDailyDTO + * @author generator + * @date 2020-07-20 + */ + UserPointStatisticalDailyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-07-20 + */ + void save(UserPointStatisticalDailyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-07-20 + */ + void update(UserPointStatisticalDailyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-07-20 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointTotalService.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointTotalService.java new file mode 100644 index 0000000000..04a49fbf11 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointTotalService.java @@ -0,0 +1,95 @@ +/** + * 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.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.UserPointTotalDTO; +import com.epmet.entity.UserPointTotalEntity; + +import java.util.List; +import java.util.Map; + +/** + * 用户积分总计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +public interface UserPointTotalService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-07-20 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-07-20 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return UserPointTotalDTO + * @author generator + * @date 2020-07-20 + */ + UserPointTotalDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-07-20 + */ + void save(UserPointTotalDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-07-20 + */ + void update(UserPointTotalDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-07-20 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointRuleServiceImpl.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointRuleServiceImpl.java new file mode 100644 index 0000000000..c64ccfdc35 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointRuleServiceImpl.java @@ -0,0 +1,100 @@ +/** + * 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.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.PointRuleDao; +import com.epmet.dto.PointRuleDTO; +import com.epmet.entity.PointRuleEntity; +import com.epmet.service.PointRuleService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 积分规则表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +@Service +public class PointRuleServiceImpl extends BaseServiceImpl implements PointRuleService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, PointRuleDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, PointRuleDTO.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 PointRuleDTO get(String id) { + PointRuleEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, PointRuleDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(PointRuleDTO dto) { + PointRuleEntity entity = ConvertUtils.sourceToTarget(dto, PointRuleEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(PointRuleDTO dto) { + PointRuleEntity entity = ConvertUtils.sourceToTarget(dto, PointRuleEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointVerificationLogServiceImpl.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointVerificationLogServiceImpl.java new file mode 100644 index 0000000000..82f9fb9d52 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointVerificationLogServiceImpl.java @@ -0,0 +1,99 @@ +/** + * 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.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.PointVerificationLogDao; +import com.epmet.dto.PointVerificationLogDTO; +import com.epmet.entity.PointVerificationLogEntity; +import com.epmet.service.PointVerificationLogService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 核销记录/确认表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +@Service +public class PointVerificationLogServiceImpl extends BaseServiceImpl implements PointVerificationLogService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, PointVerificationLogDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, PointVerificationLogDTO.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 PointVerificationLogDTO get(String id) { + PointVerificationLogEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, PointVerificationLogDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(PointVerificationLogDTO dto) { + PointVerificationLogEntity entity = ConvertUtils.sourceToTarget(dto, PointVerificationLogEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(PointVerificationLogDTO dto) { + PointVerificationLogEntity entity = ConvertUtils.sourceToTarget(dto, PointVerificationLogEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointVerificationStatisticalDailyServiceImpl.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointVerificationStatisticalDailyServiceImpl.java new file mode 100644 index 0000000000..b1802b95cd --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointVerificationStatisticalDailyServiceImpl.java @@ -0,0 +1,100 @@ +/** + * 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.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.PointVerificationStatisticalDailyDao; +import com.epmet.dto.PointVerificationStatisticalDailyDTO; +import com.epmet.entity.PointVerificationStatisticalDailyEntity; +import com.epmet.service.PointVerificationStatisticalDailyService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 工作人员核销数据统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +@Service +public class PointVerificationStatisticalDailyServiceImpl extends BaseServiceImpl implements PointVerificationStatisticalDailyService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, PointVerificationStatisticalDailyDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, PointVerificationStatisticalDailyDTO.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 PointVerificationStatisticalDailyDTO get(String id) { + PointVerificationStatisticalDailyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, PointVerificationStatisticalDailyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(PointVerificationStatisticalDailyDTO dto) { + PointVerificationStatisticalDailyEntity entity = ConvertUtils.sourceToTarget(dto, PointVerificationStatisticalDailyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(PointVerificationStatisticalDailyDTO dto) { + PointVerificationStatisticalDailyEntity entity = ConvertUtils.sourceToTarget(dto, PointVerificationStatisticalDailyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/SysOperateLogServiceImpl.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/SysOperateLogServiceImpl.java new file mode 100644 index 0000000000..59604433bf --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/SysOperateLogServiceImpl.java @@ -0,0 +1,99 @@ +/** + * 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.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.SysOperateLogDao; +import com.epmet.dto.SysOperateLogDTO; +import com.epmet.entity.SysOperateLogEntity; +import com.epmet.service.SysOperateLogService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 积分系统操作记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +@Service +public class SysOperateLogServiceImpl extends BaseServiceImpl implements SysOperateLogService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, SysOperateLogDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, SysOperateLogDTO.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 SysOperateLogDTO get(String id) { + SysOperateLogEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, SysOperateLogDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(SysOperateLogDTO dto) { + SysOperateLogEntity entity = ConvertUtils.sourceToTarget(dto, SysOperateLogEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(SysOperateLogDTO dto) { + SysOperateLogEntity entity = ConvertUtils.sourceToTarget(dto, SysOperateLogEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointActionLogServiceImpl.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointActionLogServiceImpl.java new file mode 100644 index 0000000000..1fc485a017 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointActionLogServiceImpl.java @@ -0,0 +1,100 @@ +/** + * 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.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.UserPointActionLogDao; +import com.epmet.dto.UserPointActionLogDTO; +import com.epmet.entity.UserPointActionLogEntity; +import com.epmet.service.UserPointActionLogService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 用户积分行为记录 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +@Service +public class UserPointActionLogServiceImpl extends BaseServiceImpl implements UserPointActionLogService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, UserPointActionLogDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, UserPointActionLogDTO.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 UserPointActionLogDTO get(String id) { + UserPointActionLogEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, UserPointActionLogDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(UserPointActionLogDTO dto) { + UserPointActionLogEntity entity = ConvertUtils.sourceToTarget(dto, UserPointActionLogEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(UserPointActionLogDTO dto) { + UserPointActionLogEntity entity = ConvertUtils.sourceToTarget(dto, UserPointActionLogEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointStatisticalDailyServiceImpl.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointStatisticalDailyServiceImpl.java new file mode 100644 index 0000000000..9715199436 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointStatisticalDailyServiceImpl.java @@ -0,0 +1,100 @@ +/** + * 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.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.UserPointStatisticalDailyDao; +import com.epmet.dto.UserPointStatisticalDailyDTO; +import com.epmet.entity.UserPointStatisticalDailyEntity; +import com.epmet.service.UserPointStatisticalDailyService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 用户积分统计情况 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +@Service +public class UserPointStatisticalDailyServiceImpl extends BaseServiceImpl implements UserPointStatisticalDailyService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, UserPointStatisticalDailyDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, UserPointStatisticalDailyDTO.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 UserPointStatisticalDailyDTO get(String id) { + UserPointStatisticalDailyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, UserPointStatisticalDailyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(UserPointStatisticalDailyDTO dto) { + UserPointStatisticalDailyEntity entity = ConvertUtils.sourceToTarget(dto, UserPointStatisticalDailyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(UserPointStatisticalDailyDTO dto) { + UserPointStatisticalDailyEntity entity = ConvertUtils.sourceToTarget(dto, UserPointStatisticalDailyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointTotalServiceImpl.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointTotalServiceImpl.java new file mode 100644 index 0000000000..22f3cf2e94 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointTotalServiceImpl.java @@ -0,0 +1,100 @@ +/** + * 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.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.UserPointTotalDao; +import com.epmet.dto.UserPointTotalDTO; +import com.epmet.entity.UserPointTotalEntity; +import com.epmet.service.UserPointTotalService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 用户积分总计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-20 + */ +@Service +public class UserPointTotalServiceImpl extends BaseServiceImpl implements UserPointTotalService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, UserPointTotalDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, UserPointTotalDTO.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 UserPointTotalDTO get(String id) { + UserPointTotalEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, UserPointTotalDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(UserPointTotalDTO dto) { + UserPointTotalEntity entity = ConvertUtils.sourceToTarget(dto, UserPointTotalEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(UserPointTotalDTO dto) { + UserPointTotalEntity entity = ConvertUtils.sourceToTarget(dto, UserPointTotalEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointRuleDao.xml b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointRuleDao.xml new file mode 100644 index 0000000000..539d926b29 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointRuleDao.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointVerificationLogDao.xml b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointVerificationLogDao.xml new file mode 100644 index 0000000000..38bd0e6e7f --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointVerificationLogDao.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointVerificationStatisticalDailyDao.xml b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointVerificationStatisticalDailyDao.xml new file mode 100644 index 0000000000..1a69fb4c49 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointVerificationStatisticalDailyDao.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/SysOperateLogDao.xml b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/SysOperateLogDao.xml new file mode 100644 index 0000000000..0fe2621044 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/SysOperateLogDao.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointActionLogDao.xml b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointActionLogDao.xml new file mode 100644 index 0000000000..e3c1dcc2bc --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointActionLogDao.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointStatisticalDailyDao.xml b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointStatisticalDailyDao.xml new file mode 100644 index 0000000000..5af194c539 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointStatisticalDailyDao.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointTotalDao.xml b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointTotalDao.xml new file mode 100644 index 0000000000..3866cce55e --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointTotalDao.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 8d76f18e54efb5ed2088021477e936f27c8dbe00 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 20 Jul 2020 18:19:24 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=85=9A=E5=BB=BA=E5=A3=B0=E9=9F=B3=20?= =?UTF-8?q?=E4=BA=BA=E5=B7=A5=E5=8F=91=E5=B8=83=E5=8A=9F=E8=83=BD=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/DraftDetailFormDTO.java | 5 + .../dto/result/DraftDetailResultDTO.java | 5 + .../epmet/dto/result/DraftListResultDTO.java | 5 + .../epmet/dto/result/GovDraftContentDTO.java | 5 + .../com/epmet/constant/ArticleConstant.java | 10 + .../epmet/controller/ArticleController.java | 628 +++++++++--------- .../com/epmet/controller/DraftController.java | 16 + .../java/com/epmet/entity/ArticleEntity.java | 5 + .../com/epmet/service/ArticleService.java | 8 + .../service/impl/ArticleServiceImpl.java | 54 +- .../epmet/service/impl/DraftServiceImpl.java | 14 + .../db/migration/V0.0.2__addAutoPublish.sql | 2 + .../src/main/resources/mapper/DraftDao.xml | 8 +- 13 files changed, 448 insertions(+), 317 deletions(-) create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.2__addAutoPublish.sql diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftDetailFormDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftDetailFormDTO.java index 2fed15dcf8..f2672f2b30 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftDetailFormDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftDetailFormDTO.java @@ -22,4 +22,9 @@ public class DraftDetailFormDTO implements Serializable { */ @NotBlank(message = "草稿id不能为空", groups = {DraftDetailFormDTO.AddUserInternalGroup.class}) private String draftId; + + /** + * 是否展示封面 + */ + private boolean showCover; } diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftDetailResultDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftDetailResultDTO.java index ccd0e9918e..6298a5cfca 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftDetailResultDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftDetailResultDTO.java @@ -59,4 +59,9 @@ public class DraftDetailResultDTO implements Serializable { * 标签名称数组 */ private String[] tagNameList; + + /** + * 封面信息 + */ + private CoverImgDTO coverInfo; } diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftListResultDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftListResultDTO.java index 4f41ee517c..e3f62d12d5 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftListResultDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftListResultDTO.java @@ -31,4 +31,9 @@ public class DraftListResultDTO implements Serializable { * 创建时间 */ private Long createdTime; + + /** + * 审核状态 + */ + private String auditStatus; } diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GovDraftContentDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GovDraftContentDTO.java index 1b0530e3e4..4b4ae98c07 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GovDraftContentDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GovDraftContentDTO.java @@ -24,4 +24,9 @@ public class GovDraftContentDTO implements Serializable { */ private String content; + /** + * 审核状态 + */ + private String auditStatus; + } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/constant/ArticleConstant.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/constant/ArticleConstant.java index f90304f477..65a7f54855 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/constant/ArticleConstant.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/constant/ArticleConstant.java @@ -56,4 +56,14 @@ public interface ArticleConstant { * 操作权限异常-自己发表的文章只有自己才能下线 */ String SHIRO_EXCEPTION = "当前人员不是文章发布者,不能下线文章"; + + /** + * 发布方式 人工强制发布 不审核 + */ + String PUBLISH_WAY_MANUAL = "manualNoAudit"; + + /** + * 发布方式 api审核后自动发布 + */ + String PUBLISH_WAY_AUTO_AUDIT = "autoAudit"; } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java index b22716bc16..bf3de1429d 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java @@ -52,308 +52,330 @@ import java.util.List; @RestController @RequestMapping("article") public class ArticleController { - - @Autowired - private ArticleService articleService; - @Autowired - private ArticleOperateRecordService articleOperateRecordService; - @Autowired - private DraftService draftService; - - /** - * @param tokenDTO - * @return - * @Author sun - * @Description 党建声音-政府端-可选发布范围 - **/ - @PostMapping("agencygridlist") - public Result agencyGridList(@LoginUser TokenDto tokenDTO) { - ArticleAgencyGridListResultDTO agencyGridList = new ArticleAgencyGridListResultDTO(); - agencyGridList.setAgencyGridList(articleService.agencyGridList(tokenDTO)); - return new Result().ok(agencyGridList); - } - - /** - * desc:政府端-点击返回按钮时,点击保存草稿 无需校验参数 - * @param fromDTO - * @throws Exception - */ - @PostMapping("savedraft") - @RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_PUBLISH) - public Result savedraft(@LoginUser TokenDto tokenDto,@RequestBody DraftContentFromDTO fromDTO) throws Exception { - DraftContentSaveResultDTO draftDTO = articleService.saveDraft(tokenDto, fromDTO); - return new Result().ok(draftDTO); - } - - /** - * desc:保存或修改草稿内容 - * @param fromDTO - * @throws Exception - */ - @PostMapping("savecontent") - @RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_PUBLISH) - public Result saveOrUpdateContent(@LoginUser TokenDto tokenDto,@RequestBody DraftContentFromDTO fromDTO) throws Exception { - DraftContentSaveResultDTO resultDTO = articleService.saveOrUpdateContent(tokenDto, fromDTO, true); - return new Result().ok(resultDTO); - } - - /** - * @param formDTO - * @return com.epmet.commons.tools.utils.Result> - * @author yinzuomei@elink-cn.com - * @description 政府端:查询文章操作记录 - * @date 2020/6/2 16:50 - **/ - @PostMapping("oprationlist") - public Result> operationList(@RequestBody ArticleOperationFormDTO formDTO) { - ValidatorUtils.validateEntity(formDTO, ArticleOperationFormDTO.AddUserInternalGroup.class); - List list = - articleOperateRecordService.listOfArticleOperation(formDTO.getArticleId()); - return new Result>().ok(list); - } - - /** - * @param formDTO - * @return com.epmet.commons.tools.utils.Result - * @author yinzuomei@elink-cn.com - * @description 政府端:(已发布、已下线)文章详情 - * @date 2020/6/3 9:44 - **/ - @PostMapping("articledetail") - public Result articleDetail(@RequestBody GovArticleDetailFormDTO formDTO) { - ValidatorUtils.validateEntity(formDTO, GovArticleDetailFormDTO.AddUserInternalGroup.class); - GovArticleDetailResultDTO articleDetail = articleService.queryGovArticleDetail(formDTO.getArticleId()); - return new Result().ok(articleDetail); - } - - /** - * @param formDTO 草稿id - * @return com.epmet.commons.tools.utils.Result - * @author yinzuomei@elink-cn.com - * @description 政府端:选中草稿编辑,获取草稿内容 - * @date 2020/6/3 13:18 - **/ - @PostMapping("getcontent") - @RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_DRAFT_EDIT) - public Result getContent(@RequestBody DraftDetailFormDTO formDTO){ - ValidatorUtils.validateEntity(formDTO, GovArticleDetailFormDTO.AddUserInternalGroup.class); - DraftContentResultDTO draftContent=draftService.queryDraftContent(formDTO); - return new Result().ok(draftContent); - } - - /** - * @param formDTO - * @return com.epmet.commons.tools.utils.Result - * @author yinzuomei@elink-cn.com - * @description 政府端:选中草稿编辑,获取草稿属性 - * @date 2020/6/3 13:51 - **/ - @PostMapping("getattr") - @RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_DRAFT_EDIT) - public Result getAttr(@RequestBody DraftDetailFormDTO formDTO) { - ValidatorUtils.validateEntity(formDTO, GovArticleDetailFormDTO.AddUserInternalGroup.class); - DraftAttrResultDTO draftAttrResultDTO=draftService.getDraftAttr(formDTO); - return new Result().ok(draftAttrResultDTO); - } - /** - * @param tokenDTO - * @return - * @Author sun - * @Description 党建声音-政府端-可选发布单位 - **/ - @PostMapping("publishagencylist") - public Result publishAgencyList(@LoginUser TokenDto tokenDTO) { - return new Result().ok(articleService.publishAgencyList(tokenDTO)); - } - - /** - * @param tokenDTO formDTO - * @return - * @Author sun - * @Description 党建声音-政府端-下线文章 - **/ - @PostMapping("offlinearticle") - @RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_OFFLINE) - public Result offLineArticle(@LoginUser TokenDto tokenDTO, @RequestBody OffLineArticleFormDTO formDTO) { - formDTO.setStaffId(tokenDTO.getUserId()); - ValidatorUtils.validateEntity(formDTO, OffLineArticleFormDTO.AddUserInternalGroup.class); - articleService.offLineArticle(formDTO); - return new Result(); - } - - /** - * desc:保存草稿属性 - * @param fromDTO - * @throws Exception - */ - @PostMapping("saveattr") - @RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_PUBLISH) - public Result saveDraftAttr(@LoginUser TokenDto tokenDto,@RequestBody DraftAttrFromDTO fromDTO) throws Exception { - ValidatorUtils.validateEntity(fromDTO, DefaultGroup.class); - Boolean isSuccess = articleService.saveDraftAttr(tokenDto, fromDTO); - return new Result().ok(isSuccess); - } - - /** - * desc:预览保存草稿属性 - * @param fromDTO - * @throws Exception - */ - @PostMapping("previewsaveattr") - @RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_PUBLISH) - public Result previewSaveDraftAttr(@LoginUser TokenDto tokenDto,@RequestBody DraftAttrFromDTO fromDTO) throws Exception { - ValidatorUtils.validateEntity(fromDTO, DefaultGroup.class); - Boolean isSuccess = articleService.previewSaveDraftAttr(tokenDto, fromDTO); - return new Result().ok(isSuccess); - } - - /** - * desc:发布文章 - * @param formDTO - * @throws Exception - */ - @PostMapping("publish") - @RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_PUBLISH) - public Result publishArticle(@LoginUser TokenDto tokenDto, @RequestBody PublishArticleFormDTO formDTO) throws Exception { - Boolean isSuccess = articleService.publish(tokenDto, formDTO.getDraftId()); - if (isSuccess) { - scanContent(tokenDto, formDTO.getDraftId()); - } - return new Result().ok(isSuccess); - } - - @Async - public void scanContent(TokenDto tokenDto,String draftId){ - try { - SyncScanResult syncScanResult = articleService.scanContent(tokenDto, draftId); - if (syncScanResult == null) { - log.error("scanContent draftId:{} return result null", draftId); - } - - if (syncScanResult.isAllPass()) { - articleService.scanAllPassPublishArticle(tokenDto, draftId, syncScanResult); - } else { - articleService.updateAuditStatusFailById(draftId, syncScanResult); - } - } catch (Exception e) { - articleService.updateDraftPublishStatus(draftId, DraftConstant.AUDITFAIL); - log.error("scanContent exception draftId:{} return result null", e); - } - } - - - /** - * 已发布文章列表 - * @author zhaoqifeng - * @date 2020/6/3 16:19 - * @param tokenDto - * @param formDTO - * @return com.epmet.commons.tools.utils.Result - */ - @PostMapping("publishedarticlelist") - @RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_PUBLISHED_LIST) - public Result> publishedArticleList(@LoginUser TokenDto tokenDto, @RequestBody PublishedListFormDTO formDTO) { - ValidatorUtils.validateEntity(formDTO); - List list = articleService.publishedArticleList(tokenDto, formDTO).getList(); - return new Result>().ok(list); - } - - - /** - * 已下线文章列表 - * @author zhaoqifeng - * @date 2020/6/3 16:19 - * @param tokenDto - * @param formDTO - * @return com.epmet.commons.tools.utils.Result - */ - @PostMapping("offlinearticlelist") - @RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_OFFLINE_LIST) - public Result > offLineList(@LoginUser TokenDto tokenDto, @RequestBody OfflineListFormDTO formDTO) { - ValidatorUtils.validateEntity(formDTO); - List list = articleService.offlineList(tokenDto, formDTO).getList(); - return new Result >().ok(list); - } - /** - * @Description 根据网格Id查找置顶文章的相关信息列表 用处:居民端首页轮播 - * @param commonArticleListFormDTO :: getGridId :: getNum - * @return List - * @author wangc - * @date 2020.06.02 16:13 - **/ - @PostMapping("resitoparticlelist") - public Result> resiTopArticleList(@RequestBody CommonArticleListFormDTO commonArticleListFormDTO){ - ValidatorUtils.validateEntity(commonArticleListFormDTO, CommonArticleListFormDTO.ArticleBannerInternalGroup.class); - return new Result>().ok(articleService.getTopArticleList(commonArticleListFormDTO)); - } - - /** - * @Description 根据网格Id查找最新文章的相关信息列表 用处:居民端首页最新文章列表 - * @param commonArticleListFormDTO :: getGridId :: getNum - * @return List - * @author wangc - * @date 2020.06.03 09:53 - **/ - @PostMapping("resilatestarticlelist") - public Result> resiLatestArticleList(@RequestBody CommonArticleListFormDTO commonArticleListFormDTO){ - ValidatorUtils.validateEntity(commonArticleListFormDTO, CommonArticleListFormDTO.ArticleBannerInternalGroup.class); - return new Result>().ok(articleService.getLatestArticleList(commonArticleListFormDTO)); - } - - /** - * @Description 根据网格Id和标签列表查找文章的相关信息列表 用处:居民端党建声音列表 - * @param articlePageFormDTO - * @return List - * @author wangc - * @date 2020.06.03 14:19 - **/ - @PostMapping("resiarticlelist") - public Result> resiArticleList(@RequestBody ArticlePageFormDTO articlePageFormDTO){ - ValidatorUtils.validateEntity(articlePageFormDTO,ArticlePageFormDTO.ArticlePageInternalGroup.class); - return new Result>().ok(articleService.getArticleList(articlePageFormDTO)); - } - - /** - * @param tokenDTO formDTO - * @return - * @Author sun - * @Description 党建声音-政府端-可下线网格列表 - **/ - @PostMapping("publishgridlist") - public Result publishGridList(@LoginUser TokenDto tokenDTO, @RequestBody PublishGridListFormDTO formDTO) { - formDTO.setStaffId(tokenDTO.getUserId()); - ValidatorUtils.validateEntity(formDTO, PublishGridListFormDTO.AddUserInternalGroup.class); - ArticleAgencyGridListResultDTO agencyGridList = new ArticleAgencyGridListResultDTO(); - agencyGridList.setAgencyGridList(articleService.publishGridList(formDTO)); - return new Result().ok(agencyGridList); - } - - - /** - * @Description 根绝文章Id查询出文章的内容、封面等相关信息,如果居民端传入的网格Id不在该文章的发布范围内,则返回NULL - * @param articleDetailFormDTO - * @return ArticleDetailResultDTO - * @author wangc - * @date 2020.06.03 18:28 - **/ - @PostMapping("resiarticledetail") - public Result resiArticleDetail(@RequestBody ResiArticleDetailFormDTO articleDetailFormDTO){ - ValidatorUtils.validateEntity(articleDetailFormDTO,ResiArticleDetailFormDTO.ResiArticleDetailInternalGroup.class); - return new Result().ok(articleService.getArticleDetail(articleDetailFormDTO)); - } - - /** - * @param formDTO - * @return com.epmet.commons.tools.utils.Result - * @author yinzuomei@elink-cn.com - * @description 政府端:文章预览 - * @date 2020/6/5 10:56 - **/ - @PostMapping("draftdetail") - public Result queryDraftDetail(@RequestBody DraftDetailFormDTO formDTO) { - ValidatorUtils.validateEntity(formDTO, GovArticleDetailFormDTO.AddUserInternalGroup.class); - DraftDetailResultDTO draftDetailResultDTO = draftService.queryDraftDetail(formDTO); - return new Result().ok(draftDetailResultDTO); - } + + @Autowired + private ArticleService articleService; + @Autowired + private ArticleOperateRecordService articleOperateRecordService; + @Autowired + private DraftService draftService; + + /** + * @param tokenDTO + * @return + * @Author sun + * @Description 党建声音-政府端-可选发布范围 + **/ + @PostMapping("agencygridlist") + public Result agencyGridList(@LoginUser TokenDto tokenDTO) { + ArticleAgencyGridListResultDTO agencyGridList = new ArticleAgencyGridListResultDTO(); + agencyGridList.setAgencyGridList(articleService.agencyGridList(tokenDTO)); + return new Result().ok(agencyGridList); + } + + /** + * desc:政府端-点击返回按钮时,点击保存草稿 无需校验参数 + * + * @param fromDTO + * @throws Exception + */ + @PostMapping("savedraft") + @RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_PUBLISH) + public Result savedraft(@LoginUser TokenDto tokenDto, @RequestBody DraftContentFromDTO fromDTO) throws Exception { + DraftContentSaveResultDTO draftDTO = articleService.saveDraft(tokenDto, fromDTO); + return new Result().ok(draftDTO); + } + + /** + * desc:保存或修改草稿内容 + * + * @param fromDTO + * @throws Exception + */ + @PostMapping("savecontent") + @RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_PUBLISH) + public Result saveOrUpdateContent(@LoginUser TokenDto tokenDto, @RequestBody DraftContentFromDTO fromDTO) throws Exception { + DraftContentSaveResultDTO resultDTO = articleService.saveOrUpdateContent(tokenDto, fromDTO, true); + return new Result().ok(resultDTO); + } + + /** + * @param formDTO + * @return com.epmet.commons.tools.utils.Result> + * @author yinzuomei@elink-cn.com + * @description 政府端:查询文章操作记录 + * @date 2020/6/2 16:50 + **/ + @PostMapping("oprationlist") + public Result> operationList(@RequestBody ArticleOperationFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, ArticleOperationFormDTO.AddUserInternalGroup.class); + List list = + articleOperateRecordService.listOfArticleOperation(formDTO.getArticleId()); + return new Result>().ok(list); + } + + /** + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @author yinzuomei@elink-cn.com + * @description 政府端:(已发布、已下线)文章详情 + * @date 2020/6/3 9:44 + **/ + @PostMapping("articledetail") + public Result articleDetail(@RequestBody GovArticleDetailFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, GovArticleDetailFormDTO.AddUserInternalGroup.class); + GovArticleDetailResultDTO articleDetail = articleService.queryGovArticleDetail(formDTO.getArticleId()); + return new Result().ok(articleDetail); + } + + /** + * @param formDTO 草稿id + * @return com.epmet.commons.tools.utils.Result + * @author yinzuomei@elink-cn.com + * @description 政府端:选中草稿编辑,获取草稿内容 + * @date 2020/6/3 13:18 + **/ + @PostMapping("getcontent") + @RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_DRAFT_EDIT) + public Result getContent(@RequestBody DraftDetailFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, GovArticleDetailFormDTO.AddUserInternalGroup.class); + DraftContentResultDTO draftContent = draftService.queryDraftContent(formDTO); + return new Result().ok(draftContent); + } + + /** + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @author yinzuomei@elink-cn.com + * @description 政府端:选中草稿编辑,获取草稿属性 + * @date 2020/6/3 13:51 + **/ + @PostMapping("getattr") + @RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_DRAFT_EDIT) + public Result getAttr(@RequestBody DraftDetailFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, GovArticleDetailFormDTO.AddUserInternalGroup.class); + DraftAttrResultDTO draftAttrResultDTO = draftService.getDraftAttr(formDTO); + return new Result().ok(draftAttrResultDTO); + } + + /** + * @param tokenDTO + * @return + * @Author sun + * @Description 党建声音-政府端-可选发布单位 + **/ + @PostMapping("publishagencylist") + public Result publishAgencyList(@LoginUser TokenDto tokenDTO) { + return new Result().ok(articleService.publishAgencyList(tokenDTO)); + } + + /** + * @param tokenDTO formDTO + * @return + * @Author sun + * @Description 党建声音-政府端-下线文章 + **/ + @PostMapping("offlinearticle") + @RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_OFFLINE) + public Result offLineArticle(@LoginUser TokenDto tokenDTO, @RequestBody OffLineArticleFormDTO formDTO) { + formDTO.setStaffId(tokenDTO.getUserId()); + ValidatorUtils.validateEntity(formDTO, OffLineArticleFormDTO.AddUserInternalGroup.class); + articleService.offLineArticle(formDTO); + return new Result(); + } + + /** + * desc:保存草稿属性 + * + * @param fromDTO + * @throws Exception + */ + @PostMapping("saveattr") + @RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_PUBLISH) + public Result saveDraftAttr(@LoginUser TokenDto tokenDto, @RequestBody DraftAttrFromDTO fromDTO) throws Exception { + ValidatorUtils.validateEntity(fromDTO, DefaultGroup.class); + Boolean isSuccess = articleService.saveDraftAttr(tokenDto, fromDTO); + return new Result().ok(isSuccess); + } + + /** + * desc:预览保存草稿属性 + * + * @param fromDTO + * @throws Exception + */ + @PostMapping("previewsaveattr") + @RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_PUBLISH) + public Result previewSaveDraftAttr(@LoginUser TokenDto tokenDto, @RequestBody DraftAttrFromDTO fromDTO) throws Exception { + ValidatorUtils.validateEntity(fromDTO, DefaultGroup.class); + Boolean isSuccess = articleService.previewSaveDraftAttr(tokenDto, fromDTO); + return new Result().ok(isSuccess); + } + + /** + * desc:发布文章 + * + * @param formDTO + * @throws Exception + */ + @PostMapping("publish") + @RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_PUBLISH) + public Result publishArticle(@LoginUser TokenDto tokenDto, @RequestBody PublishArticleFormDTO formDTO) throws Exception { + Boolean isSuccess = articleService.publish(tokenDto, formDTO.getDraftId()); + if (isSuccess) { + scanContent(tokenDto, formDTO.getDraftId()); + } + return new Result().ok(isSuccess); + } + + /** + * desc:人工确认无误后发布文章,不走审核接口 + * + * @param formDTO + * @throws Exception + */ + @PostMapping("manualpublish") + @RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_PUBLISH) + public Result manualPublish(@LoginUser TokenDto tokenDto, @RequestBody PublishArticleFormDTO formDTO) throws Exception { + articleService.manualPublish(tokenDto, formDTO.getDraftId()); + return new Result().ok(true); + } + + @Async + public void scanContent(TokenDto tokenDto, String draftId) { + try { + SyncScanResult syncScanResult = articleService.scanContent(tokenDto, draftId); + if (syncScanResult == null) { + log.error("scanContent draftId:{} return result null", draftId); + } + + if (syncScanResult.isAllPass()) { + articleService.scanAllPassPublishArticle(tokenDto, draftId, syncScanResult); + } else { + articleService.updateAuditStatusFailById(draftId, syncScanResult); + } + } catch (Exception e) { + articleService.updateDraftPublishStatus(draftId, DraftConstant.AUDITFAIL); + log.error("scanContent exception draftId:{} return result null", e); + } + } + + + /** + * 已发布文章列表 + * + * @param tokenDto + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @author zhaoqifeng + * @date 2020/6/3 16:19 + */ + @PostMapping("publishedarticlelist") + @RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_PUBLISHED_LIST) + public Result> publishedArticleList(@LoginUser TokenDto tokenDto, @RequestBody PublishedListFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO); + List list = articleService.publishedArticleList(tokenDto, formDTO).getList(); + return new Result>().ok(list); + } + + + /** + * 已下线文章列表 + * + * @param tokenDto + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @author zhaoqifeng + * @date 2020/6/3 16:19 + */ + @PostMapping("offlinearticlelist") + @RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_OFFLINE_LIST) + public Result> offLineList(@LoginUser TokenDto tokenDto, @RequestBody OfflineListFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO); + List list = articleService.offlineList(tokenDto, formDTO).getList(); + return new Result>().ok(list); + } + + /** + * @param commonArticleListFormDTO :: getGridId :: getNum + * @return List + * @Description 根据网格Id查找置顶文章的相关信息列表 用处:居民端首页轮播 + * @author wangc + * @date 2020.06.02 16:13 + **/ + @PostMapping("resitoparticlelist") + public Result> resiTopArticleList(@RequestBody CommonArticleListFormDTO commonArticleListFormDTO) { + ValidatorUtils.validateEntity(commonArticleListFormDTO, CommonArticleListFormDTO.ArticleBannerInternalGroup.class); + return new Result>().ok(articleService.getTopArticleList(commonArticleListFormDTO)); + } + + /** + * @param commonArticleListFormDTO :: getGridId :: getNum + * @return List + * @Description 根据网格Id查找最新文章的相关信息列表 用处:居民端首页最新文章列表 + * @author wangc + * @date 2020.06.03 09:53 + **/ + @PostMapping("resilatestarticlelist") + public Result> resiLatestArticleList(@RequestBody CommonArticleListFormDTO commonArticleListFormDTO) { + ValidatorUtils.validateEntity(commonArticleListFormDTO, CommonArticleListFormDTO.ArticleBannerInternalGroup.class); + return new Result>().ok(articleService.getLatestArticleList(commonArticleListFormDTO)); + } + + /** + * @param articlePageFormDTO + * @return List + * @Description 根据网格Id和标签列表查找文章的相关信息列表 用处:居民端党建声音列表 + * @author wangc + * @date 2020.06.03 14:19 + **/ + @PostMapping("resiarticlelist") + public Result> resiArticleList(@RequestBody ArticlePageFormDTO articlePageFormDTO) { + ValidatorUtils.validateEntity(articlePageFormDTO, ArticlePageFormDTO.ArticlePageInternalGroup.class); + return new Result>().ok(articleService.getArticleList(articlePageFormDTO)); + } + + /** + * @param tokenDTO formDTO + * @return + * @Author sun + * @Description 党建声音-政府端-可下线网格列表 + **/ + @PostMapping("publishgridlist") + public Result publishGridList(@LoginUser TokenDto tokenDTO, @RequestBody PublishGridListFormDTO formDTO) { + formDTO.setStaffId(tokenDTO.getUserId()); + ValidatorUtils.validateEntity(formDTO, PublishGridListFormDTO.AddUserInternalGroup.class); + ArticleAgencyGridListResultDTO agencyGridList = new ArticleAgencyGridListResultDTO(); + agencyGridList.setAgencyGridList(articleService.publishGridList(formDTO)); + return new Result().ok(agencyGridList); + } + + + /** + * @param articleDetailFormDTO + * @return ArticleDetailResultDTO + * @Description 根绝文章Id查询出文章的内容、封面等相关信息,如果居民端传入的网格Id不在该文章的发布范围内,则返回NULL + * @author wangc + * @date 2020.06.03 18:28 + **/ + @PostMapping("resiarticledetail") + public Result resiArticleDetail(@RequestBody ResiArticleDetailFormDTO articleDetailFormDTO) { + ValidatorUtils.validateEntity(articleDetailFormDTO, ResiArticleDetailFormDTO.ResiArticleDetailInternalGroup.class); + return new Result().ok(articleService.getArticleDetail(articleDetailFormDTO)); + } + + /** + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @author yinzuomei@elink-cn.com + * @description 政府端:文章预览 + * @date 2020/6/5 10:56 + **/ + @PostMapping("draftdetail") + public Result queryDraftDetail(@RequestBody DraftDetailFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, GovArticleDetailFormDTO.AddUserInternalGroup.class); + DraftDetailResultDTO draftDetailResultDTO = draftService.queryDraftDetail(formDTO); + return new Result().ok(draftDetailResultDTO); + } } \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/DraftController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/DraftController.java index 2a9837723f..b7ffc4a382 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/DraftController.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/DraftController.java @@ -24,7 +24,10 @@ import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.form.DeleteDraftFormDTO; +import com.epmet.dto.form.DraftDetailFormDTO; import com.epmet.dto.form.DraftListFormDTO; +import com.epmet.dto.form.GovArticleDetailFormDTO; +import com.epmet.dto.result.DraftDetailResultDTO; import com.epmet.dto.result.DraftListResultDTO; import com.epmet.service.DraftService; import org.springframework.beans.factory.annotation.Autowired; @@ -70,4 +73,17 @@ public class DraftController { ValidatorUtils.validateEntity(formDTO); return new Result>().ok(draftService.draftList(tokenDto, formDTO).getList()); } + + /** + * desc:政府端:带封面的预览 + * @param formDTO + * @return + */ + @PostMapping("detailwithcover") + public Result detailWithCover(@RequestBody DraftDetailFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, GovArticleDetailFormDTO.AddUserInternalGroup.class); + formDTO.setShowCover(true); + DraftDetailResultDTO draftDetailResultDTO = draftService.queryDraftDetail(formDTO); + return new Result().ok(draftDetailResultDTO); + } } \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/ArticleEntity.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/ArticleEntity.java index eb2b026fb7..3b1021a004 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/ArticleEntity.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/ArticleEntity.java @@ -103,6 +103,11 @@ public class ArticleEntity extends BaseEpmetEntity { */ private String tags; + /** + * 发布方式 自动审核后发布:autoAudit;人工确认无误发布(不审核):manualNoAudit + */ + private String publishWay; + /** * 组织ID */ diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/ArticleService.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/ArticleService.java index 4a5424c8af..6b69368795 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/ArticleService.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/ArticleService.java @@ -206,4 +206,12 @@ public interface ArticleService extends BaseService { * @return */ void updateDraftPublishStatus(String draftId,String statusFlag); + + /** + * desc:人工发布文章 不走审核接口 + * @param tokenDto + * @param draftId + * @return + */ + void manualPublish(TokenDto tokenDto, String draftId); } \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java index 2e3d296122..c5c4b74f0f 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java @@ -63,7 +63,6 @@ import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; @@ -322,7 +321,7 @@ public class ArticleServiceImpl extends BaseServiceImpl { offLineGridId.append(StrConstant.COLON).append(off.getGridId()); }); - recordEntity.setGridIds(offLineGridId.toString().replaceFirst(StrConstant.COLON,"")); + recordEntity.setGridIds(offLineGridId.toString().replaceFirst(StrConstant.COLON, "")); recordEntity.setContent(content); recordEntity.setOpType(ArticleConstant.OFFLINE); recordEntity.setOpTime(date); @@ -641,7 +640,7 @@ public class ArticleServiceImpl extends BaseServiceImpl NumConstant.ZERO) { draftContents.forEach(content -> { @@ -1006,16 +1008,16 @@ public class ArticleServiceImpl extends BaseServiceImpl updateGridTagCacheDTOS = this.updateGridTag(tokenDto, draftId, updateCustomerTagCacheDTO); + this.addArticleTags(updateCustomerTagCacheDTO, draftId, tokenDto, articleEntity.getCreatedTime()); + + //更新redis + try { + this.updateCacheCustomerTag(updateCustomerTagCacheDTO); + this.updateCacheGridTag(updateGridTagCacheDTOS); + } catch (Exception e) { + log.error("manualPublish update redis exception", e); + throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg()); + } + } catch (RenException e) { + log.error("manualPublish exception", e); + } + } + /** * @param draftId diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftServiceImpl.java index 59e311c943..ceb961ac38 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftServiceImpl.java @@ -26,12 +26,14 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.constant.DraftConstant; +import com.epmet.dao.DraftCoverDao; import com.epmet.dao.DraftDao; import com.epmet.dto.DraftDTO; import com.epmet.dto.form.DeleteDraftFormDTO; import com.epmet.dto.form.DraftDetailFormDTO; import com.epmet.dto.form.DraftListFormDTO; import com.epmet.dto.result.*; +import com.epmet.entity.DraftCoverEntity; import com.epmet.entity.DraftEntity; import com.epmet.service.DraftService; import com.github.pagehelper.PageHelper; @@ -39,6 +41,7 @@ import com.github.pagehelper.PageInfo; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -57,6 +60,8 @@ import java.util.Map; public class DraftServiceImpl extends BaseServiceImpl implements DraftService { private Logger logger = LoggerFactory.getLogger(getClass()); + @Autowired + private DraftCoverDao draftCoverDao; @Override public PageData page(Map params) { IPage page = baseDao.selectPage( @@ -179,6 +184,15 @@ public class DraftServiceImpl extends BaseServiceImpl imp }else{ draftDetailResultDTO.setTagNameList(new String[0]); } + if (formDTO.isShowCover()){ + DraftCoverEntity coverEntity = draftCoverDao.selectByDraftId(formDTO.getDraftId(), null); + if (coverEntity != null){ + CoverImgDTO coverImgDTO = ConvertUtils.sourceToTarget(coverEntity, CoverImgDTO.class); + draftDetailResultDTO.setCoverInfo(coverImgDTO); + }else{ + draftDetailResultDTO.setCoverInfo(new CoverImgDTO()); + } + } } return draftDetailResultDTO; } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.2__addAutoPublish.sql b/epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.2__addAutoPublish.sql new file mode 100644 index 0000000000..50dc5ea180 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.2__addAutoPublish.sql @@ -0,0 +1,2 @@ +ALTER TABLE `epmet_gov_voice`.`article` +ADD COLUMN `PUBLISH_WAY` varchar(16) NOT NULL DEFAULT 'autoAudit' COMMENT '发布方式 自动审核后发布:autoAudit;人工确认无误发布(不审核):manualNoAudit' AFTER `TAGS`; \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml index e97eb759b1..71330a10b8 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml @@ -142,7 +142,9 @@ ID AS "draftId", TITLE AS "title", IFNULL(PREVIEW_CONTENT, "") AS "content", - UNIX_TIMESTAMP(CREATED_TIME) AS "createdTime" + UNIX_TIMESTAMP(CREATED_TIME) AS "createdTime", + AUDIT_STATUS, + AUDIT_REASON FROM draft WHERE DEL_FLAG = '0' AND (STATUS_FLAG = 'unpublish' OR STATUS_FLAG = 'auditfail') @@ -169,7 +171,9 @@