|
@ -71,17 +71,9 @@ public class PointsLogsServiceImpl extends BaseServiceImpl<PointsLogsDao, Points |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public PageData<PointsLogsDTO> page(Map<String, Object> params) { |
|
|
public PageData<PointsLogsDTO> page(Map<String, Object> params) { |
|
|
String volunteerId = (String) params.get("volunteerId"); |
|
|
IPage<PointsLogsDTO> page = getPage(params); |
|
|
String behaviorCode = (String) params.get("behaviorCode"); |
|
|
List<PointsLogsDTO> list = baseDao.selectListVolunteerPointsLog(params); |
|
|
QueryWrapper<PointsLogsEntity> wrapper = new QueryWrapper<>(); |
|
|
return new PageData<>(list, page.getTotal()); |
|
|
wrapper.eq(StringUtils.isNotBlank(volunteerId), "VOLUNTEER_ID", volunteerId) |
|
|
|
|
|
.eq(StringUtils.isNotBlank(behaviorCode), "BEHAVIOR_CODE", behaviorCode); |
|
|
|
|
|
|
|
|
|
|
|
IPage<PointsLogsEntity> page = baseDao.selectPage( |
|
|
|
|
|
getPage(params, FieldConstant.CREATED_TIME, false), |
|
|
|
|
|
wrapper |
|
|
|
|
|
); |
|
|
|
|
|
return getPageData(page, PointsLogsDTO.class); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
@ -91,8 +83,8 @@ public class PointsLogsServiceImpl extends BaseServiceImpl<PointsLogsDao, Points |
|
|
return ConvertUtils.sourceToTarget(entityList, PointsLogsDTO.class); |
|
|
return ConvertUtils.sourceToTarget(entityList, PointsLogsDTO.class); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private QueryWrapper<PointsLogsEntity> getWrapper(Map<String, Object> params){ |
|
|
private QueryWrapper<PointsLogsEntity> getWrapper(Map<String, Object> params) { |
|
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
|
|
String id = (String) params.get(FieldConstant.ID_HUMP); |
|
|
|
|
|
|
|
|
QueryWrapper<PointsLogsEntity> wrapper = new QueryWrapper<>(); |
|
|
QueryWrapper<PointsLogsEntity> wrapper = new QueryWrapper<>(); |
|
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|
@ -138,10 +130,10 @@ public class PointsLogsServiceImpl extends BaseServiceImpl<PointsLogsDao, Points |
|
|
@Override |
|
|
@Override |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
public Result confirmAdjustPoint(EpdcAdjustVolunteerPointsDTO formDto) { |
|
|
public Result confirmAdjustPoint(EpdcAdjustVolunteerPointsDTO formDto) { |
|
|
if(formDto.getOperatePoints()== NumConstant.ZERO){ |
|
|
if (formDto.getOperatePoints() == NumConstant.ZERO) { |
|
|
return new Result().error("操作积分不能为0"); |
|
|
return new Result().error("操作积分不能为0"); |
|
|
} |
|
|
} |
|
|
PointsLogsEntity pointsLogsEntity=new PointsLogsEntity(); |
|
|
PointsLogsEntity pointsLogsEntity = new PointsLogsEntity(); |
|
|
pointsLogsEntity.setVolunteerId(formDto.getId()); |
|
|
pointsLogsEntity.setVolunteerId(formDto.getId()); |
|
|
pointsLogsEntity.setUserId(formDto.getUserId()); |
|
|
pointsLogsEntity.setUserId(formDto.getUserId()); |
|
|
pointsLogsEntity.setOperationTime(new Date()); |
|
|
pointsLogsEntity.setOperationTime(new Date()); |
|
|