Browse Source

王公峰:排名接口

feature/dangjian
wanggongfeng 6 years ago
parent
commit
54f465e4e7
  1. 15
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiAppUserController.java
  2. 42
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiVolunteerRankController.java
  3. 10
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/AppActUserRelationFeignClient.java
  4. 28
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/AppVolunteerRankFeignClient.java
  5. 7
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClient.java
  6. 8
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/AppActUserRelationFeignClientFallback.java
  7. 25
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/AppVolunteerRankFeignClientFallback.java
  8. 5
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/UserFeignClientFallback.java
  9. 10
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/ActUserRelationService.java
  10. 8
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AppUserService.java
  11. 22
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AppVolunteerRankService.java
  12. 11
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java
  13. 36
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppVolunteerRankServiceImpl.java
  14. 6
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/category/CategoryDao.xml
  15. 2
      esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/EpdcVolunteerRankDTO.java
  16. 122
      esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/VolunteerRankDTO.java
  17. 54
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/AppVolunteerRankController.java
  18. 94
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerRankController.java
  19. 41
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerRankDao.java
  20. 92
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerRankEntity.java
  21. 87
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerRankExcel.java
  22. 47
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerRankRedis.java
  23. 103
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerRankService.java
  24. 116
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerRankServiceImpl.java
  25. 31
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerRankDao.xml
  26. 13
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/EpdcAppVolunteerInfoController.java
  27. 8
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerInfoDao.java
  28. 8
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerInfoService.java
  29. 13
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java
  30. 3
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerInfoDao.xml

15
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiAppUserController.java

@ -2,18 +2,15 @@ package com.elink.esua.epdc.controller;
import com.elink.esua.epdc.common.token.dto.TokenDto;
import com.elink.esua.epdc.commons.tools.annotation.LoginUser;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.dto.epdc.form.*;
import com.elink.esua.epdc.dto.epdc.result.EpdcUserGridResultDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcUserInfoResultDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcVolunteerRankDTO;
import com.elink.esua.epdc.dto.epdc.result.UserInvitationRecordResultDTO;
import com.elink.esua.epdc.dto.form.*;
import com.elink.esua.epdc.dto.result.EpdcAppAuthorizationDTO;
import com.elink.esua.epdc.dto.result.EpdcAppRegisterCallbackDTO;
import com.elink.esua.epdc.dto.result.EpdcAppVolunteerRankDTO;
import com.elink.esua.epdc.dto.result.EpdcCompleteUserInfoDTO;
import com.elink.esua.epdc.service.AppUserService;
import org.springframework.beans.factory.annotation.Autowired;
@ -284,17 +281,5 @@ public class ApiAppUserController {
}
/**
* 获取排行榜
* @return com.elink.esua.epdc.commons.tools.utils.Result
* @author wanggongfeng
* @date 2019/12/13 14:41
*/
@GetMapping("volunteer/leaderboard")
public Result<List<EpdcAppVolunteerRankDTO>> leaderboard() {
Result<List<EpdcVolunteerRankDTO>> data = appUserService.leaderboard();
List<EpdcAppVolunteerRankDTO> list2 = ConvertUtils.sourceToTarget(data.getData(), EpdcAppVolunteerRankDTO.class);
return new Result().ok(list2);
}
}

42
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiVolunteerRankController.java

@ -0,0 +1,42 @@
package com.elink.esua.epdc.controller;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.result.EpdcAppVolunteerRankDTO;
import com.elink.esua.epdc.service.AppVolunteerRankService;
import com.elink.esua.epdc.volunteer.EpdcVolunteerRankDTO;
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.RestController;
import java.util.List;
/**
* APP爱心排名
*
* @author wanggongfeng
* @date 2019/12/17 10:30
*/
@RestController
@RequestMapping("heart/volunteer")
public class ApiVolunteerRankController {
@Autowired
private AppVolunteerRankService appVolunteerRankService;
/**
* 获取排行榜
* @return com.elink.esua.epdc.commons.tools.utils.Result
* @author wanggongfeng
* @date 2019/12/13 14:41
*/
@GetMapping("leaderboard")
public Result<List<EpdcAppVolunteerRankDTO>> leaderboard() {
Result<List<EpdcVolunteerRankDTO>> data = appVolunteerRankService.leaderboard();
List<EpdcAppVolunteerRankDTO> list2 = ConvertUtils.sourceToTarget(data.getData(), EpdcAppVolunteerRankDTO.class);
return new Result().ok(list2);
}
}

10
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/AppActUserRelationFeignClient.java

@ -6,11 +6,14 @@ import com.elink.esua.epdc.activity.AppClockListDTO;
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.AppActUserRelationFeignClientFallback;
import com.elink.esua.epdc.volunteer.EpdcVolunteerRankDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import java.util.List;
/**
*
* 活动报名管理
@ -52,4 +55,11 @@ public interface AppActUserRelationFeignClient {
*/
@GetMapping(value = "heart/appactuserrelation/selectListActUserRelation/{actId}")
Result<AppClockListDTO> selectListActUserRelation(@PathVariable("actId") String actId);
/**
* 获取排行榜
* @return
*/
@GetMapping("heart/volunteer/leaderboard")
Result<List<EpdcVolunteerRankDTO>> leaderboard();
}

28
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/AppVolunteerRankFeignClient.java

@ -0,0 +1,28 @@
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.AppVolunteerRankFeignClientFallback;
import com.elink.esua.epdc.volunteer.EpdcVolunteerRankDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import java.util.List;
/**
*
* 活动报名管理
*
* @Authorwanggongfeng
* @Date2019/12/16 17:36
*/
@FeignClient(name = ServiceConstant.EPDC_HEART_SERVER, fallback = AppVolunteerRankFeignClientFallback.class,url = "http://127.0.0.1:9060")
public interface AppVolunteerRankFeignClient {
/**
* 获取排行榜
* @return
*/
@GetMapping("heart/volunteer/leaderboard")
Result<List<EpdcVolunteerRankDTO>> leaderboard();
}

7
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClient.java

@ -345,10 +345,5 @@ public interface UserFeignClient {
@GetMapping("app-user/epdc-app/volunteerinfo/insertVolunteerInfo")
Result<Integer> insertVolunteerInfo(EpdcCompleteVolunteerInfoFormDTO epdcCompleteVolunteerInfoFormDTO);
/**
* 获取排行榜
* @return
*/
@GetMapping("app-user/epdc-app/volunteerinfo/leaderboard")
Result<List<EpdcVolunteerRankDTO>> leaderboard();
}

8
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/AppActUserRelationFeignClientFallback.java

@ -6,8 +6,11 @@ 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.feign.AppActUserRelationFeignClient;
import com.elink.esua.epdc.volunteer.EpdcVolunteerRankDTO;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* @Authorwanggongfeng
* @Date2019/12/16 15:11
@ -34,5 +37,10 @@ public class AppActUserRelationFeignClientFallback implements AppActUserRelation
return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "selectListActUserRelation", actId);
}
@Override
public Result<List<EpdcVolunteerRankDTO>> leaderboard() {
return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "leaderboard");
}
}

25
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/AppVolunteerRankFeignClientFallback.java

@ -0,0 +1,25 @@
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.feign.AppVolunteerRankFeignClient;
import com.elink.esua.epdc.volunteer.EpdcVolunteerRankDTO;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* @Authorwanggongfeng
* @Date2019/12/16 15:11
*/
@Component
public class AppVolunteerRankFeignClientFallback implements AppVolunteerRankFeignClient {
@Override
public Result<List<EpdcVolunteerRankDTO>> leaderboard() {
return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "leaderboard");
}
}

5
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/UserFeignClientFallback.java

@ -169,9 +169,4 @@ public class UserFeignClientFallback implements UserFeignClient {
public Result<Integer> insertVolunteerInfo(EpdcCompleteVolunteerInfoFormDTO epdcCompleteVolunteerInfoFormDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "insertVolunteerInfo", epdcCompleteVolunteerInfoFormDTO);
}
@Override
public Result<List<EpdcVolunteerRankDTO>> leaderboard() {
return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "leaderboard");
}
}

10
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/ActUserRelationService.java

@ -4,6 +4,9 @@ import com.elink.esua.epdc.activity.ActUserRelationDTO;
import com.elink.esua.epdc.activity.AppActUserClockLogDTO;
import com.elink.esua.epdc.activity.AppClockListDTO;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.volunteer.EpdcVolunteerRankDTO;
import java.util.List;
/**
* @author wanggongfeng
@ -44,7 +47,12 @@ public interface ActUserRelationService {
*/
Result<AppClockListDTO> getClockList(String actId);
/**
* 获取排行榜
* @Author wanggongfeng
* @return
*/
Result<List<EpdcVolunteerRankDTO>> leaderboard();
}

8
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AppUserService.java

@ -5,7 +5,6 @@ import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.epdc.form.*;
import com.elink.esua.epdc.dto.epdc.result.EpdcUserGridResultDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcUserInfoResultDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcVolunteerRankDTO;
import com.elink.esua.epdc.dto.epdc.result.UserInvitationRecordResultDTO;
import com.elink.esua.epdc.dto.form.*;
import com.elink.esua.epdc.dto.result.EpdcAppAuthorizationDTO;
@ -237,11 +236,6 @@ public interface AppUserService {
*/
Result getVolunteerCountById(TokenDto tokenDto);
/**
* 获取排行榜
* @Author wanggongfeng
* @return
*/
Result<List<EpdcVolunteerRankDTO>> leaderboard();
}

22
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AppVolunteerRankService.java

@ -0,0 +1,22 @@
package com.elink.esua.epdc.service;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.volunteer.EpdcVolunteerRankDTO;
import java.util.List;
/**
* @author wanggongfeng
* @date 2019/12/17 9:50
*/
public interface AppVolunteerRankService {
/**
* 获取排行榜
* @Author wanggongfeng
* @return
*/
Result<List<EpdcVolunteerRankDTO>> leaderboard();
}

11
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java

@ -1098,16 +1098,7 @@ public class AppUserServiceImpl implements AppUserService {
return result;
}
/**
* 获取排行榜
* @Author wanggongfeng
* @return
*/
@Override
public Result<List<EpdcVolunteerRankDTO>> leaderboard() {
Result<List<EpdcVolunteerRankDTO>> dataResult = userFeignClient.leaderboard();
return dataResult;
}
}

36
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppVolunteerRankServiceImpl.java

@ -0,0 +1,36 @@
package com.elink.esua.epdc.service.impl;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.feign.AppVolunteerRankFeignClient;
import com.elink.esua.epdc.service.AppVolunteerRankService;
import com.elink.esua.epdc.volunteer.EpdcVolunteerRankDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @author wanggongfeng
* @date 2019/12/16 17:50
*/
@Slf4j
@Service
public class AppVolunteerRankServiceImpl implements AppVolunteerRankService {
@Autowired
private AppVolunteerRankFeignClient appVolunteerRankFeignClient;
/**
* 获取排行榜
* @Author wanggongfeng
* @return
*/
@Override
public Result<List<EpdcVolunteerRankDTO>> leaderboard() {
Result<List<EpdcVolunteerRankDTO>> dataResult = appVolunteerRankFeignClient.leaderboard();
return dataResult;
}
}

6
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/category/CategoryDao.xml

@ -62,7 +62,8 @@
creator,
create_date,
updater,
update_date)
update_date,
info_code)
values
<foreach collection="categorys" item="item" index="index" separator="," >
(#{item.id},
@ -76,7 +77,8 @@
#{item.creator},
#{item.createDate},
#{item.updater},
#{item.updateDate})
#{item.updateDate},
#{item.infoCode})
</foreach>
</insert>
</mapper>

2
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/result/EpdcVolunteerRankDTO.java → esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/EpdcVolunteerRankDTO.java

@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.dto.epdc.result;
package com.elink.esua.epdc.volunteer;
import lombok.Data;

122
esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/VolunteerRankDTO.java

@ -0,0 +1,122 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.volunteer;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* 志愿者排名
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2019-12-19
*/
@Data
public class VolunteerRankDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 排名
*/
private Integer sort;
/**
* 志愿者ID
*/
private String volunteerId;
/**
* 用户ID
*/
private String userId;
/**
* 头像
*/
private String faceImg;
/**
* 用户名
*/
private String nickname;
/**
* 是否党员(0-1-)
*/
private String partyFlag;
/**
* 爱心时长(单位小时)
*/
private BigDecimal kindnessTime;
/**
* 参加次数
*/
private Integer participationNum;
/**
* 排行生成日期
*/
private Date generateDate;
/**
* 是否显示(0-不显示1-显示)
*/
private String showFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
/**
* 删除标志
*/
private String delFlag;
}

54
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/AppVolunteerRankController.java

@ -0,0 +1,54 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.volunteer.controller;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.modules.volunteer.service.VolunteerRankService;
import com.elink.esua.epdc.volunteer.EpdcVolunteerRankDTO;
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.RestController;
import java.util.List;
/**
* 志愿者排名接口
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2019-12-19
*/
@RestController
@RequestMapping("volunteer")
public class AppVolunteerRankController {
@Autowired
private VolunteerRankService volunteerRankService;
/**
* 获取排行榜
* @return
*/
@GetMapping(value="leaderboard")
public Result<List<EpdcVolunteerRankDTO>> leaderboard() {
List<EpdcVolunteerRankDTO> list = volunteerRankService.leaderboard();
return new Result().ok(list);
}
}

94
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerRankController.java

@ -0,0 +1,94 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.volunteer.controller;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.ExcelUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.validator.AssertUtils;
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
import com.elink.esua.epdc.volunteer.VolunteerRankDTO;
import com.elink.esua.epdc.modules.volunteer.excel.VolunteerRankExcel;
import com.elink.esua.epdc.modules.volunteer.service.VolunteerRankService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 志愿者排名
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2019-12-19
*/
@RestController
@RequestMapping("volunteerrank")
public class VolunteerRankController {
@Autowired
private VolunteerRankService volunteerRankService;
@GetMapping("page")
public Result<PageData<VolunteerRankDTO>> page(@RequestParam Map<String, Object> params){
PageData<VolunteerRankDTO> page = volunteerRankService.page(params);
return new Result<PageData<VolunteerRankDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<VolunteerRankDTO> get(@PathVariable("id") String id){
VolunteerRankDTO data = volunteerRankService.get(id);
return new Result<VolunteerRankDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody VolunteerRankDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
volunteerRankService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody VolunteerRankDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
volunteerRankService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
volunteerRankService.delete(ids);
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<VolunteerRankDTO> list = volunteerRankService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, VolunteerRankExcel.class);
}
}

41
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerRankDao.java

@ -0,0 +1,41 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.volunteer.dao;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.modules.volunteer.entity.VolunteerRankEntity;
import com.elink.esua.epdc.volunteer.EpdcVolunteerRankDTO;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 志愿者排名
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2019-12-19
*/
@Mapper
public interface VolunteerRankDao extends BaseDao<VolunteerRankEntity> {
/**
* 获取排行榜
* @Author wanggongfeng
* @return
*/
List<EpdcVolunteerRankDTO> leaderboard();
}

92
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerRankEntity.java

@ -0,0 +1,92 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.volunteer.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
import java.util.Date;
/**
* 志愿者排名
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2019-12-19
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("epdc_volunteer_rank")
public class VolunteerRankEntity extends BaseEpdcEntity {
private static final long serialVersionUID = 1L;
/**
* 排名
*/
private Integer sort;
/**
* 志愿者ID
*/
private String volunteerId;
/**
* 用户ID
*/
private String userId;
/**
* 头像
*/
private String faceImg;
/**
* 用户名
*/
private String nickname;
/**
* 是否党员(0-1-)
*/
private String partyFlag;
/**
* 爱心时长(单位小时)
*/
private BigDecimal kindnessTime;
/**
* 参加次数
*/
private Integer participationNum;
/**
* 排行生成日期
*/
private Date generateDate;
/**
* 是否显示(0-不显示1-显示)
*/
private String showFlag;
}

87
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerRankExcel.java

@ -0,0 +1,87 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.volunteer.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
/**
* 志愿者排名
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2019-12-19
*/
@Data
public class VolunteerRankExcel {
@Excel(name = "主键")
private String id;
@Excel(name = "排名")
private Integer sort;
@Excel(name = "志愿者ID")
private String volunteerId;
@Excel(name = "用户ID")
private String userId;
@Excel(name = "头像")
private String faceImg;
@Excel(name = "用户名")
private String nickname;
@Excel(name = "是否党员(0-否,1-是)")
private String partyFlag;
@Excel(name = "爱心时长(单位:小时)")
private BigDecimal kindnessTime;
@Excel(name = "参加次数")
private Integer participationNum;
@Excel(name = "排行生成日期")
private Date generateDate;
@Excel(name = "是否显示(0-不显示,1-显示)")
private String showFlag;
@Excel(name = "乐观锁")
private Integer revision;
@Excel(name = "创建人")
private String createdBy;
@Excel(name = "创建时间")
private Date createdTime;
@Excel(name = "更新人")
private String updatedBy;
@Excel(name = "更新时间")
private Date updatedTime;
@Excel(name = "删除标志")
private String delFlag;
}

47
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerRankRedis.java

@ -0,0 +1,47 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.volunteer.redis;
import com.elink.esua.epdc.commons.tools.redis.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 志愿者排名
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2019-12-19
*/
@Component
public class VolunteerRankRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

103
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerRankService.java

@ -0,0 +1,103 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.volunteer.service;
import com.elink.esua.epdc.commons.mybatis.service.BaseService;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.modules.volunteer.entity.VolunteerRankEntity;
import com.elink.esua.epdc.volunteer.EpdcVolunteerRankDTO;
import com.elink.esua.epdc.volunteer.VolunteerRankDTO;
import java.util.List;
import java.util.Map;
/**
* 志愿者排名
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2019-12-19
*/
public interface VolunteerRankService extends BaseService<VolunteerRankEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<VolunteerRankDTO>
* @author generator
* @date 2019-12-19
*/
PageData<VolunteerRankDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<VolunteerRankDTO>
* @author generator
* @date 2019-12-19
*/
List<VolunteerRankDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return VolunteerRankDTO
* @author generator
* @date 2019-12-19
*/
VolunteerRankDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2019-12-19
*/
void save(VolunteerRankDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2019-12-19
*/
void update(VolunteerRankDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2019-12-19
*/
void delete(String[] ids);
/**
* 获取排行榜
* @Author wanggongfeng
* @return
*/
List<EpdcVolunteerRankDTO> leaderboard();
}

116
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerRankServiceImpl.java

@ -0,0 +1,116 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.modules.volunteer.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.FieldConstant;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.modules.volunteer.dao.VolunteerRankDao;
import com.elink.esua.epdc.modules.volunteer.entity.VolunteerRankEntity;
import com.elink.esua.epdc.modules.volunteer.redis.VolunteerRankRedis;
import com.elink.esua.epdc.modules.volunteer.service.VolunteerRankService;
import com.elink.esua.epdc.volunteer.EpdcVolunteerRankDTO;
import com.elink.esua.epdc.volunteer.VolunteerRankDTO;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 志愿者排名
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2019-12-19
*/
@Service
public class VolunteerRankServiceImpl extends BaseServiceImpl<VolunteerRankDao, VolunteerRankEntity> implements VolunteerRankService {
@Autowired
private VolunteerRankRedis volunteerRankRedis;
@Override
public PageData<VolunteerRankDTO> page(Map<String, Object> params) {
IPage<VolunteerRankEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, VolunteerRankDTO.class);
}
@Override
public List<VolunteerRankDTO> list(Map<String, Object> params) {
List<VolunteerRankEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, VolunteerRankDTO.class);
}
private QueryWrapper<VolunteerRankEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<VolunteerRankEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public VolunteerRankDTO get(String id) {
VolunteerRankEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, VolunteerRankDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(VolunteerRankDTO dto) {
VolunteerRankEntity entity = ConvertUtils.sourceToTarget(dto, VolunteerRankEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(VolunteerRankDTO dto) {
VolunteerRankEntity entity = ConvertUtils.sourceToTarget(dto, VolunteerRankEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
/**
* 获取排行榜
* @Author wanggongfeng
* @return
*/
@Override
public List<EpdcVolunteerRankDTO> leaderboard(){
List<EpdcVolunteerRankDTO> list = baseDao.leaderboard();
return list;
}
}

31
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerRankDao.xml

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.elink.esua.epdc.modules.volunteer.dao.VolunteerRankDao">
<resultMap type="com.elink.esua.epdc.modules.volunteer.entity.VolunteerRankEntity" id="volunteerRankMap">
<result property="id" column="ID"/>
<result property="sort" column="SORT"/>
<result property="volunteerId" column="VOLUNTEER_ID"/>
<result property="userId" column="USER_ID"/>
<result property="faceImg" column="FACE_IMG"/>
<result property="nickname" column="NICKNAME"/>
<result property="partyFlag" column="PARTY_FLAG"/>
<result property="kindnessTime" column="KINDNESS_TIME"/>
<result property="participationNum" column="PARTICIPATION_NUM"/>
<result property="generateDate" column="GENERATE_DATE"/>
<result property="showFlag" column="SHOW_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
<result property="delFlag" column="DEL_FLAG"/>
</resultMap>
<select id="leaderboard" resultType="com.elink.esua.epdc.volunteer.EpdcVolunteerRankDTO">
select NICKNAME,FACE_IMG,PARTY_FLAG,KINDNESS_TIME,PARTICIPATION_NUM,SORT from epdc_volunteer_rank order by sort
</select>
</mapper>

13
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/EpdcAppVolunteerInfoController.java

@ -6,7 +6,6 @@ import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
import com.elink.esua.epdc.dto.epdc.form.EpdcCompleteVolunteerInfoFormDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcVolunteerRankDTO;
import com.elink.esua.epdc.service.VolunteerInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@ -14,8 +13,6 @@ import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 对移动端开放
*
@ -53,14 +50,6 @@ public class EpdcAppVolunteerInfoController {
return result;
}
/**
* 获取排行榜
* @return
*/
@GetMapping(value="leaderboard")
public Result<List<EpdcVolunteerRankDTO>> leaderboard() {
List<EpdcVolunteerRankDTO> list = volunteerInfoService.leaderboard();
return new Result().ok(list);
}
}

8
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerInfoDao.java

@ -21,7 +21,6 @@ import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.dto.UserTagDTO;
import com.elink.esua.epdc.dto.VolunteerInfoDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcAdjustVolunteerPointsDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcVolunteerRankDTO;
import com.elink.esua.epdc.entity.VolunteerInfoEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -100,10 +99,5 @@ public interface VolunteerInfoDao extends BaseDao<VolunteerInfoEntity> {
**/
EpdcAdjustVolunteerPointsDTO selectAdjustVolunteerPointsDTO(String id);
/**
* 获取排行榜
* @Author wanggongfeng
* @return
*/
List<EpdcVolunteerRankDTO> leaderboard();
}

8
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerInfoService.java

@ -24,7 +24,6 @@ import com.elink.esua.epdc.dto.UserTagDTO;
import com.elink.esua.epdc.dto.VolunteerInfoDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcCompleteVolunteerInfoFormDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcAdjustVolunteerPointsDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcVolunteerRankDTO;
import com.elink.esua.epdc.entity.VolunteerInfoEntity;
import java.util.List;
@ -164,11 +163,6 @@ public interface VolunteerInfoService extends BaseService<VolunteerInfoEntity> {
**/
Result<EpdcAdjustVolunteerPointsDTO> getAdjustVolunteerPointsDTO(String userId);
/**
* 获取排行榜
* @Author wanggongfeng
* @return
*/
List<EpdcVolunteerRankDTO> leaderboard();
}

13
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java

@ -32,7 +32,6 @@ import com.elink.esua.epdc.dto.VolunteerInfoDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcCompleteVolunteerInfoFormDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcInformationFormDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcAdjustVolunteerPointsDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcVolunteerRankDTO;
import com.elink.esua.epdc.entity.VolunteerInfoEntity;
import com.elink.esua.epdc.redis.VolunteerInfoRedis;
import com.elink.esua.epdc.service.UserService;
@ -42,7 +41,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
@ -244,15 +242,4 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao,
return new Result<EpdcAdjustVolunteerPointsDTO>().ok(adjustVolunteerPointsDTO);
}
/**
* 获取排行榜
* @Author wanggongfeng
* @return
*/
@Override
public List<EpdcVolunteerRankDTO> leaderboard(){
List<EpdcVolunteerRankDTO> list = baseDao.leaderboard();
return list;
}
}

3
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerInfoDao.xml

@ -167,8 +167,5 @@
m.DEL_FLAG = '0'
AND m.ID = #{id}
</select>
<select id="leaderboard" resultType="com.elink.esua.epdc.dto.epdc.result.EpdcVolunteerRankDTO">
select NICKNAME,FACE_IMG,PARTY_FLAG,KINDNESS_TIME,PARTICIPATION_NUM,SORT from epdc_volunteer_rank order by sort
</select>
</mapper>

Loading…
Cancel
Save