Browse Source

Merge remote-tracking branch 'origin/dev_heart' into dev_heart

dev_shibei_match
yinzuomei 5 years ago
parent
commit
3c7e26eeac
  1. 126
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/PointRuleDTO.java
  2. 131
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/PointVerificationLogDTO.java
  3. 121
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/PointVerificationStatisticalDailyDTO.java
  4. 106
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/SysOperateLogDTO.java
  5. 112
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/UserPointActionLogDTO.java
  6. 111
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/UserPointStatisticalDailyDTO.java
  7. 96
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/UserPointTotalDTO.java
  8. 0
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/.gitkeep
  9. 0
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/.gitkeep
  10. 4
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/EpmetPointOpenFeignClient.java
  11. 4
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/fallback/EpmetPointOpenFeignClientFallback.java
  12. 6
      epmet-module/epmet-point/epmet-point-server/pom.xml
  13. 14
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/AdjustmentController.java
  14. 14
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ExchangeController.java
  15. 14
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ResiPointController.java
  16. 33
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointRuleDao.java
  17. 33
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointVerificationLogDao.java
  18. 33
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointVerificationStatisticalDailyDao.java
  19. 33
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/SysOperateLogDao.java
  20. 33
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/UserPointActionLogDao.java
  21. 33
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/UserPointStatisticalDailyDao.java
  22. 33
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/UserPointTotalDao.java
  23. 96
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointRuleEntity.java
  24. 101
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointVerificationLogEntity.java
  25. 91
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointVerificationStatisticalDailyEntity.java
  26. 76
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/SysOperateLogEntity.java
  27. 82
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/UserPointActionLogEntity.java
  28. 81
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/UserPointStatisticalDailyEntity.java
  29. 66
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/UserPointTotalEntity.java
  30. 89
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/excel/PointRuleExcel.java
  31. 92
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/excel/PointVerificationLogExcel.java
  32. 86
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/excel/PointVerificationStatisticalDailyExcel.java
  33. 77
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/excel/SysOperateLogExcel.java
  34. 80
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/excel/UserPointActionLogExcel.java
  35. 80
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/excel/UserPointStatisticalDailyExcel.java
  36. 71
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/excel/UserPointTotalExcel.java
  37. 95
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointRuleService.java
  38. 95
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointVerificationLogService.java
  39. 95
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointVerificationStatisticalDailyService.java
  40. 95
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/SysOperateLogService.java
  41. 95
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointActionLogService.java
  42. 95
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointStatisticalDailyService.java
  43. 95
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointTotalService.java
  44. 100
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointRuleServiceImpl.java
  45. 99
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointVerificationLogServiceImpl.java
  46. 100
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointVerificationStatisticalDailyServiceImpl.java
  47. 99
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/SysOperateLogServiceImpl.java
  48. 100
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointActionLogServiceImpl.java
  49. 100
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointStatisticalDailyServiceImpl.java
  50. 100
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointTotalServiceImpl.java
  51. 28
      epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointRuleDao.xml
  52. 29
      epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointVerificationLogDao.xml
  53. 27
      epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointVerificationStatisticalDailyDao.xml
  54. 24
      epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/SysOperateLogDao.xml
  55. 25
      epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointActionLogDao.xml
  56. 25
      epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointStatisticalDailyDao.xml
  57. 22
      epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointTotalDao.xml
  58. 5
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftDetailFormDTO.java
  59. 5
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftDetailResultDTO.java
  60. 5
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftListResultDTO.java
  61. 5
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GovDraftContentDTO.java
  62. 10
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/constant/ArticleConstant.java
  63. 628
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java
  64. 16
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/DraftController.java
  65. 5
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/ArticleEntity.java
  66. 8
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/ArticleService.java
  67. 54
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java
  68. 14
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/DraftServiceImpl.java
  69. 2
      epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.2__addAutoPublish.sql
  70. 8
      epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml

126
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

131
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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机关-xxxORG必须是机关级别若工作人员日后修改昵称此项不变
*/
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;
}

121
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

106
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

112
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

111
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

96
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

0
epmet-module/epmet-point/epmet-point-client/src/main/java/dto/form/.gitkeep → epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/.gitkeep

0
epmet-module/epmet-point/epmet-point-client/src/main/java/dto/result/.gitkeep → epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/.gitkeep

4
epmet-module/epmet-point/epmet-point-client/src/main/java/feign/EpmetPointOpenFeignClient.java → 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;
/**

4
epmet-module/epmet-point/epmet-point-client/src/main/java/feign/fallback/EpmetPointOpenFeignClientFallback.java → 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;
/**

6
epmet-module/epmet-point/epmet-point-server/pom.xml

@ -63,6 +63,12 @@
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-point-client</artifactId>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>

14
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 {
}

14
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 {
}

14
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 {
}

33
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<PointRuleEntity> {
}

33
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<PointVerificationLogEntity> {
}

33
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<PointVerificationStatisticalDailyEntity> {
}

33
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<SysOperateLogEntity> {
}

33
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<UserPointActionLogEntity> {
}

33
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<UserPointStatisticalDailyEntity> {
}

33
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<UserPointTotalEntity> {
}

96
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

101
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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机关-xxxORG必须是机关级别若工作人员日后修改昵称此项不变
*/
private String operatorName;
/**
* 核销人员所属机关ID
*/
private String operatorAgencyId;
/**
* 核销物品 目前没有做商城所以商品的信息统一记录并展示核销人员手动输入的信息必填项为商品描述以后如果开发商城体系此项关联商品的ID
*/
private String exchangedItem;
/**
* 使用积分 需要多少积分
*/
private Integer point;
/**
* 核销人所在位置经度
*/
private String longitude;
/**
* 核销人所在位置维度
*/
private String dimension;
/**
* 核销人所在位置详细地址
*/
private String address;
}

91
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

76
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

82
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

81
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

66
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

89
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

92
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

86
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

77
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

80
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

80
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

71
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

95
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<PointRuleEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<PointRuleDTO>
* @author generator
* @date 2020-07-20
*/
PageData<PointRuleDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<PointRuleDTO>
* @author generator
* @date 2020-07-20
*/
List<PointRuleDTO> list(Map<String, Object> 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);
}

95
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<PointVerificationLogEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<PointVerificationLogDTO>
* @author generator
* @date 2020-07-20
*/
PageData<PointVerificationLogDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<PointVerificationLogDTO>
* @author generator
* @date 2020-07-20
*/
List<PointVerificationLogDTO> list(Map<String, Object> 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);
}

95
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<PointVerificationStatisticalDailyEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<PointVerificationStatisticalDailyDTO>
* @author generator
* @date 2020-07-20
*/
PageData<PointVerificationStatisticalDailyDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<PointVerificationStatisticalDailyDTO>
* @author generator
* @date 2020-07-20
*/
List<PointVerificationStatisticalDailyDTO> list(Map<String, Object> 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);
}

95
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<SysOperateLogEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<SysOperateLogDTO>
* @author generator
* @date 2020-07-20
*/
PageData<SysOperateLogDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<SysOperateLogDTO>
* @author generator
* @date 2020-07-20
*/
List<SysOperateLogDTO> list(Map<String, Object> 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);
}

95
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<UserPointActionLogEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<UserPointActionLogDTO>
* @author generator
* @date 2020-07-20
*/
PageData<UserPointActionLogDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<UserPointActionLogDTO>
* @author generator
* @date 2020-07-20
*/
List<UserPointActionLogDTO> list(Map<String, Object> 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);
}

95
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<UserPointStatisticalDailyEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<UserPointStatisticalDailyDTO>
* @author generator
* @date 2020-07-20
*/
PageData<UserPointStatisticalDailyDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<UserPointStatisticalDailyDTO>
* @author generator
* @date 2020-07-20
*/
List<UserPointStatisticalDailyDTO> list(Map<String, Object> 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);
}

95
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<UserPointTotalEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<UserPointTotalDTO>
* @author generator
* @date 2020-07-20
*/
PageData<UserPointTotalDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<UserPointTotalDTO>
* @author generator
* @date 2020-07-20
*/
List<UserPointTotalDTO> list(Map<String, Object> 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);
}

100
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<PointRuleDao, PointRuleEntity> implements PointRuleService {
@Override
public PageData<PointRuleDTO> page(Map<String, Object> params) {
IPage<PointRuleEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, PointRuleDTO.class);
}
@Override
public List<PointRuleDTO> list(Map<String, Object> params) {
List<PointRuleEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, PointRuleDTO.class);
}
private QueryWrapper<PointRuleEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<PointRuleEntity> 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));
}
}

99
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<PointVerificationLogDao, PointVerificationLogEntity> implements PointVerificationLogService {
@Override
public PageData<PointVerificationLogDTO> page(Map<String, Object> params) {
IPage<PointVerificationLogEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, PointVerificationLogDTO.class);
}
@Override
public List<PointVerificationLogDTO> list(Map<String, Object> params) {
List<PointVerificationLogEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, PointVerificationLogDTO.class);
}
private QueryWrapper<PointVerificationLogEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<PointVerificationLogEntity> 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));
}
}

100
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<PointVerificationStatisticalDailyDao, PointVerificationStatisticalDailyEntity> implements PointVerificationStatisticalDailyService {
@Override
public PageData<PointVerificationStatisticalDailyDTO> page(Map<String, Object> params) {
IPage<PointVerificationStatisticalDailyEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, PointVerificationStatisticalDailyDTO.class);
}
@Override
public List<PointVerificationStatisticalDailyDTO> list(Map<String, Object> params) {
List<PointVerificationStatisticalDailyEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, PointVerificationStatisticalDailyDTO.class);
}
private QueryWrapper<PointVerificationStatisticalDailyEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<PointVerificationStatisticalDailyEntity> 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));
}
}

99
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<SysOperateLogDao, SysOperateLogEntity> implements SysOperateLogService {
@Override
public PageData<SysOperateLogDTO> page(Map<String, Object> params) {
IPage<SysOperateLogEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, SysOperateLogDTO.class);
}
@Override
public List<SysOperateLogDTO> list(Map<String, Object> params) {
List<SysOperateLogEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, SysOperateLogDTO.class);
}
private QueryWrapper<SysOperateLogEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<SysOperateLogEntity> 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));
}
}

100
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<UserPointActionLogDao, UserPointActionLogEntity> implements UserPointActionLogService {
@Override
public PageData<UserPointActionLogDTO> page(Map<String, Object> params) {
IPage<UserPointActionLogEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, UserPointActionLogDTO.class);
}
@Override
public List<UserPointActionLogDTO> list(Map<String, Object> params) {
List<UserPointActionLogEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, UserPointActionLogDTO.class);
}
private QueryWrapper<UserPointActionLogEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<UserPointActionLogEntity> 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));
}
}

100
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<UserPointStatisticalDailyDao, UserPointStatisticalDailyEntity> implements UserPointStatisticalDailyService {
@Override
public PageData<UserPointStatisticalDailyDTO> page(Map<String, Object> params) {
IPage<UserPointStatisticalDailyEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, UserPointStatisticalDailyDTO.class);
}
@Override
public List<UserPointStatisticalDailyDTO> list(Map<String, Object> params) {
List<UserPointStatisticalDailyEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, UserPointStatisticalDailyDTO.class);
}
private QueryWrapper<UserPointStatisticalDailyEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<UserPointStatisticalDailyEntity> 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));
}
}

100
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<UserPointTotalDao, UserPointTotalEntity> implements UserPointTotalService {
@Override
public PageData<UserPointTotalDTO> page(Map<String, Object> params) {
IPage<UserPointTotalEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, UserPointTotalDTO.class);
}
@Override
public List<UserPointTotalDTO> list(Map<String, Object> params) {
List<UserPointTotalEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, UserPointTotalDTO.class);
}
private QueryWrapper<UserPointTotalEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<UserPointTotalEntity> 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));
}
}

28
epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointRuleDao.xml

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.PointRuleDao">
<resultMap type="com.epmet.entity.PointRuleEntity" id="pointRuleMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="ruleName" column="RULE_NAME"/>
<result property="ruleDesc" column="RULE_DESC"/>
<result property="eventCode" column="EVENT_CODE"/>
<result property="eventName" column="EVENT_NAME"/>
<result property="operateType" column="OPERATE_TYPE"/>
<result property="upLimit" column="UP_LIMIT"/>
<result property="upLimitDesc" column="UP_LIMIT_DESC"/>
<result property="pointNum" column="POINT_NUM"/>
<result property="pointUnit" column="POINT_UNIT"/>
<result property="enabledFlag" column="ENABLED_FLAG"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

29
epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointVerificationLogDao.xml

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.PointVerificationLogDao">
<resultMap type="com.epmet.entity.PointVerificationLogEntity" id="pointVerificationLogMap">
<result property="id" column="ID"/>
<result property="actionId" column="ACTION_ID"/>
<result property="userId" column="USER_ID"/>
<result property="userRegistedGridId" column="USER_REGISTED_GRID_ID"/>
<result property="userRegistedAgnecyId" column="USER_REGISTED_AGNECY_ID"/>
<result property="operatorId" column="OPERATOR_ID"/>
<result property="operatorName" column="OPERATOR_NAME"/>
<result property="operatorAgencyId" column="OPERATOR_AGENCY_ID"/>
<result property="exchangedItem" column="EXCHANGED_ITEM"/>
<result property="point" column="POINT"/>
<result property="longitude" column="LONGITUDE"/>
<result property="dimension" column="DIMENSION"/>
<result property="address" column="ADDRESS"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

27
epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointVerificationStatisticalDailyDao.xml

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.PointVerificationStatisticalDailyDao">
<resultMap type="com.epmet.entity.PointVerificationStatisticalDailyEntity" id="pointVerificationStatisticalDailyMap">
<result property="id" column="ID"/>
<result property="dateId" column="DATE_ID"/>
<result property="weekId" column="WEEK_ID"/>
<result property="monthId" column="MONTH_ID"/>
<result property="quarterId" column="QUARTER_ID"/>
<result property="yearId" column="YEAR_ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="verificatedPoint" column="VERIFICATED_POINT"/>
<result property="agencyId" column="AGENCY_ID"/>
<result property="pid" column="PID"/>
<result property="pids" column="PIDS"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

24
epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/SysOperateLogDao.xml

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.SysOperateLogDao">
<resultMap type="com.epmet.entity.SysOperateLogEntity" id="sysOperateLogMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="objectId" column="OBJECT_ID"/>
<result property="objectType" column="OBJECT_TYPE"/>
<result property="opType" column="OP_TYPE"/>
<result property="opUser" column="OP_USER"/>
<result property="befordData" column="BEFORD_DATA"/>
<result property="afterData" column="AFTER_DATA"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

25
epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointActionLogDao.xml

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.UserPointActionLogDao">
<resultMap type="com.epmet.entity.UserPointActionLogEntity" id="userPointActionLogMap">
<result property="id" column="ID"/>
<result property="userId" column="USER_ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="actionFlag" column="ACTION_FLAG"/>
<result property="eventId" column="EVENT_ID"/>
<result property="eventStatement" column="EVENT_STATEMENT"/>
<result property="eventName" column="EVENT_NAME"/>
<result property="point" column="POINT"/>
<result property="operatorAgencyId" column="OPERATOR_AGENCY_ID"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

25
epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointStatisticalDailyDao.xml

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.UserPointStatisticalDailyDao">
<resultMap type="com.epmet.entity.UserPointStatisticalDailyEntity" id="userPointStatisticalDailyMap">
<result property="id" column="ID"/>
<result property="dateId" column="DATE_ID"/>
<result property="weekId" column="WEEK_ID"/>
<result property="monthId" column="MONTH_ID"/>
<result property="quarterId" column="QUARTER_ID"/>
<result property="yearId" column="YEAR_ID"/>
<result property="actionFlag" column="ACTION_FLAG"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="pointChange" column="POINT_CHANGE"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

22
epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointTotalDao.xml

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.UserPointTotalDao">
<resultMap type="com.epmet.entity.UserPointTotalEntity" id="userPointTotalMap">
<result property="id" column="ID"/>
<result property="userId" column="USER_ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="usedPoint" column="USED_POINT"/>
<result property="usablePoint" column="USABLE_POINT"/>
<result property="totalPoint" column="TOTAL_POINT"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

