30 changed files with 460 additions and 32 deletions
@ -0,0 +1,45 @@ |
|||
/** |
|||
* 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 lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
|
|||
/** |
|||
* 初始化客户规则 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-20 |
|||
*/ |
|||
@Data |
|||
public class InitPointRuleResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户总数 |
|||
*/ |
|||
private Integer customerTotal; |
|||
|
|||
/** |
|||
* 已经初始化总数 |
|||
*/ |
|||
private Integer initedTotal; |
|||
} |
@ -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.PointRuleDefaultEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 积分规则表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-20 |
|||
*/ |
|||
@Mapper |
|||
public interface PointRuleDefaultDao extends BaseDao<PointRuleDefaultEntity> { |
|||
|
|||
} |
@ -0,0 +1,97 @@ |
|||
/** |
|||
* 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; |
|||
|
|||
/** |
|||
* 积分规则表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-20 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("point_rule_default") |
|||
public class PointRuleDefaultEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 规则名称 与事件名称保持一致即可 |
|||
*/ |
|||
private String ruleName; |
|||
|
|||
/** |
|||
* 规则说明 事件说明 |
|||
*/ |
|||
private String ruleDesc; |
|||
|
|||
/** |
|||
* 事件CODE 来自事件表 |
|||
*/ |
|||
private String eventCode; |
|||
|
|||
/** |
|||
* 功能分组Id |
|||
*/ |
|||
private String functionId; |
|||
|
|||
/** |
|||
* 操作类型 加积分:add;减积分:subtract |
|||
*/ |
|||
private String operateType; |
|||
|
|||
/** |
|||
* 积分上限 |
|||
*/ |
|||
private Integer upLimit; |
|||
|
|||
/** |
|||
* 积分上限描述 |
|||
*/ |
|||
private String upLimitDesc; |
|||
|
|||
/** |
|||
* 积分示例中 积分上限前缀 |
|||
*/ |
|||
private String upLimitPrefix; |
|||
|
|||
/** |
|||
* 上限积分计算周期;不限:unlimit;首次:first;天:day;月:周:week;month;年:year |
|||
*/ |
|||
private String rulePeriod; |
|||
|
|||
/** |
|||
* 获得积分值 |
|||
*/ |
|||
private Integer point; |
|||
|
|||
/** |
|||
* 获得积分单位 次:time;分钟:minute;小时:hour |
|||
*/ |
|||
private String pointUnit; |
|||
|
|||
/** |
|||
* 是否启用 0-否,1-是 |
|||
*/ |
|||
private String enabledFlag; |
|||
} |
@ -0,0 +1,41 @@ |
|||
package com.epmet.utils; |
|||
|
|||
|
|||
/** |
|||
* 系统支持的规则周期枚举类 |
|||
* |
|||
* @author wangc |
|||
* @date 2020-07-03 11:14 |
|||
**/ |
|||
public enum RuleCycleEnum { |
|||
|
|||
UNLIMITED("unlimit","不限制"), |
|||
FIRST("first","首次"), |
|||
DAILY("day","每日"), |
|||
WEEKLY("week","每周"), |
|||
MONTHLY("month","每月"), |
|||
YEARLY("year","每年") |
|||
; |
|||
|
|||
private String key; |
|||
private String desc; |
|||
|
|||
RuleCycleEnum(String key,String desc){ |
|||
this.key = key; |
|||
this.desc = desc; |
|||
} |
|||
|
|||
public static RuleCycleEnum getEnum(String key){ |
|||
RuleCycleEnum[] values = RuleCycleEnum.values(); |
|||
for (RuleCycleEnum value : values) { |
|||
if (null != key && value.getKey().equals(key)) { |
|||
return value; |
|||
} |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
public String getKey(){ return key;} |
|||
|
|||
public String getValue(){ return desc;} |
|||
} |
@ -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.PointRuleDefaultDao"> |
|||
|
|||
<resultMap type="com.epmet.entity.PointRuleDefaultEntity" id="pointRuleMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="ruleName" column="RULE_NAME"/> |
|||
<result property="ruleDesc" column="RULE_DESC"/> |
|||
<result property="eventCode" column="EVENT_CODE"/> |
|||
<result property="operateType" column="OPERATE_TYPE"/> |
|||
<result property="upLimit" column="UP_LIMIT"/> |
|||
<result property="upLimitDesc" column="UP_LIMIT_DESC"/> |
|||
<result property="upLimitPrefix" column="UP_LIMIT_PREFIX"/> |
|||
<result property="rulePeriod" column="RULE_PERIOD"/> |
|||
<result property="point" column="POINT"/> |
|||
<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> |
Loading…
Reference in new issue