Commit 42f84e3a by guojuxing

是否已配置平台商户规则

parent fdfd8551
......@@ -63,4 +63,13 @@ public interface ConfigRuleEnterpriseApiService {

*/
ServiceResponse<Page<RuleEnterpriseDTO>> listEnterpriseRule(String search, Integer enterpriseRuleId,
Integer pageNum, Integer pageSize);
/**
* 是否已配置平台商户规则
* @Title: hasDefaultEnterpriseRule

* @Description:

* @author guojuxing 

* @return com.gic.api.base.commons.ServiceResponse<java.lang.Boolean>


*/
ServiceResponse<Boolean> hasDefaultEnterpriseRule();
}
......@@ -178,6 +178,15 @@ public class ConfigRuleEnterpriseApiServiceImpl implements ConfigRuleEnterpriseA
return ServiceResponse.success(resultPage);
}
@Override
public ServiceResponse<Boolean> hasDefaultEnterpriseRule() {
TabConfigRuleEnterpriseRel defaultRule = configRuleEnterpriseService.getByEnterpriseId(-1);
if (defaultRule != null) {
return ServiceResponse.success(true);
}
return ServiceResponse.success(false);
}
/**
* 验证参数
* @param dto
......
......@@ -215,4 +215,16 @@ public class ConfigRuleController {
configRuleEnterpriseApiService.listEnterpriseRule(search, enterpriseRuleId, pageNum, pageSize),
EnterpriseVO.class);
}
/**
* 是否已配置平台商户规则
* @Title: hasDefaultEnterpriseRule

* @Description:

* @author guojuxing 

* @return com.gic.commons.webapi.reponse.RestResponse


*/
@RequestMapping("/has-default-enterprise-rule")
public RestResponse hasDefaultEnterpriseRule() {
return ResultControllerUtils.commonResult(configRuleEnterpriseApiService.hasDefaultEnterpriseRule());
}
}
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