Commit e05910e6 by 陶光胜

取数平台权限

parent 337166ab
......@@ -7,6 +7,7 @@ import com.gic.cloud.data.hook.api.entity.FlatQueryExecuteRequest;
import com.gic.cloud.data.hook.api.entity.GeneralResult;
import com.gic.cloud.data.hook.api.service.IFlatQueryResultService;
import com.gic.cloud.data.hook.api.service.IFreeQueryService;
import com.gic.enterprise.api.dto.EnterpriseDTO;
import com.gic.enterprise.api.service.EnterpriseService;
import com.gic.web.common.utils.SessionContextUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -120,7 +121,12 @@ public class FreeQueryController {
@RequestMapping("/get-free-query-count")
public GeneralResult getFreeQueryCount(String sql, String enterpriseId, HttpServletRequest request, HttpServletResponse response) {
GeneralResult result = new GeneralResult();
result.setInfo(String.valueOf(this.freeQueryService.getFreeQueryCount(sql, enterpriseId)));
EnterpriseDTO enterprise = this.enterpriseService.getEnterpriseById(enterpriseId);
if(enterprise.getDatahookEndDate() != null && enterprise.getDatahookEndDate().before(new Date())){
result.setInfo("0");
}else {
result.setInfo(String.valueOf(this.freeQueryService.getFreeQueryCount(sql, enterpriseId)));
}
return result;
}
......
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