34 changed files with 1448 additions and 23 deletions
@ -0,0 +1,96 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.activity; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-12-21 |
|||
*/ |
|||
@Data |
|||
public class ActUserPointsLogDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 用户活动关系表ID |
|||
*/ |
|||
private String actUserId; |
|||
|
|||
/** |
|||
* 操作类型 0-系统确认积分,2-管理员确认积分,4-取消报名扣减积分,6-管理员扣减积分,8-拒绝积分 |
|||
*/ |
|||
private String operationType; |
|||
|
|||
/** |
|||
* 操作积分类型 0-减积分,1-加积分 |
|||
*/ |
|||
private String operationPointsType; |
|||
|
|||
/** |
|||
* 操作积分值 |
|||
*/ |
|||
private Integer points; |
|||
|
|||
/** |
|||
* 处理原因 |
|||
*/ |
|||
private String operationReason; |
|||
|
|||
/** |
|||
* 删除标识 0-否,1-是 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
|||
@ -0,0 +1,59 @@ |
|||
/** |
|||
* 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.elink.esua.epdc.activity.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* 活动信息表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-12-11 |
|||
*/ |
|||
@Data |
|||
public class ActPointCheckFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
@NotBlank(message = "id不能为空") |
|||
private String id; |
|||
/** |
|||
* 活动 |
|||
*/ |
|||
private String actId; |
|||
|
|||
/** |
|||
* 状态 |
|||
*/ |
|||
@NotBlank(message = "状态不能为空") |
|||
private String status; |
|||
/** |
|||
* 未通过原因(仅当未通过时录入,并读取) |
|||
*/ |
|||
@NotBlank(message = "原因不能为空") |
|||
private String failureReason; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,75 @@ |
|||
/** |
|||
* 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.elink.esua.epdc.activity.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 活动信息表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-12-11 |
|||
*/ |
|||
@Data |
|||
public class ActInfoClockResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
/** |
|||
* 活动 |
|||
*/ |
|||
private String actId; |
|||
|
|||
/** |
|||
* 活动签到打卡地点 |
|||
*/ |
|||
private String address; |
|||
|
|||
/** |
|||
* 状态 |
|||
*/ |
|||
private String status; |
|||
/** |
|||
* 原因 |
|||
*/ |
|||
private String failureReason; |
|||
|
|||
/** |
|||
* 活动签到打卡位置经度 |
|||
*/ |
|||
private BigDecimal longitude; |
|||
|
|||
/** |
|||
* 活动签到打卡位置纬度 |
|||
*/ |
|||
private BigDecimal latitude; |
|||
|
|||
/** |
|||
* 活动签到打卡半径(单位:米) |
|||
*/ |
|||
private Integer radius; |
|||
|
|||
} |
|||
@ -0,0 +1,91 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.activity.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 用户打卡日志表 用户打卡日志表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-12-17 |
|||
*/ |
|||
@Data |
|||
public class ActUserClockLogResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
/** |
|||
* 打卡时间 |
|||
*/ |
|||
private Date clockTime; |
|||
|
|||
/** |
|||
* 打卡位置经度 |
|||
*/ |
|||
private BigDecimal clockLongitude; |
|||
|
|||
/** |
|||
* 打卡位置纬度 |
|||
*/ |
|||
private BigDecimal clockLatitude; |
|||
|
|||
/** |
|||
* 打卡地址 |
|||
*/ |
|||
private String clockAddress; |
|||
|
|||
/** |
|||
* 打卡描述 |
|||
*/ |
|||
private String clockDesc; |
|||
|
|||
/** |
|||
* 报名人真实姓名 |
|||
*/ |
|||
private String realName; |
|||
|
|||
/** |
|||
* 性别(0-女,1-男) |
|||
*/ |
|||
private String sex; |
|||
|
|||
/** |
|||
* 年龄 |
|||
*/ |
|||
private Integer age; |
|||
|
|||
/** |
|||
* 联系电话 |
|||
*/ |
|||
private String mobile; |
|||
/** |
|||
* 联系电话 |
|||
*/ |
|||
private String clockPic; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,131 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.activity.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 用户活动关系表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-12-16 |
|||
*/ |
|||
@Data |
|||
public class ActUserClockResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 活动ID |
|||
*/ |
|||
private String actId; |
|||
|
|||
/** |
|||
* 用户ID |
|||
*/ |
|||
private String userId; |
|||
|
|||
/** |
|||
* 用户昵称 |
|||
*/ |
|||
private String nickname; |
|||
|
|||
/** |
|||
* 用户头像 |
|||
*/ |
|||
private String faceImg; |
|||
|
|||
/** |
|||
* 党员标识(0-否,1-是) |
|||
*/ |
|||
private String partyFlag; |
|||
|
|||
/** |
|||
* 报名人真实姓名 |
|||
*/ |
|||
private String realName; |
|||
|
|||
/** |
|||
* 性别(0-女,1-男) |
|||
*/ |
|||
private String sex; |
|||
|
|||
/** |
|||
* 年龄 |
|||
*/ |
|||
private Integer age; |
|||
|
|||
/** |
|||
* 联系电话 |
|||
*/ |
|||
private String mobile; |
|||
/** |
|||
* 打卡地点 |
|||
*/ |
|||
private String clockAddress; |
|||
|
|||
/** |
|||
* 打卡次数 |
|||
*/ |
|||
private String clockCount; |
|||
|
|||
/** |
|||
* 是否发放积分 |
|||
*/ |
|||
private String checkPoint; |
|||
/** |
|||
* 是否发放积分 |
|||
*/ |
|||
private String point; |
|||
|
|||
/** |
|||
* 身份证号 |
|||
*/ |
|||
private String identityNo; |
|||
|
|||
/** |
|||
* 当前状态(0-报名,1-审核通过,2-打卡,3-取消报名,4-审核不通过) |
|||
*/ |
|||
private String status; |
|||
|
|||
/** |
|||
* 未通过原因(仅当未通过时录入,并读取) |
|||
*/ |
|||
private String failureReason; |
|||
|
|||
/** |
|||
* 审核时间 |
|||
*/ |
|||
private Date auditTime; |
|||
|
|||
/** |
|||
* 报名时间 |
|||
*/ |
|||
private Date signupTime; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,94 @@ |
|||
/** |
|||
* 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.elink.esua.epdc.modules.activity.controller; |
|||
|
|||
import com.elink.esua.epdc.activity.ActUserPointsLogDTO; |
|||
import com.elink.esua.epdc.commons.tools.page.PageData; |
|||
import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.commons.tools.validator.AssertUtils; |
|||
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; |
|||
import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; |
|||
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; |
|||
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; |
|||
import com.elink.esua.epdc.modules.activity.excel.ActUserPointsLogExcel; |
|||
import com.elink.esua.epdc.modules.activity.service.ActUserPointsLogService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-12-21 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("actuserpointslog") |
|||
public class ActUserPointsLogController { |
|||
|
|||
@Autowired |
|||
private ActUserPointsLogService actUserPointsLogService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<ActUserPointsLogDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<ActUserPointsLogDTO> page = actUserPointsLogService.page(params); |
|||
return new Result<PageData<ActUserPointsLogDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<ActUserPointsLogDTO> get(@PathVariable("id") String id){ |
|||
ActUserPointsLogDTO data = actUserPointsLogService.get(id); |
|||
return new Result<ActUserPointsLogDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody ActUserPointsLogDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
actUserPointsLogService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody ActUserPointsLogDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
actUserPointsLogService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
actUserPointsLogService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<ActUserPointsLogDTO> list = actUserPointsLogService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, ActUserPointsLogExcel.class); |
|||
} |
|||
|
|||
} |
|||
@ -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.elink.esua.epdc.modules.activity.dao; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; |
|||
import com.elink.esua.epdc.modules.activity.entity.ActUserPointsLogEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-12-21 |
|||
*/ |
|||
@Mapper |
|||
public interface ActUserPointsLogDao extends BaseDao<ActUserPointsLogEntity> { |
|||
|
|||
} |
|||
@ -0,0 +1,66 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.modules.activity.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-12-21 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("epdc_act_user_points_log") |
|||
public class ActUserPointsLogEntity extends BaseEpdcEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 用户活动关系表ID |
|||
*/ |
|||
private String actUserId; |
|||
|
|||
/** |
|||
* 操作类型 0-系统确认积分,2-管理员确认积分,4-取消报名扣减积分,6-管理员扣减积分,8-拒绝积分 |
|||
*/ |
|||
private String operationType; |
|||
|
|||
/** |
|||
* 操作积分类型 0-减积分,1-加积分 |
|||
*/ |
|||
private String operationPointsType; |
|||
|
|||
/** |
|||
* 操作积分值 |
|||
*/ |
|||
private Integer points; |
|||
|
|||
/** |
|||
* 处理原因 |
|||
*/ |
|||
private String operationReason; |
|||
|
|||
} |
|||
@ -0,0 +1,71 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.modules.activity.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-12-21 |
|||
*/ |
|||
@Data |
|||
public class ActUserPointsLogExcel { |
|||
|
|||
@Excel(name = "主键") |
|||
private String id; |
|||
|
|||
@Excel(name = "用户活动关系表ID") |
|||
private String actUserId; |
|||
|
|||
@Excel(name = "操作类型 0-系统确认积分,2-管理员确认积分,4-取消报名扣减积分,6-管理员扣减积分,8-拒绝积分") |
|||
private String operationType; |
|||
|
|||
@Excel(name = "操作积分类型 0-减积分,1-加积分") |
|||
private String operationPointsType; |
|||
|
|||
@Excel(name = "操作积分值") |
|||
private Integer points; |
|||
|
|||
@Excel(name = "处理原因") |
|||
private String operationReason; |
|||
|
|||
@Excel(name = "删除标识 0-否,1-是") |
|||
private String delFlag; |
|||
|
|||
@Excel(name = "乐观锁") |
|||
private Integer revision; |
|||
|
|||
@Excel(name = "创建人") |
|||
private String createdBy; |
|||
|
|||
@Excel(name = "创建时间") |
|||
private Date createdTime; |
|||
|
|||
@Excel(name = "更新人") |
|||
private String updatedBy; |
|||
|
|||
@Excel(name = "更新时间") |
|||
private Date updatedTime; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,47 @@ |
|||
/** |
|||
* 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.elink.esua.epdc.modules.activity.redis; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.redis.RedisUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-12-21 |
|||
*/ |
|||
@Component |
|||
public class ActUserPointsLogRedis { |
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
public void delete(Object[] ids) { |
|||
|
|||
} |
|||
|
|||
public void set(){ |
|||
|
|||
} |
|||
|
|||
public String get(String id){ |
|||
return null; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,95 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.modules.activity.service; |
|||
|
|||
import com.elink.esua.epdc.activity.ActUserPointsLogDTO; |
|||
import com.elink.esua.epdc.commons.mybatis.service.BaseService; |
|||
import com.elink.esua.epdc.commons.tools.page.PageData; |
|||
import com.elink.esua.epdc.modules.activity.entity.ActUserPointsLogEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-12-21 |
|||
*/ |
|||
public interface ActUserPointsLogService extends BaseService<ActUserPointsLogEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<ActUserPointsLogDTO> |
|||
* @author generator |
|||
* @date 2019-12-21 |
|||
*/ |
|||
PageData<ActUserPointsLogDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<ActUserPointsLogDTO> |
|||
* @author generator |
|||
* @date 2019-12-21 |
|||
*/ |
|||
List<ActUserPointsLogDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return ActUserPointsLogDTO |
|||
* @author generator |
|||
* @date 2019-12-21 |
|||
*/ |
|||
ActUserPointsLogDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2019-12-21 |
|||
*/ |
|||
void save(ActUserPointsLogDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2019-12-21 |
|||
*/ |
|||
void update(ActUserPointsLogDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2019-12-21 |
|||
*/ |
|||
void delete(String[] ids); |
|||
} |
|||
@ -0,0 +1,104 @@ |
|||
/** |
|||
* 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.elink.esua.epdc.modules.activity.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.elink.esua.epdc.activity.ActUserPointsLogDTO; |
|||
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.elink.esua.epdc.commons.tools.page.PageData; |
|||
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; |
|||
import com.elink.esua.epdc.commons.tools.constant.FieldConstant; |
|||
import com.elink.esua.epdc.modules.activity.dao.ActUserPointsLogDao; |
|||
import com.elink.esua.epdc.modules.activity.entity.ActUserPointsLogEntity; |
|||
import com.elink.esua.epdc.modules.activity.redis.ActUserPointsLogRedis; |
|||
import com.elink.esua.epdc.modules.activity.service.ActUserPointsLogService; |
|||
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.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-12-21 |
|||
*/ |
|||
@Service |
|||
public class ActUserPointsLogServiceImpl extends BaseServiceImpl<ActUserPointsLogDao, ActUserPointsLogEntity> implements ActUserPointsLogService { |
|||
|
|||
@Autowired |
|||
private ActUserPointsLogRedis actUserPointsLogRedis; |
|||
|
|||
@Override |
|||
public PageData<ActUserPointsLogDTO> page(Map<String, Object> params) { |
|||
IPage<ActUserPointsLogEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, ActUserPointsLogDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<ActUserPointsLogDTO> list(Map<String, Object> params) { |
|||
List<ActUserPointsLogEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, ActUserPointsLogDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<ActUserPointsLogEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<ActUserPointsLogEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public ActUserPointsLogDTO get(String id) { |
|||
ActUserPointsLogEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, ActUserPointsLogDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(ActUserPointsLogDTO dto) { |
|||
ActUserPointsLogEntity entity = ConvertUtils.sourceToTarget(dto, ActUserPointsLogEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(ActUserPointsLogDTO dto) { |
|||
ActUserPointsLogEntity entity = ConvertUtils.sourceToTarget(dto, ActUserPointsLogEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,47 @@ |
|||
package com.elink.esua.epdc.modules.feign.fallback; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.UserDTO; |
|||
import com.elink.esua.epdc.dto.epdc.result.EpdcGetVolunteerRankDTO; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.PathVariable; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* |
|||
* 调用用户模块 |
|||
* |
|||
* @Author:wanggongfeng |
|||
* @Date:2019/12/16 17:36 |
|||
*/ |
|||
@FeignClient(name = ServiceConstant., fallback = UserFeignClientFallback.class) |
|||
public interface PointsFeignClient { |
|||
|
|||
/** |
|||
* 获取排行榜 |
|||
* |
|||
* @return |
|||
*/ |
|||
@GetMapping("app-user/epdc-app/volunteerinfo/getRankingList") |
|||
Result<List<EpdcGetVolunteerRankDTO>> getRankingList(); |
|||
|
|||
|
|||
@GetMapping("app-user/epdc-app/user/getById/{userId}") |
|||
Result<UserDTO> getUserInfoById(@PathVariable("userId") String userId); |
|||
|
|||
/** |
|||
* 更新用户信息 |
|||
* |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @params [userDTO] |
|||
* @author liuchuang |
|||
* @since 2019/10/25 17:07 |
|||
*/ |
|||
@PostMapping("app-user/epdc-app/user/updateUserInfo") |
|||
Result updateUserInfo(UserDTO userDTO); |
|||
|
|||
} |
|||
@ -0,0 +1,22 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.elink.esua.epdc.dao.ActUserPointsLogDao"> |
|||
|
|||
<resultMap type="com.elink.esua.epdc.modules.activity.entity.ActUserPointsLogEntity" id="actUserPointsLogMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="actUserId" column="ACT_USER_ID"/> |
|||
<result property="operationType" column="OPERATION_TYPE"/> |
|||
<result property="operationPointsType" column="OPERATION_POINTS_TYPE"/> |
|||
<result property="points" column="POINTS"/> |
|||
<result property="operationReason" column="OPERATION_REASON"/> |
|||
<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