bocloud.sms/bocloud.sms.service/src/main/java/com/bocloud/sms/interfaces/TenantService.java

404 lines
8.2 KiB
Java
Raw Normal View History

2024-08-20 09:57:30 +00:00
package com.bocloud.sms.interfaces;
import com.bocloud.sms.entity.*;
import com.bocloud.sms.model.*;
import com.megatron.common.exception.InternalServerException;
import com.megatron.common.model.*;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
import java.util.Map;
/**
* Service
*
* @author wei wei
* @version 1.0
* @since 2016.08.05
*/
public interface TenantService {
/**
*
*
* @param params
* @param requestContext
* @return
* @throws InternalServerException
*/
Result create(TenantModel params, RequestContext requestContext) throws InternalServerException;
/**
*
*
* @param id
* @param tenant
* @param requestContext
* @return
* @throws InternalServerException
*/
Result modify(Long id, TenantModel tenant, RequestContext requestContext) throws InternalServerException;
/**
*
*
* @param id
* @param requestContext
* @return
* @throws InternalServerException
*/
Result remove(Long id, RequestContext requestContext) throws InternalServerException;
/**
*
*
* @param id
* @return
*/
GeneralResult<Tenant> detail(Long id);
/**
*
*
* @param pager
* @param user
* @return
*/
GeneralResult<GridBean<Tenant>> list(Pager pager, RequestContext user);
/**
* id
*
* @param poolId
* @return
*/
Result deleteByPoolId(Long poolId);
/**
*
*
* @param id
* @param category
* @param poolIds
* @param requestContext
* @return
*/
Result configPool(Long id, String category, List<Long> poolIds, RequestContext requestContext);
/**
*
*
* @param id
* @return
*/
GeneralResult<List<TenantPool>> listTenantPool(Long id);
/**
*
*
* @param id
* @param businessIds
* @return
*/
Result configBusiness(Long id, List<Long> businessIds);
/**
*
*
* @param account
* @param password
* @param sessionId
* @param requestIp
* @return
* @throws InternalServerException
*/
GeneralResult<Map<String, Object>> login(String account, String password, String sessionId, String requestIp)
throws InternalServerException;
/**
* 退
*
* @param id
* @return
* @throws InternalServerException
*/
Result logout(Long id) throws InternalServerException;
/**
*
*
* @param id
* @param action
* @param requestContext
* @return
*/
Result updateStatus(Long id, ActionModel.Action action, RequestContext requestContext);
/**
*
*
* @param id
* @return
*/
GeneralResult<List<User>> getTenantUsers(Long id);
/**
*
*
* @param id
* @param oldPassword
* @param password
* @param requestContext
* @return
*/
Result changePwd(Long id, String oldPassword, String password, RequestContext requestContext);
/**
*
*
* @param id
* @param password
* @param requestContext
* @return
*/
Result resetPwd(Long id, String password, RequestContext requestContext);
/**
* ()
*
* @param apiKey
* @return
*/
GeneralResult<AccountSecurity> apiKey(String apiKey);
/**
*
*
* @param id
* @param token
* @return
*/
Result checkTenant(Long id, String token);
/**
*
*
* @param tenantId
* @return
*/
GeneralResult<List<Role>> listRoles(Long tenantId);
/**
* apiKey
*
* @param apiKey
* @return
*/
GeneralResult<AccountSecurity> getByApiKey(String apiKey);
/**
*
*
* @param account
* @return
* @throws InternalServerException
*/
Result lockByAccount(String account) throws InternalServerException;
/**
*
*
* @param ids
* @param context
* @return
*/
Result batchLock(List<Long> ids, RequestContext context);
/**
*
*
* @param ids
* @param context
* @return
*/
Result batchActive(List<Long> ids, RequestContext context);
/**
*
*
* @param ids
* @param context
* @return
*/
Result batchRemove(List<Long> ids, RequestContext context);
/**
*
*
* @param log
* @return
* @throws InternalServerException
*/
Result save(LoginRecord log) throws InternalServerException;
/**
*
*
* @param pager
* @return
*/
GeneralResult<GridBean<LoginRecord>> list(Pager pager);
/**
* checked
*
* @param context
* @return
*/
GeneralResult<Map<String, Object>> listPermissions(RequestContext context);
/**
*
*
* @param id
* @param password
* @return
*/
Result check(Long id, String password);
/**
*
*
* @param favorites
* @return
*/
Result addFavorites(List<Favorite> favorites);
/**
*
*
* @param serviceMenuId
* @param tenantId
* @return
*/
Result addFavorite(Long serviceMenuId, Long tenantId);
/**
*
*
* @param serviceId
* @param tenantId
* @return
*/
Result cancelFavorite(Long serviceId, Long tenantId, RequestContext requestContext);
/**
*
*
* @param requestContext
* @return
*/
GeneralResult<List<ServiceMenuBean>> listServiceMenu(RequestContext requestContext);
/**
*
*
* @param requestContext
* @return
*/
GeneralResult<List<CloudServiceBean>> listFavorite(RequestContext requestContext);
/**
*
*
* @param params
* @param requestContext
* @return
*/
Result changePriority(List<PriorityModel> params, RequestContext requestContext);
/**
*
*
* @param account
* @return
*/
GeneralResult<Map<String, Object>> tokenLogin(String account);
/**
*
*
* @param id
* @return
*/
GeneralResult<List<Project>> projects(Long id);
/**
*
*
* @param account
* @return
*/
Result exist(String account);
/**
*
*
* @param city
* @return
*/
GeneralResult<List<Tenant>> listTenantByCity(String city);
/**
*
*
* @param title
* @param requestContext
* @param response
* @return
*/
Result importTemp(String title, RequestContext requestContext, HttpServletResponse response);
/**
*
*
* @param multipartFile
* @param requestContext
* @return
*/
Result importData(MultipartFile multipartFile, RequestContext requestContext);
/**
*
*
* @param id
* @param userIds
* @return
*/
Result configUsers(Long id, List<Long> userIds);
/**
*
*
* @param condition
* @return
*/
GeneralResult condition(String condition);
/**
*
*
* @param paramList
* @param requestContext
* @param response
* @return
*/
Result export(List<Param> paramList, RequestContext requestContext, HttpServletResponse response);
GeneralResult checkPassword(RequestContext requestContext, String password);
}