379 changed files with 20386 additions and 551 deletions
@ -1,6 +1,16 @@ |
|||||
package com.epmet.commons.rocketmq.constants; |
package com.epmet.commons.rocketmq.constants; |
||||
|
|
||||
public interface TopicConstants { |
public interface TopicConstants { |
||||
|
/** |
||||
|
* 初始化客户 |
||||
|
*/ |
||||
String INIT_CUSTOMER = "init_customer"; |
String INIT_CUSTOMER = "init_customer"; |
||||
|
/** |
||||
|
* 项目变动 |
||||
|
*/ |
||||
String PROJECT_CHANGED = "project_changed"; |
String PROJECT_CHANGED = "project_changed"; |
||||
|
/** |
||||
|
* 小组成就 |
||||
|
*/ |
||||
|
String GROUP_ACHIEVEMENT = "group_achievement"; |
||||
} |
} |
||||
|
|||||
@ -0,0 +1,27 @@ |
|||||
|
package com.epmet.commons.rocketmq.messages; |
||||
|
|
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* desc:小组成就mq消息类 |
||||
|
* |
||||
|
* @author LiuJanJun |
||||
|
* @date 2021/4/22 8:35 下午 |
||||
|
*/ |
||||
|
@Data |
||||
|
@AllArgsConstructor |
||||
|
public class GroupAchievementMQMsg implements Serializable { |
||||
|
|
||||
|
private String customerId; |
||||
|
|
||||
|
private String groupId; |
||||
|
|
||||
|
/** |
||||
|
* 成就类型 |
||||
|
* @see com.epmet.modules.enums.AchievementTypeEnum |
||||
|
*/ |
||||
|
private String achievementType; |
||||
|
} |
||||
@ -0,0 +1,43 @@ |
|||||
|
package com.epmet.commons.rocketmq.register; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
import org.apache.rocketmq.client.consumer.listener.MessageListenerConcurrently; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* desc:mq 消费配置类 |
||||
|
* |
||||
|
* @author: LiuJanJun |
||||
|
* @date: 2021/4/30 2:39 下午 |
||||
|
* @version: 1.0 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ConsumerConfigProperties implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 2069676324708473773L; |
||||
|
/** |
||||
|
* 消费者组 |
||||
|
*/ |
||||
|
private String consumerGroup; |
||||
|
/** |
||||
|
* 主题 |
||||
|
*/ |
||||
|
private String topic; |
||||
|
/** |
||||
|
* 标签 |
||||
|
*/ |
||||
|
private String tag = "*"; |
||||
|
/** |
||||
|
* 最小消费的线程数 |
||||
|
*/ |
||||
|
private int consumeThreadMin = 2; |
||||
|
/** |
||||
|
* 最大消费的线程数 |
||||
|
*/ |
||||
|
private int consumeThreadMax = 4; |
||||
|
/** |
||||
|
* 消费监听器 |
||||
|
*/ |
||||
|
private MessageListenerConcurrently consumerListener; |
||||
|
} |
||||
@ -0,0 +1,79 @@ |
|||||
|
package com.epmet.commons.rocketmq.register; |
||||
|
|
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.apache.rocketmq.client.consumer.DefaultMQPushConsumer; |
||||
|
import org.apache.rocketmq.client.exception.MQClientException; |
||||
|
import org.apache.rocketmq.common.protocol.heartbeat.MessageModel; |
||||
|
import org.springframework.beans.factory.annotation.Value; |
||||
|
|
||||
|
import javax.annotation.PostConstruct; |
||||
|
|
||||
|
/** |
||||
|
* desc:注册mq监听器 |
||||
|
* |
||||
|
* @author liujianjun |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
public abstract class MQConsumerRegister { |
||||
|
@Value("${spring.profiles.active}") |
||||
|
private String env; |
||||
|
@Value("${rocketmq.name-server}") |
||||
|
private String namesrvAddr; |
||||
|
|
||||
|
public abstract ConsumerConfigProperties getConsumerProperty(); |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* @return |
||||
|
* @Description 注册监听器 |
||||
|
* @author wxz |
||||
|
* @date 2021.03.03 16:09 |
||||
|
*/ |
||||
|
@PostConstruct |
||||
|
public void registerMQListener() { |
||||
|
ConsumerConfigProperties consumerProperty = getConsumerProperty(); |
||||
|
log.info("registerAllListeners consumers:{} success", consumerProperty); |
||||
|
//本地环境不注册
|
||||
|
//if (!"local".equals(env)) {
|
||||
|
try { |
||||
|
// 实例化消费者
|
||||
|
DefaultMQPushConsumer consumer = new DefaultMQPushConsumer(consumerProperty.getConsumerGroup()); |
||||
|
|
||||
|
// 设置NameServer的地址
|
||||
|
consumer.setNamesrvAddr(namesrvAddr); |
||||
|
consumer.setMessageModel(MessageModel.CLUSTERING); |
||||
|
consumer.setInstanceName(buildInstanceName()); |
||||
|
// 订阅一个或者多个Topic,以及Tag来过滤需要消费的消息
|
||||
|
consumer.subscribe(consumer.getConsumerGroup(), consumerProperty.getTag()); |
||||
|
// 注册回调实现类来处理从broker拉取回来的消息
|
||||
|
consumer.registerMessageListener(consumerProperty.getConsumerListener()); |
||||
|
consumer.setConsumeThreadMin(consumerProperty.getConsumeThreadMin()); |
||||
|
consumer.setConsumeThreadMax(consumerProperty.getConsumeThreadMax()); |
||||
|
// 启动消费者实例
|
||||
|
consumer.start(); |
||||
|
} catch (MQClientException e) { |
||||
|
log.info("registerMQListener exception", e); |
||||
|
} |
||||
|
|
||||
|
//}
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* desc: 因为docker-compose部署有问题 所有自己命名 |
||||
|
* |
||||
|
* @param |
||||
|
* @return java.lang.String |
||||
|
* @author LiuJanJun |
||||
|
* @date 2021/4/30 5:00 下午 |
||||
|
*/ |
||||
|
private String buildInstanceName() { |
||||
|
String instanceName = ""; |
||||
|
for (int i = 0; i < 4; i++) { |
||||
|
int t = (int) (Math.random() * 10); |
||||
|
instanceName = instanceName.concat(t + ""); |
||||
|
} |
||||
|
|
||||
|
return instanceName; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,42 @@ |
|||||
|
package com.epmet.commons.tools.dto.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @author zhaoqifeng |
||||
|
* @dscription |
||||
|
* @date 2020/12/21 15:37 |
||||
|
*/ |
||||
|
@NoArgsConstructor |
||||
|
@Data |
||||
|
public class FileCommonDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = -5307959406648243353L; |
||||
|
/** |
||||
|
* 文件名 |
||||
|
*/ |
||||
|
private String name; |
||||
|
/** |
||||
|
* url地址 |
||||
|
*/ |
||||
|
private String url; |
||||
|
/** |
||||
|
* 文件类型(图片 - image、 视频 - video、 语音 - voice、 文档 - doc) |
||||
|
*/ |
||||
|
private String type; |
||||
|
/** |
||||
|
* 后缀名 |
||||
|
*/ |
||||
|
private String format; |
||||
|
/** |
||||
|
* 文件大小 kb |
||||
|
*/ |
||||
|
private Integer size; |
||||
|
/** |
||||
|
* 语音或视频文件时长,单位秒 |
||||
|
*/ |
||||
|
private Integer duration; |
||||
|
} |
||||
@ -0,0 +1,49 @@ |
|||||
|
package com.epmet.commons.tools.enums; |
||||
|
|
||||
|
/** |
||||
|
* 小组成就类型枚举类 |
||||
|
* dev|test|prod |
||||
|
* |
||||
|
* @author jianjun liu |
||||
|
* @date 2020-07-03 11:14 |
||||
|
**/ |
||||
|
public enum AchievementTypeEnum { |
||||
|
/** |
||||
|
* 环境变量枚举 |
||||
|
*/ |
||||
|
MEMBER("member", "小组成员数"), |
||||
|
TOPIC("topic", "话题数"), |
||||
|
TOISSUE("toissue", "转议题数"), |
||||
|
RESOVLE_TOPIC("resovletopic", "解决话题数"), |
||||
|
; |
||||
|
|
||||
|
private String code; |
||||
|
private String name; |
||||
|
|
||||
|
|
||||
|
|
||||
|
AchievementTypeEnum(String code, String name) { |
||||
|
this.code = code; |
||||
|
this.name = name; |
||||
|
} |
||||
|
|
||||
|
public static AchievementTypeEnum getEnum(String code) { |
||||
|
AchievementTypeEnum[] values = AchievementTypeEnum.values(); |
||||
|
for (AchievementTypeEnum value : values) { |
||||
|
if (value.getCode().equals(code)) { |
||||
|
return value; |
||||
|
} |
||||
|
} |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public String getCode() { |
||||
|
return code; |
||||
|
} |
||||
|
|
||||
|
public String getName() { |
||||
|
return name; |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,28 @@ |
|||||
|
package com.epmet.commons.tools.enums; |
||||
|
|
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.Getter; |
||||
|
|
||||
|
/** |
||||
|
* @author zhaoqifeng |
||||
|
* @dscription |
||||
|
* @date 2021/4/25 15:49 |
||||
|
*/ |
||||
|
@Getter |
||||
|
@AllArgsConstructor |
||||
|
public enum BizTypeEnum { |
||||
|
//枚举类型
|
||||
|
GROUP("group", "小组"), |
||||
|
ACTIVITY("activity", "活动"), |
||||
|
AGENCY("agency", "组织"); |
||||
|
|
||||
|
/** |
||||
|
* 类型 |
||||
|
*/ |
||||
|
private String type; |
||||
|
/** |
||||
|
* 描述 |
||||
|
*/ |
||||
|
private String typeDesc; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,31 @@ |
|||||
|
package com.epmet.commons.tools.enums; |
||||
|
|
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.Getter; |
||||
|
|
||||
|
/** |
||||
|
* @author zhaoqifeng |
||||
|
* @dscription |
||||
|
* @date 2021/4/25 16:23 |
||||
|
*/ |
||||
|
@Getter |
||||
|
@AllArgsConstructor |
||||
|
public enum SourceTypeEnum { |
||||
|
//枚举类型
|
||||
|
ACTIVITY("activity", "活动"), |
||||
|
TOPIC("topic", "话题"), |
||||
|
ISSUE("issue", "议题"), |
||||
|
PROJECT("project", "项目"), |
||||
|
INVITE("invite", "邀请进组"), |
||||
|
MANUAL("manual", "人工调整"), |
||||
|
VOLUNTEER("volunteer", "志愿者"); |
||||
|
|
||||
|
/** |
||||
|
* 类型 |
||||
|
*/ |
||||
|
private String type; |
||||
|
/** |
||||
|
* 描述 |
||||
|
*/ |
||||
|
private String typeDesc; |
||||
|
} |
||||
@ -0,0 +1 @@ |
|||||
|
INSERT INTO `epmet_point`.`point_rule_default`(`ID`, `RULE_NAME`, `RULE_DESC`, `EVENT_CODE`, `FUNCTION_ID`, `OPERATE_TYPE`, `UP_LIMIT`, `UP_LIMIT_DESC`, `UP_LIMIT_PREFIX`, `RULE_PERIOD`, `POINT`, `POINT_UNIT`, `ENABLED_FLAG`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('10', '组长解决话题', '组长解决组内话题', 'leader_resolve_topic', '1', 'plus', 0, '无上限', NULL, 'day', 2, 'time', '0', '0', 0, 'APP_USER', '2021-04-19 15:55:18', 'APP_USER', '2021-04-19 15:55:18'); |
||||
@ -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.dto; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 按业务类型积分总计 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2021-04-20 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class BizPointTotalDetailDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 组织Id |
||||
|
*/ |
||||
|
private String agencyId; |
||||
|
|
||||
|
/** |
||||
|
* 网格ID |
||||
|
*/ |
||||
|
private String gridId; |
||||
|
|
||||
|
/** |
||||
|
* 业务类型:小组:group |
||||
|
*/ |
||||
|
private String bizType; |
||||
|
|
||||
|
/** |
||||
|
* 业务类型的对象id |
||||
|
*/ |
||||
|
private String objectId; |
||||
|
|
||||
|
/** |
||||
|
* OBJECTID的总积分 总积分=objectId下所有的用户积分 |
||||
|
*/ |
||||
|
private Integer totalPoint; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
||||
@ -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 2021-04-20 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class BizPointUserTotalDetailDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 组织Id |
||||
|
*/ |
||||
|
private String agencyId; |
||||
|
|
||||
|
/** |
||||
|
* 网格ID |
||||
|
*/ |
||||
|
private String gridId; |
||||
|
|
||||
|
/** |
||||
|
* 用户ID |
||||
|
*/ |
||||
|
private String userId; |
||||
|
|
||||
|
/** |
||||
|
* 业务类型:小组:group |
||||
|
*/ |
||||
|
private String bizType; |
||||
|
|
||||
|
/** |
||||
|
* 业务类型的对象id |
||||
|
*/ |
||||
|
private String objectId; |
||||
|
|
||||
|
/** |
||||
|
* OBJECTID的总积分 总积分=objectId下所有的用户积分 |
||||
|
*/ |
||||
|
private Integer totalPoint; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,17 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @author zhaoqifeng |
||||
|
* @dscription |
||||
|
* @date 2021/4/21 9:50 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class GroupPointFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -3231073030413434313L; |
||||
|
private String groupId; |
||||
|
private String gridId; |
||||
|
} |
||||
@ -0,0 +1,38 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @author zhaoqifeng |
||||
|
* @dscription |
||||
|
* @date 2021/4/21 10:34 |
||||
|
*/ |
||||
|
@NoArgsConstructor |
||||
|
@Data |
||||
|
public class GroupPointRankingResultDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = -9215609608003827403L; |
||||
|
/** |
||||
|
* 排名 |
||||
|
*/ |
||||
|
private String ranking; |
||||
|
/** |
||||
|
* 小组名 |
||||
|
*/ |
||||
|
private String groupName; |
||||
|
/** |
||||
|
* 小组积分 |
||||
|
*/ |
||||
|
private String point; |
||||
|
/** |
||||
|
* 是否本小组 |
||||
|
*/ |
||||
|
private String isMine; |
||||
|
/** |
||||
|
* 小组ID |
||||
|
*/ |
||||
|
private String groupId; |
||||
|
} |
||||
@ -0,0 +1,26 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author zhaoqifeng |
||||
|
* @dscription |
||||
|
* @date 2021/4/22 15:15 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class GroupPointRuleResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -1651136821935977327L; |
||||
|
private List<String> rules; |
||||
|
/** |
||||
|
* 个人贡献概述 |
||||
|
*/ |
||||
|
private String contriSummary; |
||||
|
|
||||
|
/** |
||||
|
* 小组积分概述 |
||||
|
*/ |
||||
|
private String groupSummary; |
||||
|
} |
||||
@ -0,0 +1,44 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonIgnore; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @author zhaoqifeng |
||||
|
* @dscription |
||||
|
* @date 2021/4/21 10:05 |
||||
|
*/ |
||||
|
@NoArgsConstructor |
||||
|
@Data |
||||
|
public class PointRankingResultDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = -5383837225811609227L; |
||||
|
/** |
||||
|
* 头像 |
||||
|
*/ |
||||
|
private String headPhoto; |
||||
|
/** |
||||
|
* 支部小组-姓名/普通小组-昵称 |
||||
|
*/ |
||||
|
private String name; |
||||
|
/** |
||||
|
* 积分 |
||||
|
*/ |
||||
|
private String point; |
||||
|
/** |
||||
|
* 排名 |
||||
|
*/ |
||||
|
private String ranking; |
||||
|
/** |
||||
|
* 是否本人 |
||||
|
*/ |
||||
|
private String isMine; |
||||
|
/** |
||||
|
* 用户ID |
||||
|
*/ |
||||
|
@JsonIgnore |
||||
|
private String userId; |
||||
|
} |
||||
@ -0,0 +1,96 @@ |
|||||
|
package com.epmet.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.annotation.LoginUser; |
||||
|
import com.epmet.commons.tools.security.dto.TokenDto; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.dto.form.GroupPointFormDTO; |
||||
|
import com.epmet.dto.result.GroupPointRuleResultDTO; |
||||
|
import com.epmet.resi.group.dto.group.result.GroupPointDetailResultDTO; |
||||
|
import com.epmet.dto.result.GroupPointRankingResultDTO; |
||||
|
import com.epmet.dto.result.PointRankingResultDTO; |
||||
|
import com.epmet.service.BizPointTotalDetailService; |
||||
|
import com.epmet.service.BizPointUserTotalDetailService; |
||||
|
import com.epmet.service.PointRuleService; |
||||
|
import com.epmet.utils.ModuleConstant; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author zhaoqifeng |
||||
|
* 小组积分 |
||||
|
* @date 2021/4/21 9:45 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("group/point") |
||||
|
public class GroupPointController { |
||||
|
|
||||
|
@Autowired |
||||
|
private BizPointUserTotalDetailService bizPointUserTotalDetailService; |
||||
|
@Autowired |
||||
|
private BizPointTotalDetailService bizPointTotalDetailService; |
||||
|
@Autowired |
||||
|
private PointRuleService pointRuleService; |
||||
|
|
||||
|
/** |
||||
|
* 小组积分贡献榜 |
||||
|
* |
||||
|
* @param tokenDto |
||||
|
* @param formDTO |
||||
|
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.dto.result.PointRankingResultDTO>> |
||||
|
* @author zhaoqifeng |
||||
|
* @date 2021/4/21 14:02 |
||||
|
*/ |
||||
|
@PostMapping("pointranking") |
||||
|
public Result<List<PointRankingResultDTO>> pointRanking(@LoginUser TokenDto tokenDto, @RequestBody GroupPointFormDTO formDTO) { |
||||
|
List<PointRankingResultDTO> list = bizPointUserTotalDetailService.pointRanking(tokenDto, formDTO); |
||||
|
return new Result<List<PointRankingResultDTO>>().ok(list); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 网格小组积分排行 |
||||
|
* |
||||
|
* @param formDTO |
||||
|
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.dto.result.GroupPointRankingResultDTO>> |
||||
|
* @author zhaoqifeng |
||||
|
* @date 2021/4/21 14:02 |
||||
|
*/ |
||||
|
@PostMapping("grouppointranking") |
||||
|
public Result<List<GroupPointRankingResultDTO>> groupPointRanking(@RequestBody GroupPointFormDTO formDTO) { |
||||
|
List<GroupPointRankingResultDTO> list = bizPointTotalDetailService.groupPointRanking(formDTO); |
||||
|
return new Result<List<GroupPointRankingResultDTO>>().ok(list); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 小组积分详情 |
||||
|
* |
||||
|
* @param formDTO |
||||
|
* @return com.epmet.commons.tools.utils.Result<com.epmet.resi.group.dto.group.result.GroupPointDetailResultDTO> |
||||
|
* @author zhaoqifeng |
||||
|
* @date 2021/4/21 14:02 |
||||
|
*/ |
||||
|
@PostMapping("pointdetail") |
||||
|
public Result<GroupPointDetailResultDTO> pointDetail(@RequestBody GroupPointFormDTO formDTO) { |
||||
|
GroupPointDetailResultDTO result = bizPointTotalDetailService.pointDetail(formDTO); |
||||
|
return new Result<GroupPointDetailResultDTO>().ok(result); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 小组积分规则 |
||||
|
* @author zhaoqifeng |
||||
|
* @date 2021/4/22 15:36 |
||||
|
* @param tokenDto |
||||
|
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.GroupPointRuleResultDTO> |
||||
|
*/ |
||||
|
@PostMapping("pointrule") |
||||
|
public Result<GroupPointRuleResultDTO> pointRule(@LoginUser TokenDto tokenDto) { |
||||
|
GroupPointRuleResultDTO result = pointRuleService.getGroupRule(tokenDto.getCustomerId()); |
||||
|
result.setContriSummary(ModuleConstant.CONTRI_SUMMARY); |
||||
|
result.setGroupSummary(ModuleConstant.GROUP_RULE_SUMMARY); |
||||
|
return new Result<GroupPointRuleResultDTO>().ok(result); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,43 @@ |
|||||
|
/** |
||||
|
* 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.BizPointTotalDetailDTO; |
||||
|
import com.epmet.entity.BizPointTotalDetailEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
/** |
||||
|
* 按业务类型积分总计 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2021-04-20 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface BizPointTotalDetailDao extends BaseDao<BizPointTotalDetailEntity> { |
||||
|
/** |
||||
|
* 根据业务类型查找数据 |
||||
|
* @author zhaoqifeng |
||||
|
* @date 2021/4/20 16:57 |
||||
|
* @param type |
||||
|
* @param objectId |
||||
|
* @return com.epmet.dto.BizPointTotalDetailDTO |
||||
|
*/ |
||||
|
BizPointTotalDetailDTO selectDataByObject(@Param("type")String type, @Param("objectId")String objectId); |
||||
|
} |
||||
@ -0,0 +1,44 @@ |
|||||
|
/** |
||||
|
* 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.BizPointUserTotalDetailEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
/** |
||||
|
* 按业务类型积分总计 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2021-04-20 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface BizPointUserTotalDetailDao extends BaseDao<BizPointUserTotalDetailEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 获取今日积分增量 |
||||
|
* @author zhaoqifeng |
||||
|
* @date 2021/4/21 16:56 |
||||
|
* @param type |
||||
|
* @param objectId |
||||
|
* @return java.lang.Integer |
||||
|
*/ |
||||
|
Integer selectIncrease(@Param("type")String type, @Param("objectId")String objectId); |
||||
|
|
||||
|
} |
||||
@ -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 2021-04-20 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("biz_point_user_total_detail") |
||||
|
public class BizPointUserTotalDetailEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 组织Id |
||||
|
*/ |
||||
|
private String agencyId; |
||||
|
|
||||
|
/** |
||||
|
* 网格ID |
||||
|
*/ |
||||
|
private String gridId; |
||||
|
|
||||
|
/** |
||||
|
* 用户ID |
||||
|
*/ |
||||
|
private String userId; |
||||
|
|
||||
|
/** |
||||
|
* 业务类型:小组:group |
||||
|
*/ |
||||
|
private String bizType; |
||||
|
|
||||
|
/** |
||||
|
* 业务类型的对象id |
||||
|
*/ |
||||
|
private String objectId; |
||||
|
|
||||
|
/** |
||||
|
* OBJECTID的总积分 总积分=objectId下所有的用户积分 |
||||
|
*/ |
||||
|
private Integer totalPoint; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,129 @@ |
|||||
|
/** |
||||
|
* 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.BizPointTotalDetailDTO; |
||||
|
import com.epmet.dto.form.GroupPointFormDTO; |
||||
|
import com.epmet.resi.group.dto.group.result.GroupPointDetailResultDTO; |
||||
|
import com.epmet.dto.result.GroupPointRankingResultDTO; |
||||
|
import com.epmet.entity.BizPointTotalDetailEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 按业务类型积分总计 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2021-04-20 |
||||
|
*/ |
||||
|
public interface BizPointTotalDetailService extends BaseService<BizPointTotalDetailEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<BizPointTotalDetailDTO> |
||||
|
* @author generator |
||||
|
* @date 2021-04-20 |
||||
|
*/ |
||||
|
PageData<BizPointTotalDetailDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<BizPointTotalDetailDTO> |
||||
|
* @author generator |
||||
|
* @date 2021-04-20 |
||||
|
*/ |
||||
|
List<BizPointTotalDetailDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return BizPointTotalDetailDTO |
||||
|
* @author generator |
||||
|
* @date 2021-04-20 |
||||
|
*/ |
||||
|
BizPointTotalDetailDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2021-04-20 |
||||
|
*/ |
||||
|
void save(BizPointTotalDetailDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2021-04-20 |
||||
|
*/ |
||||
|
void update(BizPointTotalDetailDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2021-04-20 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
|
||||
|
/** |
||||
|
* 根据业务类型查找数据 |
||||
|
* |
||||
|
* @param type |
||||
|
* @param objectId |
||||
|
* @return com.epmet.dto.BizPointTotalDetailDTO |
||||
|
* @author zhaoqifeng |
||||
|
* @date 2021/4/20 16:53 |
||||
|
*/ |
||||
|
BizPointTotalDetailDTO getDataByObject(String type, String objectId); |
||||
|
|
||||
|
/** |
||||
|
* 小组积分详情 |
||||
|
* |
||||
|
* @param formDTO |
||||
|
* @return com.epmet.resi.group.dto.group.result.GroupPointDetailResultDTO |
||||
|
* @author zhaoqifeng |
||||
|
* @date 2021/4/21 14:05 |
||||
|
*/ |
||||
|
GroupPointDetailResultDTO pointDetail(GroupPointFormDTO formDTO); |
||||
|
|
||||
|
/** |
||||
|
* 网格小组积分排行 |
||||
|
* |
||||
|
* @param formDTO |
||||
|
* @return java.util.List<com.epmet.dto.result.GroupPointRankingResultDTO> |
||||
|
* @author zhaoqifeng |
||||
|
* @date 2021/4/21 14:05 |
||||
|
*/ |
||||
|
List<GroupPointRankingResultDTO> groupPointRanking(GroupPointFormDTO formDTO); |
||||
|
} |
||||
@ -0,0 +1,143 @@ |
|||||
|
/** |
||||
|
* 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.commons.tools.security.dto.TokenDto; |
||||
|
import com.epmet.dto.BizPointUserTotalDetailDTO; |
||||
|
import com.epmet.dto.form.GroupPointFormDTO; |
||||
|
import com.epmet.dto.result.PointRankingResultDTO; |
||||
|
import com.epmet.entity.BizPointUserTotalDetailEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 按业务类型积分总计 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2021-04-20 |
||||
|
*/ |
||||
|
public interface BizPointUserTotalDetailService extends BaseService<BizPointUserTotalDetailEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<BizPointUserTotalDetailDTO> |
||||
|
* @author generator |
||||
|
* @date 2021-04-20 |
||||
|
*/ |
||||
|
PageData<BizPointUserTotalDetailDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<BizPointUserTotalDetailDTO> |
||||
|
* @author generator |
||||
|
* @date 2021-04-20 |
||||
|
*/ |
||||
|
List<BizPointUserTotalDetailDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return BizPointUserTotalDetailDTO |
||||
|
* @author generator |
||||
|
* @date 2021-04-20 |
||||
|
*/ |
||||
|
BizPointUserTotalDetailDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2021-04-20 |
||||
|
*/ |
||||
|
void save(BizPointUserTotalDetailDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2021-04-20 |
||||
|
*/ |
||||
|
void update(BizPointUserTotalDetailDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2021-04-20 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 根据业务类型查找用户数据 |
||||
|
* |
||||
|
* @param type |
||||
|
* @param objectId |
||||
|
* @param userId |
||||
|
* @return com.epmet.dto.BizPointTotalDetailDTO |
||||
|
* @author zhaoqifeng |
||||
|
* @date 2021/4/20 16:53 |
||||
|
*/ |
||||
|
BizPointUserTotalDetailDTO getDataByObject(String type, String objectId, String userId); |
||||
|
|
||||
|
/** |
||||
|
* 根据业务类型查找积分总和 |
||||
|
* |
||||
|
* @param type |
||||
|
* @param objectId |
||||
|
* @return java.lang.Integer |
||||
|
* @author zhaoqifeng |
||||
|
* @date 2021/4/20 17:21 |
||||
|
*/ |
||||
|
Integer getTotalByObject(String type, String objectId); |
||||
|
|
||||
|
/** |
||||
|
* 小组积分贡献榜 |
||||
|
* |
||||
|
* @param tokenDto |
||||
|
* @param formDTO |
||||
|
* @return java.util.List<com.epmet.dto.result.PointRankingResultDTO> |
||||
|
* @author zhaoqifeng |
||||
|
* @date 2021/4/21 14:06 |
||||
|
*/ |
||||
|
List<PointRankingResultDTO> pointRanking(TokenDto tokenDto, GroupPointFormDTO formDTO); |
||||
|
|
||||
|
/** |
||||
|
* 获取今日增量 |
||||
|
* @author zhaoqifeng |
||||
|
* @date 2021/4/21 16:41 |
||||
|
* @param type |
||||
|
* @param objectId |
||||
|
* @return java.lang.Integer |
||||
|
*/ |
||||
|
Integer getIncrease(String type, String objectId); |
||||
|
} |
||||
@ -0,0 +1,212 @@ |
|||||
|
/** |
||||
|
* 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.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.BizPointTotalDetailDao; |
||||
|
import com.epmet.dto.BizPointTotalDetailDTO; |
||||
|
import com.epmet.dto.form.GroupPointFormDTO; |
||||
|
import com.epmet.resi.group.dto.group.result.GroupPointDetailResultDTO; |
||||
|
import com.epmet.dto.result.GroupPointRankingResultDTO; |
||||
|
import com.epmet.entity.BizPointTotalDetailEntity; |
||||
|
import com.epmet.resi.group.dto.group.ResiGroupDTO; |
||||
|
import com.epmet.resi.group.feign.ResiGroupOpenFeignClient; |
||||
|
import com.epmet.service.BizPointTotalDetailService; |
||||
|
import com.epmet.service.BizPointUserTotalDetailService; |
||||
|
import com.epmet.service.UserPointActionLogService; |
||||
|
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.text.Collator; |
||||
|
import java.util.*; |
||||
|
import java.util.concurrent.atomic.AtomicInteger; |
||||
|
import java.util.stream.Collectors; |
||||
|
|
||||
|
/** |
||||
|
* 按业务类型积分总计 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2021-04-20 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class BizPointTotalDetailServiceImpl extends BaseServiceImpl<BizPointTotalDetailDao, BizPointTotalDetailEntity> implements BizPointTotalDetailService { |
||||
|
|
||||
|
@Autowired |
||||
|
private ResiGroupOpenFeignClient resiGroupOpenFeignClient; |
||||
|
@Autowired |
||||
|
private BizPointUserTotalDetailService bizPointUserTotalDetailService; |
||||
|
@Autowired |
||||
|
private UserPointActionLogService userPointActionLogService; |
||||
|
|
||||
|
@Override |
||||
|
public PageData<BizPointTotalDetailDTO> page(Map<String, Object> params) { |
||||
|
IPage<BizPointTotalDetailEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, BizPointTotalDetailDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<BizPointTotalDetailDTO> list(Map<String, Object> params) { |
||||
|
List<BizPointTotalDetailEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, BizPointTotalDetailDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<BizPointTotalDetailEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<BizPointTotalDetailEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public BizPointTotalDetailDTO get(String id) { |
||||
|
BizPointTotalDetailEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, BizPointTotalDetailDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(BizPointTotalDetailDTO dto) { |
||||
|
BizPointTotalDetailEntity entity = ConvertUtils.sourceToTarget(dto, BizPointTotalDetailEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(BizPointTotalDetailDTO dto) { |
||||
|
BizPointTotalDetailEntity entity = ConvertUtils.sourceToTarget(dto, BizPointTotalDetailEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 根据业务类型查找数据 |
||||
|
* |
||||
|
* @param type |
||||
|
* @param objectId |
||||
|
* @return com.epmet.dto.BizPointTotalDetailDTO |
||||
|
* @author zhaoqifeng |
||||
|
* @date 2021/4/20 16:53 |
||||
|
*/ |
||||
|
@Override |
||||
|
public BizPointTotalDetailDTO getDataByObject(String type, String objectId) { |
||||
|
return baseDao.selectDataByObject(type, objectId); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 小组积分详情 |
||||
|
* |
||||
|
* @param formDTO |
||||
|
* @return com.epmet.resi.group.dto.group.result.GroupPointDetailResultDTO |
||||
|
* @author zhaoqifeng |
||||
|
* @date 2021/4/21 14:05 |
||||
|
*/ |
||||
|
@Override |
||||
|
public GroupPointDetailResultDTO pointDetail(GroupPointFormDTO formDTO) { |
||||
|
Result<GroupPointDetailResultDTO> result = resiGroupOpenFeignClient.groupPointDetail(formDTO.getGroupId()); |
||||
|
if (!result.success() || null == result.getData()) { |
||||
|
throw new RenException(result.getCode(), result.getMsg()); |
||||
|
} |
||||
|
GroupPointDetailResultDTO detail = result.getData(); |
||||
|
QueryWrapper<BizPointTotalDetailEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq("BIZ_TYPE", "group") |
||||
|
.eq("OBJECT_ID", formDTO.getGroupId()) |
||||
|
.eq("DEL_FLAG", NumConstant.ZERO_STR); |
||||
|
BizPointTotalDetailEntity entity = baseDao.selectOne(wrapper); |
||||
|
Integer increase = userPointActionLogService.getIncrease("group", formDTO.getGroupId()); |
||||
|
detail.setIncrease(increase.toString()); |
||||
|
if (null == entity) { |
||||
|
detail.setToUpgrade(detail.getNextLevelPoint()); |
||||
|
detail.setTotal(NumConstant.ZERO_STR); |
||||
|
detail.setCurrentPoint(NumConstant.ZERO_STR); |
||||
|
} else { |
||||
|
int toUpgrade = Integer.parseInt(detail.getNextLevelPoint()) - entity.getTotalPoint(); |
||||
|
detail.setToUpgrade(Integer.toString(toUpgrade)); |
||||
|
detail.setTotal(entity.getTotalPoint().toString()); |
||||
|
detail.setCurrentPoint(entity.getTotalPoint().toString()); |
||||
|
} |
||||
|
return detail; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 网格小组积分排行 |
||||
|
* |
||||
|
* @param formDTO |
||||
|
* @return java.util.List<com.epmet.dto.result.GroupPointRankingResultDTO> |
||||
|
* @author zhaoqifeng |
||||
|
* @date 2021/4/21 14:05 |
||||
|
*/ |
||||
|
@Override |
||||
|
public List<GroupPointRankingResultDTO> groupPointRanking(GroupPointFormDTO formDTO) { |
||||
|
List<GroupPointRankingResultDTO> list; |
||||
|
QueryWrapper<BizPointTotalDetailEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq("BIZ_TYPE", "group") |
||||
|
.eq("GRID_ID", formDTO.getGridId()) |
||||
|
.eq("DEL_FLAG", NumConstant.ZERO_STR) |
||||
|
.orderByDesc("TOTAL_POINT"); |
||||
|
List<BizPointTotalDetailEntity> totalDetailList = baseDao.selectList(wrapper); |
||||
|
Result<List<ResiGroupDTO>> groupList = resiGroupOpenFeignClient.getGroupListByGrid(formDTO.getGridId()); |
||||
|
list = groupList.getData().stream().map(item -> { |
||||
|
GroupPointRankingResultDTO dto = new GroupPointRankingResultDTO(); |
||||
|
dto.setGroupId(item.getId()); |
||||
|
dto.setGroupName(item.getGroupName()); |
||||
|
dto.setPoint(NumConstant.ZERO_STR); |
||||
|
if (formDTO.getGroupId().equals(item.getId())) { |
||||
|
dto.setIsMine(NumConstant.ONE_STR); |
||||
|
} else { |
||||
|
dto.setIsMine(NumConstant.ZERO_STR); |
||||
|
} |
||||
|
return dto; |
||||
|
}).collect(Collectors.toList()); |
||||
|
list.forEach(item -> totalDetailList.stream().filter(detail -> item.getGroupId().equals(detail.getObjectId())).forEach(total -> { |
||||
|
item.setPoint(total.getTotalPoint().toString()); |
||||
|
|
||||
|
})); |
||||
|
list = |
||||
|
list.stream().sorted(Comparator.comparing(GroupPointRankingResultDTO :: getPoint, Comparator.comparingInt(Integer::parseInt)).reversed() |
||||
|
.thenComparing(GroupPointRankingResultDTO::getGroupName, Collator.getInstance(Locale.CHINA))) |
||||
|
.collect(Collectors.toList()); |
||||
|
AtomicInteger i = new AtomicInteger(1); |
||||
|
list.forEach(dto -> { |
||||
|
dto.setRanking(String.valueOf(i.getAndIncrement())); |
||||
|
}); |
||||
|
return list; |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,251 @@ |
|||||
|
/** |
||||
|
* 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.FieldConstant; |
||||
|
import com.epmet.commons.tools.constant.NumConstant; |
||||
|
import com.epmet.commons.tools.constant.StrConstant; |
||||
|
import com.epmet.commons.tools.enums.BizTypeEnum; |
||||
|
import com.epmet.commons.tools.exception.RenException; |
||||
|
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.commons.tools.utils.Result; |
||||
|
import com.epmet.dao.BizPointUserTotalDetailDao; |
||||
|
import com.epmet.dto.BizPointUserTotalDetailDTO; |
||||
|
import com.epmet.dto.form.GroupPointFormDTO; |
||||
|
import com.epmet.dto.result.PointRankingResultDTO; |
||||
|
import com.epmet.dto.result.UserBaseInfoResultDTO; |
||||
|
import com.epmet.entity.BizPointUserTotalDetailEntity; |
||||
|
import com.epmet.feign.EpmetUserOpenFeignClient; |
||||
|
import com.epmet.resi.group.dto.group.ResiGroupDTO; |
||||
|
import com.epmet.resi.group.dto.member.ResiGroupMemberDTO; |
||||
|
import com.epmet.resi.group.feign.ResiGroupOpenFeignClient; |
||||
|
import com.epmet.service.BizPointUserTotalDetailService; |
||||
|
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.text.Collator; |
||||
|
import java.util.*; |
||||
|
import java.util.concurrent.atomic.AtomicInteger; |
||||
|
import java.util.stream.Collectors; |
||||
|
|
||||
|
/** |
||||
|
* 按业务类型积分总计 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2021-04-20 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class BizPointUserTotalDetailServiceImpl extends BaseServiceImpl<BizPointUserTotalDetailDao, BizPointUserTotalDetailEntity> implements BizPointUserTotalDetailService { |
||||
|
|
||||
|
@Autowired |
||||
|
private EpmetUserOpenFeignClient epmetUserOpenFeignClient; |
||||
|
@Autowired |
||||
|
private ResiGroupOpenFeignClient resiGroupOpenFeignClient; |
||||
|
|
||||
|
@Override |
||||
|
public PageData<BizPointUserTotalDetailDTO> page(Map<String, Object> params) { |
||||
|
IPage<BizPointUserTotalDetailEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, BizPointUserTotalDetailDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<BizPointUserTotalDetailDTO> list(Map<String, Object> params) { |
||||
|
List<BizPointUserTotalDetailEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, BizPointUserTotalDetailDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<BizPointUserTotalDetailEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<BizPointUserTotalDetailEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public BizPointUserTotalDetailDTO get(String id) { |
||||
|
BizPointUserTotalDetailEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, BizPointUserTotalDetailDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(BizPointUserTotalDetailDTO dto) { |
||||
|
BizPointUserTotalDetailEntity entity = ConvertUtils.sourceToTarget(dto, BizPointUserTotalDetailEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(BizPointUserTotalDetailDTO dto) { |
||||
|
BizPointUserTotalDetailEntity entity = ConvertUtils.sourceToTarget(dto, BizPointUserTotalDetailEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 根据业务类型查找用户数据 |
||||
|
* |
||||
|
* @param type |
||||
|
* @param objectId |
||||
|
* @param userId |
||||
|
* @return com.epmet.dto.BizPointTotalDetailDTO |
||||
|
* @author zhaoqifeng |
||||
|
* @date 2021/4/20 16:53 |
||||
|
*/ |
||||
|
@Override |
||||
|
public BizPointUserTotalDetailDTO getDataByObject(String type, String objectId, String userId) { |
||||
|
QueryWrapper<BizPointUserTotalDetailEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq("BIZ_TYPE", type) |
||||
|
.eq("OBJECT_ID", objectId) |
||||
|
.eq("USER_ID", userId) |
||||
|
.eq("DEL_FLAG", NumConstant.ZERO_STR); |
||||
|
BizPointUserTotalDetailEntity entity = baseDao.selectOne(wrapper); |
||||
|
return ConvertUtils.sourceToTarget(entity, BizPointUserTotalDetailDTO.class); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 根据业务类型查找积分总和 |
||||
|
* |
||||
|
* @param type |
||||
|
* @param objectId |
||||
|
* @return java.lang.Integer |
||||
|
* @author zhaoqifeng |
||||
|
* @date 2021/4/20 17:21 |
||||
|
*/ |
||||
|
@Override |
||||
|
public Integer getTotalByObject(String type, String objectId) { |
||||
|
QueryWrapper<BizPointUserTotalDetailEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.select("IFNULL(SUM(TOTAL_POINT), 0) as TOTAL_POINT") |
||||
|
.eq("BIZ_TYPE", type) |
||||
|
.eq("OBJECT_ID", objectId) |
||||
|
.eq("DEL_FLAG", NumConstant.ZERO_STR); |
||||
|
BizPointUserTotalDetailEntity entity = baseDao.selectOne(wrapper); |
||||
|
if (null == entity) { |
||||
|
return NumConstant.ZERO; |
||||
|
} |
||||
|
return entity.getTotalPoint(); |
||||
|
} |
||||
|
|
||||
|
public static void main(String[] args) { |
||||
|
System.out.println(BizTypeEnum.ACTIVITY.getType()); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 小组积分贡献榜 |
||||
|
* |
||||
|
* @param tokenDto |
||||
|
* @param formDTO |
||||
|
* @return java.util.List<com.epmet.dto.result.PointRankingResultDTO> |
||||
|
* @author zhaoqifeng |
||||
|
* @date 2021/4/21 14:06 |
||||
|
*/ |
||||
|
@Override |
||||
|
public List<PointRankingResultDTO> pointRanking(TokenDto tokenDto, GroupPointFormDTO formDTO) { |
||||
|
List<PointRankingResultDTO> list = new ArrayList<>(); |
||||
|
QueryWrapper<BizPointUserTotalDetailEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq("BIZ_TYPE", "group") |
||||
|
.eq("OBJECT_ID", formDTO.getGroupId()) |
||||
|
.eq("DEL_FLAG", NumConstant.ZERO_STR) |
||||
|
.orderByDesc("TOTAL_POINT"); |
||||
|
List<BizPointUserTotalDetailEntity> userTotalList = baseDao.selectList(wrapper); |
||||
|
AtomicInteger i = new AtomicInteger(1); |
||||
|
|
||||
|
//获取小组信息
|
||||
|
Result<ResiGroupDTO> group = resiGroupOpenFeignClient.getGroupDetail(formDTO.getGroupId()); |
||||
|
if (!group.success() || null == group.getData()) { |
||||
|
throw new RenException(group.getCode(), group.getMsg()); |
||||
|
} |
||||
|
List<ResiGroupMemberDTO> memberList = group.getData().getMemberList(); |
||||
|
list = memberList.stream().map(item -> { |
||||
|
PointRankingResultDTO dto = new PointRankingResultDTO(); |
||||
|
dto.setUserId(item.getCustomerUserId()); |
||||
|
dto.setPoint(NumConstant.ZERO_STR); |
||||
|
if (tokenDto.getUserId().equals(item.getCustomerUserId())) { |
||||
|
dto.setIsMine(NumConstant.ONE_STR); |
||||
|
} else { |
||||
|
dto.setIsMine(NumConstant.ZERO_STR); |
||||
|
} |
||||
|
return dto; |
||||
|
}).collect(Collectors.toList()); |
||||
|
list.forEach(item -> userTotalList.stream().filter(user -> user.getUserId().equals(item.getUserId())).forEach(total -> { |
||||
|
item.setPoint(total.getTotalPoint().toString()); |
||||
|
})); |
||||
|
//获取用户信息
|
||||
|
List<String> userIds = memberList.stream().map(ResiGroupMemberDTO :: getCustomerUserId).collect(Collectors.toList()); |
||||
|
Result<List<UserBaseInfoResultDTO>> userInfoListResult = epmetUserOpenFeignClient.queryUserBaseInfo(userIds); |
||||
|
if (!userInfoListResult.success() || null == userInfoListResult.getData()) { |
||||
|
throw new RenException(userInfoListResult.getCode(), userInfoListResult.getMsg()); |
||||
|
} |
||||
|
list.forEach(item -> userInfoListResult.getData().stream().filter(baseInfo -> item.getUserId().equals(baseInfo.getUserId())).forEach( |
||||
|
user -> { |
||||
|
//楼院小组显示昵称,支部小组显示姓名
|
||||
|
if (("ordinary").equals(group.getData().getGroupType())) { |
||||
|
item.setName(user.getNickname()); |
||||
|
} else { |
||||
|
item.setName(StrConstant.EPMETY_STR); |
||||
|
if (StringUtils.isNotBlank(user.getSurname())){ |
||||
|
item.setName(user.getSurname()); |
||||
|
} |
||||
|
if (StringUtils.isNotBlank(user.getName())){ |
||||
|
item.setName(item.getName().concat(user.getName())); |
||||
|
} |
||||
|
} |
||||
|
item.setHeadPhoto(user.getHeadImgUrl()); |
||||
|
} |
||||
|
)); |
||||
|
list = list.stream().sorted(Comparator.comparing(PointRankingResultDTO :: getPoint, Comparator.comparingInt(Integer::parseInt)).reversed() |
||||
|
.thenComparing(PointRankingResultDTO::getName, Collator.getInstance(Locale.CHINA))) |
||||
|
.collect(Collectors.toList()); |
||||
|
list.forEach(item -> item.setRanking(String.valueOf(i.getAndIncrement()))); |
||||
|
return list; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取今日增量 |
||||
|
* |
||||
|
* @param type |
||||
|
* @param objectId |
||||
|
* @return java.lang.Integer |
||||
|
* @author zhaoqifeng |
||||
|
* @date 2021/4/21 16:41 |
||||
|
*/ |
||||
|
@Override |
||||
|
public Integer getIncrease(String type, String objectId) { |
||||
|
return baseDao.selectIncrease(type, objectId); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,3 @@ |
|||||
|
UPDATE point_rule_default SET RULE_NAME = '组长转话题为议题' WHERE EVENT_CODE = 'shift_topic_to_issue'; |
||||
|
UPDATE point_rule SET RULE_NAME = '组长转话题为议题' WHERE EVENT_CODE = 'shift_topic_to_issue'; |
||||
|
INSERT INTO `epmet_point`.`point_rule_default`(`ID`, `RULE_NAME`, `RULE_DESC`, `EVENT_CODE`, `FUNCTION_ID`, `OPERATE_TYPE`, `UP_LIMIT`, `UP_LIMIT_DESC`, `UP_LIMIT_PREFIX`, `RULE_PERIOD`, `POINT`, `POINT_UNIT`, `ENABLED_FLAG`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('10', '组长解决话题', '组长解决组内话题', 'leader_resolve_topic', '1', 'plus', 0, '无上限', NULL, 'day', 2, 'time', '0', '0', 0, 'APP_USER', '2021-04-19 15:55:18', 'APP_USER', '2021-04-19 15:55:18'); |
||||
@ -0,0 +1,40 @@ |
|||||
|
CREATE TABLE `biz_point_total_detail` ( |
||||
|
`ID` varchar(64) NOT NULL COMMENT '主键', |
||||
|
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', |
||||
|
`AGENCY_ID` varchar(64) NOT NULL COMMENT '组织Id', |
||||
|
`GRID_ID` varchar(64) NOT NULL COMMENT '网格ID', |
||||
|
`BIZ_TYPE` varchar(64) NOT NULL DEFAULT '0' COMMENT '业务类型:小组:group', |
||||
|
`OBJECT_ID` varchar(64) NOT NULL DEFAULT '0' COMMENT '业务类型的对象id', |
||||
|
`TOTAL_POINT` int(11) NOT NULL DEFAULT '0' COMMENT 'OBJECTID的总积分 总积分=objectId下所有的用户积分', |
||||
|
`DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识', |
||||
|
`REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
||||
|
PRIMARY KEY (`ID`) USING BTREE, |
||||
|
UNIQUE KEY `unx_o_point` (`OBJECT_ID`,`BIZ_TYPE`) USING BTREE |
||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='按业务类型积分总计'; |
||||
|
CREATE TABLE `biz_point_user_total_detail` ( |
||||
|
`ID` varchar(64) NOT NULL COMMENT '主键', |
||||
|
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', |
||||
|
`AGENCY_ID` varchar(64) NOT NULL COMMENT '组织Id', |
||||
|
`GRID_ID` varchar(64) NOT NULL COMMENT '网格ID', |
||||
|
`USER_ID` varchar(64) NOT NULL COMMENT '用户ID', |
||||
|
`BIZ_TYPE` varchar(64) NOT NULL DEFAULT '0' COMMENT '业务类型:小组:group', |
||||
|
`OBJECT_ID` varchar(64) NOT NULL DEFAULT '0' COMMENT '业务类型的对象id', |
||||
|
`TOTAL_POINT` int(11) NOT NULL DEFAULT '0' COMMENT 'OBJECTID的总积分 总积分=objectId下所有的用户积分', |
||||
|
`DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识', |
||||
|
`REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
||||
|
PRIMARY KEY (`ID`) USING BTREE, |
||||
|
UNIQUE KEY `unx_point` (`USER_ID`,`OBJECT_ID`,`BIZ_TYPE`) |
||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='按业务类型积分总计'; |
||||
|
|
||||
|
ALTER TABLE `user_point_action_log` |
||||
|
ADD COLUMN `BIZ_TYPE` varchar(64) NULL COMMENT '业务类型:小组:group 活动 activity' AFTER `EVENT_ID`, |
||||
|
ADD COLUMN `OBJECT_ID` varchar(64) NULL COMMENT '业务类型的对象id' AFTER `BIZ_TYPE`, |
||||
|
ADD COLUMN `SOURCE_TYPE` varchar(20) NULL COMMENT '活动 activity 活动ID\r\n志愿者 volunteer 用户ID\r\n邀请进组 invite 用户ID\r\n话题 topic 话题ID\r\n话题转议题 issue 议题id\r\n话题转项目 project 话题ID' AFTER `OBJECT_ID`; |
||||
@ -0,0 +1,33 @@ |
|||||
|
<?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.BizPointTotalDetailDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.entity.BizPointTotalDetailEntity" id="bizPointTotalDetailMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="customerId" column="CUSTOMER_ID"/> |
||||
|
<result property="agencyId" column="AGENCY_ID"/> |
||||
|
<result property="gridId" column="GRID_ID"/> |
||||
|
<result property="bizType" column="BIZ_TYPE"/> |
||||
|
<result property="objectId" column="OBJECT_ID"/> |
||||
|
<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> |
||||
|
<select id="selectDataByObject" resultType="com.epmet.dto.BizPointTotalDetailDTO"> |
||||
|
select ID, |
||||
|
CUSTOMER_ID, |
||||
|
AGENCY_ID, |
||||
|
GRID_ID, |
||||
|
TOTAL_POINT |
||||
|
from biz_point_total_detail |
||||
|
where BIZ_TYPE = #{type} |
||||
|
and OBJECT_ID = #{objectId} |
||||
|
</select> |
||||
|
|
||||
|
|
||||
|
</mapper> |
||||
@ -0,0 +1,32 @@ |
|||||
|
<?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.BizPointUserTotalDetailDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.entity.BizPointUserTotalDetailEntity" id="bizPointUserTotalDetailMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="customerId" column="CUSTOMER_ID"/> |
||||
|
<result property="agencyId" column="AGENCY_ID"/> |
||||
|
<result property="gridId" column="GRID_ID"/> |
||||
|
<result property="userId" column="USER_ID"/> |
||||
|
<result property="bizType" column="BIZ_TYPE"/> |
||||
|
<result property="objectId" column="OBJECT_ID"/> |
||||
|
<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> |
||||
|
<select id="selectIncrease" resultType="java.lang.Integer"> |
||||
|
SELECT IFNULL(SUM(TOTAL_POINT), 0) |
||||
|
FROM biz_point_user_total_detail |
||||
|
WHERE |
||||
|
BIZ_TYPE = #{type} |
||||
|
AND OBJECT_ID = #{objectId} |
||||
|
AND DATE_FORMAT(CREATED_TIME, '%Y-%m-%d') = DATE_FORMAT(NOW(), '%Y-%m-%d') |
||||
|
</select> |
||||
|
|
||||
|
|
||||
|
</mapper> |
||||
@ -0,0 +1,146 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import com.epmet.commons.tools.dto.form.FileCommonDTO; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 工作端小组内,活动详情返参DTO |
||||
|
* |
||||
|
* @author yinzuomei@elink-cn.com |
||||
|
* @date 2021/4/29 9:30 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ActDetailGovResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 3982724635100043221L; |
||||
|
|
||||
|
private String groupActId; |
||||
|
|
||||
|
/** |
||||
|
* 小组id |
||||
|
*/ |
||||
|
private String groupId; |
||||
|
|
||||
|
/** |
||||
|
* 活动标题; |
||||
|
*/ |
||||
|
private String title; |
||||
|
|
||||
|
/** |
||||
|
* 活动时间 |
||||
|
*/ |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
||||
|
private Date startTime; |
||||
|
|
||||
|
/** |
||||
|
* 活动所属类别编码 |
||||
|
*/ |
||||
|
private String categoryCode; |
||||
|
|
||||
|
/** |
||||
|
* 上级类别编码 |
||||
|
*/ |
||||
|
private String parentCode; |
||||
|
|
||||
|
private String menuCode; |
||||
|
|
||||
|
/** |
||||
|
* 活动类别名称;eg:支部建设-三会一课 |
||||
|
*/ |
||||
|
private String allCategoryName; |
||||
|
|
||||
|
/** |
||||
|
* 活动地点 |
||||
|
*/ |
||||
|
private String address; |
||||
|
|
||||
|
/** |
||||
|
* 应参加人数组长填入;此列也是应签到人数; |
||||
|
*/ |
||||
|
private Integer shouldAttend; |
||||
|
|
||||
|
/** |
||||
|
* 活动状态:已发布:published;已取消:canceled;已变更:changed;已关闭:closed |
||||
|
*/ |
||||
|
private String status; |
||||
|
|
||||
|
/** |
||||
|
* 签到开始时间 |
||||
|
*/ |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
||||
|
private Date signInStartTime; |
||||
|
|
||||
|
/** |
||||
|
* 签到截止时间 |
||||
|
*/ |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
||||
|
private Date signInEndTime; |
||||
|
|
||||
|
/** |
||||
|
* 是否填写总结?1:已填写;0:未填写 |
||||
|
*/ |
||||
|
private Integer summaryFlag; |
||||
|
|
||||
|
/** |
||||
|
* 取消时间 |
||||
|
*/ |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
||||
|
private Date canceledTime; |
||||
|
|
||||
|
/** |
||||
|
* 关闭时间 |
||||
|
*/ |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
||||
|
private Date closedTime; |
||||
|
|
||||
|
/** |
||||
|
* 活动发布人用户id |
||||
|
*/ |
||||
|
private String publishUserId; |
||||
|
|
||||
|
/** |
||||
|
* 内容列表 |
||||
|
*/ |
||||
|
private List<String> textList; |
||||
|
|
||||
|
/** |
||||
|
* 图片列表 |
||||
|
*/ |
||||
|
private List<String> imgArrayList; |
||||
|
|
||||
|
/** |
||||
|
* 图片列表,最多3张 |
||||
|
*/ |
||||
|
private List<FileCommonDTO> imgList; |
||||
|
|
||||
|
//以下字段需要单独赋值
|
||||
|
/** |
||||
|
* 取消原因 |
||||
|
*/ |
||||
|
private String canceledReason; |
||||
|
|
||||
|
/** |
||||
|
* 已签到人数(有人签到自动+1) |
||||
|
*/ |
||||
|
private Integer signedInNum; |
||||
|
|
||||
|
/** |
||||
|
* 网格id |
||||
|
*/ |
||||
|
private String gridId; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 最后一次编辑时间;首次发布与CREATED_TIME一致 |
||||
|
*/ |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
||||
|
private Date changedTime; |
||||
|
} |
||||
@ -1,100 +0,0 @@ |
|||||
package com.epmet.mq.listener; |
|
||||
|
|
||||
import com.alibaba.fastjson.JSON; |
|
||||
import com.epmet.commons.rocketmq.constants.ConsomerGroupConstants; |
|
||||
import com.epmet.commons.rocketmq.constants.TopicConstants; |
|
||||
import com.epmet.commons.rocketmq.messages.InitCustomerMQMsg; |
|
||||
import com.epmet.commons.tools.distributedlock.DistributedLock; |
|
||||
import com.epmet.commons.tools.exception.ExceptionUtils; |
|
||||
import com.epmet.commons.tools.exception.RenException; |
|
||||
import com.epmet.constant.UserWorkType; |
|
||||
import com.epmet.dto.CustomerAgencyDTO; |
|
||||
import com.epmet.dto.form.AddAgencyAndStaffFormDTO; |
|
||||
import com.epmet.dto.form.AdminStaffFromDTO; |
|
||||
import com.epmet.service.AgencyService; |
|
||||
import org.apache.rocketmq.common.message.MessageExt; |
|
||||
import org.apache.rocketmq.spring.annotation.MessageModel; |
|
||||
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener; |
|
||||
import org.apache.rocketmq.spring.core.RocketMQListener; |
|
||||
import org.redisson.api.RLock; |
|
||||
import org.slf4j.Logger; |
|
||||
import org.slf4j.LoggerFactory; |
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||
import org.springframework.stereotype.Component; |
|
||||
|
|
||||
import java.util.concurrent.TimeUnit; |
|
||||
|
|
||||
/** |
|
||||
* 监听初始化客户动作,为客户初始化角色列表 |
|
||||
*/ |
|
||||
//@RocketMQMessageListener(topic = TopicConstants.INIT_CUSTOMER,
|
|
||||
// consumerGroup = ConsomerGroupConstants.INIT_CUSTOMER_ORG_ROLES_GROUP,
|
|
||||
// messageModel = MessageModel.CLUSTERING,
|
|
||||
// selectorExpression = "*")
|
|
||||
//@Component
|
|
||||
public class InitCustomerOrgListener implements RocketMQListener<MessageExt> { |
|
||||
|
|
||||
private Logger logger = LoggerFactory.getLogger(getClass()); |
|
||||
|
|
||||
@Autowired |
|
||||
private AgencyService agencyService; |
|
||||
|
|
||||
@Autowired |
|
||||
private DistributedLock distributedLock; |
|
||||
|
|
||||
@Override |
|
||||
public void onMessage(MessageExt messageExt) { |
|
||||
String msg = new String(messageExt.getBody()); |
|
||||
logger.info("初始化客户-初始化组织信息-收到消息内容:{}", msg); |
|
||||
InitCustomerMQMsg msgObj = JSON.parseObject(msg, InitCustomerMQMsg.class); |
|
||||
|
|
||||
RLock lock = null; |
|
||||
try { |
|
||||
lock = distributedLock.getLock(String.format("lock:init_customer_org:%s", msgObj.getCustomerId()), |
|
||||
30l, 30l, TimeUnit.SECONDS); |
|
||||
agencyService.saveRootAgency(constructRootAndAgencyDTO(msgObj)); |
|
||||
} catch (RenException e) { |
|
||||
// 如果是我们手动抛出的异常,说明在业务可控范围内。目前不需要MQ重试
|
|
||||
logger.error("【RocketMQ】初始化客户组织失败:".concat(ExceptionUtils.getErrorStackTrace(e))); |
|
||||
} catch (Exception e) { |
|
||||
// 不是我们自己抛出的异常,可以让MQ重试
|
|
||||
logger.error("【RocketMQ】初始化客户组织失败:".concat(ExceptionUtils.getErrorStackTrace(e))); |
|
||||
throw e; |
|
||||
} finally { |
|
||||
distributedLock.unLock(lock); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* @Description 构造dto |
|
||||
* @return |
|
||||
* @author wxz |
|
||||
* @date 2021.01.06 15:03 |
|
||||
*/ |
|
||||
private AddAgencyAndStaffFormDTO constructRootAndAgencyDTO(InitCustomerMQMsg msgObj) { |
|
||||
AddAgencyAndStaffFormDTO agencyAndStaff = new AddAgencyAndStaffFormDTO(); |
|
||||
//客户组织信息
|
|
||||
CustomerAgencyDTO agencyDTO = new CustomerAgencyDTO(); |
|
||||
agencyDTO.setId(msgObj.getAgency().getAgencyId()); |
|
||||
agencyDTO.setCustomerId(msgObj.getCustomerId()); |
|
||||
agencyDTO.setOrganizationName(msgObj.getAgency().getOrganizationName()); |
|
||||
agencyDTO.setLevel(msgObj.getAgency().getLevel()); |
|
||||
agencyDTO.setAreaCode(msgObj.getAgency().getAreaCode()); |
|
||||
agencyDTO.setProvince(msgObj.getAgency().getProvince()); |
|
||||
agencyDTO.setCity(msgObj.getAgency().getCity()); |
|
||||
agencyDTO.setDistrict(msgObj.getAgency().getDistrict()); |
|
||||
agencyAndStaff.setAgencyDTO(agencyDTO); |
|
||||
|
|
||||
//客户管理员信息
|
|
||||
AdminStaffFromDTO staffSubmitFrom = new AdminStaffFromDTO(); |
|
||||
staffSubmitFrom.setCustomerId(msgObj.getCustomerId()); |
|
||||
staffSubmitFrom.setAgencyId(msgObj.getStaff().getAgencyId()); |
|
||||
staffSubmitFrom.setGender(msgObj.getStaff().getGender()); |
|
||||
staffSubmitFrom.setMobile(msgObj.getStaff().getMobile()); |
|
||||
staffSubmitFrom.setName(msgObj.getStaff().getName()); |
|
||||
staffSubmitFrom.setWorkType(UserWorkType.FULL_TIME); |
|
||||
agencyAndStaff.setStaffDTO(staffSubmitFrom); |
|
||||
|
|
||||
return agencyAndStaff; |
|
||||
} |
|
||||
} |
|
||||
@ -1,68 +0,0 @@ |
|||||
package com.epmet.mq.listener; |
|
||||
|
|
||||
import com.alibaba.fastjson.JSON; |
|
||||
import com.epmet.commons.rocketmq.constants.ConsomerGroupConstants; |
|
||||
import com.epmet.commons.rocketmq.constants.TopicConstants; |
|
||||
import com.epmet.commons.rocketmq.messages.InitCustomerMQMsg; |
|
||||
import com.epmet.commons.tools.distributedlock.DistributedLock; |
|
||||
import com.epmet.commons.tools.exception.ExceptionUtils; |
|
||||
import com.epmet.commons.tools.exception.RenException; |
|
||||
import com.epmet.dto.CustomerHomeDTO; |
|
||||
import com.epmet.service.CustomerHomeService; |
|
||||
import org.apache.rocketmq.common.message.MessageExt; |
|
||||
import org.apache.rocketmq.spring.annotation.MessageModel; |
|
||||
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener; |
|
||||
import org.apache.rocketmq.spring.core.RocketMQListener; |
|
||||
import org.redisson.api.RLock; |
|
||||
import org.slf4j.Logger; |
|
||||
import org.slf4j.LoggerFactory; |
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||
import org.springframework.stereotype.Component; |
|
||||
|
|
||||
import java.util.concurrent.TimeUnit; |
|
||||
|
|
||||
/** |
|
||||
* 监听初始化客户动作,为客户初始化角色列表 |
|
||||
* 已废弃 |
|
||||
*/ |
|
||||
//@RocketMQMessageListener(topic = TopicConstants.INIT_CUSTOMER,
|
|
||||
// consumerGroup = ConsomerGroupConstants.INIT_CUSTOMER_COMPONENTS_GROUP,
|
|
||||
// messageModel = MessageModel.CLUSTERING,
|
|
||||
// selectorExpression = "*")
|
|
||||
//@Component
|
|
||||
public class InitCustomerCustomizeListener implements RocketMQListener<MessageExt> { |
|
||||
|
|
||||
private Logger logger = LoggerFactory.getLogger(getClass()); |
|
||||
|
|
||||
@Autowired |
|
||||
private CustomerHomeService customerHomeService; |
|
||||
|
|
||||
@Autowired |
|
||||
private DistributedLock distributedLock; |
|
||||
|
|
||||
@Override |
|
||||
public void onMessage(MessageExt messageExt) { |
|
||||
String msg = new String(messageExt.getBody()); |
|
||||
logger.info("初始化客户-初始化客户自定义信息-收到消息内容:{}", msg); |
|
||||
InitCustomerMQMsg msgObj = JSON.parseObject(msg, InitCustomerMQMsg.class); |
|
||||
|
|
||||
CustomerHomeDTO customerHomeDTO = new CustomerHomeDTO(); |
|
||||
customerHomeDTO.setCustomerId(msgObj.getCustomerId()); |
|
||||
|
|
||||
RLock lock = null; |
|
||||
try { |
|
||||
lock = distributedLock.getLock(String.format("lock:init_customer_home:%s", msgObj.getCustomerId()), |
|
||||
30l, 30l, TimeUnit.SECONDS); |
|
||||
customerHomeService.init(customerHomeDTO); |
|
||||
} catch (RenException e) { |
|
||||
// 如果是我们手动抛出的异常,说明在业务可控范围内。目前不需要MQ重试
|
|
||||
logger.error("【RocketMQ】初始化客户组件失败:".concat(ExceptionUtils.getErrorStackTrace(e))); |
|
||||
} catch (Exception e) { |
|
||||
// 不是我们自己抛出的异常,可以让MQ重试
|
|
||||
logger.error("【RocketMQ】初始化客户组件失败:".concat(ExceptionUtils.getErrorStackTrace(e))); |
|
||||
throw e; |
|
||||
} finally { |
|
||||
distributedLock.unLock(lock); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -0,0 +1,102 @@ |
|||||
|
/** |
||||
|
* 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.resi.group.dto.act; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 活动类别字典 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2021-04-16 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ActCategoryDictDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 类别编码 |
||||
|
*/ |
||||
|
private String categoryCode; |
||||
|
|
||||
|
/** |
||||
|
* 活动类别名称;eg:支部建设、联建共建 |
||||
|
*/ |
||||
|
private String categoryName; |
||||
|
|
||||
|
/** |
||||
|
* 等级1,2...... |
||||
|
*/ |
||||
|
private Integer level; |
||||
|
|
||||
|
/** |
||||
|
* 排序 |
||||
|
*/ |
||||
|
private Integer sort; |
||||
|
|
||||
|
/** |
||||
|
* 上级类别编码 |
||||
|
*/ |
||||
|
private String parentCode; |
||||
|
|
||||
|
/** |
||||
|
* 逻辑删除标识 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
||||
@ -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.resi.group.dto.act; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 活动操作表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2021-04-16 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ActOperationRecordDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键(签到成功后插入此表) |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* group_act_info.id |
||||
|
*/ |
||||
|
private String groupActId; |
||||
|
|
||||
|
/** |
||||
|
* 操作人id |
||||
|
*/ |
||||
|
private String operateUserId; |
||||
|
|
||||
|
/** |
||||
|
* 操作类型:发布:publish; |
||||
|
取消:cancel; |
||||
|
变更:change; |
||||
|
关闭:close |
||||
|
*/ |
||||
|
private String operationType; |
||||
|
|
||||
|
/** |
||||
|
* 备注;取消理由 |
||||
|
*/ |
||||
|
private String note; |
||||
|
|
||||
|
/** |
||||
|
* 逻辑删除标识 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
||||
@ -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.resi.group.dto.act; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 活动已读记录 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2021-04-16 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ActReadRecordDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键(发布活动后后台自动初始化记录) |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 小组所属网格id |
||||
|
*/ |
||||
|
private String gridId; |
||||
|
|
||||
|
/** |
||||
|
* 小组id |
||||
|
*/ |
||||
|
private String groupId; |
||||
|
|
||||
|
/** |
||||
|
* group_act_info.id |
||||
|
*/ |
||||
|
private String groupActId; |
||||
|
|
||||
|
/** |
||||
|
* 活动关闭前已读:read;未读:un_read |
||||
|
*/ |
||||
|
private String readFlag; |
||||
|
|
||||
|
/** |
||||
|
* 已读:read未读:un_read |
||||
|
*/ |
||||
|
private String viewDetail; |
||||
|
|
||||
|
/** |
||||
|
* 用户id |
||||
|
*/ |
||||
|
private String userId; |
||||
|
|
||||
|
/** |
||||
|
* yes:应读;no: 新入群的人已读 |
||||
|
*/ |
||||
|
private String shouldBeRead; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识 0.未删除 1.已删除 |
||||
|
*/ |
||||
|
private Integer delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
||||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue