|
|
@@ -12,6 +12,7 @@ import com.zhiqiyun.open.mvc.Result;
|
|
|
import com.zhiqiyun.open.mvc.params.statistics.QueryComplaintInfoParams;
|
|
|
import com.zhiqiyun.open.mvc.params.statistics.SaveComplaintInfoParams;
|
|
|
import com.zhiqiyun.open.utils.DateUtil;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
@@ -32,12 +33,31 @@ public class ComplaintController {
|
|
|
@Autowired
|
|
|
private SequenceService sequenceService;
|
|
|
|
|
|
- @Permission(value = "statistics.complaint", tags = "查询度假村")
|
|
|
+ @Permission(value = "statistics.complaint", tags = "查询客诉信息")
|
|
|
@PostMapping("/findPage")
|
|
|
public Result findPage(@RequestBody QueryComplaintInfoParams params) {
|
|
|
|
|
|
QueryWrapper<ComplaintInfo> wrapper = new QueryWrapper<>();
|
|
|
|
|
|
+ if (StringUtils.isNotBlank(params.getTitle())) {
|
|
|
+ wrapper.like("title", params.getTitle());
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(params.getCategory())) {
|
|
|
+ wrapper.like("category", params.getCategory());
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(params.getChannel())) {
|
|
|
+ wrapper.like("channel", params.getChannel());
|
|
|
+ }
|
|
|
+ if (params.getState() != null) {
|
|
|
+ wrapper.eq("state", params.getState());
|
|
|
+ }
|
|
|
+ if (params.getCreatedTime() != null) {
|
|
|
+ wrapper.between("created_time", params.getCreatedTime().getStatDate(), params.getCreatedTime().getEndDate());
|
|
|
+ }
|
|
|
+ if (params.getProcessedTime() != null) {
|
|
|
+ wrapper.between("processed_time", params.getProcessedTime().getStatDate(), params.getProcessedTime().getEndDate());
|
|
|
+ }
|
|
|
+
|
|
|
Page<ComplaintInfo> page = params.getPage();
|
|
|
page.addOrder(OrderItem.desc("id"));
|
|
|
|