From b15fe9e0c5bfc9d26d98c11f094eb430600f063e Mon Sep 17 00:00:00 2001 From: wanggongfeng <1305282856@qq.com> Date: Thu, 31 Mar 2022 15:00:53 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=AF=E5=88=86=E8=B0=83=E6=95=B4=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epdc-cloud-client-yushan | 2 +- .../PointsAdjustmentTypeController.java | 94 +++++++++++++++ ...intsIntegralAdjustmentCheckController.java | 97 +++++++++++++++ .../epdc/dao/PointsAdjustmentTypeDao.java | 33 ++++++ .../dao/PointsIntegralAdjustmentCheckDao.java | 33 ++++++ .../entity/PointsAdjustmentTypeEntity.java | 61 ++++++++++ .../PointsIntegralAdjustmentCheckEntity.java | 111 ++++++++++++++++++ .../epdc/excel/PointsAdjustmentTypeExcel.java | 68 +++++++++++ .../PointsIntegralAdjustmentCheckExcel.java | 98 ++++++++++++++++ .../epdc/redis/PointsAdjustmentTypeRedis.java | 47 ++++++++ .../PointsIntegralAdjustmentCheckRedis.java | 47 ++++++++ .../service/PointsAdjustmentTypeService.java | 95 +++++++++++++++ .../PointsIntegralAdjustmentCheckService.java | 95 +++++++++++++++ .../impl/PointsAdjustmentTypeServiceImpl.java | 104 ++++++++++++++++ ...ntsIntegralAdjustmentCheckServiceImpl.java | 104 ++++++++++++++++ .../mapper/PointsAdjustmentTypeDao.xml | 21 ++++ .../PointsIntegralAdjustmentCheckDao.xml | 31 +++++ 17 files changed, 1140 insertions(+), 1 deletion(-) create mode 100644 epdc-cloud-points/src/main/java/com/elink/esua/epdc/controller/PointsAdjustmentTypeController.java create mode 100644 epdc-cloud-points/src/main/java/com/elink/esua/epdc/controller/PointsIntegralAdjustmentCheckController.java create mode 100644 epdc-cloud-points/src/main/java/com/elink/esua/epdc/dao/PointsAdjustmentTypeDao.java create mode 100644 epdc-cloud-points/src/main/java/com/elink/esua/epdc/dao/PointsIntegralAdjustmentCheckDao.java create mode 100644 epdc-cloud-points/src/main/java/com/elink/esua/epdc/entity/PointsAdjustmentTypeEntity.java create mode 100644 epdc-cloud-points/src/main/java/com/elink/esua/epdc/entity/PointsIntegralAdjustmentCheckEntity.java create mode 100644 epdc-cloud-points/src/main/java/com/elink/esua/epdc/excel/PointsAdjustmentTypeExcel.java create mode 100644 epdc-cloud-points/src/main/java/com/elink/esua/epdc/excel/PointsIntegralAdjustmentCheckExcel.java create mode 100644 epdc-cloud-points/src/main/java/com/elink/esua/epdc/redis/PointsAdjustmentTypeRedis.java create mode 100644 epdc-cloud-points/src/main/java/com/elink/esua/epdc/redis/PointsIntegralAdjustmentCheckRedis.java create mode 100644 epdc-cloud-points/src/main/java/com/elink/esua/epdc/service/PointsAdjustmentTypeService.java create mode 100644 epdc-cloud-points/src/main/java/com/elink/esua/epdc/service/PointsIntegralAdjustmentCheckService.java create mode 100644 epdc-cloud-points/src/main/java/com/elink/esua/epdc/service/impl/PointsAdjustmentTypeServiceImpl.java create mode 100644 epdc-cloud-points/src/main/java/com/elink/esua/epdc/service/impl/PointsIntegralAdjustmentCheckServiceImpl.java create mode 100644 epdc-cloud-points/src/main/resources/mapper/PointsAdjustmentTypeDao.xml create mode 100644 epdc-cloud-points/src/main/resources/mapper/PointsIntegralAdjustmentCheckDao.xml diff --git a/epdc-cloud-client-yushan b/epdc-cloud-client-yushan index 201e33e..ba9218d 160000 --- a/epdc-cloud-client-yushan +++ b/epdc-cloud-client-yushan @@ -1 +1 @@ -Subproject commit 201e33eb2576b5358359b57b55d97cfce2b535dc +Subproject commit ba9218dd49c0443007e925385cec5660dae9d8a2 diff --git a/epdc-cloud-points/src/main/java/com/elink/esua/epdc/controller/PointsAdjustmentTypeController.java b/epdc-cloud-points/src/main/java/com/elink/esua/epdc/controller/PointsAdjustmentTypeController.java new file mode 100644 index 0000000..3a217ea --- /dev/null +++ b/epdc-cloud-points/src/main/java/com/elink/esua/epdc/controller/PointsAdjustmentTypeController.java @@ -0,0 +1,94 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.controller; + +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.dto.PointsAdjustmentTypeDTO; +import com.elink.esua.epdc.excel.PointsAdjustmentTypeExcel; +import com.elink.esua.epdc.service.PointsAdjustmentTypeService; +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 elink elink@elink-cn.com + * @since v1.0.0 2022-03-31 + */ +@RestController +@RequestMapping("pointsadjustmenttype") +public class PointsAdjustmentTypeController { + + @Autowired + private PointsAdjustmentTypeService pointsAdjustmentTypeService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = pointsAdjustmentTypeService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + PointsAdjustmentTypeDTO data = pointsAdjustmentTypeService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody PointsAdjustmentTypeDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + pointsAdjustmentTypeService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody PointsAdjustmentTypeDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + pointsAdjustmentTypeService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + pointsAdjustmentTypeService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = pointsAdjustmentTypeService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, PointsAdjustmentTypeExcel.class); + } + +} \ No newline at end of file diff --git a/epdc-cloud-points/src/main/java/com/elink/esua/epdc/controller/PointsIntegralAdjustmentCheckController.java b/epdc-cloud-points/src/main/java/com/elink/esua/epdc/controller/PointsIntegralAdjustmentCheckController.java new file mode 100644 index 0000000..37bb2f9 --- /dev/null +++ b/epdc-cloud-points/src/main/java/com/elink/esua/epdc/controller/PointsIntegralAdjustmentCheckController.java @@ -0,0 +1,97 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.controller; + +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.security.user.SecurityUser; +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.dto.PointsIntegralAdjustmentCheckDTO; +import com.elink.esua.epdc.excel.PointsIntegralAdjustmentCheckExcel; +import com.elink.esua.epdc.service.PointsIntegralAdjustmentCheckService; +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 elink elink@elink-cn.com + * @since v1.0.0 2022-03-31 + */ +@RestController +@RequestMapping("pointsintegraladjustmentcheck") +public class PointsIntegralAdjustmentCheckController { + + @Autowired + private PointsIntegralAdjustmentCheckService pointsIntegralAdjustmentCheckService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = pointsIntegralAdjustmentCheckService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + PointsIntegralAdjustmentCheckDTO data = pointsIntegralAdjustmentCheckService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody PointsIntegralAdjustmentCheckDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + dto.setWorkUserId(SecurityUser.getUserId().toString()); + pointsIntegralAdjustmentCheckService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody PointsIntegralAdjustmentCheckDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + dto.setWorkUserId(SecurityUser.getUserId().toString()); + pointsIntegralAdjustmentCheckService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + pointsIntegralAdjustmentCheckService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = pointsIntegralAdjustmentCheckService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, PointsIntegralAdjustmentCheckExcel.class); + } + +} diff --git a/epdc-cloud-points/src/main/java/com/elink/esua/epdc/dao/PointsAdjustmentTypeDao.java b/epdc-cloud-points/src/main/java/com/elink/esua/epdc/dao/PointsAdjustmentTypeDao.java new file mode 100644 index 0000000..58a373d --- /dev/null +++ b/epdc-cloud-points/src/main/java/com/elink/esua/epdc/dao/PointsAdjustmentTypeDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.entity.PointsAdjustmentTypeEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 积分调整类型分值管理表 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2022-03-31 + */ +@Mapper +public interface PointsAdjustmentTypeDao extends BaseDao { + +} \ No newline at end of file diff --git a/epdc-cloud-points/src/main/java/com/elink/esua/epdc/dao/PointsIntegralAdjustmentCheckDao.java b/epdc-cloud-points/src/main/java/com/elink/esua/epdc/dao/PointsIntegralAdjustmentCheckDao.java new file mode 100644 index 0000000..1b943a6 --- /dev/null +++ b/epdc-cloud-points/src/main/java/com/elink/esua/epdc/dao/PointsIntegralAdjustmentCheckDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.entity.PointsIntegralAdjustmentCheckEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 积分调整审核表 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2022-03-31 + */ +@Mapper +public interface PointsIntegralAdjustmentCheckDao extends BaseDao { + +} \ No newline at end of file diff --git a/epdc-cloud-points/src/main/java/com/elink/esua/epdc/entity/PointsAdjustmentTypeEntity.java b/epdc-cloud-points/src/main/java/com/elink/esua/epdc/entity/PointsAdjustmentTypeEntity.java new file mode 100644 index 0000000..bb3540a --- /dev/null +++ b/epdc-cloud-points/src/main/java/com/elink/esua/epdc/entity/PointsAdjustmentTypeEntity.java @@ -0,0 +1,61 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.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 elink elink@elink-cn.com + * @since v1.0.0 2022-03-31 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_points_adjustment_type") +public class PointsAdjustmentTypeEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 行为调整类型code + */ + private String adjustmentTypeCode; + + /** + * 行为调整类型名称 + */ + private String adjustmentTypeName; + + /** + * 分数 + */ + private Integer point; + + /** + * 备注 + */ + private String remark; + +} \ No newline at end of file diff --git a/epdc-cloud-points/src/main/java/com/elink/esua/epdc/entity/PointsIntegralAdjustmentCheckEntity.java b/epdc-cloud-points/src/main/java/com/elink/esua/epdc/entity/PointsIntegralAdjustmentCheckEntity.java new file mode 100644 index 0000000..af4fe80 --- /dev/null +++ b/epdc-cloud-points/src/main/java/com/elink/esua/epdc/entity/PointsIntegralAdjustmentCheckEntity.java @@ -0,0 +1,111 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.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 elink elink@elink-cn.com + * @since v1.0.0 2022-03-31 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_points_integral_adjustment_check") +public class PointsIntegralAdjustmentCheckEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 用户ID + */ + private String userId; + + /** + * 用户昵称 + */ + private String nickName; + + /** + * 姓名 + */ + private String realName; + + /** + * 用户头像 + */ + private String faceImg; + + /** + * 性别(0-女,1-男) + */ + private String sex; + + /** + * 出生日期 + */ + private Date birthday; + + /** + * 手机号 + */ + private String mobile; + + /** + * 用户当前积分 + */ + private Integer points; + + /** + * 调整原因 + */ + private String adjustReason; + + /** + * 积分操作类型(0:减;1:加) + */ + private String operationType; + + /** + * 积分调整值 + */ + private Integer operatePoints; + + /** + * 积分调整类型编码 + */ + private String pointOperateTypeCode; + + /** + * 积分调整类型名称 + */ + private String pointOperateTypeName; + + /** + * 工作人员ID + */ + private String workUserId; + +} \ No newline at end of file diff --git a/epdc-cloud-points/src/main/java/com/elink/esua/epdc/excel/PointsAdjustmentTypeExcel.java b/epdc-cloud-points/src/main/java/com/elink/esua/epdc/excel/PointsAdjustmentTypeExcel.java new file mode 100644 index 0000000..b0ff1ad --- /dev/null +++ b/epdc-cloud-points/src/main/java/com/elink/esua/epdc/excel/PointsAdjustmentTypeExcel.java @@ -0,0 +1,68 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 积分调整类型分值管理表 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2022-03-31 + */ +@Data +public class PointsAdjustmentTypeExcel { + + @Excel(name = "ID") + private String id; + + @Excel(name = "行为调整类型code") + private String adjustmentTypeCode; + + @Excel(name = "行为调整类型名称") + private String adjustmentTypeName; + + @Excel(name = "分数") + private Integer point; + + @Excel(name = "备注") + private String remark; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "逻辑删除标识") + private String delFlag; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epdc-cloud-points/src/main/java/com/elink/esua/epdc/excel/PointsIntegralAdjustmentCheckExcel.java b/epdc-cloud-points/src/main/java/com/elink/esua/epdc/excel/PointsIntegralAdjustmentCheckExcel.java new file mode 100644 index 0000000..7634255 --- /dev/null +++ b/epdc-cloud-points/src/main/java/com/elink/esua/epdc/excel/PointsIntegralAdjustmentCheckExcel.java @@ -0,0 +1,98 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 积分调整审核表 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2022-03-31 + */ +@Data +public class PointsIntegralAdjustmentCheckExcel { + + @Excel(name = "ID") + private String id; + + @Excel(name = "用户ID") + private String userId; + + @Excel(name = "用户昵称") + private String nickName; + + @Excel(name = "姓名") + private String realName; + + @Excel(name = "用户头像") + private String faceImg; + + @Excel(name = "性别(0-女,1-男)") + private String sex; + + @Excel(name = "出生日期") + private Date birthday; + + @Excel(name = "手机号") + private String mobile; + + @Excel(name = "用户当前积分") + private Integer points; + + @Excel(name = "调整原因") + private String adjustReason; + + @Excel(name = "积分操作类型(0:减;1:加)") + private String operationType; + + @Excel(name = "积分调整值") + private Integer operatePoints; + + @Excel(name = "积分调整类型编码") + private String pointOperateTypeCode; + + @Excel(name = "积分调整类型名称") + private String pointOperateTypeName; + + @Excel(name = "工作人员ID") + private String workUserId; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "逻辑删除标识") + private String delFlag; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epdc-cloud-points/src/main/java/com/elink/esua/epdc/redis/PointsAdjustmentTypeRedis.java b/epdc-cloud-points/src/main/java/com/elink/esua/epdc/redis/PointsAdjustmentTypeRedis.java new file mode 100644 index 0000000..9532c2e --- /dev/null +++ b/epdc-cloud-points/src/main/java/com/elink/esua/epdc/redis/PointsAdjustmentTypeRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 积分调整类型分值管理表 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2022-03-31 + */ +@Component +public class PointsAdjustmentTypeRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epdc-cloud-points/src/main/java/com/elink/esua/epdc/redis/PointsIntegralAdjustmentCheckRedis.java b/epdc-cloud-points/src/main/java/com/elink/esua/epdc/redis/PointsIntegralAdjustmentCheckRedis.java new file mode 100644 index 0000000..bc2f675 --- /dev/null +++ b/epdc-cloud-points/src/main/java/com/elink/esua/epdc/redis/PointsIntegralAdjustmentCheckRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 积分调整审核表 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2022-03-31 + */ +@Component +public class PointsIntegralAdjustmentCheckRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epdc-cloud-points/src/main/java/com/elink/esua/epdc/service/PointsAdjustmentTypeService.java b/epdc-cloud-points/src/main/java/com/elink/esua/epdc/service/PointsAdjustmentTypeService.java new file mode 100644 index 0000000..08bee1b --- /dev/null +++ b/epdc-cloud-points/src/main/java/com/elink/esua/epdc/service/PointsAdjustmentTypeService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.dto.PointsAdjustmentTypeDTO; +import com.elink.esua.epdc.entity.PointsAdjustmentTypeEntity; + +import java.util.List; +import java.util.Map; + +/** + * 积分调整类型分值管理表 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2022-03-31 + */ +public interface PointsAdjustmentTypeService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-03-31 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-03-31 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return PointsAdjustmentTypeDTO + * @author generator + * @date 2022-03-31 + */ + PointsAdjustmentTypeDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-03-31 + */ + void save(PointsAdjustmentTypeDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-03-31 + */ + void update(PointsAdjustmentTypeDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-03-31 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epdc-cloud-points/src/main/java/com/elink/esua/epdc/service/PointsIntegralAdjustmentCheckService.java b/epdc-cloud-points/src/main/java/com/elink/esua/epdc/service/PointsIntegralAdjustmentCheckService.java new file mode 100644 index 0000000..ae564fe --- /dev/null +++ b/epdc-cloud-points/src/main/java/com/elink/esua/epdc/service/PointsIntegralAdjustmentCheckService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.dto.PointsIntegralAdjustmentCheckDTO; +import com.elink.esua.epdc.entity.PointsIntegralAdjustmentCheckEntity; + +import java.util.List; +import java.util.Map; + +/** + * 积分调整审核表 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2022-03-31 + */ +public interface PointsIntegralAdjustmentCheckService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-03-31 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-03-31 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return PointsIntegralAdjustmentCheckDTO + * @author generator + * @date 2022-03-31 + */ + PointsIntegralAdjustmentCheckDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-03-31 + */ + void save(PointsIntegralAdjustmentCheckDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-03-31 + */ + void update(PointsIntegralAdjustmentCheckDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-03-31 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epdc-cloud-points/src/main/java/com/elink/esua/epdc/service/impl/PointsAdjustmentTypeServiceImpl.java b/epdc-cloud-points/src/main/java/com/elink/esua/epdc/service/impl/PointsAdjustmentTypeServiceImpl.java new file mode 100644 index 0000000..e851d7c --- /dev/null +++ b/epdc-cloud-points/src/main/java/com/elink/esua/epdc/service/impl/PointsAdjustmentTypeServiceImpl.java @@ -0,0 +1,104 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +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.dao.PointsAdjustmentTypeDao; +import com.elink.esua.epdc.dto.PointsAdjustmentTypeDTO; +import com.elink.esua.epdc.entity.PointsAdjustmentTypeEntity; +import com.elink.esua.epdc.redis.PointsAdjustmentTypeRedis; +import com.elink.esua.epdc.service.PointsAdjustmentTypeService; +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 elink elink@elink-cn.com + * @since v1.0.0 2022-03-31 + */ +@Service +public class PointsAdjustmentTypeServiceImpl extends BaseServiceImpl implements PointsAdjustmentTypeService { + + @Autowired + private PointsAdjustmentTypeRedis pointsAdjustmentTypeRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, PointsAdjustmentTypeDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, PointsAdjustmentTypeDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public PointsAdjustmentTypeDTO get(String id) { + PointsAdjustmentTypeEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, PointsAdjustmentTypeDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(PointsAdjustmentTypeDTO dto) { + PointsAdjustmentTypeEntity entity = ConvertUtils.sourceToTarget(dto, PointsAdjustmentTypeEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(PointsAdjustmentTypeDTO dto) { + PointsAdjustmentTypeEntity entity = ConvertUtils.sourceToTarget(dto, PointsAdjustmentTypeEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epdc-cloud-points/src/main/java/com/elink/esua/epdc/service/impl/PointsIntegralAdjustmentCheckServiceImpl.java b/epdc-cloud-points/src/main/java/com/elink/esua/epdc/service/impl/PointsIntegralAdjustmentCheckServiceImpl.java new file mode 100644 index 0000000..a5d0df3 --- /dev/null +++ b/epdc-cloud-points/src/main/java/com/elink/esua/epdc/service/impl/PointsIntegralAdjustmentCheckServiceImpl.java @@ -0,0 +1,104 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +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.dao.PointsIntegralAdjustmentCheckDao; +import com.elink.esua.epdc.dto.PointsIntegralAdjustmentCheckDTO; +import com.elink.esua.epdc.entity.PointsIntegralAdjustmentCheckEntity; +import com.elink.esua.epdc.redis.PointsIntegralAdjustmentCheckRedis; +import com.elink.esua.epdc.service.PointsIntegralAdjustmentCheckService; +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 elink elink@elink-cn.com + * @since v1.0.0 2022-03-31 + */ +@Service +public class PointsIntegralAdjustmentCheckServiceImpl extends BaseServiceImpl implements PointsIntegralAdjustmentCheckService { + + @Autowired + private PointsIntegralAdjustmentCheckRedis pointsIntegralAdjustmentCheckRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, PointsIntegralAdjustmentCheckDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, PointsIntegralAdjustmentCheckDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public PointsIntegralAdjustmentCheckDTO get(String id) { + PointsIntegralAdjustmentCheckEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, PointsIntegralAdjustmentCheckDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(PointsIntegralAdjustmentCheckDTO dto) { + PointsIntegralAdjustmentCheckEntity entity = ConvertUtils.sourceToTarget(dto, PointsIntegralAdjustmentCheckEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(PointsIntegralAdjustmentCheckDTO dto) { + PointsIntegralAdjustmentCheckEntity entity = ConvertUtils.sourceToTarget(dto, PointsIntegralAdjustmentCheckEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epdc-cloud-points/src/main/resources/mapper/PointsAdjustmentTypeDao.xml b/epdc-cloud-points/src/main/resources/mapper/PointsAdjustmentTypeDao.xml new file mode 100644 index 0000000..ba1da76 --- /dev/null +++ b/epdc-cloud-points/src/main/resources/mapper/PointsAdjustmentTypeDao.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epdc-cloud-points/src/main/resources/mapper/PointsIntegralAdjustmentCheckDao.xml b/epdc-cloud-points/src/main/resources/mapper/PointsIntegralAdjustmentCheckDao.xml new file mode 100644 index 0000000..d374d8f --- /dev/null +++ b/epdc-cloud-points/src/main/resources/mapper/PointsIntegralAdjustmentCheckDao.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file