5
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;
}

5
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;
}

5
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;
}

5
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;
}

10
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";
}

628
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<ArticleAgencyGridListResultDTO> agencyGridList(@LoginUser TokenDto tokenDTO) {
ArticleAgencyGridListResultDTO agencyGridList = new ArticleAgencyGridListResultDTO();
agencyGridList.setAgencyGridList(articleService.agencyGridList(tokenDTO));
return new Result<ArticleAgencyGridListResultDTO>().ok(agencyGridList);
}
/**
* desc:政府端-点击返回按钮时点击保存草稿 无需校验参数
* @param fromDTO
* @throws Exception
*/
@PostMapping("savedraft")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_PUBLISH)
public Result<DraftContentSaveResultDTO> savedraft(@LoginUser TokenDto tokenDto,@RequestBody DraftContentFromDTO fromDTO) throws Exception {
DraftContentSaveResultDTO draftDTO = articleService.saveDraft(tokenDto, fromDTO);
return new Result<DraftContentSaveResultDTO>().ok(draftDTO);
}
/**
* desc:保存或修改草稿内容
* @param fromDTO
* @throws Exception
*/
@PostMapping("savecontent")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_PUBLISH)
public Result<DraftContentSaveResultDTO> saveOrUpdateContent(@LoginUser TokenDto tokenDto,@RequestBody DraftContentFromDTO fromDTO) throws Exception {
DraftContentSaveResultDTO resultDTO = articleService.saveOrUpdateContent(tokenDto, fromDTO, true);
return new Result<DraftContentSaveResultDTO>().ok(resultDTO);
}
/**
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.form.ArticleOperationResultDTO>>
* @author yinzuomei@elink-cn.com
* @description 政府端查询文章操作记录
* @date 2020/6/2 16:50
**/
@PostMapping("oprationlist")
public Result<List<ArticleOperationResultDTO>> operationList(@RequestBody ArticleOperationFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, ArticleOperationFormDTO.AddUserInternalGroup.class);
List<ArticleOperationResultDTO> list =
articleOperateRecordService.listOfArticleOperation(formDTO.getArticleId());
return new Result<List<ArticleOperationResultDTO>>().ok(list);
}
/**
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.GovArticleDetailResultDTO>
* @author yinzuomei@elink-cn.com
* @description 政府端已发布已下线文章详情
* @date 2020/6/3 9:44
**/
@PostMapping("articledetail")
public Result<GovArticleDetailResultDTO> articleDetail(@RequestBody GovArticleDetailFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, GovArticleDetailFormDTO.AddUserInternalGroup.class);
GovArticleDetailResultDTO articleDetail = articleService.queryGovArticleDetail(formDTO.getArticleId());
return new Result<GovArticleDetailResultDTO>().ok(articleDetail);
}
/**
* @param formDTO 草稿id
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.DraftContentResultDTO>
* @author yinzuomei@elink-cn.com
* @description 政府端选中草稿编辑获取草稿内容
* @date 2020/6/3 13:18
**/
@PostMapping("getcontent")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_DRAFT_EDIT)
public Result<DraftContentResultDTO> getContent(@RequestBody DraftDetailFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, GovArticleDetailFormDTO.AddUserInternalGroup.class);
DraftContentResultDTO draftContent=draftService.queryDraftContent(formDTO);
return new Result<DraftContentResultDTO>().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<DraftAttrResultDTO> getAttr(@RequestBody DraftDetailFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, GovArticleDetailFormDTO.AddUserInternalGroup.class);
DraftAttrResultDTO draftAttrResultDTO=draftService.getDraftAttr(formDTO);
return new Result<DraftAttrResultDTO>().ok(draftAttrResultDTO);
}
/**
* @param tokenDTO
* @return
* @Author sun
* @Description 党建声音-政府端-可选发布单位
**/
@PostMapping("publishagencylist")
public Result<PublishAgencyListResultDTO> publishAgencyList(@LoginUser TokenDto tokenDTO) {
return new Result<PublishAgencyListResultDTO>().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<Boolean> saveDraftAttr(@LoginUser TokenDto tokenDto,@RequestBody DraftAttrFromDTO fromDTO) throws Exception {
ValidatorUtils.validateEntity(fromDTO, DefaultGroup.class);
Boolean isSuccess = articleService.saveDraftAttr(tokenDto, fromDTO);
return new Result<Boolean>().ok(isSuccess);
}
/**
* desc:预览保存草稿属性
* @param fromDTO
* @throws Exception
*/
@PostMapping("previewsaveattr")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_PUBLISH)
public Result<Boolean> previewSaveDraftAttr(@LoginUser TokenDto tokenDto,@RequestBody DraftAttrFromDTO fromDTO) throws Exception {
ValidatorUtils.validateEntity(fromDTO, DefaultGroup.class);
Boolean isSuccess = articleService.previewSaveDraftAttr(tokenDto, fromDTO);
return new Result<Boolean>().ok(isSuccess);
}
/**
* desc:发布文章
* @param formDTO
* @throws Exception
*/
@PostMapping("publish")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_PUBLISH)
public Result<Boolean> 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<Boolean>().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<com.epmet.commons.tools.page.PageData>
*/
@PostMapping("publishedarticlelist")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_PUBLISHED_LIST)
public Result<List<PublishedListResultDTO>> publishedArticleList(@LoginUser TokenDto tokenDto, @RequestBody PublishedListFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
List<PublishedListResultDTO> list = articleService.publishedArticleList(tokenDto, formDTO).getList();
return new Result<List<PublishedListResultDTO>>().ok(list);
}
/**
* 已下线文章列表
* @author zhaoqifeng
* @date 2020/6/3 16:19
* @param tokenDto
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<com.epmet.commons.tools.page.PageData>
*/
@PostMapping("offlinearticlelist")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_OFFLINE_LIST)
public Result<List<OfflineListResultDTO> > offLineList(@LoginUser TokenDto tokenDto, @RequestBody OfflineListFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
List<OfflineListResultDTO> list = articleService.offlineList(tokenDto, formDTO).getList();
return new Result<List<OfflineListResultDTO> >().ok(list);
}
/**
* @Description 根据网格Id查找置顶文章的相关信息列表 用处:居民端首页轮播
* @param commonArticleListFormDTO :: getGridId :: getNum
* @return List<ArticleBannerResultDTO>
* @author wangc
* @date 2020.06.02 16:13
**/
@PostMapping("resitoparticlelist")
public Result<List<ArticleBannerResultDTO>> resiTopArticleList(@RequestBody CommonArticleListFormDTO commonArticleListFormDTO){
ValidatorUtils.validateEntity(commonArticleListFormDTO, CommonArticleListFormDTO.ArticleBannerInternalGroup.class);
return new Result<List<ArticleBannerResultDTO>>().ok(articleService.getTopArticleList(commonArticleListFormDTO));
}
/**
* @Description 根据网格Id查找最新文章的相关信息列表 用处:居民端首页最新文章列表
* @param commonArticleListFormDTO :: getGridId :: getNum
* @return List<ArticleLatestResultDTO>
* @author wangc
* @date 2020.06.03 09:53
**/
@PostMapping("resilatestarticlelist")
public Result<List<ArticleLatestResultDTO>> resiLatestArticleList(@RequestBody CommonArticleListFormDTO commonArticleListFormDTO){
ValidatorUtils.validateEntity(commonArticleListFormDTO, CommonArticleListFormDTO.ArticleBannerInternalGroup.class);
return new Result<List<ArticleLatestResultDTO>>().ok(articleService.getLatestArticleList(commonArticleListFormDTO));
}
/**
* @Description 根据网格Id和标签列表查找文章的相关信息列表 用处:居民端党建声音列表
* @param articlePageFormDTO
* @return List<ArticleListResultDTO>
* @author wangc
* @date 2020.06.03 14:19
**/
@PostMapping("resiarticlelist")
public Result<List<ArticleListResultDTO>> resiArticleList(@RequestBody ArticlePageFormDTO articlePageFormDTO){
ValidatorUtils.validateEntity(articlePageFormDTO,ArticlePageFormDTO.ArticlePageInternalGroup.class);
return new Result<List<ArticleListResultDTO>>().ok(articleService.getArticleList(articlePageFormDTO));
}
/**
* @param tokenDTO formDTO
* @return
* @Author sun
* @Description 党建声音-政府端-可下线网格列表
**/
@PostMapping("publishgridlist")
public Result<ArticleAgencyGridListResultDTO> 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<ArticleAgencyGridListResultDTO>().ok(agencyGridList);
}
/**
* @Description 根绝文章Id查询出文章的内容封面等相关信息如果居民端传入的网格Id不在该文章的发布范围内则返回NULL
* @param articleDetailFormDTO
* @return ArticleDetailResultDTO
* @author wangc
* @date 2020.06.03 18:28
**/
@PostMapping("resiarticledetail")
public Result<ArticleDetailResultDTO> resiArticleDetail(@RequestBody ResiArticleDetailFormDTO articleDetailFormDTO){
ValidatorUtils.validateEntity(articleDetailFormDTO,ResiArticleDetailFormDTO.ResiArticleDetailInternalGroup.class);
return new Result<ArticleDetailResultDTO>().ok(articleService.getArticleDetail(articleDetailFormDTO));
}
/**
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.DraftDetailResultDTO>
* @author yinzuomei@elink-cn.com
* @description 政府端文章预览
* @date 2020/6/5 10:56
**/
@PostMapping("draftdetail")
public Result<DraftDetailResultDTO> queryDraftDetail(@RequestBody DraftDetailFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, GovArticleDetailFormDTO.AddUserInternalGroup.class);
DraftDetailResultDTO draftDetailResultDTO = draftService.queryDraftDetail(formDTO);
return new Result<DraftDetailResultDTO>().ok(draftDetailResultDTO);
}
@Autowired
private ArticleService articleService;
@Autowired
private ArticleOperateRecordService articleOperateRecordService;
@Autowired
private DraftService draftService;
/**
* @param tokenDTO
* @return
* @Author sun
* @Description 党建声音-政府端-可选发布范围
**/
@PostMapping("agencygridlist")
public Result<ArticleAgencyGridListResultDTO> agencyGridList(@LoginUser TokenDto tokenDTO) {
ArticleAgencyGridListResultDTO agencyGridList = new ArticleAgencyGridListResultDTO();
agencyGridList.setAgencyGridList(articleService.agencyGridList(tokenDTO));
return new Result<ArticleAgencyGridListResultDTO>().ok(agencyGridList);
}
/**
* desc:政府端-点击返回按钮时点击保存草稿 无需校验参数
*
* @param fromDTO
* @throws Exception
*/
@PostMapping("savedraft")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_PUBLISH)
public Result<DraftContentSaveResultDTO> savedraft(@LoginUser TokenDto tokenDto, @RequestBody DraftContentFromDTO fromDTO) throws Exception {
DraftContentSaveResultDTO draftDTO = articleService.saveDraft(tokenDto, fromDTO);
return new Result<DraftContentSaveResultDTO>().ok(draftDTO);
}
/**
* desc:保存或修改草稿内容
*
* @param fromDTO
* @throws Exception
*/
@PostMapping("savecontent")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_PUBLISH)
public Result<DraftContentSaveResultDTO> saveOrUpdateContent(@LoginUser TokenDto tokenDto, @RequestBody DraftContentFromDTO fromDTO) throws Exception {
DraftContentSaveResultDTO resultDTO = articleService.saveOrUpdateContent(tokenDto, fromDTO, true);
return new Result<DraftContentSaveResultDTO>().ok(resultDTO);
}
/**
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.dto.form.ArticleOperationResultDTO>>
* @author yinzuomei@elink-cn.com
* @description 政府端查询文章操作记录
* @date 2020/6/2 16:50
**/
@PostMapping("oprationlist")
public Result<List<ArticleOperationResultDTO>> operationList(@RequestBody ArticleOperationFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, ArticleOperationFormDTO.AddUserInternalGroup.class);
List<ArticleOperationResultDTO> list =
articleOperateRecordService.listOfArticleOperation(formDTO.getArticleId());
return new Result<List<ArticleOperationResultDTO>>().ok(list);
}
/**
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.GovArticleDetailResultDTO>
* @author yinzuomei@elink-cn.com
* @description 政府端已发布已下线文章详情
* @date 2020/6/3 9:44
**/
@PostMapping("articledetail")
public Result<GovArticleDetailResultDTO> articleDetail(@RequestBody GovArticleDetailFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, GovArticleDetailFormDTO.AddUserInternalGroup.class);
GovArticleDetailResultDTO articleDetail = articleService.queryGovArticleDetail(formDTO.getArticleId());
return new Result<GovArticleDetailResultDTO>().ok(articleDetail);
}
/**
* @param formDTO 草稿id
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.DraftContentResultDTO>
* @author yinzuomei@elink-cn.com
* @description 政府端选中草稿编辑获取草稿内容
* @date 2020/6/3 13:18
**/
@PostMapping("getcontent")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_DRAFT_EDIT)
public Result<DraftContentResultDTO> getContent(@RequestBody DraftDetailFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, GovArticleDetailFormDTO.AddUserInternalGroup.class);
DraftContentResultDTO draftContent = draftService.queryDraftContent(formDTO);
return new Result<DraftContentResultDTO>().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<DraftAttrResultDTO> getAttr(@RequestBody DraftDetailFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, GovArticleDetailFormDTO.AddUserInternalGroup.class);
DraftAttrResultDTO draftAttrResultDTO = draftService.getDraftAttr(formDTO);
return new Result<DraftAttrResultDTO>().ok(draftAttrResultDTO);
}
/**
* @param tokenDTO
* @return
* @Author sun
* @Description 党建声音-政府端-可选发布单位
**/
@PostMapping("publishagencylist")
public Result<PublishAgencyListResultDTO> publishAgencyList(@LoginUser TokenDto tokenDTO) {
return new Result<PublishAgencyListResultDTO>().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<Boolean> saveDraftAttr(@LoginUser TokenDto tokenDto, @RequestBody DraftAttrFromDTO fromDTO) throws Exception {
ValidatorUtils.validateEntity(fromDTO, DefaultGroup.class);
Boolean isSuccess = articleService.saveDraftAttr(tokenDto, fromDTO);
return new Result<Boolean>().ok(isSuccess);
}
/**
* desc:预览保存草稿属性
*
* @param fromDTO
* @throws Exception
*/
@PostMapping("previewsaveattr")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_PUBLISH)
public Result<Boolean> previewSaveDraftAttr(@LoginUser TokenDto tokenDto, @RequestBody DraftAttrFromDTO fromDTO) throws Exception {
ValidatorUtils.validateEntity(fromDTO, DefaultGroup.class);
Boolean isSuccess = articleService.previewSaveDraftAttr(tokenDto, fromDTO);
return new Result<Boolean>().ok(isSuccess);
}
/**
* desc:发布文章
*
* @param formDTO
* @throws Exception
*/
@PostMapping("publish")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_PUBLISH)
public Result<Boolean> 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<Boolean>().ok(isSuccess);
}
/**
* desc:人工确认无误后发布文章不走审核接口
*
* @param formDTO
* @throws Exception
*/
@PostMapping("manualpublish")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_PUBLISH)
public Result<Boolean> manualPublish(@LoginUser TokenDto tokenDto, @RequestBody PublishArticleFormDTO formDTO) throws Exception {
articleService.manualPublish(tokenDto, formDTO.getDraftId());
return new Result<Boolean>().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<com.epmet.commons.tools.page.PageData>
* @author zhaoqifeng
* @date 2020/6/3 16:19
*/
@PostMapping("publishedarticlelist")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_PUBLISHED_LIST)
public Result<List<PublishedListResultDTO>> publishedArticleList(@LoginUser TokenDto tokenDto, @RequestBody PublishedListFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
List<PublishedListResultDTO> list = articleService.publishedArticleList(tokenDto, formDTO).getList();
return new Result<List<PublishedListResultDTO>>().ok(list);
}
/**
* 已下线文章列表
*
* @param tokenDto
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<com.epmet.commons.tools.page.PageData>
* @author zhaoqifeng
* @date 2020/6/3 16:19
*/
@PostMapping("offlinearticlelist")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_OFFLINE_LIST)
public Result<List<OfflineListResultDTO>> offLineList(@LoginUser TokenDto tokenDto, @RequestBody OfflineListFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
List<OfflineListResultDTO> list = articleService.offlineList(tokenDto, formDTO).getList();
return new Result<List<OfflineListResultDTO>>().ok(list);
}
/**
* @param commonArticleListFormDTO :: getGridId :: getNum
* @return List<ArticleBannerResultDTO>
* @Description 根据网格Id查找置顶文章的相关信息列表 用处:居民端首页轮播
* @author wangc
* @date 2020.06.02 16:13
**/
@PostMapping("resitoparticlelist")
public Result<List<ArticleBannerResultDTO>> resiTopArticleList(@RequestBody CommonArticleListFormDTO commonArticleListFormDTO) {
ValidatorUtils.validateEntity(commonArticleListFormDTO, CommonArticleListFormDTO.ArticleBannerInternalGroup.class);
return new Result<List<ArticleBannerResultDTO>>().ok(articleService.getTopArticleList(commonArticleListFormDTO));
}
/**
* @param commonArticleListFormDTO :: getGridId :: getNum
* @return List<ArticleLatestResultDTO>
* @Description 根据网格Id查找最新文章的相关信息列表 用处:居民端首页最新文章列表
* @author wangc
* @date 2020.06.03 09:53
**/
@PostMapping("resilatestarticlelist")
public Result<List<ArticleLatestResultDTO>> resiLatestArticleList(@RequestBody CommonArticleListFormDTO commonArticleListFormDTO) {
ValidatorUtils.validateEntity(commonArticleListFormDTO, CommonArticleListFormDTO.ArticleBannerInternalGroup.class);
return new Result<List<ArticleLatestResultDTO>>().ok(articleService.getLatestArticleList(commonArticleListFormDTO));
}
/**
* @param articlePageFormDTO
* @return List<ArticleListResultDTO>
* @Description 根据网格Id和标签列表查找文章的相关信息列表 用处:居民端党建声音列表
* @author wangc
* @date 2020.06.03 14:19
**/
@PostMapping("resiarticlelist")
public Result<List<ArticleListResultDTO>> resiArticleList(@RequestBody ArticlePageFormDTO articlePageFormDTO) {
ValidatorUtils.validateEntity(articlePageFormDTO, ArticlePageFormDTO.ArticlePageInternalGroup.class);
return new Result<List<ArticleListResultDTO>>().ok(articleService.getArticleList(articlePageFormDTO));
}
/**
* @param tokenDTO formDTO
* @return
* @Author sun
* @Description 党建声音-政府端-可下线网格列表
**/
@PostMapping("publishgridlist")
public Result<ArticleAgencyGridListResultDTO> 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<ArticleAgencyGridListResultDTO>().ok(agencyGridList);
}
/**
* @param articleDetailFormDTO
* @return ArticleDetailResultDTO
* @Description 根绝文章Id查询出文章的内容封面等相关信息如果居民端传入的网格Id不在该文章的发布范围内则返回NULL
* @author wangc
* @date 2020.06.03 18:28
**/
@PostMapping("resiarticledetail")
public Result<ArticleDetailResultDTO> resiArticleDetail(@RequestBody ResiArticleDetailFormDTO articleDetailFormDTO) {
ValidatorUtils.validateEntity(articleDetailFormDTO, ResiArticleDetailFormDTO.ResiArticleDetailInternalGroup.class);
return new Result<ArticleDetailResultDTO>().ok(articleService.getArticleDetail(articleDetailFormDTO));
}
/**
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.DraftDetailResultDTO>
* @author yinzuomei@elink-cn.com
* @description 政府端文章预览
* @date 2020/6/5 10:56
**/
@PostMapping("draftdetail")
public Result<DraftDetailResultDTO> queryDraftDetail(@RequestBody DraftDetailFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, GovArticleDetailFormDTO.AddUserInternalGroup.class);
DraftDetailResultDTO draftDetailResultDTO = draftService.queryDraftDetail(formDTO);
return new Result<DraftDetailResultDTO>().ok(draftDetailResultDTO);
}
}

