修改单据insert和update的代码,解决大数据量无法写入的bug,另外增加消息提醒的定时刷新

This commit is contained in:
季圣华
2020-03-28 19:04:04 +08:00
parent 89d2e29779
commit e45e3b119e
8 changed files with 186 additions and 53 deletions

View File

@@ -9,7 +9,9 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author ji sheng hua 华夏ERP
@@ -54,4 +56,22 @@ public class MsgController {
}
return res;
}
@GetMapping("/getMsgCountByStatus")
public BaseResponseInfo getMsgCountByStatus(@RequestParam("status") String status,
HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo();
try {
Map<String, Long> map = new HashMap<String, Long>();
Long count = msgService.getMsgCountByStatus(status);
map.put("count", count);
res.code = 200;
res.data = map;
} catch(Exception e){
e.printStackTrace();
res.code = 500;
res.data = "获取数据失败";
}
return res;
}
}