+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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@833066false
- 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_testjinshui@833066true
- 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