16
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<List<DraftListResultDTO>>().ok(draftService.draftList(tokenDto, formDTO).getList());
}
/**
* desc:政府端带封面的预览
* @param formDTO
* @return
*/
@PostMapping("detailwithcover")
public Result<DraftDetailResultDTO> detailWithCover(@RequestBody DraftDetailFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, GovArticleDetailFormDTO.AddUserInternalGroup.class);
formDTO.setShowCover(true);
DraftDetailResultDTO draftDetailResultDTO = draftService.queryDraftDetail(formDTO);
return new Result<DraftDetailResultDTO>().ok(draftDetailResultDTO);
}
}

5
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
*/

8
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/ArticleService.java

@ -206,4 +206,12 @@ public interface ArticleService extends BaseService<ArticleEntity> {
* @return
*/
void updateDraftPublishStatus(String draftId,String statusFlag);
/**
* desc:人工发布文章 不走审核接口
* @param tokenDto
* @param draftId
* @return
*/
void manualPublish(TokenDto tokenDto, String draftId);
}

54
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<ArticleDao, ArticleEntit
@Override
public Boolean previewSaveDraftAttr(TokenDto tokenDto, DraftAttrFromDTO fromDTO) {
log.debug("previewSaveDraftAttr param:{}",JSON.toJSONString(fromDTO));
log.debug("previewSaveDraftAttr param:{}", JSON.toJSONString(fromDTO));
//校验参数
ValidatorUtils.validateEntity(fromDTO);
if (DraftConstant.TOP.equals(fromDTO.getIsTop()) && StringUtils.isBlank(fromDTO.getCoverImg())) {
@ -566,7 +565,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
offLineList.forEach(off -> {
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<ArticleDao, ArticleEntit
if (RoleKeyConstants.ROLE_KEY_PARTY_PRINCIPALS.equals(role.getRoleKey())) {
staffLevel = AGENCY;
break;
} else if (RoleKeyConstants.ROLE_KEY_GRID_PARTY_DIRECTOR.equals(role.getRoleKey())){
} else if (RoleKeyConstants.ROLE_KEY_GRID_PARTY_DIRECTOR.equals(role.getRoleKey())) {
staffLevel = GRID;
}
}
@ -888,7 +887,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
* @date 2020.06.05 09:10
**/
public ArticleEntity publishDraftToArticle(DraftEntity draft) {
public ArticleEntity publishDraftToArticle(DraftEntity draft, String publishWay) {
//1.查找草稿内容
if (null != draft) {
@ -904,6 +903,9 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
article.setId(null);
article.setDraftId(draftId);
article.setStatusFlag(DraftConstant.PUBLISHED);
if (StringUtils.isNotBlank(publishWay)) {
article.setPublishWay(publishWay);
}
baseDao.insert(article);
if (null != draftContents && draftContents.size() > NumConstant.ZERO) {
draftContents.forEach(content -> {
@ -1006,16 +1008,16 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
log.info("scanContent imgScanParamDTO:{}", JSON.toJSONString(imgScanParamDTO));
imgSyncScanResult = ScanContentUtils.imgSyncScan(scanApiUrl.concat(imgSyncScanMethod), imgScanParamDTO);
log.info("scanContent imgSyncScanResult:{}", JSON.toJSONString(imgSyncScanResult));
if (!imgSyncScanResult.success()){
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode(),imgSyncScanResult.getMsg());
if (!imgSyncScanResult.success()) {
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode(), imgSyncScanResult.getMsg());
}
}
if (!CollectionUtils.isEmpty(textScanParamDTO.getTasks())) {
log.info("scanContent textScanParamDTO:{}", JSON.toJSONString(textScanParamDTO));
textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO);
log.info("scanContent textSyncScanResult:{}", JSON.toJSONString(textSyncScanResult));
if (!textSyncScanResult.success()){
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode(),textSyncScanResult.getMsg());
if (!textSyncScanResult.success()) {
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode(), textSyncScanResult.getMsg());
}
}
@ -1047,7 +1049,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
}
@Override
@Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
@Transactional(rollbackFor = Exception.class)
public void scanAllPassPublishArticle(TokenDto tokenDto, String draftId, SyncScanResult syncScanResult) {
DraftEntity draft = draftDao.selectById(draftId);
@ -1058,7 +1060,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
try {
//审核通过
this.updateAuditStatusFailById(draftId, syncScanResult);
ArticleEntity articleEntity = this.publishDraftToArticle(draft);
ArticleEntity articleEntity = this.publishDraftToArticle(draft, ArticleConstant.PUBLISH_WAY_AUTO_AUDIT);
UpdateCustomerTagCacheDTO updateCustomerTagCacheDTO = this.updateCustomerTag(tokenDto, draftId);
if (updateCustomerTagCacheDTO == null) {
return;
@ -1123,7 +1125,6 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
auditMsg = ModuleConstant.DRAFT_CONTENT;
} else if (coverFail) {
auditMsg = ModuleConstant.DRAFT_COVER;
;
}
this.sendMsg(draft.getCustomerId(), draft.getTitle(), String.format(ModuleConstant.MSG_AUDIT_CONTENT, draft.getTitle(), auditMsg));
}
@ -1157,6 +1158,35 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
draftDao.updateAuditStatusById(draftId, statusFlag);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void manualPublish(TokenDto tokenDto, String draftId) {
try {
//校验草稿状态 并更新为已发布
DraftEntity draftEntity = checkDraftStatus(draftId);
this.updateDraftPublishStatus(draftId, DraftConstant.PUBLISHED);
//复制 草稿到文章(草稿内容,封面,属性)
ArticleEntity articleEntity = this.publishDraftToArticle(draftEntity, ArticleConstant.PUBLISH_WAY_MANUAL);
UpdateCustomerTagCacheDTO updateCustomerTagCacheDTO = this.updateCustomerTag(tokenDto, draftId);
if (updateCustomerTagCacheDTO == null) {
return;
}
List<UpdateGridTagCacheDTO> 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

14
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<DraftDao, DraftEntity> implements DraftService {
private Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private DraftCoverDao draftCoverDao;
@Override
public PageData<DraftDTO> page(Map<String, Object> params) {
IPage<DraftEntity> page = baseDao.selectPage(
@ -179,6 +184,15 @@ public class DraftServiceImpl extends BaseServiceImpl<DraftDao, DraftEntity> 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;
}

2
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`;

8
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 @@
<select id="selectDraftContentList" parameterType="java.lang.String" resultType="com.epmet.dto.result.GovDraftContentDTO">
SELECT
dc.CONTENT_TYPE,
dc.CONTENT
dc.CONTENT,
dc.AUDIT_STATUS,
dc.AUDIT_REASON
FROM
draft_content dc
WHERE

Loading…
Cancel
Save