cloudroam
2024-09-30 b14befec1ef345d88a04da3ca1e10a006a7862e5
src/main/java/com/mzl/flower/service/point/CustomerPointService.java
@@ -15,6 +15,8 @@
import com.mzl.flower.mapper.point.CustomerPointDetailMapper;
import com.mzl.flower.mapper.point.CustomerPointMapper;
import com.mzl.flower.service.BaseService;
import com.mzl.flower.utils.DateUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -47,6 +49,12 @@
    }
    public  Page<CustomerPointDetailDTO> queryCustomerDetails(QueryPointDetailDTO dto, Page page) {
        if(StringUtils.isNotBlank(dto.getCreateTimeStartStr())){
            dto.setCreateTimeStart(DateUtils.dateTimeStringToLocalDateTime(dto.getCreateTimeStartStr()));
        }
        if(StringUtils.isNotBlank(dto.getCreateTimeEndStr())){
            dto.setCreateTimeEnd(DateUtils.dateTimeStringToLocalDateTime(dto.getCreateTimeEndStr()));
        }
        List<CustomerPointDetailDTO> list = customerPointMapper.queryCustomerDetails(dto, page);
        page.setRecords(list);
@@ -182,6 +190,7 @@
                .eq(CustomerPointDetail::getUserId, SecurityUtils.getUserId())
                .eq(CustomerPointDetail::getChangeType, POINT_CHANGE_TYPE.add.name())
                .eq(CustomerPointDetail::getType, POINT_TYPE.sign.name());
        lambdaQueryWrapper.orderByDesc(CustomerPointDetail::getRecordDate);
        if(startDate!=null){
            lambdaQueryWrapper.ge(CustomerPointDetail::getRecordDate,startDate);
        }