|
@@ -1,13 +1,18 @@
|
|
package com.chelvc.cloud.vehicle.server.service.impl;
|
|
package com.chelvc.cloud.vehicle.server.service.impl;
|
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.chelvc.cloud.vehicle.api.dto.FeedBackDTO;
|
|
import com.chelvc.cloud.vehicle.api.dto.FeedBackDTO;
|
|
import com.chelvc.cloud.vehicle.api.param.FeedBackModifyParam;
|
|
import com.chelvc.cloud.vehicle.api.param.FeedBackModifyParam;
|
|
|
|
+import com.chelvc.cloud.vehicle.api.param.FeedBackPagingParam;
|
|
import com.chelvc.cloud.vehicle.server.copier.FeedbackCopier;
|
|
import com.chelvc.cloud.vehicle.server.copier.FeedbackCopier;
|
|
import com.chelvc.cloud.vehicle.server.dao.FeedbackMapper;
|
|
import com.chelvc.cloud.vehicle.server.dao.FeedbackMapper;
|
|
import com.chelvc.cloud.vehicle.server.entity.FeedBack;
|
|
import com.chelvc.cloud.vehicle.server.entity.FeedBack;
|
|
import com.chelvc.cloud.vehicle.server.service.FeedbackService;
|
|
import com.chelvc.cloud.vehicle.server.service.FeedbackService;
|
|
import com.chelvc.framework.base.context.SessionContextHolder;
|
|
import com.chelvc.framework.base.context.SessionContextHolder;
|
|
|
|
+import com.chelvc.framework.common.model.Pagination;
|
|
import com.chelvc.framework.common.util.AssertUtils;
|
|
import com.chelvc.framework.common.util.AssertUtils;
|
|
|
|
+import com.chelvc.framework.common.util.StringUtils;
|
|
|
|
+import com.chelvc.framework.database.context.DatabaseContextHolder;
|
|
import lombok.NonNull;
|
|
import lombok.NonNull;
|
|
import org.apache.dubbo.config.annotation.DubboService;
|
|
import org.apache.dubbo.config.annotation.DubboService;
|
|
|
|
|
|
@@ -51,4 +56,16 @@ public class FeedbackServiceImpl extends ServiceImpl<FeedbackMapper, FeedBack> i
|
|
return FeedbackCopier.INSTANCE.copying(feedBack);
|
|
return FeedbackCopier.INSTANCE.copying(feedBack);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ public Pagination<FeedBackDTO> getFeedbackPaging(FeedBackPagingParam param){
|
|
|
|
+ Page<FeedBack> page = this.lambdaQuery()
|
|
|
|
+ .eq(StringUtils.notEmpty(param.getStatus()),FeedBack::getStatus,param.getStatus())
|
|
|
|
+ .like(StringUtils.notEmpty(param.getTitle()),FeedBack::getTitle,param.getTitle())
|
|
|
|
+ .eq(StringUtils.notEmpty(param.getChannel()),FeedBack::getChannel,param.getChannel())
|
|
|
|
+ .orderByDesc(FeedBack::getCreateTime)
|
|
|
|
+ .page(DatabaseContextHolder.page(param.getPaging()));
|
|
|
|
+
|
|
|
|
+ return DatabaseContextHolder.pagination(page,FeedbackCopier.INSTANCE::copying);
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|