|
@@ -1,25 +1,31 @@
|
|
package com.boman.web.core.service.message;
|
|
package com.boman.web.core.service.message;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
+import com.boman.domain.constant.FormDataConstant;
|
|
import com.boman.domain.dto.AjaxResult;
|
|
import com.boman.domain.dto.AjaxResult;
|
|
|
|
+import com.boman.domain.dto.FormDataDto;
|
|
import com.boman.domain.dto.QueryBySqlDto;
|
|
import com.boman.domain.dto.QueryBySqlDto;
|
|
import com.boman.domain.dto.UpdateDto;
|
|
import com.boman.domain.dto.UpdateDto;
|
|
|
|
+import com.boman.web.core.mapper.MessageMapper;
|
|
import com.boman.web.core.service.TableServiceCmdService;
|
|
import com.boman.web.core.service.TableServiceCmdService;
|
|
import com.boman.web.core.service.bomanMessageReceive.IBomanMessageReceiveService;
|
|
import com.boman.web.core.service.bomanMessageReceive.IBomanMessageReceiveService;
|
|
import com.boman.web.core.service.common.ICommonService;
|
|
import com.boman.web.core.service.common.ICommonService;
|
|
import com.boman.web.core.utils.AuthUtils;
|
|
import com.boman.web.core.utils.AuthUtils;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.LoggerFactory;
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Isolation;
|
|
import org.springframework.transaction.annotation.Isolation;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
|
+import java.util.List;
|
|
|
|
+
|
|
import static com.boman.common.core.utils.number.NumberUtils.eqZero;
|
|
import static com.boman.common.core.utils.number.NumberUtils.eqZero;
|
|
-import static com.boman.common.core.utils.number.NumberUtils.gtZero;
|
|
|
|
import static com.boman.common.core.utils.obj.ObjectUtils.*;
|
|
import static com.boman.common.core.utils.obj.ObjectUtils.*;
|
|
-
|
|
|
|
|
|
+import static com.boman.domain.constant.FormDataConstant.*;
|
|
/**
|
|
/**
|
|
* @author shiqian
|
|
* @author shiqian
|
|
* @date 2021年07月08日 13:56
|
|
* @date 2021年07月08日 13:56
|
|
@@ -45,6 +51,8 @@ public class MessageServiceImpl implements MessageService {
|
|
private IBomanMessageReceiveService receiveService;
|
|
private IBomanMessageReceiveService receiveService;
|
|
@Resource
|
|
@Resource
|
|
private TableServiceCmdService cmdService;
|
|
private TableServiceCmdService cmdService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private MessageMapper messageMapper;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 功能描述: 撤回
|
|
* 功能描述: 撤回
|
|
@@ -114,4 +122,23 @@ public class MessageServiceImpl implements MessageService {
|
|
public AjaxResult notFinishMessages(QueryBySqlDto queryBySql) {
|
|
public AjaxResult notFinishMessages(QueryBySqlDto queryBySql) {
|
|
return cmdService.queryListByUnionTable(queryBySql);
|
|
return cmdService.queryListByUnionTable(queryBySql);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public AjaxResult toDoMessage(FormDataDto dto) {
|
|
|
|
+ JSONObject rows = new JSONObject();
|
|
|
|
+ int total = messageMapper.countByCondition(dto.getUsername());
|
|
|
|
+ rows.put(FormDataConstant.PAGE_TOTAL, total);
|
|
|
|
+
|
|
|
|
+ if (total <= 0) {
|
|
|
|
+ rows.put(FormDataConstant.PAGE_ROWS, new ArrayList<>());
|
|
|
|
+ return AjaxResult.success(rows);
|
|
|
|
+ }
|
|
|
|
+ if (total <= 0) {
|
|
|
|
+ rows.put(FormDataConstant.PAGE_ROWS, new ArrayList<>());
|
|
|
|
+ return AjaxResult.success(rows);
|
|
|
|
+ }
|
|
|
|
+ List<JSONObject> result = messageMapper.toDoMessage(dto.getUsername(), dto.getLimit(), dto.getOffset());
|
|
|
|
+ rows.put(PAGE_ROWS, result);
|
|
|
|
+ return AjaxResult.success(rows);
|
|
|
|
+ }
|
|
}
|
|
}
|