Commit bbc5b41e by 陶光胜

取数平台权限

parent e05910e6
......@@ -121,8 +121,10 @@ public class FreeQueryController {
@RequestMapping("/get-free-query-count")
public GeneralResult getFreeQueryCount(String sql, String enterpriseId, HttpServletRequest request, HttpServletResponse response) {
GeneralResult result = new GeneralResult();
EnterpriseDTO enterprise = this.enterpriseService.getEnterpriseById(enterpriseId);
if(enterprise.getDatahookEndDate() != null && enterprise.getDatahookEndDate().before(new Date())){
FreeQuerySource freeQuerySource = this.freeQueryService.getFreeQuerySource(SessionContextUtils.getLoginUserEnterpriseId());
Date expireTime = freeQuerySource.getDbExpiration();
Integer isPrivate = freeQuerySource.getIsPrivate();
if(isPrivate != null && isPrivate == 1 && expireTime != null && expireTime.before(new Date())){
result.setInfo("0");
}else {
result.setInfo(String.valueOf(this.freeQueryService.getFreeQueryCount(sql, enterpriseId)));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment