diff --git a/esua-epdc/epdc-admin/epdc-admin-server/pom.xml b/esua-epdc/epdc-admin/epdc-admin-server/pom.xml index 9230ffca..4a83d3bb 100644 --- a/esua-epdc/epdc-admin/epdc-admin-server/pom.xml +++ b/esua-epdc/epdc-admin/epdc-admin-server/pom.xml @@ -158,9 +158,9 @@ false - 47.105.119.155:8848 + 115.29.142.202:8848 - 1da17390-6495-4e16-9ec6-0b8ece18a4a0 + 9c6a1a78-690f-4cfe-833b-f8cec174c6e8 http://localhost:9411 @@ -194,16 +194,16 @@ epdc!redis@master1405 - + jinshui_epdc_test jinshui@833066 true - 47.105.119.155:8848 - 47.105.119.155 - 1da17390-6495-4e16-9ec6-0b8ece18a4a0 + 115.29.142.202:8848 + 47.104.94.220 + 9c6a1a78-690f-4cfe-833b-f8cec174c6e8 http://localhost:9411 diff --git a/esua-epdc/epdc-auth/pom.xml b/esua-epdc/epdc-auth/pom.xml index 8fac954e..e0f7b9b7 100644 --- a/esua-epdc/epdc-auth/pom.xml +++ b/esua-epdc/epdc-auth/pom.xml @@ -114,9 +114,9 @@ false - 47.105.119.155:8848 + 115.29.142.202:8848 - 1da17390-6495-4e16-9ec6-0b8ece18a4a0 + 9c6a1a78-690f-4cfe-833b-f8cec174c6e8 http://localhost:9411 @@ -135,9 +135,9 @@ true - 47.105.119.155:8848 - 47.105.119.155 - 1da17390-6495-4e16-9ec6-0b8ece18a4a0 + 115.29.142.202:8848 + 47.104.94.220 + 9c6a1a78-690f-4cfe-833b-f8cec174c6e8 http://localhost:9411 diff --git a/esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/enums/BehaviorEnum.java b/esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/enums/BehaviorEnum.java index c4e80bc8..0e8a49cc 100644 --- a/esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/enums/BehaviorEnum.java +++ b/esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/enums/BehaviorEnum.java @@ -310,7 +310,12 @@ public enum BehaviorEnum { /** * 内容评论的点踩 */ - NOTICE_COMMENT_OPPOSITION("notice_comment_opposition"); + NOTICE_COMMENT_OPPOSITION("notice_comment_opposition"), + + /** + * 话题违规,积分扣除 + */ + TOPIC_VIOLATIONS("topic_violations"); private String value; diff --git a/esua-epdc/epdc-gateway/pom.xml b/esua-epdc/epdc-gateway/pom.xml index 98838fca..7cecb02e 100644 --- a/esua-epdc/epdc-gateway/pom.xml +++ b/esua-epdc/epdc-gateway/pom.xml @@ -100,9 +100,9 @@ lb://epdc-auth-server - http://127.0.0.1:9091 - - http://127.0.0.1:9092 + + lb://epdc-admin-server + lb://epdc-activiti-server @@ -142,12 +142,11 @@ http://127.0.0.1:9078 lb://epdc-content-security-server - false - 47.105.119.155:8848 + 115.29.142.202:8848 - 1da17390-6495-4e16-9ec6-0b8ece18a4a0 + 9c6a1a78-690f-4cfe-833b-f8cec174c6e8 http://localhost:9411 @@ -193,9 +192,9 @@ lb://epdc-content-security-server true - 47.105.119.155:8848 - 47.105.119.155 - 1da17390-6495-4e16-9ec6-0b8ece18a4a0 + 115.29.142.202:8848 + 47.104.94.220 + 9c6a1a78-690f-4cfe-833b-f8cec174c6e8 http://localhost:9411 diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/user/result/DeptVolunteerResultDTO.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/user/result/DeptVolunteerResultDTO.java new file mode 100644 index 00000000..993ec5a8 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/user/result/DeptVolunteerResultDTO.java @@ -0,0 +1,59 @@ +package com.elink.esua.epdc.dto.user.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author:liuchuang + * @Date:2021/7/15 13:41 + */ +@Data +public class DeptVolunteerResultDTO implements Serializable { + private static final long serialVersionUID = 4029749279983587695L; + + /** + * 志愿者ID + */ + private String id; + + /** + * 用户ID + */ + private String userId; + + /** + * 姓名 + */ + private String realName; + + /** + * 身份证 + */ + private String identityNo; + + /** + * 手机号 + */ + private String mobile; + + /** + * 志愿者标签 + */ + private String tagName; + + /** + * 志愿者签名 + */ + private String volunteerSignature; + + /** + * 居住地址 + */ + private String address; + + /** + * 公益积分 + */ + private Integer volunteerPoints; +} diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/user/result/VolunteerPointsRecordsResultDTO.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/user/result/VolunteerPointsRecordsResultDTO.java new file mode 100644 index 00000000..b3b70183 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/user/result/VolunteerPointsRecordsResultDTO.java @@ -0,0 +1,39 @@ +package com.elink.esua.epdc.dto.user.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author:liuchuang + * @Date:2021/7/15 14:45 + */ +@Data +public class VolunteerPointsRecordsResultDTO implements Serializable { + private static final long serialVersionUID = -286937478420813680L; + + /** + * 积分记录ID + */ + private String id; + + /** + * 昵称 + */ + private String nickname; + + /** + * 活动名称 + */ + private String actName; + + /** + * 积分记录时间 + */ + private String operationTime; + + /** + * 积分 + */ + private Integer volunteerPoints; +} diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/user/result/VolunteerPointsStaticResultDTO.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/user/result/VolunteerPointsStaticResultDTO.java new file mode 100644 index 00000000..556a3c32 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/user/result/VolunteerPointsStaticResultDTO.java @@ -0,0 +1,34 @@ +package com.elink.esua.epdc.dto.user.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author:liuchuang + * @Date:2021/7/14 16:56 + */ +@Data +public class VolunteerPointsStaticResultDTO implements Serializable { + private static final long serialVersionUID = 103978565192164909L; + + /** + * 志愿者部门ID + */ + private String id; + + /** + * 志愿者部门ID + */ + private String deptName; + + /** + * 志愿者数量 + */ + private String volunteerNum; + + /** + * 志愿者公益积分总数 + */ + private String volunteerPoints; +} diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/pom.xml b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/pom.xml index 18e5c522..9411e247 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/pom.xml +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/pom.xml @@ -133,9 +133,9 @@ false - 47.105.119.155:8848 + 115.29.142.202:8848 - 1da17390-6495-4e16-9ec6-0b8ece18a4a0 + 9c6a1a78-690f-4cfe-833b-f8cec174c6e8 https://epmet-dev.elinkservice.cn/api 0398b33f845c4768a102d2ab6ebdd00b5fec222e437540428f55d1df53e6be1e @@ -162,9 +162,10 @@ true - 47.105.119.155:8848 - 47.105.119.155 - 1da17390-6495-4e16-9ec6-0b8ece18a4a0 + 115.29.142.202:8848 + 47.104.94.220 + 9c6a1a78-690f-4cfe-833b-f8cec174c6e8 + https://epmet-dev.elinkservice.cn/api 0398b33f845c4768a102d2ab6ebdd00b5fec222e437540428f55d1df53e6be1e d44a6daaea58be408bb74fe93714710f diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/controller/VolunteerPointsAnalysisCotroller.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/controller/VolunteerPointsAnalysisCotroller.java new file mode 100644 index 00000000..a880e9f3 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/controller/VolunteerPointsAnalysisCotroller.java @@ -0,0 +1,71 @@ +package com.elink.esua.epdc.modules.user.controller; + +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.user.result.DeptVolunteerResultDTO; +import com.elink.esua.epdc.dto.user.result.VolunteerPointsRecordsResultDTO; +import com.elink.esua.epdc.dto.user.result.VolunteerPointsStaticResultDTO; +import com.elink.esua.epdc.modules.user.service.VolunteerPointsAnalysisService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import java.util.Map; + +/** + * 志愿者公益积分统计 + * + * @Author:liuchuang + * @Date:2021/7/14 16:52 + */ +@RestController +@RequestMapping("volunteer") +public class VolunteerPointsAnalysisCotroller { + + @Autowired + VolunteerPointsAnalysisService volunteerPointsAnalysisService; + + /** + * PC端志愿者公益积分管理列表 + * + * @param params + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @author liuchuang + * @since 2021/7/14 17:06 + */ + @GetMapping("volunteerpointsstatic") + public Result> volunteerPointsStatic(@RequestParam Map params) { + PageData data = volunteerPointsAnalysisService.volunteerPointsStatic(params); + return new Result>().ok(data); + } + + /** + * 公益积分管理-志愿者列表 + * + * @param params + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @author liuchuang + * @since 2021/7/15 13:35 + */ + @GetMapping("volunteers") + public Result> volunteers(@RequestParam Map params) { + PageData data = volunteerPointsAnalysisService.listOfVolunteers(params); + return new Result>().ok(data); + } + + /** + * 公益积分管理-积分记录列表 + * + * @param params + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @author liuchuang + * @since 2021/7/15 13:35 + */ + @GetMapping("volunteerPointsRecords") + public Result> volunteerPointsRecords(@RequestParam Map params) { + PageData data = volunteerPointsAnalysisService.volunteerPointsRecords(params); + return new Result>().ok(data); + } +} diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/dao/VolunteerPointsAnalysisDao.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/dao/VolunteerPointsAnalysisDao.java new file mode 100644 index 00000000..5e763e0d --- /dev/null +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/dao/VolunteerPointsAnalysisDao.java @@ -0,0 +1,47 @@ +package com.elink.esua.epdc.modules.user.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.elink.esua.epdc.dto.user.result.DeptVolunteerResultDTO; +import com.elink.esua.epdc.dto.user.result.VolunteerPointsRecordsResultDTO; +import com.elink.esua.epdc.dto.user.result.VolunteerPointsStaticResultDTO; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; +import java.util.Map; + +/** + * @Author:liuchuang + * @Date:2021/7/14 17:02 + */ +@Mapper +public interface VolunteerPointsAnalysisDao extends BaseMapper { + + /** + * PC端志愿者公益积分管理列表 + * + * @param params + * @return java.util.List + * @author liuchuang + * @since 2021/7/14 17:12 + */ + List volunteerPointsStatic(Map params); + + /** + * 公益积分管理-志愿者列表 + * + * @return java.util.List + * @author liuchuang + * @since 2021/7/15 13:38 + */ + List selectListOfVolunteers(Map params); + + /** + * 公益积分管理-积分记录列表 + * + * @param params + * @return java.util.List + * @author liuchuang + * @since 2021/7/15 14:51 + */ + List volunteerPointsRecords(Map params); +} diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/service/VolunteerPointsAnalysisService.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/service/VolunteerPointsAnalysisService.java new file mode 100644 index 00000000..fb408d22 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/service/VolunteerPointsAnalysisService.java @@ -0,0 +1,45 @@ +package com.elink.esua.epdc.modules.user.service; + +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.dto.user.result.DeptVolunteerResultDTO; +import com.elink.esua.epdc.dto.user.result.VolunteerPointsRecordsResultDTO; +import com.elink.esua.epdc.dto.user.result.VolunteerPointsStaticResultDTO; + +import java.util.Map; + +/** + * @Author:liuchuang + * @Date:2021/7/14 17:00 + */ +public interface VolunteerPointsAnalysisService { + + /** + * PC端志愿者公益积分管理列表 + * + * @param params + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @author liuchuang + * @since 2021/7/14 17:06 + */ + PageData volunteerPointsStatic(Map params); + + /** + * 公益积分管理-志愿者列表 + * + * @param params + * @return com.elink.esua.epdc.commons.tools.page.PageData + * @author liuchuang + * @since 2021/7/15 13:36 + */ + PageData listOfVolunteers(Map params); + + /** + * 公益积分管理-积分记录列表 + * + * @param params + * @return com.elink.esua.epdc.commons.tools.page.PageData + * @author liuchuang + * @since 2021/7/15 14:48 + */ + PageData volunteerPointsRecords(Map params); +} diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/service/impl/VolunteerPointsAnalysisServiceImpl.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/service/impl/VolunteerPointsAnalysisServiceImpl.java new file mode 100644 index 00000000..bd6f7f44 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/service/impl/VolunteerPointsAnalysisServiceImpl.java @@ -0,0 +1,43 @@ +package com.elink.esua.epdc.modules.user.service.impl; + +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.dto.user.result.DeptVolunteerResultDTO; +import com.elink.esua.epdc.dto.user.result.VolunteerPointsRecordsResultDTO; +import com.elink.esua.epdc.dto.user.result.VolunteerPointsStaticResultDTO; +import com.elink.esua.epdc.modules.user.dao.VolunteerPointsAnalysisDao; +import com.elink.esua.epdc.modules.user.service.VolunteerPointsAnalysisService; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Map; + +/** + * @Author:liuchuang + * @Date:2021/7/14 17:00 + */ +@Service +public class VolunteerPointsAnalysisServiceImpl extends BaseServiceImpl implements VolunteerPointsAnalysisService { + + @Override + public PageData volunteerPointsStatic(Map params) { + IPage iPage = this.getPage(params); + List list = baseDao.volunteerPointsStatic(params); + return new PageData<>(list, iPage.getTotal()); + } + + @Override + public PageData listOfVolunteers(Map params) { + IPage iPage = this.getPage(params); + List list = baseDao.selectListOfVolunteers(params); + return new PageData<>(list, iPage.getTotal()); + } + + @Override + public PageData volunteerPointsRecords(Map params) { + IPage iPage = this.getPage(params); + List list = baseDao.volunteerPointsRecords(params); + return new PageData<>(list, iPage.getTotal()); + } +} diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/application-test.yml b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/application-test.yml index ddb63045..c97c5f19 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/application-test.yml +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/application-test.yml @@ -4,51 +4,51 @@ spring: driverClassName: com.mysql.jdbc.Driver druid: first: #数据源1 - url: jdbc:mysql://rm-m5eguiv2827bdye79.mysql.rds.aliyuncs.com:10001/js_esua_epdc_admin?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai + url: jdbc:mysql://rm-m5eguiv2827bdye798o.mysql.rds.aliyuncs.com:10001/js_esua_epdc_admin?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai username: jinshui_epdc_test password: jinshui@833066 second: #数据源2 - url: jdbc:mysql://rm-m5eguiv2827bdye79.mysql.rds.aliyuncs.com:10001/js_esua_epdc_api?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai + url: jdbc:mysql://rm-m5eguiv2827bdye798o.mysql.rds.aliyuncs.com:10001/js_esua_epdc_api?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai username: jinshui_epdc_test password: jinshui@833066 third: #数据源3 - url: jdbc:mysql://rm-m5eguiv2827bdye79.mysql.rds.aliyuncs.com:10001/js_esua_epdc_custom?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai + url: jdbc:mysql://rm-m5eguiv2827bdye798o.mysql.rds.aliyuncs.com:10001/js_esua_epdc_custom?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai username: jinshui_epdc_test password: jinshui@833066 fourth: #数据源4 - url: jdbc:mysql://rm-m5eguiv2827bdye79.mysql.rds.aliyuncs.com:10001/js_esua_epdc_events?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai + url: jdbc:mysql://rm-m5eguiv2827bdye798o.mysql.rds.aliyuncs.com:10001/js_esua_epdc_events?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai username: jinshui_epdc_test password: jinshui@833066 fifth: #数据源5 - url: jdbc:mysql://rm-m5eguiv2827bdye79.mysql.rds.aliyuncs.com:10001/js_esua_epdc_group?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai + url: jdbc:mysql://rm-m5eguiv2827bdye798o.mysql.rds.aliyuncs.com:10001/js_esua_epdc_group?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai username: jinshui_epdc_test password: jinshui@833066 sixth: #数据源6 - url: jdbc:mysql://rm-m5eguiv2827bdye79.mysql.rds.aliyuncs.com:10001/js_esua_epdc_job?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai + url: jdbc:mysql://rm-m5eguiv2827bdye798o.mysql.rds.aliyuncs.com:10001/js_esua_epdc_job?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai username: jinshui_epdc_test password: jinshui@833066 seventh: #数据源7 - url: jdbc:mysql://rm-m5eguiv2827bdye79.mysql.rds.aliyuncs.com:10001/js_esua_epdc_kpi?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai + url: jdbc:mysql://rm-m5eguiv2827bdye798o.mysql.rds.aliyuncs.com:10001/js_esua_epdc_kpi?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai username: jinshui_epdc_test password: jinshui@833066 eighth: #数据源8 - url: jdbc:mysql://rm-m5eguiv2827bdye79.mysql.rds.aliyuncs.com:10001/js_esua_epdc_mutuality?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai + url: jdbc:mysql://rm-m5eguiv2827bdye798o.mysql.rds.aliyuncs.com:10001/js_esua_epdc_mutuality?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai username: jinshui_epdc_test password: jinshui@833066 ninth: #数据源9 - url: jdbc:mysql://rm-m5eguiv2827bdye79.mysql.rds.aliyuncs.com:10001/js_esua_epdc_news?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai + url: jdbc:mysql://rm-m5eguiv2827bdye798o.mysql.rds.aliyuncs.com:10001/js_esua_epdc_news?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai username: jinshui_epdc_test password: jinshui@833066 tenth: #数据源10 - url: jdbc:mysql://rm-m5eguiv2827bdye79.mysql.rds.aliyuncs.com:10001/js_esua_epdc_points?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai + url: jdbc:mysql://rm-m5eguiv2827bdye798o.mysql.rds.aliyuncs.com:10001/js_esua_epdc_points?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai username: jinshui_epdc_test password: jinshui@833066 eleventh: #数据源11 - url: jdbc:mysql://rm-m5eguiv2827bdye79.mysql.rds.aliyuncs.com:10001/js_esua_epdc_user?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai + url: jdbc:mysql://rm-m5eguiv2827bdye798o.mysql.rds.aliyuncs.com:10001/js_esua_epdc_user?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai username: jinshui_epdc_test password: jinshui@833066 twelve: #数据源12 - url: jdbc:mysql://rm-m5eguiv2827bdye79.mysql.rds.aliyuncs.com:10001/js_esua_epdc_analysis?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai + url: jdbc:mysql://rm-m5eguiv2827bdye798o.mysql.rds.aliyuncs.com:10001/js_esua_epdc_analysis?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai username: jinshui_epdc_test password: jinshui@833066 initial-size: 10 diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/user/VolunteerPointsAnalysisDao.xml b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/user/VolunteerPointsAnalysisDao.xml new file mode 100644 index 00000000..3863f027 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/user/VolunteerPointsAnalysisDao.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcAppVolunteerRankFormDTO.java b/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcAppVolunteerRankFormDTO.java index 76fbac22..0a765e3e 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcAppVolunteerRankFormDTO.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcAppVolunteerRankFormDTO.java @@ -24,4 +24,9 @@ public class EpdcAppVolunteerRankFormDTO implements Serializable { */ @Min(value = 1, message = "页容量必须大于0") private Integer pageSize; + + /** + * 排序字段 0 :爱心时长 1:参与次数 2:公益积分 + */ + private String type; } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcAppVolunteerRankDTO.java b/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcAppVolunteerRankDTO.java index d589c4f9..fdc0f5d9 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcAppVolunteerRankDTO.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcAppVolunteerRankDTO.java @@ -63,6 +63,19 @@ public class EpdcAppVolunteerRankDTO implements Serializable { */ private Integer participationNum; + /** + * 志愿者部门ID + */ + private String volunteerDeptId; + /** + * 志愿者公益积分 + */ + private Integer volunteerPoints; + /** + * 志愿公益累计积分 + */ + private Integer volunteerPointsTotal; + -} \ No newline at end of file +} diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcCompleteUserInfoDTO.java b/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcCompleteUserInfoDTO.java index 469cfea3..a380c7dd 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcCompleteUserInfoDTO.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcCompleteUserInfoDTO.java @@ -98,4 +98,9 @@ public class EpdcCompleteUserInfoDTO implements Serializable { * 志愿者标签 */ private String volunteerTagId; + + /** + * 志愿者所属部门 + */ + private String volunteerDeptId; } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/pom.xml b/esua-epdc/epdc-module/epdc-api/epdc-api-server/pom.xml index 4c0ccb28..f4df5545 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/pom.xml +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/pom.xml @@ -167,10 +167,11 @@ jinshui_epdc_test jinshui@833066 + false - 47.105.119.155:8848 + 115.29.142.202:8848 - 1da17390-6495-4e16-9ec6-0b8ece18a4a0 + 9c6a1a78-690f-4cfe-833b-f8cec174c6e8 wx3ef8f2cd12a19fcb @@ -213,15 +214,16 @@ epdc!redis@master1405 - + jinshui_epdc_test jinshui@833066 + true - 47.105.119.155:8848 - 47.105.119.155 - 1da17390-6495-4e16-9ec6-0b8ece18a4a0 + 115.29.142.202:8848 + 47.104.94.220 + 9c6a1a78-690f-4cfe-833b-f8cec174c6e8 wx3ef8f2cd12a19fcb diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiAppUserController.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiAppUserController.java index 49fd6fa1..b7a5688a 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiAppUserController.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiAppUserController.java @@ -426,4 +426,16 @@ public class ApiAppUserController { public Result> getVolunteerTags() { return appUserService.listOfVolunteerTags(); } + + /** + * 志愿者部门 + * + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @author liuchuang + * @since 2021/7/14 14:47 + */ + @GetMapping("volunteer/depts") + public Result> getVolunteerDepts() { + return appUserService.listOfVolunteerDepts(); + } } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClient.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClient.java index 35dd202b..da2ad4f6 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClient.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClient.java @@ -623,6 +623,17 @@ public interface UserFeignClient { */ @GetMapping("app-user/epdc-app/volunteerinfo/tags") Result> getVolunteerTags(); + + /** + * 志愿者部门 + * + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @author liuchuang + * @since 2021/7/14 14:49 + */ + @GetMapping("app-user/epdc-app/volunteerinfo/depts") + Result> getVolunteerDepts(); + /** * @Description 检查用户重复信息 * @Author songyunpeng diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/UserFeignClientFallback.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/UserFeignClientFallback.java index dfaa177e..1966b7a6 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/UserFeignClientFallback.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/UserFeignClientFallback.java @@ -303,6 +303,11 @@ public class UserFeignClientFallback implements UserFeignClient { return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "getVolunteerTags", null); } + @Override + public Result> getVolunteerDepts() { + return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "getVolunteerDepts", null); + } + @Override public Result checkRepeatUser(CheckRepeatUserFormDTO checkRepeatUserFormDTO) { return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "checkRepeatUser", checkRepeatUserFormDTO); diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AppUserService.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AppUserService.java index a7a59c10..8a09ccc5 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AppUserService.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AppUserService.java @@ -411,6 +411,14 @@ public interface AppUserService { * @since 2021/1/25 15:03 */ Result> listOfVolunteerTags(); + /** + * 志愿者部门 + * + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @author liuchuang + * @since 2021/7/14 14:47 + */ + Result> listOfVolunteerDepts(); /** * @Description 获取居民信息采集总览数据 - 街道 * @Author songyunpeng diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java index 9214f96a..ee7c3441 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java @@ -948,6 +948,7 @@ public class AppUserServiceImpl implements AppUserService { dto.setVolunteerSignature(volunteerInfoDTO.getData().getVolunteerSignature()); dto.setIntroduce(volunteerInfoDTO.getData().getIntroduce()); dto.setVolunteerTagId(volunteerInfoDTO.getData().getTagId()); + dto.setVolunteerDeptId(volunteerInfoDTO.getData().getVolunteerDeptId()); // 如果用户表的身份证号为空,则尝试使用志愿者表中的身份证 if (null == dto.getIdentityNo() || "".equals(dto.getIdentityNo())) { dto.setIdentityNo(volunteerInfoDTO.getData().getIdentityNo()); @@ -1744,6 +1745,11 @@ public class AppUserServiceImpl implements AppUserService { return userFeignClient.getVolunteerTags(); } + @Override + public Result> listOfVolunteerDepts() { + return userFeignClient.getVolunteerDepts(); + } + @Override public Result getPopulationInfoOverview() { return userFeignClient.getPopulationInfoOverview(); diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/pom.xml b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/pom.xml index 6b9b1ce6..ae497bd8 100644 --- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/pom.xml +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/pom.xml @@ -151,11 +151,11 @@ jinshui@833066 false - 47.105.119.155:8848 + 115.29.142.202:8848 - 1da17390-6495-4e16-9ec6-0b8ece18a4a0 + 9c6a1a78-690f-4cfe-833b-f8cec174c6e8 47.104.85.99:9876;114.215.125.123:9876 @@ -178,15 +178,15 @@ epdc!redis@master1405 - + jinshui_epdc_test jinshui@833066 true - 47.105.119.155:8848 - 47.105.119.155 - 1da17390-6495-4e16-9ec6-0b8ece18a4a0 + 115.29.142.202:8848 + 47.104.94.220 + 9c6a1a78-690f-4cfe-833b-f8cec174c6e8 47.104.85.99:9876;114.215.125.123:9876 jinshui-organizationGroup diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/pom.xml b/esua-epdc/epdc-module/epdc-events/epdc-events-server/pom.xml index 2e409f54..83990a6f 100644 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/pom.xml +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/pom.xml @@ -171,9 +171,9 @@ jinshui@833066 false - 47.105.119.155:8848 + 115.29.142.202:8848 - 1da17390-6495-4e16-9ec6-0b8ece18a4a0 + 9c6a1a78-690f-4cfe-833b-f8cec174c6e8 dev @@ -215,15 +215,15 @@ epdc!redis@master1405 - + jinshui_epdc_test jinshui@833066 true - 47.105.119.155:8848 - 47.105.119.155 - 1da17390-6495-4e16-9ec6-0b8ece18a4a0 + 115.29.142.202:8848 + 47.104.94.220 + 9c6a1a78-690f-4cfe-833b-f8cec174c6e8 test diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/EpdcVolunteerRankDTO.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/EpdcVolunteerRankDTO.java index c847ccd6..2205f6b6 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/EpdcVolunteerRankDTO.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/EpdcVolunteerRankDTO.java @@ -63,6 +63,17 @@ public class EpdcVolunteerRankDTO implements Serializable { */ private Integer participationNum; + /** + * 志愿者部门ID + */ + private String volunteerDeptId; + /** + * 志愿者公益积分 + */ + private Integer volunteerPoints; + /** + * 志愿公益累计积分 + */ + private Integer volunteerPointsTotal; - -} \ No newline at end of file +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/pom.xml b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/pom.xml index 43363614..b59a9355 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/pom.xml +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/pom.xml @@ -168,10 +168,11 @@ jinshui_epdc_test jinshui@833066 + false - 47.105.119.155:8848 + 115.29.142.202:8848 - 1da17390-6495-4e16-9ec6-0b8ece18a4a0 + 9c6a1a78-690f-4cfe-833b-f8cec174c6e8 47.104.85.99:9876;114.215.125.123:9876 jinshui-contentSecurityGroup @@ -193,15 +194,16 @@ epdc!redis@master1405 - + jinshui_epdc_test jinshui@833066 + true - 47.105.119.155:8848 - 47.105.119.155 - 1da17390-6495-4e16-9ec6-0b8ece18a4a0 + 115.29.142.202:8848 + 47.104.94.220 + 9c6a1a78-690f-4cfe-833b-f8cec174c6e8 47.104.85.99:9876;114.215.125.123:9876 jinshui-contentSecurityGroup diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActUserClockLogServiceImpl.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActUserClockLogServiceImpl.java index 1304ab11..72a8f7c0 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActUserClockLogServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActUserClockLogServiceImpl.java @@ -46,8 +46,8 @@ import com.elink.esua.epdc.dto.PointsLogsDTO; import com.elink.esua.epdc.dto.UserDTO; import com.elink.esua.epdc.dto.VolunteerInfoDTO; import com.elink.esua.epdc.dto.epdc.form.EpdcInformationFormDTO; -import com.elink.esua.epdc.dto.epdc.form.EpdcUserPointsFormDTO; import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerKindnessTimeFormDTO; +import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerPointsFormDTO; import com.elink.esua.epdc.dto.result.BehaviorResultDto; import com.elink.esua.epdc.modules.activity.dao.ActUserClockLogDao; import com.elink.esua.epdc.modules.activity.entity.ActInfoEntity; @@ -279,13 +279,14 @@ public class ActUserClockLogServiceImpl extends BaseServiceImpl result = userInfoFeignClient.handleUserPoints(userPointsFormDTO); + EpdcVolunteerPointsFormDTO volunteerPointsFormDTO = new EpdcVolunteerPointsFormDTO(); + volunteerPointsFormDTO.setVolunteerId(volunteerInfoDTOResult.getData().getId()); + volunteerPointsFormDTO.setPoints(actInfoDTO.getReward()); + volunteerPointsFormDTO.setOperationType(PointsOperationEnum.OPERATION_TYPE_ADD.getOperationType()); + //2021-07-14 更新为不增加用户积分 增加志愿者公益积分 + Result result = userInfoFeignClient.handleVolunteerPoints(volunteerPointsFormDTO); if (!result.success()) { - throw new RenException("更新用户积分异常"); + throw new RenException("更新志愿者公益积分异常"); } return new Result(); } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActUserRelationServiceImpl.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActUserRelationServiceImpl.java index 01be80a9..01ba9b0c 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActUserRelationServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActUserRelationServiceImpl.java @@ -44,7 +44,7 @@ import com.elink.esua.epdc.dto.PointsLogsDTO; import com.elink.esua.epdc.dto.UserDTO; import com.elink.esua.epdc.dto.VolunteerInfoDTO; import com.elink.esua.epdc.dto.epdc.form.EpdcInformationFormDTO; -import com.elink.esua.epdc.dto.epdc.form.EpdcUserPointsFormDTO; +import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerPointsFormDTO; import com.elink.esua.epdc.dto.form.EpdcClockListV2FormDTO; import com.elink.esua.epdc.dto.result.BehaviorResultDto; import com.elink.esua.epdc.modules.activity.dao.ActInfoDao; @@ -333,15 +333,7 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl result = userInfoFeignClient.handleUserPoints(userPointsFormDTO); - if (!result.success()) { - throw new RenException("更新用户积分异常"); - } + //5、插入epdc_act_user_points_log记录 ActUserPointsLogDTO actUserPointsLogDTO = new ActUserPointsLogDTO(); actUserPointsLogDTO.setActUserId(actUserRelationDTO.getId()); @@ -365,7 +357,11 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl userById = userInfoFeignClient.getUserInfoById(actUserRelationDTO.getUserId()); + if (!userById.success()) { + throw new RenException("获取用户信息失败"); + } + pointsLogsDTO.setLavePoints(userById.getData().getPoints() + actInfoDTO.getReward());//剩余积分值 pointsLogsDTO.setBehaviorCode(BehaviorEnum.BREAK_PROMISE.getValue());//积分行为编码 pointsLogsDTO.setReferenceId(actUserPointsLog.getId()); //积分日志描述 @@ -386,6 +382,15 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl getUserGridIdByUserId(@PathVariable String userId); + /** + * @Description 更新志愿者积分 + * @Author songyunpeng + * @Date 2021/7/14 + * @Param [formDTO] + * @return com.elink.esua.epdc.commons.tools.utils.Result + **/ + @PostMapping(value = "app-user/volunteerinfo/handleVolunteerPoints", consumes = MediaType.APPLICATION_JSON_VALUE) + Result handleVolunteerPoints(EpdcVolunteerPointsFormDTO formDTO); + } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/fallback/UserInfoFeignClientFallback.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/fallback/UserInfoFeignClientFallback.java index f8ecedae..cfb9419a 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/fallback/UserInfoFeignClientFallback.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/fallback/UserInfoFeignClientFallback.java @@ -8,6 +8,7 @@ import com.elink.esua.epdc.dto.VolunteerInfoDTO; import com.elink.esua.epdc.dto.epdc.form.EpdcUserPointsFormDTO; import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerKindnessTimeFormDTO; import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerKindnessTimeUpdateFormDTO; +import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerPointsFormDTO; import com.elink.esua.epdc.modules.feign.UserInfoFeignClient; import org.springframework.stereotype.Component; @@ -55,4 +56,9 @@ public class UserInfoFeignClientFallback implements UserInfoFeignClient { public Result getUserGridIdByUserId(String userId) { return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "getUserGridIdByUserId", userId); } + + @Override + public Result handleVolunteerPoints(EpdcVolunteerPointsFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "handleVolunteerPoints", formDTO); + } } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerRankDao.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerRankDao.java index d1b41fad..19dd1499 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerRankDao.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerRankDao.java @@ -22,7 +22,6 @@ import com.elink.esua.epdc.dto.form.EpdcAppVolunteerRankFormDTO; import com.elink.esua.epdc.modules.volunteer.entity.VolunteerRankEntity; import com.elink.esua.epdc.volunteer.EpdcVolunteerRankDTO; import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; import java.util.List; @@ -39,7 +38,7 @@ public interface VolunteerRankDao extends BaseDao { * @Author wanggongfeng * @return */ - List leaderboard(@Param("formDto") EpdcAppVolunteerRankFormDTO formDto); + List leaderboard(EpdcAppVolunteerRankFormDTO formDto); /** * @Description 清空排行榜数据 * @Author songyunpeng diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerRankEntity.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerRankEntity.java index 6f95006f..41873d93 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerRankEntity.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerRankEntity.java @@ -87,5 +87,17 @@ public class VolunteerRankEntity extends BaseEpdcEntity { * 是否显示(0-不显示,1-显示) */ private String showFlag; + /** + * 志愿者部门ID + */ + private String volunteerDeptId; + /** + * 志愿者公益积分 + */ + private Integer volunteerPoints; + /** + * 志愿公益累计积分 + */ + private Integer volunteerPointsTotal; -} \ No newline at end of file +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerRankServiceImpl.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerRankServiceImpl.java index 569ac3d6..1b91f67c 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerRankServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerRankServiceImpl.java @@ -115,6 +115,9 @@ public class VolunteerRankServiceImpl extends BaseServiceImpl leaderboard(EpdcAppVolunteerRankFormDTO formDto){ int pageIndex = (formDto.getPageIndex() - NumConstant.ONE) * formDto.getPageSize(); formDto.setPageIndex(pageIndex); + if(StringUtils.isBlank(formDto.getType())){ + formDto.setType("0"); + } return baseDao.leaderboard(formDto); } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerRankDao.xml b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerRankDao.xml index 52d48209..5757e5da 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerRankDao.xml +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerRankDao.xml @@ -24,11 +24,20 @@ delete from epdc_volunteer_rank diff --git a/esua-epdc/epdc-module/epdc-job/epdc-job-server/pom.xml b/esua-epdc/epdc-module/epdc-job/epdc-job-server/pom.xml index c88cd9ee..9cc00ddf 100644 --- a/esua-epdc/epdc-module/epdc-job/epdc-job-server/pom.xml +++ b/esua-epdc/epdc-module/epdc-job/epdc-job-server/pom.xml @@ -158,9 +158,9 @@ jinshui@833066 false - 47.105.119.155:8848 + 115.29.142.202:8848 - 1da17390-6495-4e16-9ec6-0b8ece18a4a0 + 9c6a1a78-690f-4cfe-833b-f8cec174c6e8 @@ -177,15 +177,15 @@ epdc!redis@master1405 - + jinshui_epdc_test jinshui@833066 true - 47.105.119.155:8848 - 47.105.119.155 - 1da17390-6495-4e16-9ec6-0b8ece18a4a0 + 115.29.142.202:8848 + 47.104.94.220 + 9c6a1a78-690f-4cfe-833b-f8cec174c6e8 diff --git a/esua-epdc/epdc-module/epdc-message/epdc-message-server/pom.xml b/esua-epdc/epdc-module/epdc-message/epdc-message-server/pom.xml index bc339f72..d3b7775c 100644 --- a/esua-epdc/epdc-module/epdc-message/epdc-message-server/pom.xml +++ b/esua-epdc/epdc-module/epdc-message/epdc-message-server/pom.xml @@ -158,9 +158,9 @@ jinshui@833066 false - 47.105.119.155:8848 + 115.29.142.202:8848 - 1da17390-6495-4e16-9ec6-0b8ece18a4a0 + 9c6a1a78-690f-4cfe-833b-f8cec174c6e8 @@ -177,15 +177,15 @@ epdc!redis@master1405 - + jinshui_epdc_test jinshui@833066 true - 47.105.119.155:8848 - 47.105.119.155 - 1da17390-6495-4e16-9ec6-0b8ece18a4a0 + 115.29.142.202:8848 + 47.104.94.220 + 9c6a1a78-690f-4cfe-833b-f8cec174c6e8 diff --git a/esua-epdc/epdc-module/epdc-news/epdc-news-server/pom.xml b/esua-epdc/epdc-module/epdc-news/epdc-news-server/pom.xml index 8b0a2a80..7a323ba3 100644 --- a/esua-epdc/epdc-module/epdc-news/epdc-news-server/pom.xml +++ b/esua-epdc/epdc-module/epdc-news/epdc-news-server/pom.xml @@ -129,9 +129,9 @@ jinshui@833066 false - 47.105.119.155:8848 + 115.29.142.202:8848 - 1da17390-6495-4e16-9ec6-0b8ece18a4a0 + 9c6a1a78-690f-4cfe-833b-f8cec174c6e8 47.104.85.99:9876;114.215.125.123:9876 jinshui-organizationGroup @@ -151,15 +151,15 @@ epdc!redis@master1405 - + jinshui_epdc_test jinshui@833066 true - 47.105.119.155:8848 - 47.105.119.155 - 1da17390-6495-4e16-9ec6-0b8ece18a4a0 + 115.29.142.202:8848 + 47.104.94.220 + 9c6a1a78-690f-4cfe-833b-f8cec174c6e8 47.104.85.99:9876;114.215.125.123:9876 jinshui-organizationGroup diff --git a/esua-epdc/epdc-module/epdc-oss/epdc-oss-server/pom.xml b/esua-epdc/epdc-module/epdc-oss/epdc-oss-server/pom.xml index 933acb73..b83debbd 100644 --- a/esua-epdc/epdc-module/epdc-oss/epdc-oss-server/pom.xml +++ b/esua-epdc/epdc-module/epdc-oss/epdc-oss-server/pom.xml @@ -171,9 +171,9 @@ jinshui@833066 false - 47.105.119.155:8848 + 115.29.142.202:8848 - 1da17390-6495-4e16-9ec6-0b8ece18a4a0 + 9c6a1a78-690f-4cfe-833b-f8cec174c6e8 @@ -192,15 +192,15 @@ epdc!redis@master1405 - + jinshui_epdc_test jinshui@833066 true - 47.105.119.155:8848 - 47.105.119.155 - 1da17390-6495-4e16-9ec6-0b8ece18a4a0 + 115.29.142.202:8848 + 47.104.94.220 + 9c6a1a78-690f-4cfe-833b-f8cec174c6e8 diff --git a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/pom.xml b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/pom.xml index 434c5716..d780c08d 100644 --- a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/pom.xml +++ b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/pom.xml @@ -150,10 +150,11 @@ jinshui_epdc_test jinshui@833066 + false - 47.105.119.155:8848 + 115.29.142.202:8848 - 1da17390-6495-4e16-9ec6-0b8ece18a4a0 + 9c6a1a78-690f-4cfe-833b-f8cec174c6e8 47.104.85.99:9876;114.215.125.123:9876 jinshui-contentSecurityGroup @@ -175,15 +176,16 @@ epdc!redis@master1405 - + jinshui_epdc_test jinshui@833066 + true - 47.105.119.155:8848 - 47.105.119.155 - 1da17390-6495-4e16-9ec6-0b8ece18a4a0 + 115.29.142.202:8848 + 47.104.94.220 + 9c6a1a78-690f-4cfe-833b-f8cec174c6e8 47.104.85.99:9876;114.215.125.123:9876 jinshui-contentSecurityGroup diff --git a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/feign/PointsFeignClient.java b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/feign/PointsFeignClient.java new file mode 100644 index 00000000..bc4d875f --- /dev/null +++ b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/feign/PointsFeignClient.java @@ -0,0 +1,25 @@ +package com.elink.esua.epdc.feign; + +import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.feign.fallback.PointsFeignClientFallback; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.PostMapping; + +import java.util.List; + +/** + * 积分管理模块 + * + * @author work@yujt.net.cn + * @date 2019/9/18 15:37 + */ +@FeignClient(name = ServiceConstant.EPDC_POINTS_SERVER, fallback = PointsFeignClientFallback.class) +public interface PointsFeignClient { + + + @PostMapping(value = "points/pointslogs/deletePointsByReferenceId", consumes = MediaType.APPLICATION_JSON_VALUE) + Result deletePointsByTopic(List topicIdList); + +} diff --git a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/feign/fallback/PointsFeignClientFallback.java b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/feign/fallback/PointsFeignClientFallback.java new file mode 100644 index 00000000..37b827a5 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/feign/fallback/PointsFeignClientFallback.java @@ -0,0 +1,23 @@ +package com.elink.esua.epdc.feign.fallback; + +import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; +import com.elink.esua.epdc.commons.tools.utils.ModuleUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.PointsLogsBindUnIdDTO; +import com.elink.esua.epdc.feign.PointsFeignClient; +import org.springframework.stereotype.Component; + +import java.util.List; + +/** + * @author work@yujt.net.cn + * @date 2019/9/18 15:38 + */ +@Component +public class PointsFeignClientFallback implements PointsFeignClient { + + @Override + public Result deletePointsByTopic(List topicIdList) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_POINTS_SERVER, "deletePointsByTopic", topicIdList); + } +} diff --git a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyTopicServiceImpl.java b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyTopicServiceImpl.java index 13e8440c..e713aabe 100644 --- a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyTopicServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyTopicServiceImpl.java @@ -47,6 +47,7 @@ import com.elink.esua.epdc.entity.PartyTopicEntity; import com.elink.esua.epdc.entity.PartyTopicUserAttitudeEntity; import com.elink.esua.epdc.feign.AdminFeignClient; import com.elink.esua.epdc.feign.ContentSecurityFeignClient; +import com.elink.esua.epdc.feign.PointsFeignClient; import com.elink.esua.epdc.rocketmq.dto.OrganizationModifyDTO; import com.elink.esua.epdc.rocketmq.dto.RejectRecordDTO; import com.elink.esua.epdc.service.PartyTopicImgService; @@ -90,6 +91,10 @@ public class PartyTopicServiceImpl extends BaseServiceImpl page(Map params) { IPage page = baseDao.selectPage( @@ -162,6 +167,7 @@ public class PartyTopicServiceImpl extends BaseServiceImpljinshui_epdc_test jinshui@833066 + false - 47.105.119.155:8848 + 115.29.142.202:8848 - 1da17390-6495-4e16-9ec6-0b8ece18a4a0 + 9c6a1a78-690f-4cfe-833b-f8cec174c6e8 114.215.125.123:9876 jinshui-pointsGroup @@ -175,15 +176,16 @@ epdc!redis@master1405 - + jinshui_epdc_test jinshui@833066 + true - 47.105.119.155:8848 - 47.105.119.155 - 1da17390-6495-4e16-9ec6-0b8ece18a4a0 + 115.29.142.202:8848 + 47.104.94.220 + 9c6a1a78-690f-4cfe-833b-f8cec174c6e8 114.215.125.123:9876 jinshui-pointsGroup diff --git a/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/controller/PointsLogsController.java b/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/controller/PointsLogsController.java index dda59d3b..f61ae76f 100755 --- a/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/controller/PointsLogsController.java +++ b/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/controller/PointsLogsController.java @@ -181,4 +181,16 @@ public class PointsLogsController { return pointsLogsService.maBindUnIdLogs(formDto); } + /** + * @Description 话题积分恶意刷分 积分调整 + * @Author songyunpeng + * @Date 2021/7/15 + * @Param [idList] + * @return com.elink.esua.epdc.commons.tools.utils.Result + **/ + @PostMapping("deletePointsByReferenceId") + public Result deletePointsByTopic(@RequestBody List idList) { + return pointsLogsService.deletePointsByTopic(idList); + } + } diff --git a/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/feign/UsersFeignClient.java b/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/feign/UsersFeignClient.java index 47d41623..eee0e501 100644 --- a/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/feign/UsersFeignClient.java +++ b/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/feign/UsersFeignClient.java @@ -8,7 +8,12 @@ import com.elink.esua.epdc.dto.epdc.form.EpdcUserPointsFormDTO; import com.elink.esua.epdc.feign.fallback.UsersFeignClientFallback; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.http.MediaType; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; + +import java.util.List; /** @@ -38,6 +43,16 @@ public interface UsersFeignClient { @PostMapping(value = "app-user/user/updateUserPoints", consumes = MediaType.APPLICATION_JSON_VALUE) Result updateUserPoints(@RequestBody EpdcUserPointsFormDTO epdcUserPointsFormDTO); + /** + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @Description 批量更新用户积分信息 + * @Author songyunpeng + * @Date 2020/4/29 + * @Param [dto] + **/ + @PostMapping(value = "app-user/user/updateBatchUserPoints", consumes = MediaType.APPLICATION_JSON_VALUE) + Result updateBatchUserPoints(@RequestBody List epdcUserPointsFormDTO); + /** * @param formDTO * @return com.elink.esua.epdc.dto.UserDTO diff --git a/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/feign/fallback/UsersFeignClientFallback.java b/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/feign/fallback/UsersFeignClientFallback.java index ef21e6da..190bd604 100644 --- a/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/feign/fallback/UsersFeignClientFallback.java +++ b/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/feign/fallback/UsersFeignClientFallback.java @@ -9,6 +9,8 @@ import com.elink.esua.epdc.dto.epdc.form.EpdcUserPointsFormDTO; import com.elink.esua.epdc.feign.UsersFeignClient; import org.springframework.stereotype.Component; +import java.util.List; + /** * @author songyunpeng * @date 2020/4/28 9:30 @@ -26,6 +28,11 @@ public class UsersFeignClientFallback implements UsersFeignClient { return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "updateUserPoints", epdcUserPointsFormDTO); } + @Override + public Result updateBatchUserPoints(List epdcUserPointsFormDTO) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "updateBatchUserPoints", epdcUserPointsFormDTO); + } + @Override public Result handleUserPoints(EpdcUserPointsFormDTO formDTO) { return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "handleUserPoints", formDTO); diff --git a/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/service/PointsLogsService.java b/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/service/PointsLogsService.java index 2e8dc356..05e6a16a 100755 --- a/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/service/PointsLogsService.java +++ b/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/service/PointsLogsService.java @@ -245,4 +245,12 @@ public interface PointsLogsService extends BaseService { Result maBindUnIdLogs(PointsLogsBindUnIdDTO formDto); Result test(); + /** + * @Description 话题积分恶意刷分 积分调整 + * @Author songyunpeng + * @Date 2021/7/15 + * @Param [idList] + * @return com.elink.esua.epdc.commons.tools.utils.Result + **/ + Result deletePointsByTopic(List idList); } diff --git a/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/service/impl/PointsLogsServiceImpl.java b/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/service/impl/PointsLogsServiceImpl.java index 1d577fa1..1b815ac6 100755 --- a/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/service/impl/PointsLogsServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/service/impl/PointsLogsServiceImpl.java @@ -24,6 +24,7 @@ import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; import com.elink.esua.epdc.commons.tools.constant.FieldConstant; import com.elink.esua.epdc.commons.tools.constant.NumConstant; import com.elink.esua.epdc.commons.tools.constant.PointsConstant; +import com.elink.esua.epdc.commons.tools.enums.BehaviorEnum; import com.elink.esua.epdc.commons.tools.enums.pointsenum.PointsOperationEnum; import com.elink.esua.epdc.commons.tools.enums.pointsenum.PointsOperationModeEnum; import com.elink.esua.epdc.commons.tools.exception.RenException; @@ -55,6 +56,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.*; +import java.util.stream.Collectors; /** * 积分记录表 积分记录表 @@ -562,6 +564,81 @@ public class PointsLogsServiceImpl extends BaseServiceImpl idList) { + if(idList.size() == 0){ + return new Result().error(); + } + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.in("REFERENCE_ID",idList); + List pointsLogsEntities = baseDao.selectList(queryWrapper); + if(pointsLogsEntities.size() == 0) { + return new Result(); + } + //组装 用户 - 扣减积分 + List epdcUserPointsFormDTOList = new ArrayList<>(); + //整理epdcUserPointsFormDTOList为 用户ID - 用户扣除的总分 + Map collect = pointsLogsEntities.stream().collect(Collectors.groupingBy(PointsLogsEntity::getUserId, Collectors.summarizingInt(PointsLogsEntity::getPoints))); + collect.forEach((k, v) -> { + EpdcUserPointsFormDTO epdcUserPointsFormDTO = new EpdcUserPointsFormDTO(); + epdcUserPointsFormDTO.setUserId(k); + epdcUserPointsFormDTO.setPoints(-Integer.parseInt(String.valueOf(v.getSum()))); + epdcUserPointsFormDTOList.add(epdcUserPointsFormDTO); + }); + //新增扣除积分记录: + insertTopicPointsLog(epdcUserPointsFormDTOList); + //扣除用户表相应积分 + usersFeignClient.updateBatchUserPoints(epdcUserPointsFormDTOList); + return new Result(); + } + /** + * @Description 新增扣除积分记录 + * @Author songyunpeng + * @Date 2021/7/15 + * @Param [epdcUserPointsFormDTOList] + * @return void + **/ + private void insertTopicPointsLog(List formDTOS) { + for (EpdcUserPointsFormDTO formDto : formDTOS) { + //根据动作编码获取动作信息 + Result behaviorCodeInfoByBehaviorCode = pointsBehaviorService.getBehaviorCodeInfoByBehaviorCode(BehaviorEnum.TOPIC_VIOLATIONS.getValue()); + Result userById = usersFeignClient.getUserById(formDto.getUserId()); + if(!userById.success()){ + throw new RenException("扣除话题积分记录 - 获取用户信息失败"); + } + UserDTO userDto = userById.getData(); + PointsLogsEntity pointsLogsEntity = new PointsLogsEntity(); + pointsLogsEntity.setUserId(formDto.getUserId()); + pointsLogsEntity.setNickname(userDto.getNickname()); + pointsLogsEntity.setFaceImg(userDto.getFaceImg()); + pointsLogsEntity.setOperationTime(new Date()); + pointsLogsEntity.setOperationMode(PointsOperationModeEnum.OPERATION_MODE_ADMIN.getOperationMode()); + pointsLogsEntity.setRuleCode(PointsConstant.behaviorCodeCode); + pointsLogsEntity.setBehaviorCode(BehaviorEnum.TOPIC_VIOLATIONS.getValue()); + pointsLogsEntity.setOperationDesc(behaviorCodeInfoByBehaviorCode.getData().getBehaviorDesc()); + pointsLogsEntity.setPoints(-formDto.getPoints()); + pointsLogsEntity.setOperationType("0"); + pointsLogsEntity.setReferenceId(formDto.getUserId()); + pointsLogsEntity.setLavePoints(userDto.getPoints() + formDto.getPoints()); + pointsLogsEntity.setRemark(""); + pointsLogsEntity.setRealName(userDto.getRealName()); + + // 赋值积分所属部门 + Result userGridIdByUserId = usersFeignClient.getUserGridIdByUserId(formDto.getUserId()); + Result parentAndAllDept = adminFeignClient.getParentAndAllDept(userGridIdByUserId.getData()); + ParentAndAllDeptDTO parentAndAllDeptDTO = parentAndAllDept.getData(); + pointsLogsEntity.setGrid(parentAndAllDeptDTO.getGrid()); + pointsLogsEntity.setGridId(parentAndAllDeptDTO.getGridId()); + pointsLogsEntity.setAllDeptIds(parentAndAllDeptDTO.getAllDeptIds()); + pointsLogsEntity.setAllDeptNames(parentAndAllDeptDTO.getAllDeptNames()); + pointsLogsEntity.setParentDeptIds(parentAndAllDeptDTO.getParentDeptIds()); + pointsLogsEntity.setParentDeptNames(parentAndAllDeptDTO.getParentDeptNames()); + + insert(pointsLogsEntity); + } + + } + private void insertLogs() { PointsLogsEntity entity = new PointsLogsEntity(); entity.setUserId("f093eaa6b6ace23b631e2e61e02b9e58"); diff --git a/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/resources/mapper/PointsLogsDao.xml b/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/resources/mapper/PointsLogsDao.xml index 2ad48004..89f51559 100755 --- a/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/resources/mapper/PointsLogsDao.xml +++ b/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/resources/mapper/PointsLogsDao.xml @@ -33,7 +33,7 @@ FROM epdc_points_logs l WHERE l.DEL_FLAG = 0 - AND l.USER_ID = #{userId} + AND l.USER_ID = #{userId} and BEHAVIOR_CODE != 'join_act' ORDER BY l.OPERATION_TIME DESC LIMIT #{pageIndex}, #{pageSize} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerDeptDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerDeptDTO.java new file mode 100644 index 00000000..d15f4048 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerDeptDTO.java @@ -0,0 +1,86 @@ +/** + * 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.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 志愿者部门管理 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-07-14 + */ +@Data +public class VolunteerDeptDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * id + */ + private String id; + + /** + * 部门名称 + */ + private String deptName; + + /** + * 排序 + */ + private Integer sort; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + /** + * 删除标记:0-否,1-是 + */ + private String delFlag; + + /** + * 启用标识 0:否,1:是 + */ + private String enableFlag; + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerInfoDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerInfoDTO.java index 914d6be1..69c1ce96 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerInfoDTO.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerInfoDTO.java @@ -222,4 +222,14 @@ public class VolunteerInfoDTO implements Serializable { * 志愿者标签ID */ private String tagId; + + /** + * 志愿者部门ID + */ + private String volunteerDeptId; + + /** + * 志愿者部门名称 + */ + private String DeptName; } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcCompleteVolunteerInfoFormDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcCompleteVolunteerInfoFormDTO.java index ae136f24..f6a0cf22 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcCompleteVolunteerInfoFormDTO.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcCompleteVolunteerInfoFormDTO.java @@ -103,5 +103,10 @@ public class EpdcCompleteVolunteerInfoFormDTO implements Serializable { */ private String sex; + /** + * 志愿者部门 + */ + private String volunteerDept; + } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcVolunteerPointsFormDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcVolunteerPointsFormDTO.java new file mode 100644 index 00000000..dca7bfed --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcVolunteerPointsFormDTO.java @@ -0,0 +1,32 @@ +package com.elink.esua.epdc.dto.epdc.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; + +/** + * @Description 根据操作类型更新志愿者积分 入参DTO + * @Author syp + * @Date 2019/12/13 13:57 + */ +@Data +public class EpdcVolunteerPointsFormDTO { + /** + * 积分操作类型(加积分、减积分) + */ + @NotBlank(message = "积分操作类型不能为空") + private String operationType; + + /** + * 用户ID + */ + @NotBlank(message = "志愿者id不能为空") + private String volunteerId; + + @NotNull + /** + * 积分调整值 + */ + private Integer points; +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/VolunteerDeptModifyFormDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/VolunteerDeptModifyFormDTO.java new file mode 100644 index 00000000..c355ac06 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/VolunteerDeptModifyFormDTO.java @@ -0,0 +1,39 @@ +package com.elink.esua.epdc.dto.epdc.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.Size; +import java.io.Serializable; + +/** + * @Author:liuchuang + * @Date:2021/7/14 14:12 + */ +@Data +public class VolunteerDeptModifyFormDTO implements Serializable { + private static final long serialVersionUID = 2545685600843780773L; + + /** + * id + */ + private String id; + + /** + * 部门名称 + */ + @NotBlank(message = "部门名称不能为空") + @Size(min = 1, max = 100, message = "部门名称不能为空且在100个字以内") + private String deptName; + + /** + * 排序 + */ + private Integer sort; + + /** + * 启用标识 0:否,1:是 + */ + @NotBlank(message = "启用标识不能为空") + private String enableFlag; +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/v2/EpdcCompleteVolunteerInfoV2FormDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/v2/EpdcCompleteVolunteerInfoV2FormDTO.java index 2329a7d0..51a92554 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/v2/EpdcCompleteVolunteerInfoV2FormDTO.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/v2/EpdcCompleteVolunteerInfoV2FormDTO.java @@ -123,5 +123,11 @@ public class EpdcCompleteVolunteerInfoV2FormDTO implements Serializable { * 标签ID */ private String volunteerTagId; + + /** + * 志愿者部门 + */ + private String volunteerDeptId; + } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/result/EpdcGetVolunteerRankDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/result/EpdcGetVolunteerRankDTO.java index 5de780bd..88ffc3f7 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/result/EpdcGetVolunteerRankDTO.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/result/EpdcGetVolunteerRankDTO.java @@ -119,4 +119,17 @@ public class EpdcGetVolunteerRankDTO implements Serializable { */ private String delFlag; -} \ No newline at end of file + /** + * 志愿者部门ID + */ + private String volunteerDeptId; + /** + * 志愿者公益积分 + */ + private Integer volunteerPoints; + /** + * 志愿公益累计积分 + */ + private Integer volunteerPointsTotal; + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/result/EpdcVolunteerDeptResultDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/result/EpdcVolunteerDeptResultDTO.java new file mode 100644 index 00000000..47034f3d --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/result/EpdcVolunteerDeptResultDTO.java @@ -0,0 +1,24 @@ +package com.elink.esua.epdc.dto.epdc.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author:liuchuang + * @Date:2021/7/14 14:32 + */ +@Data +public class EpdcVolunteerDeptResultDTO implements Serializable { + private static final long serialVersionUID = 2429674875574207951L; + + /** + * ID + */ + private String id; + + /** + * 部门名称 + */ + private String deptName; +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/pom.xml b/esua-epdc/epdc-module/epdc-user/epdc-user-server/pom.xml index e344b444..48d3132c 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/pom.xml +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/pom.xml @@ -144,10 +144,11 @@ jinshui_epdc_test jinshui@833066 + false - 47.105.119.155:8848 + 115.29.142.202:8848 - 1da17390-6495-4e16-9ec6-0b8ece18a4a0 + 9c6a1a78-690f-4cfe-833b-f8cec174c6e8 114.215.125.123:9876 jinshui-organizationGroup @@ -169,15 +170,16 @@ epdc!redis@master1405 - + jinshui_epdc_test jinshui@833066 + true - 47.105.119.155:8848 - 47.105.119.155 - 1da17390-6495-4e16-9ec6-0b8ece18a4a0 + 115.29.142.202:8848 + 47.104.94.220 + 9c6a1a78-690f-4cfe-833b-f8cec174c6e8 114.215.125.123:9876 jinshui-organizationGroup diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/EpdcAppVolunteerInfoController.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/EpdcAppVolunteerInfoController.java index 99898a5a..efa61f8c 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/EpdcAppVolunteerInfoController.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/EpdcAppVolunteerInfoController.java @@ -8,10 +8,8 @@ import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; import com.elink.esua.epdc.dto.epdc.form.EpdcAppVolunteerListFormDTO; import com.elink.esua.epdc.dto.epdc.form.EpdcCompleteVolunteerInfoFormDTO; import com.elink.esua.epdc.dto.epdc.form.v2.EpdcCompleteVolunteerInfoV2FormDTO; -import com.elink.esua.epdc.dto.epdc.result.EpdcAppVolunteerListCountResultDTO; -import com.elink.esua.epdc.dto.epdc.result.EpdcAppVolunteerListResultDTO; -import com.elink.esua.epdc.dto.epdc.result.EpdcGetVolunteerRankDTO; -import com.elink.esua.epdc.dto.epdc.result.VolunteerTagsResultDTO; +import com.elink.esua.epdc.dto.epdc.result.*; +import com.elink.esua.epdc.service.VolunteerDeptService; import com.elink.esua.epdc.service.VolunteerInfoService; import com.elink.esua.epdc.service.VolunteerTagService; import org.springframework.beans.factory.annotation.Autowired; @@ -33,6 +31,8 @@ public class EpdcAppVolunteerInfoController { @Autowired private VolunteerTagService volunteerTagService; + @Autowired + private VolunteerDeptService volunteerDeptService; /** * 根据用户id 进行志愿者认证 @@ -111,4 +111,17 @@ public class EpdcAppVolunteerInfoController { return new Result>().ok(data); } + /** + * 志愿者部门列表 + * + * @return java.util.List + * @author liuchuang + * @since 2021/7/14 14:36 + */ + @GetMapping("depts") + public Result> getVolunteerDepts() { + List data = volunteerDeptService.listOfVolunteerDepts(); + return new Result>().ok(data); + } + } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/UserController.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/UserController.java index 9f0033ef..6f3d7439 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/UserController.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/UserController.java @@ -212,8 +212,6 @@ public class UserController { public Result handleUserPoints(@RequestBody @Valid EpdcUserPointsFormDTO formDTO) { return userService.handleUserPoints(formDTO); } - - /** * @Description 获取已认证未删除用户列表 * @Author songyunpeng @@ -251,7 +249,7 @@ public class UserController { } /** - * @Description 党员认证通过并更新党员库信息 + * @Description 党员认证通过并更新党员库信息 * @Author songyunpeng * @Date 2020/6/10 * @Param [dto] @@ -298,7 +296,7 @@ public class UserController { return userService.addPartyInfo(dto); } /** - * @Description 完善党员信息加积分 + * @Description 完善党员信息加积分 * @Author songyunpeng * @Date 2020/6/24 * @Param [dto] @@ -316,7 +314,7 @@ public class UserController { /*** * 网格积分排名 - * @param params + * @param params * @return com.elink.esua.epdc.commons.tools.utils.Result> * @author qushutong * @date 2020/8/4 13:44 @@ -342,6 +340,18 @@ public class UserController { return userService.updateUserPoints(epdcUserPointsFormDTO); } + /** + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @Description 更新用户积分信息 + * @Author songyunpeng + * @Date 2020/4/29 + * @Param [dto] + **/ + @PostMapping(value = "updateBatchUserPoints") + public Result updateBatchUserPoints(@RequestBody List epdcUserPointsFormDTO){ + return userService.updateBatchUserPoints(epdcUserPointsFormDTO); + } + /** * @return com.elink.esua.epdc.commons.tools.utils.Result * @Description 更新用户积分信息 diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VolunteerDeptController.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VolunteerDeptController.java new file mode 100644 index 00000000..bac4e41f --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VolunteerDeptController.java @@ -0,0 +1,103 @@ +/** + * 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 cn.hutool.db.Page; +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.VolunteerDeptDTO; +import com.elink.esua.epdc.dto.VolunteerInfoDTO; +import com.elink.esua.epdc.dto.epdc.form.VolunteerDeptModifyFormDTO; +import com.elink.esua.epdc.dto.epdc.result.EpdcVolunteerDeptResultDTO; +import com.elink.esua.epdc.service.VolunteerDeptService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +import java.util.Map; + + +/** + * 志愿者部门管理 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-07-14 + */ +@RestController +@RequestMapping("volunteerdept") +public class VolunteerDeptController { + + @Autowired + private VolunteerDeptService volunteerDeptService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = volunteerDeptService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + VolunteerDeptDTO data = volunteerDeptService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody VolunteerDeptModifyFormDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto); + volunteerDeptService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody VolunteerDeptModifyFormDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto); + volunteerDeptService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + volunteerDeptService.delete(ids); + return new Result(); + } + + /** + * 部门列表 + * + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @author liuchuang + * @since 2021/7/14 15:58 + */ + @GetMapping("volunteerdepts") + public Result> volunteerDepts() { + List data = volunteerDeptService.listOfVolunteerDepts(); + return new Result>().ok(data); + } + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VolunteerInfoController.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VolunteerInfoController.java index 8d8d6227..04654fab 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VolunteerInfoController.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VolunteerInfoController.java @@ -18,16 +18,17 @@ package com.elink.esua.epdc.controller; import com.elink.esua.epdc.commons.tools.page.PageData; -import com.elink.esua.epdc.commons.tools.utils.DateUtils; 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.DefaultGroup; +import com.elink.esua.epdc.dto.UserDTO; import com.elink.esua.epdc.dto.VolunteerInfoDTO; import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerKindnessTimeFormDTO; import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerKindnessTimeUpdateFormDTO; +import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerPointsFormDTO; import com.elink.esua.epdc.dto.epdc.result.EpdcAdjustVolunteerPointsDTO; import com.elink.esua.epdc.dto.epdc.result.VolunteerTagsResultDTO; import com.elink.esua.epdc.excel.VolunteerInfoExcel; @@ -38,8 +39,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; import java.text.SimpleDateFormat; -import java.util.Collection; import java.util.Date; import java.util.List; import java.util.Map; @@ -257,4 +258,18 @@ public class VolunteerInfoController { return new Result>().ok(data); } + + /** + * @param formDTO + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @Author syp + * @Description 根据操作类型更新志愿者公益积分 + * @Date 2019/12/13 15:01 + **/ + @PostMapping("handleVolunteerPoints") + public Result handleVolunteerPoints(@RequestBody @Valid EpdcVolunteerPointsFormDTO formDTO) { + return volunteerInfoService.handleVolunteerPoints(formDTO); + } + + } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/UserDao.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/UserDao.java index 0172f545..0452dbd2 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/UserDao.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/UserDao.java @@ -297,6 +297,14 @@ public interface UserDao extends BaseDao { * @return void **/ void updateUserPoints(EpdcUserPointsFormDTO epdcUserPointsFormDTO); + /** + * @Description 批量更新用户积分 + * @Author songyunpeng + * @Date 2020/12/11 + * @Param [epdcUserPointsFormDTO] + * @return void + **/ + void updateBatchUserPoints(@Param("list") List list); /** * @Description 获取用户绑定网格接口 - 未绑定 获取第一次扫码网格 * @Author songyunpeng diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerDeptDao.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerDeptDao.java new file mode 100644 index 00000000..92e97cfd --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerDeptDao.java @@ -0,0 +1,46 @@ +/** + * 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.dto.VolunteerInfoDTO; +import com.elink.esua.epdc.dto.epdc.result.EpdcVolunteerDeptResultDTO; +import com.elink.esua.epdc.entity.VolunteerDeptEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; +import java.util.Map; + +/** + * 志愿者部门管理 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-07-14 + */ +@Mapper +public interface VolunteerDeptDao extends BaseDao { + + /** + * 志愿者部门列表 + * + * @return java.util.List + * @author liuchuang + * @since 2021/7/14 14:37 + */ + List selectListOfVolunteerDepts(); +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/VolunteerDeptEntity.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/VolunteerDeptEntity.java new file mode 100644 index 00000000..ff3482d7 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/VolunteerDeptEntity.java @@ -0,0 +1,56 @@ +/** + * 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 qu qu@elink-cn.com + * @since v1.0.0 2021-07-14 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_volunteer_dept") +public class VolunteerDeptEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 部门名称 + */ + private String deptName; + + /** + * 排序 + */ + private Integer sort; + + /** + * 启用标识 0:否,1:是 + */ + private String enableFlag; + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/VolunteerInfoEntity.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/VolunteerInfoEntity.java index dfca3804..d86786c6 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/VolunteerInfoEntity.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/VolunteerInfoEntity.java @@ -153,4 +153,16 @@ public class VolunteerInfoEntity extends DeptScope { * 志愿者排序 */ private Integer volunteerOrder; + /** + * 志愿者部门ID + */ + private String volunteerDeptId; + /** + * 志愿者公益积分 + */ + private Integer volunteerPoints; + /** + * 志愿公益累计积分 + */ + private Integer volunteerPointsTotal; } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/UserService.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/UserService.java index 6cd23a99..96de755a 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/UserService.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/UserService.java @@ -401,6 +401,14 @@ public interface UserService extends BaseService { * @return com.elink.esua.epdc.commons.tools.utils.Result **/ Result updateUserPoints(EpdcUserPointsFormDTO epdcUserPointsFormDTO); + /** + * @Description 批量更新用户积分信息 + * @Author songyunpeng + * @Date 2020/12/11 + * @Param [epdcUserPointsFormDTO] + * @return com.elink.esua.epdc.commons.tools.utils.Result + **/ + Result updateBatchUserPoints(List epdcUserPointsFormDTO); /** * @Description 获取用户积分接口 * @Author songyunpeng diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerDeptService.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerDeptService.java new file mode 100644 index 00000000..5cb5025d --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerDeptService.java @@ -0,0 +1,107 @@ +/** + * 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.VolunteerDeptDTO; +import com.elink.esua.epdc.dto.VolunteerInfoDTO; +import com.elink.esua.epdc.dto.epdc.form.VolunteerDeptModifyFormDTO; +import com.elink.esua.epdc.dto.epdc.result.EpdcVolunteerDeptResultDTO; +import com.elink.esua.epdc.entity.VolunteerDeptEntity; + +import java.util.List; +import java.util.Map; + +/** + * 志愿者部门管理 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-07-14 + */ +public interface VolunteerDeptService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-07-14 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-07-14 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return VolunteerDeptDTO + * @author generator + * @date 2021-07-14 + */ + VolunteerDeptDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-07-14 + */ + void save(VolunteerDeptModifyFormDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-07-14 + */ + void update(VolunteerDeptModifyFormDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-07-14 + */ + void delete(String[] ids); + + /** + * 志愿者部门列表 + * + * @return java.util.List + * @author liuchuang + * @since 2021/7/14 14:36 + */ + List listOfVolunteerDepts(); +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerInfoService.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerInfoService.java index 06d14863..a781fb83 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerInfoService.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerInfoService.java @@ -22,10 +22,7 @@ import com.elink.esua.epdc.commons.tools.page.PageData; import com.elink.esua.epdc.commons.tools.utils.Result; import com.elink.esua.epdc.dto.UserTagDTO; import com.elink.esua.epdc.dto.VolunteerInfoDTO; -import com.elink.esua.epdc.dto.epdc.form.EpdcAppVolunteerListFormDTO; -import com.elink.esua.epdc.dto.epdc.form.EpdcCompleteVolunteerInfoFormDTO; -import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerKindnessTimeFormDTO; -import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerKindnessTimeUpdateFormDTO; +import com.elink.esua.epdc.dto.epdc.form.*; import com.elink.esua.epdc.dto.epdc.form.v2.EpdcCompleteVolunteerInfoV2FormDTO; import com.elink.esua.epdc.dto.epdc.result.EpdcAdjustVolunteerPointsDTO; import com.elink.esua.epdc.dto.epdc.result.EpdcAppVolunteerListCountResultDTO; @@ -264,4 +261,13 @@ public interface VolunteerInfoService extends BaseService { * @return void **/ void modifyOrganizationInfo(OrganizationModifyDTO dto); + + + /** + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @Author syp + * @Description 根据操作类型更新志愿者积分 + * @Date 2019/12/13 15:10 + **/ + Result handleVolunteerPoints(EpdcVolunteerPointsFormDTO formDTO); } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserServiceImpl.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserServiceImpl.java index 670bff76..edb0184e 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserServiceImpl.java @@ -1482,6 +1482,11 @@ public class UserServiceImpl extends BaseServiceImpl implem baseDao.updateUserPoints(epdcUserPointsFormDTO); return new Result(); } + @Override + public Result updateBatchUserPoints(List epdcUserPointsFormDTO) { + baseDao.updateBatchUserPoints(epdcUserPointsFormDTO); + return new Result(); + } @Override public Result getPointsByUserId(String userId) { diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerDeptServiceImpl.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerDeptServiceImpl.java new file mode 100644 index 00000000..5bd99a8c --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerDeptServiceImpl.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.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.constant.Constant; +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.VolunteerDeptDao; +import com.elink.esua.epdc.dto.VolunteerDeptDTO; +import com.elink.esua.epdc.dto.VolunteerInfoDTO; +import com.elink.esua.epdc.dto.epdc.form.VolunteerDeptModifyFormDTO; +import com.elink.esua.epdc.dto.epdc.result.EpdcVolunteerDeptResultDTO; +import com.elink.esua.epdc.dto.user.result.VolunteerPointsStaticResultDTO; +import com.elink.esua.epdc.entity.VolunteerDeptEntity; +import com.elink.esua.epdc.service.VolunteerDeptService; +import org.apache.commons.lang3.StringUtils; +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 2021-07-14 + */ +@Service +public class VolunteerDeptServiceImpl extends BaseServiceImpl implements VolunteerDeptService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params), + getWrapper(params) + ); + return getPageData(page, VolunteerDeptDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, VolunteerDeptDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String deptName = (String)params.get("deptName"); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.like(StringUtils.isNotBlank(deptName), "DEPT_NAME", deptName); + wrapper.orderByAsc("SORT"); + wrapper.orderByDesc(FieldConstant.UPDATED_TIME); + + return wrapper; + } + + @Override + public VolunteerDeptDTO get(String id) { + VolunteerDeptEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, VolunteerDeptDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(VolunteerDeptModifyFormDTO dto) { + VolunteerDeptEntity entity = ConvertUtils.sourceToTarget(dto, VolunteerDeptEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(VolunteerDeptModifyFormDTO dto) { + VolunteerDeptEntity entity = ConvertUtils.sourceToTarget(dto, VolunteerDeptEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public List listOfVolunteerDepts() { + return baseDao.selectListOfVolunteerDepts(); + } + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java index c8d53b28..4fa75309 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java @@ -27,13 +27,17 @@ import com.elink.esua.epdc.commons.mybatis.utils.DeptEntityUtils; import com.elink.esua.epdc.commons.tools.constant.FieldConstant; import com.elink.esua.epdc.commons.tools.constant.NumConstant; import com.elink.esua.epdc.commons.tools.enums.UserTagEnum; +import com.elink.esua.epdc.commons.tools.enums.pointsenum.PointsOperationEnum; 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.utils.Result; import com.elink.esua.epdc.constant.UserFieldConsant; import com.elink.esua.epdc.constant.VolunteerInfoNoticeConstant; import com.elink.esua.epdc.dao.VolunteerInfoDao; -import com.elink.esua.epdc.dto.*; +import com.elink.esua.epdc.dto.ParentAndAllDeptDTO; +import com.elink.esua.epdc.dto.UserTagDTO; +import com.elink.esua.epdc.dto.VolunteerInfoDTO; +import com.elink.esua.epdc.dto.VolunteerTagRelationDTO; import com.elink.esua.epdc.dto.epdc.form.*; import com.elink.esua.epdc.dto.epdc.form.v2.EpdcCompleteVolunteerInfoV2FormDTO; import com.elink.esua.epdc.dto.epdc.result.EpdcAdjustVolunteerPointsDTO; @@ -46,7 +50,6 @@ import com.elink.esua.epdc.rocketmq.dto.OrganizationModifyDTO; import com.elink.esua.epdc.service.UserTagRelationService; import com.elink.esua.epdc.service.VolunteerInfoService; import com.elink.esua.epdc.service.VolunteerTagRelationService; -import com.elink.esua.epdc.service.VolunteerTagService; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -484,6 +487,29 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl points) { + return new Result().error("用户积分不足"); + } + volunteerInfoEntity.setVolunteerPoints(volunteerInfoEntity.getVolunteerPoints() - formDTO.getPoints()); + } + baseDao.updateById(volunteerInfoEntity); + return new Result(); + } + /** * 组织机构信息处理 * diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/UserDao.xml b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/UserDao.xml index 29648194..5d236b13 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/UserDao.xml +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/UserDao.xml @@ -16,6 +16,23 @@ update epdc_user set points = 0 where DEL_FLAG = '0' and UPDATED_TIME = now() + + update epdc_user + + + + + when id=#{item.userId} + then points + #{item.points} + + + + + where id in + + #{item.userId} + + DELETE FROM epdc_user WHERE WX_OPEN_ID = #{wxOpenId} AND STATE = '2' diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerDeptDao.xml b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerDeptDao.xml new file mode 100644 index 00000000..464e3892 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerDeptDao.xml @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerInfoDao.xml b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerInfoDao.xml index ce922dff..89e51f09 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerInfoDao.xml +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerInfoDao.xml @@ -56,9 +56,11 @@ date_format(v.REGIST_TIME,'%Y-%m-%d %H:%i:%S') registTimeString, v.REGIST_TIME registTime, v.AUDIT_STATUS auditStatus, - v.VOLUNTEER_ORDER volunteerOrder + v.VOLUNTEER_ORDER volunteerOrder, + d.dept_name FROM epdc_volunteer_info v + left join epdc_volunteer_dept d on d.id = v.volunteer_dept_id left join epdc_user u on v.USER_ID = u.ID and u.del_flag = '0' where v.del_flag = '0' and u.id is not null @@ -73,6 +75,9 @@ and v.ALL_DEPT_IDS like concat('%',#{deptId},'%') + + and v.volunteer_dept_id = #{volunteerDeptId} + ORDER BY v.KINDNESS_TIME desc,u.POINTS DESC @@ -194,7 +199,10 @@ vi.VOLUNTEER_NICKNAME as NICKNAME, eu.PARTY_FLAG, vi.KINDNESS_TIME, - vi.PARTICIPATION_NUM + vi.PARTICIPATION_NUM, + vi.VOLUNTEER_DEPT_ID, + vi.VOLUNTEER_POINTS, + vi.VOLUNTEER_POINTS_TOTAL from epdc_volunteer_info vi left join epdc_user eu on eu.id = vi.USER_ID WHERE vi.DEL_FLAG = '0' AND vi.AUDIT_STATUS IN ('0', '1') diff --git a/esua-epdc/epdc-module/epdc-websocket/epdc-websocket-server/pom.xml b/esua-epdc/epdc-module/epdc-websocket/epdc-websocket-server/pom.xml index 1c0064d4..4e7f3f34 100644 --- a/esua-epdc/epdc-module/epdc-websocket/epdc-websocket-server/pom.xml +++ b/esua-epdc/epdc-module/epdc-websocket/epdc-websocket-server/pom.xml @@ -152,9 +152,9 @@ jinshui@833066 false - 47.105.119.155:8848 + 115.29.142.202:8848 - 1da17390-6495-4e16-9ec6-0b8ece18a4a0 + 9c6a1a78-690f-4cfe-833b-f8cec174c6e8 @@ -171,15 +171,15 @@ epdc!redis@master1405 - + jinshui_epdc_test jinshui@833066 true - 47.105.119.155:8848 - 47.105.119.155 - 1da17390-6495-4e16-9ec6-0b8ece18a4a0 + 115.29.142.202:8848 + 47.104.94.220 + 9c6a1a78-690f-4cfe-833b-f8cec174c6e8