162 changed files with 4388 additions and 531 deletions
@ -0,0 +1,48 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description appId、手机号、验证码获取组织-接口入参 |
||||
|
* @Author sun |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ThirdStaffOrgsFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 4193133227120225342L; |
||||
|
/** |
||||
|
* 添加用户操作的用户可见异常分组 |
||||
|
* 该分组用于校验需要返回给前端错误信息提示的列,需要继承CustomerClientShowGroup |
||||
|
* 返回错误码为8999,提示信息为DTO中具体的列的校验注解message的内容 |
||||
|
*/ |
||||
|
public interface AddUserShowGroup extends CustomerClientShowGroup { |
||||
|
} |
||||
|
|
||||
|
public interface GetMyOrgByPassWordGroup extends CustomerClientShowGroup { |
||||
|
} |
||||
|
public interface GetMyOrgByLoginWxmp extends CustomerClientShowGroup{} |
||||
|
/** |
||||
|
* 小程序appId |
||||
|
*/ |
||||
|
@NotBlank(message = "appId不能为空", groups = {AddUserShowGroup.class}) |
||||
|
private String appId; |
||||
|
|
||||
|
/** |
||||
|
* 手机号 |
||||
|
*/ |
||||
|
@NotBlank(message = "手机号不能为空", groups = {AddUserShowGroup.class}) |
||||
|
private String mobile; |
||||
|
|
||||
|
/** |
||||
|
* 验证码 |
||||
|
*/ |
||||
|
@NotBlank(message="验证码不能为空", groups = {GetMyOrgByLoginWxmp.class}) |
||||
|
private String smsCode; |
||||
|
|
||||
|
@NotBlank(message = "密码不能为空",groups ={GetMyOrgByPassWordGroup.class}) |
||||
|
private String password; |
||||
|
} |
||||
|
|
||||
@ -1,37 +1,65 @@ |
|||||
package com.epmet.commons.tools.utils; |
package com.epmet.commons.tools.utils; |
||||
|
|
||||
import java.io.File; |
import java.io.File; |
||||
|
import java.io.FileOutputStream; |
||||
import java.io.IOException; |
import java.io.IOException; |
||||
import java.io.InputStream; |
import java.io.InputStream; |
||||
import java.nio.file.Files; |
import java.nio.file.Files; |
||||
|
|
||||
|
/** |
||||
|
* @author kamui |
||||
|
*/ |
||||
public class FileUtils { |
public class FileUtils { |
||||
|
|
||||
/** |
/** |
||||
* 创建临时文件. |
* 创建临时文件 |
||||
* |
* |
||||
* @param inputStream 输入文件流 |
* @param inputStream |
||||
* @param name 文件名 |
* @param name 文件名 |
||||
* @param ext 扩展名 |
* @param ext 扩展名 |
||||
* @param tmpDirFile 临时文件夹目录 |
* @param tmpDirFile 临时文件夹目录 |
||||
*/ |
*/ |
||||
public static File createTmpFile(InputStream inputStream, String name, String ext, File tmpDirFile) throws IOException { |
public static File createTmpFile(InputStream inputStream, String name, String ext, File tmpDirFile) throws IOException { |
||||
File resultFile = File.createTempFile(name, '.' + ext, tmpDirFile); |
File tmpFile; |
||||
|
if (tmpDirFile == null) { |
||||
resultFile.deleteOnExit(); |
tmpFile = File.createTempFile(name, '.' + ext); |
||||
org.apache.commons.io.FileUtils.copyToFile(inputStream, resultFile); |
} else { |
||||
return resultFile; |
tmpFile = File.createTempFile(name, '.' + ext, tmpDirFile); |
||||
} |
} |
||||
|
|
||||
/** |
tmpFile.deleteOnExit(); |
||||
* 创建临时文件. |
FileOutputStream fos = new FileOutputStream(tmpFile); |
||||
* |
try { |
||||
* @param inputStream 输入文件流 |
int read = 0; |
||||
* @param name 文件名 |
byte[] bytes = new byte[1024 * 100]; |
||||
* @param ext 扩展名 |
while ((read = inputStream.read(bytes)) != -1) { |
||||
*/ |
fos.write(bytes, 0, read); |
||||
public static File createTmpFile(InputStream inputStream, String name, String ext) throws IOException { |
} |
||||
return createTmpFile(inputStream, name, ext, Files.createTempDirectory("weixin-java-tools-temp").toFile()); |
|
||||
} |
fos.flush(); |
||||
|
} catch (Exception e) { |
||||
|
|
||||
|
} finally { |
||||
|
if (fos != null) { |
||||
|
try { |
||||
|
fos.close(); |
||||
|
} catch (IOException e) { |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
return tmpFile; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 创建临时文件 |
||||
|
* |
||||
|
* @param inputStream |
||||
|
* @param name 文件名 |
||||
|
* @param ext 扩展名 |
||||
|
*/ |
||||
|
public static File createTmpFile(InputStream inputStream, String name, String ext) throws IOException { |
||||
|
return createTmpFile(inputStream, name, ext, null); |
||||
|
} |
||||
|
|
||||
} |
} |
||||
|
|||||
@ -0,0 +1,46 @@ |
|||||
|
/** |
||||
|
* 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.result.resi; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 是否到达活动打卡地址 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-07-19 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ResiActAddressResultDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键 |
||||
|
*/ |
||||
|
private Boolean isAddress; |
||||
|
|
||||
|
/** |
||||
|
* 未报到活动范围的提示信息 |
||||
|
*/ |
||||
|
private String errorTip; |
||||
|
|
||||
|
} |
||||
@ -1,94 +0,0 @@ |
|||||
package com.epmet.utils; |
|
||||
|
|
||||
import com.alibaba.nacos.client.utils.StringUtils; |
|
||||
import com.epmet.commons.tools.constant.NumConstant; |
|
||||
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
||||
import com.epmet.commons.tools.exception.RenException; |
|
||||
import com.epmet.commons.tools.scan.param.ImgScanParamDTO; |
|
||||
import com.epmet.commons.tools.scan.param.ImgTaskDTO; |
|
||||
import com.epmet.commons.tools.scan.param.TextScanParamDTO; |
|
||||
import com.epmet.commons.tools.scan.param.TextTaskDTO; |
|
||||
import com.epmet.commons.tools.scan.result.SyncScanResult; |
|
||||
import com.epmet.commons.tools.utils.Result; |
|
||||
import com.epmet.commons.tools.utils.ScanContentUtils; |
|
||||
import org.springframework.beans.factory.annotation.Value; |
|
||||
import lombok.extern.slf4j.Slf4j; |
|
||||
|
|
||||
import java.util.List; |
|
||||
import java.util.UUID; |
|
||||
|
|
||||
/** |
|
||||
* 文字、图片合法性校验 |
|
||||
* |
|
||||
* @author zhangyong |
|
||||
* @date 2020-07-15 14:26 |
|
||||
*/ |
|
||||
@Slf4j |
|
||||
public class ValidityVerification { |
|
||||
|
|
||||
@Value("${openapi.scan.server.url}") |
|
||||
private String scanApiUrl; |
|
||||
@Value("${openapi.scan.method.textSyncScan}") |
|
||||
private String textSyncScanMethod; |
|
||||
@Value("${openapi.scan.method.imgSyncScan}") |
|
||||
private String imgSyncScanMethod; |
|
||||
|
|
||||
/** |
|
||||
* 文本校验 |
|
||||
* @param context 被校验的文本,,不能超过10000 |
|
||||
* @param businessEnum 业务枚举,定义校验失败后,输出的日志信息 |
|
||||
* @return void |
|
||||
* @auther zhangyong |
|
||||
* @Date 14:42 2020-07-15 |
|
||||
**/ |
|
||||
public void textScanVerification(String context, String businessEnum){ |
|
||||
if (StringUtils.isNotBlank(context)) { |
|
||||
TextScanParamDTO textScanParamDTO = new TextScanParamDTO(); |
|
||||
TextTaskDTO taskDTO = new TextTaskDTO(); |
|
||||
taskDTO.setContent(context); |
|
||||
taskDTO.setDataId(UUID.randomUUID().toString().replace("-", "")); |
|
||||
textScanParamDTO.getTasks().add(taskDTO); |
|
||||
Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO); |
|
||||
if (!textSyncScanResult.success()) { |
|
||||
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); |
|
||||
} else { |
|
||||
if (!textSyncScanResult.getData().isAllPass()) { |
|
||||
// 业务枚举:例如:评论话题失败,评论内容为:%s"
|
|
||||
log.error(String.format(businessEnum, context)); |
|
||||
throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode()); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 图片列表校验 |
|
||||
* @param imgList 被校验的图片列表 |
|
||||
* @param businessEnum 业务枚举,定义校验失败后,输出的日志信息 |
|
||||
* |
|
||||
* @return void |
|
||||
* @auther zhangyong |
|
||||
* @Date 14:42 2020-07-15 |
|
||||
**/ |
|
||||
public void imgScanVerification(List<String> imgList, String businessEnum){ |
|
||||
if (null != imgList && NumConstant.ZERO != imgList.size()){ |
|
||||
ImgScanParamDTO imgScanParamDTO = new ImgScanParamDTO(); |
|
||||
imgList.forEach(url -> { |
|
||||
ImgTaskDTO task = new ImgTaskDTO(); |
|
||||
task.setDataId(UUID.randomUUID().toString().replace("-", "")); |
|
||||
task.setUrl(url); |
|
||||
imgScanParamDTO.getTasks().add(task); |
|
||||
}); |
|
||||
Result<SyncScanResult> imgScanResult = ScanContentUtils.imgSyncScan(scanApiUrl.concat(imgSyncScanMethod), imgScanParamDTO); |
|
||||
if (!imgScanResult.success()){ |
|
||||
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); |
|
||||
} else { |
|
||||
if (!imgScanResult.getData().isAllPass()) { |
|
||||
// 业务枚举:例如:评论话题失败,评论内容为:%s"
|
|
||||
log.error(String.format(businessEnum)); |
|
||||
throw new RenException(EpmetErrorCode.IMG_SCAN_FAILED.getCode()); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -0,0 +1,423 @@ |
|||||
|
/* |
||||
|
Navicat Premium Data Transfer |
||||
|
|
||||
|
Source Server : 外网192.168.1.130 |
||||
|
Source Server Type : MySQL |
||||
|
Source Server Version : 50728 |
||||
|
Source Host : 118.190.150.119:47306 |
||||
|
Source Schema : epmet_heart |
||||
|
|
||||
|
Target Server Type : MySQL |
||||
|
Target Server Version : 50728 |
||||
|
File Encoding : 65001 |
||||
|
|
||||
|
Date: 28/07/2020 15:17:47 |
||||
|
*/ |
||||
|
|
||||
|
SET NAMES utf8mb4; |
||||
|
SET FOREIGN_KEY_CHECKS = 0; |
||||
|
|
||||
|
-- ---------------------------- |
||||
|
-- Table structure for act_content |
||||
|
-- ---------------------------- |
||||
|
DROP TABLE IF EXISTS `act_content`; |
||||
|
CREATE TABLE `act_content` ( |
||||
|
`ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键', |
||||
|
`ACT_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动id:act_info.id', |
||||
|
`CONTENT` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '内容', |
||||
|
`CONTENT_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '内容类型 图片:img;文字:text', |
||||
|
`ORDER_NUM` int(11) NOT NULL COMMENT '内容顺序 从1开始', |
||||
|
`DEL_FLAG` int(11) NOT NULL DEFAULT 0 COMMENT '删除标识 0.未删除 1.已删除', |
||||
|
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime(0) NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime(0) NOT NULL COMMENT '更新时间', |
||||
|
PRIMARY KEY (`ID`) USING BTREE |
||||
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '活动内容' ROW_FORMAT = Dynamic; |
||||
|
|
||||
|
-- ---------------------------- |
||||
|
-- Table structure for act_customized |
||||
|
-- ---------------------------- |
||||
|
DROP TABLE IF EXISTS `act_customized`; |
||||
|
CREATE TABLE `act_customized` ( |
||||
|
`ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键(客户如果没配置,默认的值写在代码里)', |
||||
|
`CUSTOMER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户id', |
||||
|
`TITLE_NAME` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '标题:eg: 志愿者去哪儿', |
||||
|
`HOTLINE` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '咨询热线', |
||||
|
`ACT_LIST_NAME` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动列表', |
||||
|
`HEART_RANK_NAME` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '爱心榜', |
||||
|
`ACT_REVIEW_NAME` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动回顾', |
||||
|
`MY_ACT_NAME` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '我的活动', |
||||
|
`REVISION` int(11) NOT NULL DEFAULT 0 COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime(0) NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime(0) NOT NULL COMMENT '更新时间', |
||||
|
`DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标记', |
||||
|
PRIMARY KEY (`ID`) USING BTREE |
||||
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '爱心互助首页自定义配置' ROW_FORMAT = Dynamic; |
||||
|
|
||||
|
-- ---------------------------- |
||||
|
-- Table structure for act_info |
||||
|
-- ---------------------------- |
||||
|
DROP TABLE IF EXISTS `act_info`; |
||||
|
CREATE TABLE `act_info` ( |
||||
|
`ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键', |
||||
|
`CUSTOMER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户id', |
||||
|
`TITLE` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动标题', |
||||
|
`COVER_PIC` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动封面', |
||||
|
`SIGN_UP_START_TIME` datetime(0) NOT NULL COMMENT '报名开始时间', |
||||
|
`SIGN_UP_END_TIME` datetime(0) NOT NULL COMMENT '报名截止时间', |
||||
|
`REQUIREMENT` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '招募要求', |
||||
|
`ACT_START_TIME` datetime(0) NOT NULL COMMENT '活动开始时间', |
||||
|
`ACT_END_TIME` datetime(0) NOT NULL COMMENT '活动结束时间', |
||||
|
`ACT_ADDRESS` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动地点', |
||||
|
`ACT_LONGITUDE` decimal(32, 10) NOT NULL COMMENT '活动位置经度', |
||||
|
`ACT_LATITUDE` decimal(32, 10) NOT NULL COMMENT '活动位置纬度', |
||||
|
`SIGN_IN_START_TIME` datetime(0) NOT NULL COMMENT '打卡开始时间', |
||||
|
`SIGN_IN_END_TIME` datetime(0) NOT NULL COMMENT '打卡截止时间', |
||||
|
`SIGN_IN_ADDRESS` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动签到打卡地点', |
||||
|
`SIGN_IN_LONGITUDE` decimal(32, 10) NOT NULL COMMENT '活动签到打卡位置经度', |
||||
|
`SIGN_IN_LATITUDE` decimal(32, 10) NOT NULL COMMENT '活动签到打卡位置纬度', |
||||
|
`SIGN_IN_RADIUS` int(11) NOT NULL COMMENT '活动签到打卡半径(单位:米)', |
||||
|
`ACT_QUOTA_CATEGORY` tinyint(1) NOT NULL DEFAULT 0 COMMENT '活动名额类型(0-不限名额,1-固定名额)', |
||||
|
`ACT_QUOTA` int(11) NULL DEFAULT 0 COMMENT '活动名额', |
||||
|
`ACT_STATUS` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '活动状态(\r\n已发布/报名中:published;\r\n已取消:canceled;\r\n已结束:finished)', |
||||
|
`CANCEL_REASON` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '活动取消的原因', |
||||
|
`CANCEL_TIME` datetime(0) NULL DEFAULT NULL COMMENT '取消活动的时间', |
||||
|
`SPONSOR_CONTACTS` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '联系人', |
||||
|
`SPONSOR_TEL` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '联系电话', |
||||
|
`SPONSOR_TYPE` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '发布名义:网格主办:grid;组织主办:agency', |
||||
|
`SPONSOR_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主办方id(机关或网格的id)', |
||||
|
`SPONSOR_NAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动主办方名称(机关或网格的名称)', |
||||
|
`PID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '发布单位的上一级组织id,如果是以网格发布,此列存储的是网格所属机关的上一级机关', |
||||
|
`REWARD` int(11) NOT NULL DEFAULT 0 COMMENT '活动奖励积分', |
||||
|
`VOLUNTEER_LIMIT` tinyint(1) NOT NULL COMMENT '身份限制:1只有志愿者才可以参加活动0不限制志愿者身份', |
||||
|
`AUDIT_SWITCH` tinyint(1) NOT NULL COMMENT '审核开关:1报名人员需要人工审核0不需要', |
||||
|
`ACTUAL_START_TIME` datetime(0) NULL DEFAULT NULL COMMENT '活动实际开始时间', |
||||
|
`ACTUAL_END_TIME` datetime(0) NULL DEFAULT NULL COMMENT '活动实际结束时间', |
||||
|
`SERVICE_MIN` int(11) NULL DEFAULT NULL COMMENT '活动共计时长(服务时间)单位:分钟', |
||||
|
`SUMMARY_FLAG` tinyint(1) NOT NULL DEFAULT 0 COMMENT '1已经总结0未总结', |
||||
|
`REVISION` int(11) NOT NULL DEFAULT 0 COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime(0) NOT NULL COMMENT '创建时间(活动发布时间)', |
||||
|
`UPDATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime(0) NOT NULL COMMENT '更新时间', |
||||
|
`DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '删除标识', |
||||
|
PRIMARY KEY (`ID`) USING BTREE |
||||
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '活动信息' ROW_FORMAT = Compact; |
||||
|
|
||||
|
-- ---------------------------- |
||||
|
-- Table structure for act_live_pic |
||||
|
-- ---------------------------- |
||||
|
DROP TABLE IF EXISTS `act_live_pic`; |
||||
|
CREATE TABLE `act_live_pic` ( |
||||
|
`ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键', |
||||
|
`LIVE_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '实况ID:act_live.id', |
||||
|
`PIC_URL` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '图片地址', |
||||
|
`SORT` int(11) NOT NULL COMMENT '排序从1开始', |
||||
|
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime(0) NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime(0) NOT NULL COMMENT '更新时间', |
||||
|
`DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标志', |
||||
|
PRIMARY KEY (`ID`) USING BTREE |
||||
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '活动实况图片表' ROW_FORMAT = Compact; |
||||
|
|
||||
|
-- ---------------------------- |
||||
|
-- Table structure for act_live_rec |
||||
|
-- ---------------------------- |
||||
|
DROP TABLE IF EXISTS `act_live_rec`; |
||||
|
CREATE TABLE `act_live_rec` ( |
||||
|
`ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键', |
||||
|
`ACT_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动id: act_info.id', |
||||
|
`USER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户id', |
||||
|
`LONGITUDE` decimal(32, 10) NULL DEFAULT NULL COMMENT '实况打卡位置经度', |
||||
|
`LATITUDE` decimal(32, 10) NULL DEFAULT NULL COMMENT '实况打卡位置纬度', |
||||
|
`ADDRESS` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '实况打卡地址', |
||||
|
`DESC` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '实况打卡描述', |
||||
|
`DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标记', |
||||
|
`REVISION` int(11) NOT NULL DEFAULT 0 COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime(0) NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime(0) NOT NULL COMMENT '更新时间', |
||||
|
PRIMARY KEY (`ID`) USING BTREE, |
||||
|
INDEX `epmet_act_user_clock_log_ACT_USER_ID_IDX`(`ACT_ID`) USING BTREE |
||||
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '活动实况记录' ROW_FORMAT = Compact; |
||||
|
|
||||
|
-- ---------------------------- |
||||
|
-- Table structure for act_operation_rec |
||||
|
-- ---------------------------- |
||||
|
DROP TABLE IF EXISTS `act_operation_rec`; |
||||
|
CREATE TABLE `act_operation_rec` ( |
||||
|
`ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键', |
||||
|
`ACT_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动id', |
||||
|
`TYPE` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '发布:publish;\r\n取消活动:cancel;\r\n结束活动:finish\r\n重新编辑:update', |
||||
|
`NOTICE_USER` tinyint(1) NOT NULL DEFAULT 0 COMMENT '1通知用户0不通知,取消活动时默认true', |
||||
|
`REMARK` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注,取消活动时此列有值', |
||||
|
`DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标记', |
||||
|
`REVISION` int(11) NOT NULL DEFAULT 0 COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '操作人', |
||||
|
`CREATED_TIME` datetime(0) NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime(0) NOT NULL COMMENT '更新时间', |
||||
|
PRIMARY KEY (`ID`) USING BTREE |
||||
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '活动操作日志表' ROW_FORMAT = Dynamic; |
||||
|
|
||||
|
-- ---------------------------- |
||||
|
-- Table structure for act_point_log |
||||
|
-- ---------------------------- |
||||
|
DROP TABLE IF EXISTS `act_point_log`; |
||||
|
CREATE TABLE `act_point_log` ( |
||||
|
`ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键(给分或者不给分,以及重新处理插入本表)', |
||||
|
`ACT_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动id', |
||||
|
`USER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户id', |
||||
|
`POINTS` int(11) NOT NULL COMMENT '积分值', |
||||
|
`OPERATE_TYPE` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '操作类型:\r\n同意给分agree; 不给分:deny;重新处理: reset', |
||||
|
`REMARK` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注:拒绝给分和重新处理时录入的理由', |
||||
|
`DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标识 0-否,1-是', |
||||
|
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人(工作人员id)', |
||||
|
`CREATED_TIME` datetime(0) NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime(0) NOT NULL COMMENT '更新时间', |
||||
|
PRIMARY KEY (`ID`) USING BTREE |
||||
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '活动发放积分日志表' ROW_FORMAT = Dynamic; |
||||
|
|
||||
|
-- ---------------------------- |
||||
|
-- Table structure for act_sign_in_pic |
||||
|
-- ---------------------------- |
||||
|
DROP TABLE IF EXISTS `act_sign_in_pic`; |
||||
|
CREATE TABLE `act_sign_in_pic` ( |
||||
|
`ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键', |
||||
|
`SIGN_IN_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '签到记录ID:act_sign_in_record.id', |
||||
|
`PIC_URL` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '图片地址', |
||||
|
`SORT` int(11) NOT NULL COMMENT '排序从1开始', |
||||
|
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime(0) NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime(0) NOT NULL COMMENT '更新时间', |
||||
|
`DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标志', |
||||
|
PRIMARY KEY (`ID`) USING BTREE |
||||
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '活动签到图片表' ROW_FORMAT = Compact; |
||||
|
|
||||
|
-- ---------------------------- |
||||
|
-- Table structure for act_sign_in_rec |
||||
|
-- ---------------------------- |
||||
|
DROP TABLE IF EXISTS `act_sign_in_rec`; |
||||
|
CREATE TABLE `act_sign_in_rec` ( |
||||
|
`ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键', |
||||
|
`ACT_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动id:act_info.id', |
||||
|
`USER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户id', |
||||
|
`LONGITUDE` decimal(32, 10) NOT NULL COMMENT '签到位置经度', |
||||
|
`LATITUDE` decimal(32, 10) NOT NULL COMMENT '签到位置纬度', |
||||
|
`ADDRESS` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '签到地址', |
||||
|
`DESC` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '签到描述', |
||||
|
`SYNC_LIVE` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0不同步实况1同步到实况记录', |
||||
|
`LIVE_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '实况id,党sync_live=1时此列有值', |
||||
|
`DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标记', |
||||
|
`REVISION` int(11) NOT NULL DEFAULT 0 COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime(0) NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime(0) NOT NULL COMMENT '更新时间', |
||||
|
PRIMARY KEY (`ID`) USING BTREE |
||||
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '活动签到记录' ROW_FORMAT = Dynamic; |
||||
|
|
||||
|
-- ---------------------------- |
||||
|
-- Table structure for act_statistical |
||||
|
-- ---------------------------- |
||||
|
DROP TABLE IF EXISTS `act_statistical`; |
||||
|
CREATE TABLE `act_statistical` ( |
||||
|
`ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键(活动结束后插入本表)', |
||||
|
`ACT_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动id', |
||||
|
`SIGNUP_NUM` int(11) NOT NULL DEFAULT 0 COMMENT '已报名总人数(已报名/待审核auditing,审核通过passed,审核不通过refused取消报名canceld总人数)', |
||||
|
`AUDITING_NUM` int(11) NOT NULL DEFAULT 0 COMMENT '待审核', |
||||
|
`PASSED_NUM` int(11) NOT NULL DEFAULT 0 COMMENT '审核通过', |
||||
|
`REFUSED_NUM` int(11) NOT NULL DEFAULT 0 COMMENT '审核不通过总人数', |
||||
|
`CANCELD_NUM` int(11) NOT NULL DEFAULT 0 COMMENT '取消报名的人数', |
||||
|
`SIGNED_IN_USER_NUM` int(11) NOT NULL DEFAULT 0 COMMENT '活动已签到人数', |
||||
|
`REWARD_USER_NUM` int(11) NOT NULL DEFAULT 0 COMMENT '发放积分总人数', |
||||
|
`DENY_REWARD_USER_NUM` int(11) NOT NULL DEFAULT 0 COMMENT '拒绝发放积分总人数', |
||||
|
`DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '删除标识', |
||||
|
`REVISION` int(11) NOT NULL DEFAULT 0 COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime(0) NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime(0) NOT NULL COMMENT '更新时间', |
||||
|
PRIMARY KEY (`ID`) USING BTREE |
||||
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '活动统计信息' ROW_FORMAT = Dynamic; |
||||
|
|
||||
|
-- ---------------------------- |
||||
|
-- Table structure for act_summary |
||||
|
-- ---------------------------- |
||||
|
DROP TABLE IF EXISTS `act_summary`; |
||||
|
CREATE TABLE `act_summary` ( |
||||
|
`ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键ID', |
||||
|
`ACT_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动ID:act_info.id', |
||||
|
`CONTENT` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '内容', |
||||
|
`CONTENT_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '内容类型 图片:img;文字:text', |
||||
|
`ORDER_NUM` int(11) NOT NULL COMMENT '内容顺序 从1开始', |
||||
|
`DEL_FLAG` int(11) NOT NULL DEFAULT 0 COMMENT '删除标识 0.未删除 1.已删除', |
||||
|
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime(0) NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime(0) NOT NULL COMMENT '更新时间', |
||||
|
PRIMARY KEY (`ID`) USING BTREE |
||||
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '活动回顾表' ROW_FORMAT = Dynamic; |
||||
|
|
||||
|
-- ---------------------------- |
||||
|
-- Table structure for act_user_log |
||||
|
-- ---------------------------- |
||||
|
DROP TABLE IF EXISTS `act_user_log`; |
||||
|
CREATE TABLE `act_user_log` ( |
||||
|
`ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键', |
||||
|
`ACT_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动ID', |
||||
|
`USER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户ID', |
||||
|
`OPERATION_TYPE` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '操作类型(已报名/待审核auditing,\r\n审核通过passed,\r\n审核不通过refused\r\n取消报名canceled,\r\n)', |
||||
|
`REASON` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作备注:(1)审核不通过的原因\r\n(2)取消报名的原因|\r\n(3)拒绝发放积分的理由\r\n(4)重新处理的理由', |
||||
|
`DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标识 0.未删除 1.已删除', |
||||
|
`REVISION` int(11) NOT NULL DEFAULT 0 COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime(0) NOT NULL COMMENT '创建时间(操作的时间)', |
||||
|
`UPDATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime(0) NOT NULL COMMENT '更新时间', |
||||
|
PRIMARY KEY (`ID`) USING BTREE |
||||
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户活动关系日志表' ROW_FORMAT = Compact; |
||||
|
|
||||
|
-- ---------------------------- |
||||
|
-- Table structure for act_user_relation |
||||
|
-- ---------------------------- |
||||
|
DROP TABLE IF EXISTS `act_user_relation`; |
||||
|
CREATE TABLE `act_user_relation` ( |
||||
|
`ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键(用户-活动一对一,报名取消再报名也只有一条记录)', |
||||
|
`ACT_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动ID', |
||||
|
`USER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户ID', |
||||
|
`STATUS` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '当前状态(已报名/待审核auditing,\r\n审核通过passed,\r\n审核不通过refused\r\n取消报名canceled,\r\n)', |
||||
|
`PASSED_TYPE` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '审核通过类型:auto, manual', |
||||
|
`AUDIT_TIME` datetime(0) NULL DEFAULT NULL COMMENT '审核时间(同意、拒绝的时间)', |
||||
|
`FAILURE_REASON` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '未通过原因', |
||||
|
`CANCEL_TIME` datetime(0) NULL DEFAULT NULL COMMENT '取消报名的时间', |
||||
|
`CANCEL_REASON` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户取消报名的原因', |
||||
|
`PROCESS_FLAG` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '已处理: handled; 默认\"\",重新处理时reward_flag置为空字符串', |
||||
|
`SIGN_IN_FLAG` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '已签到:signed_in; 默认\"\"', |
||||
|
`REWARD_FLAG` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '已给分:agree, 不给分:deny 默认\"\"', |
||||
|
`DENY_REWARD_REASON` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '拒绝发放积分备注', |
||||
|
`REVISION` int(11) NOT NULL DEFAULT 0 COMMENT '乐观锁', |
||||
|
`DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标记', |
||||
|
`CREATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime(0) NOT NULL COMMENT '创建时间(报名时间)', |
||||
|
`UPDATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime(0) NOT NULL COMMENT '更新时间', |
||||
|
PRIMARY KEY (`ID`) USING BTREE, |
||||
|
INDEX `epmet_act_user_relation_ACT_ID_IDX`(`ACT_ID`, `USER_ID`) USING BTREE |
||||
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户活动关系表' ROW_FORMAT = Compact; |
||||
|
|
||||
|
-- ---------------------------- |
||||
|
-- Table structure for heart_user_info |
||||
|
-- ---------------------------- |
||||
|
DROP TABLE IF EXISTS `heart_user_info`; |
||||
|
CREATE TABLE `heart_user_info` ( |
||||
|
`ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键(用户提交报名成功后,插入本表)', |
||||
|
`CUSTOMER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户id', |
||||
|
`USER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户id', |
||||
|
`VOLUNTEER_FLAG` tinyint(1) NOT NULL COMMENT '1是志愿者,0不是志愿者(志愿者注册成功后需要来更新值)', |
||||
|
`KINDNESS_TIME` int(11) NOT NULL DEFAULT 0 COMMENT '爱心时长(单位:分钟)(参与并签到了的活动,实际结束-实际开始)签到的。未签到但是有积分的\r\n', |
||||
|
`PARTICIPATION_NUM` int(11) NOT NULL DEFAULT 0 COMMENT '实际参与活动个数(签到+1)', |
||||
|
`OBTAIN_POINT_NUM` int(11) NOT NULL DEFAULT 0 COMMENT '参与活动并获得积分的次数(结束活动时,如果给用户发放积分则该数值+1)', |
||||
|
`DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标记', |
||||
|
`REVISION` int(11) NOT NULL DEFAULT 0 COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime(0) NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime(0) NOT NULL COMMENT '更新时间', |
||||
|
PRIMARY KEY (`ID`) USING BTREE |
||||
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户信息' ROW_FORMAT = Dynamic; |
||||
|
|
||||
|
-- ---------------------------- |
||||
|
-- Table structure for latest_act_content |
||||
|
-- ---------------------------- |
||||
|
DROP TABLE IF EXISTS `latest_act_content`; |
||||
|
CREATE TABLE `latest_act_content` ( |
||||
|
`ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键', |
||||
|
`ACT_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动id:latest_act_info.id', |
||||
|
`CONTENT` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '内容', |
||||
|
`CONTENT_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '内容类型 图片:img;文字:text', |
||||
|
`ORDER_NUM` int(11) NOT NULL COMMENT '内容顺序 从1开始', |
||||
|
`DEL_FLAG` int(11) NOT NULL DEFAULT 0 COMMENT '删除标识 0.未删除 1.已删除', |
||||
|
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime(0) NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime(0) NOT NULL COMMENT '更新时间', |
||||
|
PRIMARY KEY (`ID`) USING BTREE |
||||
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '最近一次编辑的活动内容' ROW_FORMAT = Dynamic; |
||||
|
|
||||
|
-- ---------------------------- |
||||
|
-- Table structure for latest_act_info |
||||
|
-- ---------------------------- |
||||
|
DROP TABLE IF EXISTS `latest_act_info`; |
||||
|
CREATE TABLE `latest_act_info` ( |
||||
|
`ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键', |
||||
|
`CUSTOMER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户id', |
||||
|
`TITLE` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '活动标题', |
||||
|
`COVER_PIC` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '活动封面', |
||||
|
`SIGN_UP_START_TIME` datetime(0) NULL DEFAULT NULL COMMENT '报名开始时间', |
||||
|
`SIGN_UP_END_TIME` datetime(0) NULL DEFAULT NULL COMMENT '报名截止时间', |
||||
|
`REQUIREMENT` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '招募要求', |
||||
|
`ACT_START_TIME` datetime(0) NULL DEFAULT NULL COMMENT '活动开始时间', |
||||
|
`ACT_END_TIME` datetime(0) NULL DEFAULT NULL COMMENT '活动结束时间', |
||||
|
`ACT_ADDRESS` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '活动地点', |
||||
|
`ACT_LONGITUDE` decimal(32, 10) NULL DEFAULT NULL COMMENT '活动位置经度', |
||||
|
`ACT_LATITUDE` decimal(32, 10) NULL DEFAULT NULL COMMENT '活动位置纬度', |
||||
|
`SIGN_IN_START_TIME` datetime(0) NULL DEFAULT NULL COMMENT '打卡开始时间', |
||||
|
`SIGN_IN_END_TIME` datetime(0) NULL DEFAULT NULL COMMENT '打卡截止时间', |
||||
|
`SIGN_IN_ADDRESS` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '活动签到打卡地点', |
||||
|
`SIGN_IN_LONGITUDE` decimal(32, 10) NULL DEFAULT NULL COMMENT '活动签到打卡位置经度', |
||||
|
`SIGN_IN_LATITUDE` decimal(32, 10) NULL DEFAULT NULL COMMENT '活动签到打卡位置纬度', |
||||
|
`SIGN_IN_RADIUS` int(11) NULL DEFAULT NULL COMMENT '活动签到打卡半径(单位:米)', |
||||
|
`ACT_QUOTA_CATEGORY` tinyint(1) NULL DEFAULT NULL COMMENT '活动名额类型(0-不限名额,1-固定名额)', |
||||
|
`ACT_QUOTA` int(11) NULL DEFAULT 0 COMMENT '活动名额', |
||||
|
`SPONSOR_CONTACTS` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '联系人', |
||||
|
`SPONSOR_TEL` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '联系电话', |
||||
|
`SPONSOR_TYPE` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '主办方类型:网格主办:grid;组织主办:agency', |
||||
|
`SPONSOR_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '主办方id(机关或网格的id)', |
||||
|
`SPONSOR_NAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '活动主办方名称(机关或网格的名称)', |
||||
|
`PID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '如果以网格名义发布,存储空字符串\"\"', |
||||
|
`REWARD` int(11) NULL DEFAULT 0 COMMENT '活动奖励积分', |
||||
|
`VOLUNTEER_LIMIT` tinyint(1) NULL DEFAULT NULL COMMENT '身份限制:1只有志愿者才可以参加活动0不限制志愿者身份', |
||||
|
`AUDIT_SWITCH` tinyint(1) NULL DEFAULT NULL COMMENT '审核开关:1报名人员需要人工审核0不需要', |
||||
|
`REVISION` int(11) NOT NULL DEFAULT 0 COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime(0) NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime(0) NOT NULL COMMENT '更新时间', |
||||
|
`DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '删除标识', |
||||
|
PRIMARY KEY (`ID`) USING BTREE |
||||
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '最近一次编辑的活动信息' ROW_FORMAT = Compact; |
||||
|
|
||||
|
-- ---------------------------- |
||||
|
-- Table structure for volunteer_info |
||||
|
-- ---------------------------- |
||||
|
DROP TABLE IF EXISTS `volunteer_info`; |
||||
|
CREATE TABLE `volunteer_info` ( |
||||
|
`ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键(志愿者注册后插入本表)', |
||||
|
`USER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户id', |
||||
|
`CUSTOMER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户id', |
||||
|
`VOLUNTEER_INTRODUCE` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '志愿者自我介绍', |
||||
|
`VOLUNTEER_SIGNATURE` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '志愿者签名', |
||||
|
`DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标记', |
||||
|
`REVISION` int(11) NOT NULL DEFAULT 0 COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime(0) NOT NULL COMMENT '创建时间(认证志愿者时间)', |
||||
|
`UPDATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime(0) NOT NULL COMMENT '更新时间', |
||||
|
PRIMARY KEY (`ID`) USING BTREE |
||||
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '志愿者信息' ROW_FORMAT = Dynamic; |
||||
|
|
||||
|
SET FOREIGN_KEY_CHECKS = 1; |
||||
@ -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-27 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class PointAdjustmentLogDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 关联的积分动作Id |
||||
|
*/ |
||||
|
private String actionId; |
||||
|
|
||||
|
/** |
||||
|
* 调整人名称【xx机关-xx】 |
||||
|
*/ |
||||
|
private String operatorName; |
||||
|
|
||||
|
/** |
||||
|
* 调整原因 |
||||
|
*/ |
||||
|
private String adjustReason; |
||||
|
|
||||
|
/** |
||||
|
* 调整积分 |
||||
|
*/ |
||||
|
private Integer point; |
||||
|
|
||||
|
/** |
||||
|
* plus/minus |
||||
|
*/ |
||||
|
private String adjustmentType; |
||||
|
|
||||
|
/** |
||||
|
* 调整人所属机关Id |
||||
|
*/ |
||||
|
private String operatorAgencyId; |
||||
|
|
||||
|
/** |
||||
|
* 居民Id |
||||
|
*/ |
||||
|
private String userId; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,29 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.Min; |
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description 用户Id 分页参数 |
||||
|
* @ClassName CommonPageUserFormDTO |
||||
|
* @Auth wangc |
||||
|
* @Date 2020-07-24 13:24 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class CommonPageUserFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -6721313124444595189L; |
||||
|
|
||||
|
public interface PageUserGroup extends CustomerClientShowGroup{} |
||||
|
|
||||
|
@NotBlank(message = "获取不到用户Id" , groups = PageUserGroup.class) |
||||
|
private String userId; |
||||
|
|
||||
|
@Min(value = 1) |
||||
|
private Integer pageNo = 1; |
||||
|
|
||||
|
private Integer pageSize = 10; |
||||
|
} |
||||
@ -0,0 +1,56 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description 积分调整传参积分dto |
||||
|
* @ClassName PointAdjustmentFormDTO |
||||
|
* @Auth wangc |
||||
|
* @Date 2020-07-27 13:36 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class PointAdjustmentFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -1879530107301465633L; |
||||
|
|
||||
|
public interface PointAdjustmentGroup extends CustomerClientShowGroup{} |
||||
|
|
||||
|
/** |
||||
|
* 用户Id |
||||
|
* */ |
||||
|
@NotBlank(message = "用户Id不能为空", groups = PointAdjustmentGroup.class) |
||||
|
private String userId; |
||||
|
|
||||
|
/** |
||||
|
* 积分调整标识 key:add/minus |
||||
|
* */ |
||||
|
@NotBlank(message = "调整类型不能为空", groups = PointAdjustmentGroup.class) |
||||
|
private String adjustmentType; |
||||
|
|
||||
|
/** |
||||
|
* 调整的分值 |
||||
|
* */ |
||||
|
private Integer point; |
||||
|
|
||||
|
/** |
||||
|
* 调整原因 |
||||
|
* */ |
||||
|
@NotBlank(message = "调整原因不能为空", groups = PointAdjustmentGroup.class) |
||||
|
private String reason; |
||||
|
|
||||
|
/** |
||||
|
* 操作人Id |
||||
|
* */ |
||||
|
@NotBlank(message = "当前工作人员Id不能为空", groups = PointAdjustmentGroup.class) |
||||
|
private String operatorId; |
||||
|
|
||||
|
/** |
||||
|
* 客户Id |
||||
|
* */ |
||||
|
@NotBlank(message = "客户Id不能为空", groups = PointAdjustmentGroup.class) |
||||
|
private String customerId; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,53 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.Min; |
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description 积分核销传参dto |
||||
|
* |
||||
|
* @ClassName PointVerificationFormDTO |
||||
|
* @Auth wangc |
||||
|
* @Date 2020-07-27 13:45 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class PointVerificationFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -154634518066538184L; |
||||
|
|
||||
|
public interface PointVerificationGroup extends CustomerClientShowGroup{} |
||||
|
|
||||
|
/** |
||||
|
* 用户Id |
||||
|
* */ |
||||
|
@NotBlank(message = "用户Id不能为空", groups = PointVerificationGroup.class) |
||||
|
private String userId; |
||||
|
|
||||
|
/** |
||||
|
* 核销备注 |
||||
|
* */ |
||||
|
@NotBlank(message = "核销备注不能为空", groups = PointVerificationGroup.class) |
||||
|
private String remark; |
||||
|
|
||||
|
/** |
||||
|
* 核销积分数 |
||||
|
* */ |
||||
|
@Min(0) |
||||
|
private Integer point; |
||||
|
|
||||
|
/** |
||||
|
* 操作人Id |
||||
|
* */ |
||||
|
@NotBlank(message = "当前工作人员Id不能为空", groups = PointVerificationGroup.class) |
||||
|
private String operatorId; |
||||
|
|
||||
|
|
||||
|
private String longitude; |
||||
|
|
||||
|
private String dimension; |
||||
|
|
||||
|
private String address; |
||||
|
} |
||||
@ -0,0 +1,32 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.Max; |
||||
|
import javax.validation.constraints.Min; |
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description 工作端核销记录传参 |
||||
|
* @ClassName WorkPointVerificationFormDTO |
||||
|
* @Auth wangc |
||||
|
* @Date 2020-07-24 16:25 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class WorkPointVerificationFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -590822390667788693L; |
||||
|
|
||||
|
@NotBlank(message = "获取不到用户Id",groups = ResiCommonUserIdFormDTO.UserIdGroup.class) |
||||
|
private String staffId; |
||||
|
|
||||
|
/** |
||||
|
* yyyy-MM |
||||
|
* */ |
||||
|
private String timeParam; |
||||
|
|
||||
|
@Min(1) |
||||
|
private Integer pageNo; |
||||
|
|
||||
|
private Integer pageSize; |
||||
|
} |
||||
@ -0,0 +1,36 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @ClassName PointAdjustmentResultDTO |
||||
|
* @Auth wangc |
||||
|
* @Date 2020-07-27 09:45 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class PointAdjustmentResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -5339173292750971212L; |
||||
|
|
||||
|
/** |
||||
|
* 操作日期 |
||||
|
* */ |
||||
|
private String date; |
||||
|
|
||||
|
/** |
||||
|
* 调整积分 |
||||
|
* */ |
||||
|
private String point; |
||||
|
|
||||
|
/** |
||||
|
* 调整原因 |
||||
|
* */ |
||||
|
private String reason; |
||||
|
|
||||
|
/** |
||||
|
* 调整人昵称 |
||||
|
* */ |
||||
|
private String staffNickname; |
||||
|
} |
||||
@ -0,0 +1,36 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description 积分核销返参Dto |
||||
|
* @ClassName PointVerificationResultDTO |
||||
|
* @Auth wangc |
||||
|
* @Date 2020-07-27 13:57 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class PointVerificationResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 6990717665110392389L; |
||||
|
|
||||
|
/** |
||||
|
* 核销成功标识 |
||||
|
* */ |
||||
|
private boolean successFlag; |
||||
|
|
||||
|
/** |
||||
|
* 失败原因 |
||||
|
* */ |
||||
|
private String failureReason; |
||||
|
|
||||
|
/** |
||||
|
* 用户(居民)昵称 |
||||
|
* */ |
||||
|
private String userNickname; |
||||
|
|
||||
|
/** |
||||
|
* 用户(居民)头像 |
||||
|
* */ |
||||
|
private String userHeadPhoto; |
||||
|
} |
||||
@ -0,0 +1,27 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Description 工作端积分核销记录列表 |
||||
|
* @ClassName WorkPointVerficationListResultDTO |
||||
|
* @Auth wangc |
||||
|
* @Date 2020-07-24 15:38 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class WorkPointVerficationListResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 2737976236826002595L; |
||||
|
|
||||
|
/** |
||||
|
* 当月总积分 |
||||
|
* */ |
||||
|
private Integer totalPoint; |
||||
|
|
||||
|
/** |
||||
|
* 核销列表 |
||||
|
* */ |
||||
|
List<WorkPointVerificationDetailResultDTO> checkingList; |
||||
|
} |
||||
@ -0,0 +1,33 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description 工作端积分核销显示记录 |
||||
|
* @ClassName WorkPointVerificationDetailResultDTO |
||||
|
* @Auth wangc |
||||
|
* @Date 2020-07-24 15:38 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class WorkPointVerificationDetailResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -205177259417194562L; |
||||
|
|
||||
|
/** |
||||
|
* 被核销用户昵称 |
||||
|
* */ |
||||
|
private String userNickname; |
||||
|
|
||||
|
/** |
||||
|
* 核销积分 "-100" |
||||
|
* */ |
||||
|
private String point; |
||||
|
|
||||
|
/** |
||||
|
* 核销备注 |
||||
|
* */ |
||||
|
private String remark; |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,38 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description 工作端积分核销记录 |
||||
|
* @ClassName WorkPointVerificationLogResultDTO |
||||
|
* @Auth wangc |
||||
|
* @Date 2020-07-24 15:38 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class WorkPointVerificationLogResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -3570820382554221450L; |
||||
|
|
||||
|
/** |
||||
|
* 积分 |
||||
|
* */ |
||||
|
private Integer point; |
||||
|
|
||||
|
/** |
||||
|
* 用户Id |
||||
|
* */ |
||||
|
private String userId; |
||||
|
|
||||
|
/** |
||||
|
* 日期 yyyy-MM-dd HH:mm:ss |
||||
|
* */ |
||||
|
private String date; |
||||
|
|
||||
|
/** |
||||
|
* 核销备注 |
||||
|
* */ |
||||
|
private String remark; |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,46 @@ |
|||||
|
/** |
||||
|
* 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.dto.result.PointAdjustmentResultDTO; |
||||
|
import com.epmet.entity.PointAdjustmentLogEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-07-27 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface PointAdjustmentLogDao extends BaseDao<PointAdjustmentLogEntity> { |
||||
|
|
||||
|
/** |
||||
|
* @Description 查询积分调整列表 |
||||
|
* @param userId |
||||
|
* @return |
||||
|
* @author wangc |
||||
|
* @date 2020.07.27 10:44 |
||||
|
**/ |
||||
|
List<PointAdjustmentResultDTO> selectAdjustmentListByUserId(@Param("userId") String userId); |
||||
|
|
||||
|
} |
||||
@ -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-27 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("point_adjustment_log") |
||||
|
public class PointAdjustmentLogEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 关联的积分动作Id |
||||
|
*/ |
||||
|
private String actionId; |
||||
|
|
||||
|
/** |
||||
|
* 调整人名称【xx机关-xx】 |
||||
|
*/ |
||||
|
private String operatorName; |
||||
|
|
||||
|
/** |
||||
|
* 调整原因 |
||||
|
*/ |
||||
|
private String adjustReason; |
||||
|
|
||||
|
/** |
||||
|
* 调整积分 |
||||
|
*/ |
||||
|
private Integer point; |
||||
|
|
||||
|
/** |
||||
|
* plus/minus |
||||
|
*/ |
||||
|
private String adjustmentType; |
||||
|
|
||||
|
/** |
||||
|
* 调整人所属机关Id |
||||
|
*/ |
||||
|
private String operatorAgencyId; |
||||
|
|
||||
|
/** |
||||
|
* 居民Id |
||||
|
*/ |
||||
|
private String userId; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,18 @@ |
|||||
|
package com.epmet.redis; |
||||
|
|
||||
|
import com.epmet.commons.tools.redis.RedisUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* @Description 积分缓存相关 |
||||
|
* @ClassName PointRedis |
||||
|
* @Auth wangc |
||||
|
* @Date 2020-07-27 17:25 |
||||
|
*/ |
||||
|
@Component |
||||
|
public class PointRedis { |
||||
|
|
||||
|
@Autowired |
||||
|
private RedisUtils redisUtils; |
||||
|
} |
||||
@ -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.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.dto.PointAdjustmentLogDTO; |
||||
|
import com.epmet.dto.form.IssueInitiatorFormDTO; |
||||
|
import com.epmet.dto.form.PointAdjustmentFormDTO; |
||||
|
import com.epmet.dto.result.CustomerUserDetailResultDTO; |
||||
|
import com.epmet.dto.result.PointAdjustmentResultDTO; |
||||
|
import com.epmet.entity.PointAdjustmentLogEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-07-27 |
||||
|
*/ |
||||
|
public interface PointAdjustmentLogService extends BaseService<PointAdjustmentLogEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<PointAdjustmentLogDTO> |
||||
|
* @author generator |
||||
|
* @date 2020-07-27 |
||||
|
*/ |
||||
|
PageData<PointAdjustmentLogDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<PointAdjustmentLogDTO> |
||||
|
* @author generator |
||||
|
* @date 2020-07-27 |
||||
|
*/ |
||||
|
List<PointAdjustmentLogDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return PointAdjustmentLogDTO |
||||
|
* @author generator |
||||
|
* @date 2020-07-27 |
||||
|
*/ |
||||
|
PointAdjustmentLogDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2020-07-27 |
||||
|
*/ |
||||
|
void save(PointAdjustmentLogDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2020-07-27 |
||||
|
*/ |
||||
|
void update(PointAdjustmentLogDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2020-07-27 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
|
||||
|
/** |
||||
|
* @Description 根据UserId获取积分调整记录 |
||||
|
* @param param :: getUserId |
||||
|
* @return |
||||
|
* @author wangc |
||||
|
* @date 2020.07.27 10:51 |
||||
|
**/ |
||||
|
List<PointAdjustmentResultDTO> adjustRecord(IssueInitiatorFormDTO param); |
||||
|
|
||||
|
/** |
||||
|
* @Description 用户详情 |
||||
|
* @param param |
||||
|
* @return |
||||
|
* @author wangc |
||||
|
* @date 2020.07.27 10:57 |
||||
|
**/ |
||||
|
CustomerUserDetailResultDTO userDetail(IssueInitiatorFormDTO param); |
||||
|
|
||||
|
/** |
||||
|
* @Description 积分调整 |
||||
|
* @param param |
||||
|
* @return |
||||
|
* @author wangc |
||||
|
* @date 2020.07.27 13:52 |
||||
|
**/ |
||||
|
void adjustPoint(PointAdjustmentFormDTO param); |
||||
|
} |
||||
@ -0,0 +1,242 @@ |
|||||
|
/** |
||||
|
* 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.constant.NumConstant; |
||||
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
||||
|
import com.epmet.commons.tools.exception.RenException; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.commons.tools.constant.FieldConstant; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.dao.PointAdjustmentLogDao; |
||||
|
import com.epmet.dao.UserPointActionLogDao; |
||||
|
import com.epmet.dto.PointAdjustmentLogDTO; |
||||
|
import com.epmet.dto.form.IssueInitiatorFormDTO; |
||||
|
import com.epmet.dto.form.PointAdjustmentFormDTO; |
||||
|
import com.epmet.dto.form.ResiCommonUserIdFormDTO; |
||||
|
import com.epmet.dto.result.CustomerUserDetailResultDTO; |
||||
|
import com.epmet.dto.result.PointAdjustmentResultDTO; |
||||
|
import com.epmet.dto.result.ResiPointDetailResultDTO; |
||||
|
import com.epmet.dto.result.StaffEtAgencyResultDTO; |
||||
|
import com.epmet.entity.PointAdjustmentLogEntity; |
||||
|
import com.epmet.entity.UserPointActionLogEntity; |
||||
|
import com.epmet.entity.UserPointStatisticalDailyEntity; |
||||
|
import com.epmet.entity.UserPointTotalEntity; |
||||
|
import com.epmet.feign.EpmetUserOpenFeignClient; |
||||
|
import com.epmet.service.PointAdjustmentLogService; |
||||
|
import com.epmet.service.UserPointStatisticalDailyService; |
||||
|
import com.epmet.service.UserPointTotalService; |
||||
|
import com.epmet.utils.DimIdGenerator; |
||||
|
import com.epmet.utils.ModuleConstant; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.util.Arrays; |
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-07-27 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class PointAdjustmentLogServiceImpl extends BaseServiceImpl<PointAdjustmentLogDao, PointAdjustmentLogEntity> implements PointAdjustmentLogService { |
||||
|
|
||||
|
@Autowired |
||||
|
EpmetUserOpenFeignClient epmetUserOpenFeignClient; |
||||
|
@Autowired |
||||
|
UserPointTotalService userPointTotalService; |
||||
|
@Autowired |
||||
|
UserPointActionLogDao userPointActionLogDao; |
||||
|
@Autowired |
||||
|
UserPointStatisticalDailyService userPointStatisticalDailyService; |
||||
|
@Autowired |
||||
|
PointAdjustmentLogDao pointAdjustmentLogDao; |
||||
|
|
||||
|
@Override |
||||
|
public PageData<PointAdjustmentLogDTO> page(Map<String, Object> params) { |
||||
|
IPage<PointAdjustmentLogEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, PointAdjustmentLogDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<PointAdjustmentLogDTO> list(Map<String, Object> params) { |
||||
|
List<PointAdjustmentLogEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, PointAdjustmentLogDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<PointAdjustmentLogEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<PointAdjustmentLogEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public PointAdjustmentLogDTO get(String id) { |
||||
|
PointAdjustmentLogEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, PointAdjustmentLogDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(PointAdjustmentLogDTO dto) { |
||||
|
PointAdjustmentLogEntity entity = ConvertUtils.sourceToTarget(dto, PointAdjustmentLogEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(PointAdjustmentLogDTO dto) { |
||||
|
PointAdjustmentLogEntity entity = ConvertUtils.sourceToTarget(dto, PointAdjustmentLogEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @Description 根据UserId获取积分调整记录 |
||||
|
* @param param :: getUserId |
||||
|
* @return |
||||
|
* @author wangc |
||||
|
* @date 2020.07.27 10:51 |
||||
|
**/ |
||||
|
@Override |
||||
|
public List<PointAdjustmentResultDTO> adjustRecord(IssueInitiatorFormDTO param) { |
||||
|
return baseDao.selectAdjustmentListByUserId(param.getUserId()); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* @Description 用户详情 |
||||
|
* @param param |
||||
|
* @return |
||||
|
* @author wangc |
||||
|
* @date 2020.07.27 10:57 |
||||
|
**/ |
||||
|
@Override |
||||
|
public CustomerUserDetailResultDTO userDetail(IssueInitiatorFormDTO param) { |
||||
|
Result<CustomerUserDetailResultDTO> detailResult = epmetUserOpenFeignClient.customerUserDetail(param); |
||||
|
if(!detailResult.success()){ |
||||
|
throw new RenException(detailResult.getCode()); |
||||
|
} |
||||
|
ResiCommonUserIdFormDTO userParam = ConvertUtils.sourceToTarget(param,ResiCommonUserIdFormDTO.class); |
||||
|
ResiPointDetailResultDTO pointDto = userPointTotalService.getMyPoint(userParam); |
||||
|
if(null != detailResult.getData()){ |
||||
|
CustomerUserDetailResultDTO result = new CustomerUserDetailResultDTO(); |
||||
|
result.setPoint(null != pointDto ? pointDto.getUsablePoint() : NumConstant.ZERO); |
||||
|
} |
||||
|
detailResult.getData().setPoint(null != pointDto ? pointDto.getUsablePoint() : NumConstant.ZERO); |
||||
|
return detailResult.getData(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @Description 积分调整 |
||||
|
* @param param |
||||
|
* @return |
||||
|
* @author wangc |
||||
|
* @date 2020.07.27 13:52 |
||||
|
**/ |
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void adjustPoint(PointAdjustmentFormDTO param) { |
||||
|
if(null == param.getPoint()) throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); |
||||
|
Date currentTime = new Date(); |
||||
|
Integer point = param.getPoint(); |
||||
|
if(StringUtils.equals(ModuleConstant.OPERATION_TYPE_MINUS,param.getAdjustmentType())){ |
||||
|
if(point > NumConstant.ZERO){ |
||||
|
point *= NumConstant.ONE_NEG; |
||||
|
} |
||||
|
}else{ |
||||
|
if(point < NumConstant.ZERO){ |
||||
|
point *= NumConstant.ONE_NEG; |
||||
|
} |
||||
|
} |
||||
|
//0.工作人员基本信息[agencyId 昵称]
|
||||
|
IssueInitiatorFormDTO staffParam = new IssueInitiatorFormDTO(); |
||||
|
staffParam.setUserId(param.getOperatorId()); |
||||
|
Result<StaffEtAgencyResultDTO> staffResult = |
||||
|
epmetUserOpenFeignClient.staffMsg(staffParam); |
||||
|
String agencyId = ModuleConstant.EMPTY_STR; |
||||
|
String operatorName = ModuleConstant.EMPTY_STR; |
||||
|
if(staffResult.success() && null != staffResult.getData()){ |
||||
|
agencyId = staffResult.getData().getAgencyId(); |
||||
|
operatorName = staffResult.getData().getNickname(); |
||||
|
} |
||||
|
//1.记录用户积分行为记录表
|
||||
|
UserPointActionLogEntity userPointActionEntity = new UserPointActionLogEntity(); |
||||
|
userPointActionEntity.setUserId(param.getUserId()); |
||||
|
userPointActionEntity.setCustomerId(param.getCustomerId()); |
||||
|
userPointActionEntity.setActionFlag(param.getAdjustmentType()); |
||||
|
userPointActionEntity.setPoint(point); |
||||
|
userPointActionEntity.setEventStatement(param.getReason()); |
||||
|
userPointActionEntity.setEventName(ModuleConstant.EVENT_NAME_ADJUSTMENT); |
||||
|
userPointActionEntity.setOperatorAgencyId(agencyId); |
||||
|
userPointActionLogDao.insert(userPointActionEntity); |
||||
|
//2.记录积分调整记录表
|
||||
|
PointAdjustmentLogEntity adjustmentEntity = new PointAdjustmentLogEntity(); |
||||
|
adjustmentEntity.setActionId(userPointActionEntity.getId()); |
||||
|
adjustmentEntity.setOperatorName(operatorName); |
||||
|
adjustmentEntity.setAdjustReason(param.getReason()); |
||||
|
adjustmentEntity.setAdjustmentType(param.getAdjustmentType()); |
||||
|
adjustmentEntity.setPoint(point); |
||||
|
adjustmentEntity.setOperatorAgencyId(agencyId); |
||||
|
adjustmentEntity.setUserId(param.getUserId()); |
||||
|
//此处设置无效,会拦截到当前请求token中的userId,实际与这里的operatorId一致
|
||||
|
adjustmentEntity.setCreatedBy(param.getOperatorId()); |
||||
|
pointAdjustmentLogDao.insert(adjustmentEntity); |
||||
|
//3.新增或更新用户积分日统计表
|
||||
|
DimIdGenerator.DimIdBean dim = DimIdGenerator.getDimIdBean(currentTime); |
||||
|
UserPointStatisticalDailyEntity statistical = ConvertUtils.sourceToTarget(dim,UserPointStatisticalDailyEntity.class); |
||||
|
statistical.setUserId(param.getUserId()); |
||||
|
statistical.setActionFlag(param.getAdjustmentType()); |
||||
|
statistical.setCustomerId(param.getCustomerId()); |
||||
|
statistical.setPointChange(point); |
||||
|
userPointStatisticalDailyService.insertOrUpdate(statistical); |
||||
|
//4.更新用户积分总表
|
||||
|
UserPointTotalEntity total = new UserPointTotalEntity(); |
||||
|
total.setUserId(param.getUserId()); |
||||
|
total.setCustomerId(param.getCustomerId()); |
||||
|
//增量
|
||||
|
total.setUsedPoint(NumConstant.ZERO); |
||||
|
total.setUsablePoint(point); |
||||
|
total.setTotalPoint(point); |
||||
|
userPointTotalService.insertOrUpdate(total); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,91 @@ |
|||||
|
package com.epmet.utils; |
||||
|
|
||||
|
import com.epmet.commons.tools.utils.DateUtils; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Calendar; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
public class DimIdGenerator { |
||||
|
|
||||
|
/** |
||||
|
* 生成日期维度ID |
||||
|
* @param targetDate |
||||
|
* @return |
||||
|
*/ |
||||
|
public static String getDateDimId(Date targetDate) { |
||||
|
return DateUtils.format(targetDate, DateUtils.DATE_PATTERN_YYYYMMDD); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取月维度ID |
||||
|
* @param date |
||||
|
* @return |
||||
|
*/ |
||||
|
public static String getMonthDimId(Date date) { |
||||
|
return DateUtils.format(date, DateUtils.DATE_PATTERN_YYYYMM); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取周维度ID ,每周的星期一为 周的开始 |
||||
|
* @param date |
||||
|
* @return |
||||
|
*/ |
||||
|
public static String getWeekDimId(Date date) { |
||||
|
String yyyy = DateUtils.format(date, DateUtils.DATE_PATTERN_YYYY); |
||||
|
Calendar calendar = Calendar.getInstance(); |
||||
|
calendar.setFirstDayOfWeek(Calendar.MONDAY); |
||||
|
calendar.setTime(date); |
||||
|
return yyyy.concat("W").concat(calendar.get(Calendar.WEEK_OF_YEAR)+""); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取季度维度ID |
||||
|
* @param date |
||||
|
* @return |
||||
|
*/ |
||||
|
public static String getQuarterDimId(Date date) { |
||||
|
String yyyy = DateUtils.format(date, DateUtils.DATE_PATTERN_YYYY); |
||||
|
return yyyy.concat("Q").concat(DateUtils.getQuarterIndex(date) + ""); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取年维度ID |
||||
|
* @param date |
||||
|
* @return |
||||
|
*/ |
||||
|
public static String getYearDimId(Date date) { |
||||
|
return DateUtils.format(date, DateUtils.DATE_PATTERN_YYYY); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取封装了所有ID的对象 |
||||
|
* @return |
||||
|
*/ |
||||
|
public static DimIdBean getDimIdBean(Date date) { |
||||
|
DimIdBean dimIdBean = new DimIdBean(); |
||||
|
dimIdBean.setDateId(getDateDimId(date)); |
||||
|
dimIdBean.setMonthId(getMonthDimId(date)); |
||||
|
dimIdBean.setWeekId(getWeekDimId(date)); |
||||
|
dimIdBean.setQuarterId(getQuarterDimId(date)); |
||||
|
dimIdBean.setYearId(getYearDimId(date)); |
||||
|
return dimIdBean; |
||||
|
} |
||||
|
|
||||
|
public static void main(String[] args) { |
||||
|
DimIdBean dimIdBean = getDimIdBean(DateUtils.stringToDate("2020-06-14",DateUtils.DATE_PATTERN)); |
||||
|
System.out.println(dimIdBean); |
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
public static class DimIdBean { |
||||
|
private String dateId; |
||||
|
private String monthId; |
||||
|
private String quarterId; |
||||
|
private String yearId; |
||||
|
private String weekId; |
||||
|
|
||||
|
public DimIdBean() { |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,43 @@ |
|||||
|
<?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.PointAdjustmentLogDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.entity.PointAdjustmentLogEntity" id="pointAdjustmentLogMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="actionId" column="ACTION_ID"/> |
||||
|
<result property="operatorName" column="OPERATOR_NAME"/> |
||||
|
<result property="adjustReason" column="ADJUST_REASON"/> |
||||
|
<result property="point" column="POINT"/> |
||||
|
<result property="adjustmentType" column="ADJUSTMENT_TYPE"/> |
||||
|
<result property="operatorAgencyId" column="OPERATOR_AGENCY_ID"/> |
||||
|
<result property="userId" column="USER_ID"/> |
||||
|
<result property="delFlag" column="DEL_FLAG"/> |
||||
|
<result property="revision" column="REVISION"/> |
||||
|
<result property="createdTime" column="CREATED_TIME"/> |
||||
|
<result property="createdBy" column="CREATED_BY"/> |
||||
|
<result property="updatedTime" column="UPDATED_TIME"/> |
||||
|
<result property="updatedBy" column="UPDATED_BY"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
<!-- 查询积分调整记录 --> |
||||
|
<select id="selectAdjustmentListByUserId" resultType="com.epmet.dto.result.PointAdjustmentResultDTO"> |
||||
|
SELECT |
||||
|
operator_name AS staffNickname, |
||||
|
adjust_reason AS reason, |
||||
|
DATE_FORMAT( created_time, '%Y-%m-%d %H:%i:%s' ) AS date, |
||||
|
CASE |
||||
|
action_flag |
||||
|
WHEN 'plus' THEN |
||||
|
CONCAT( '+', POINT ) ELSE CONCAT( '-', POINT ) |
||||
|
END AS POINT |
||||
|
FROM |
||||
|
point_adjustment_log |
||||
|
WHERE |
||||
|
del_flag = '0' |
||||
|
AND user_id = #{userId} |
||||
|
ORDER BY |
||||
|
created_time DESC |
||||
|
</select> |
||||
|
|
||||
|
</mapper> |
||||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue