Browse Source

支持查询历史日期

master
yinzuomei 4 years ago
parent
commit
adfa631ef1
  1. 1
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/MyPointTaskFormDTO.java
  2. 6
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ResiPointController.java
  3. 4
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointActionLogServiceImpl.java

1
epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/MyPointTaskFormDTO.java

@ -28,4 +28,5 @@ public class MyPointTaskFormDTO implements Serializable {
* */
@NotBlank(message = "未完成:unfinished;已完成:finished;全部:all")
private String type;
private String dateId;
}

6
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ResiPointController.java

@ -2,6 +2,7 @@ package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.*;
@ -11,6 +12,7 @@ import com.epmet.service.UserPointActionLogService;
import com.epmet.service.UserPointStatisticalDailyService;
import com.epmet.service.UserPointTotalService;
import com.epmet.utils.ModuleConstant;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@ -169,6 +171,10 @@ public class ResiPointController {
public Result<List<MyPointTaskResultDTO>> queryMyPointTaskList(@LoginUser TokenDto tokenDto,@RequestBody MyPointTaskFormDTO formDTO){
formDTO.setUserId(tokenDto.getUserId());
formDTO.setCustomerId(tokenDto.getCustomerId());
//默认查询当天
if(StringUtils.isBlank(formDTO.getDateId())){
formDTO.setDateId(DateUtils.getBeforeNDay(0));
}
ValidatorUtils.validateEntity(formDTO);
return new Result<List<MyPointTaskResultDTO>>().ok(pointActionLogService.queryMyPointTaskList(formDTO));
}

4
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointActionLogServiceImpl.java

@ -525,9 +525,7 @@ public class UserPointActionLogServiceImpl extends BaseServiceImpl<UserPointActi
*/
@Override
public List<MyPointTaskResultDTO> queryMyPointTaskList(MyPointTaskFormDTO formDTO) {
//默认查询当天
String dateId= DateUtils.getBeforeNDay(0);
List<MyPointTaskResultDTO> list=baseDao.queryMyPointTaskList(formDTO.getCustomerId(),formDTO.getUserId(),formDTO.getType(), dateId);
List<MyPointTaskResultDTO> list=baseDao.queryMyPointTaskList(formDTO.getCustomerId(),formDTO.getUserId(),formDTO.getType(), formDTO.getDateId());
list.forEach(dto->{
if(NumConstant.ZERO==dto.getUpLimit()){
//无上限

Loading…
Cancel
Save