package com.farriver.bwf.service.extend.rbac; import com.farriver.bwf.common.model.ApiData; import com.farriver.bwf.common.model.ApiPageData; import com.farriver.bwf.data.transferobject.queryobject.om.OMOrganizationPositionQueryObject; import com.farriver.bwf.data.transferobject.queryobject.om.OMOrganizationQueryObject; import com.farriver.bwf.data.transferobject.queryobject.pa.PAEmployeeOrganizationPositionRelationQueryObject; import com.farriver.bwf.data.transferobject.queryobject.pa.PAEmployeeQueryObject; import com.farriver.bwf.data.transferobject.queryobject.pa.PAProfessionalTitleQueryObject; import com.farriver.bwf.data.transferobject.queryobject.security.AccountMasterQueryObject; import com.farriver.bwf.data.transferobject.viewmodel.common.AuthBean; import com.farriver.bwf.data.transferobject.viewmodel.om.OMOrganizationPositionWriteViewModel; import com.farriver.bwf.data.transferobject.viewmodel.om.OMOrganizationWriteViewModel; import com.farriver.bwf.data.transferobject.viewmodel.pa.PAEmployeeViewModel; import com.farriver.bwf.data.transferobject.viewmodel.pa.PAProfessionalTitleWriteViewModel; import com.farriver.bwf.data.transferobject.viewmodel.security.AccountMasterViewModel; import com.farriver.bwf.data.transferobject.viewmodel.security.PasswordViewModel; import com.farriver.bwf.data.transferobject.viewmodel.security.PermissionMasterViewModel; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; @FeignClient(name = "service-provider-rbac", path = "/rbac/api/admin") public interface RBACService { @RequestMapping(value = "/pa/professionaltitle/create", method = RequestMethod.POST) ApiData CreatePAProfessionalTitle(@RequestBody PAProfessionalTitleWriteViewModel model); @RequestMapping(value = "/pa/professionaltitle/list", method = RequestMethod.POST) ApiPageData GetPAProfessionalTitleList(@RequestBody PAProfessionalTitleQueryObject queryObject); @RequestMapping(value = "/pa/professionaltitle/update", method = RequestMethod.POST) ApiData UpdatePAProfessionalTitle(@RequestBody PAProfessionalTitleWriteViewModel model); @RequestMapping(value = "/pa/professionaltitle/delete", method = RequestMethod.GET) ApiData DeletePAProfessionalTitle(@RequestParam("id") String id); @RequestMapping(value = "/pa/professionaltitle/category", method = RequestMethod.GET) ApiData PAProfessionalTitleCategory(); @RequestMapping(value = "/pa/professionaltitle/group", method = RequestMethod.GET) ApiData PAProfessionalTitleGroup(); @RequestMapping(value = "/pa/professionaltitle/all", method = RequestMethod.GET) ApiPageData GetAllPAProfessionalTitle(); @RequestMapping(value = "/pa/professionaltitle/tree", method = RequestMethod.GET) ApiData GetPAProfessionalTitleTree(); @RequestMapping(value = "/pa/employee/create", method = RequestMethod.POST) ApiData CreatePAEmployee(@RequestBody PAEmployeeViewModel model); @RequestMapping(value = "/pa/employee/detail", method = RequestMethod.POST) ApiData GetPAEmployeeViewDetail(@RequestBody PAEmployeeQueryObject queryObject); @RequestMapping(value = "/pa/employee/createwithpositions", method = RequestMethod.POST) ApiData CreatePAEmployeeWithPositions(@RequestBody PAEmployeeViewModel model); @RequestMapping(value = "/pa/employee/list", method = RequestMethod.POST) ApiPageData GetPAEmployeeList(@RequestBody PAEmployeeQueryObject queryObject); @RequestMapping(value = "/pa/employee/listbyposition", method = RequestMethod.POST) ApiPageData GetPAEmployeeListByPosition(@RequestBody PAEmployeeOrganizationPositionRelationQueryObject queryObject); @RequestMapping(value = "/pa/employee/update", method = RequestMethod.POST) ApiData UpdatePAEmployee(@RequestBody PAEmployeeViewModel model); @RequestMapping(value = "/pa/employee/updatewithpositions", method = RequestMethod.POST) ApiData UpdatePAEmployeeWithPositions(@RequestBody PAEmployeeViewModel model); @RequestMapping(value = "/pa/employee/updateprofile", method = RequestMethod.POST) ApiData UpdatePAEmployeeProfile(@RequestBody PAEmployeeViewModel model); @RequestMapping(value = "/pa/employee/export", method = RequestMethod.POST) ResponseEntity ExportPAEmployeeData(@RequestBody PAEmployeeQueryObject queryObject); @RequestMapping(value = "/pa/employee/delete", method = RequestMethod.GET) ApiData DeletePAEmployee(@RequestParam("id") String id); @RequestMapping(value = "/pa/employee/positions", method = RequestMethod.GET) ApiData GetEmployeePositionsByEmployeeId(@RequestParam("employeeid") String employeeid); @RequestMapping(value = "/pa/employee/positionwithorganization", method = RequestMethod.GET) ApiData GetEmployeePositionWithOrganizationsByEmployeeId(@RequestParam("employeeid") String employeeid); @RequestMapping(value = "/pa/employee/title/delete", method = RequestMethod.GET) ApiData DeletePAEmployeeTitle(@RequestParam("id") String id); @RequestMapping(value = "/om/organization/create", method = RequestMethod.POST) ApiData CreateOMOrganization(@RequestBody OMOrganizationWriteViewModel model); @RequestMapping(value = "/om/organization/list", method = RequestMethod.POST) ApiPageData GetOMOrganizationList(@RequestBody OMOrganizationQueryObject queryObject); @RequestMapping(value = "/om/organization/update", method = RequestMethod.POST) ApiData UpdateOMOrganization(@RequestBody OMOrganizationWriteViewModel model); @RequestMapping(value = "/om/organization/all", method = RequestMethod.GET) ApiPageData GetAllOMOrganization(); @RequestMapping(value = "/om/organization/tree", method = RequestMethod.GET) ApiData GetOMOrganizationTree(); @RequestMapping(value = "/om/organization/delete", method = RequestMethod.GET) ApiData DeleteOMOrganization(@RequestParam("id") String id); @RequestMapping(value = "/om/organization/position/create", method = RequestMethod.POST) ApiData CreateOMOrganizationPosition(@RequestBody OMOrganizationPositionWriteViewModel model); @RequestMapping(value = "/om/organization/position/createwithroles", method = RequestMethod.POST) ApiData CreateOMOrganizationPositionWithRoles(@RequestBody OMOrganizationPositionWriteViewModel model); @RequestMapping(value = "/om/organization/position/list", method = RequestMethod.POST) ApiPageData GetOMOrganizationPositionList(@RequestBody OMOrganizationPositionQueryObject queryObject); @RequestMapping(value = "/om/organization/position/update", method = RequestMethod.POST) ApiData UpdateOMOrganizationPosition(@RequestBody OMOrganizationPositionWriteViewModel model); @RequestMapping(value = "/om/organization/position/updatewithroles", method = RequestMethod.POST) ApiData UpdateOMOrganizationPositionWithRoles(@RequestBody OMOrganizationPositionWriteViewModel model); @RequestMapping(value = "/om/organization/position/delete", method = RequestMethod.GET) ApiData DeleteOMOrganizationPosition(@RequestParam("id") String id); @RequestMapping(value = "/security/account/pass", method = RequestMethod.POST) ApiData UpdateAccountPassword(@RequestBody PasswordViewModel model); @RequestMapping(value = "/security/application/all", method = RequestMethod.GET) ApiPageData GetAllApplication(@RequestParam("permissionLevel") Integer permissionLevel); @RequestMapping(value = "/security/application/accountapps", method = RequestMethod.GET) ApiPageData GetAccountApplications(@RequestParam("accountid") String accountid); //role & permission @RequestMapping(value = "/security/role/all", method = RequestMethod.GET) ApiPageData getAllRoles(@RequestParam("permissionLevel") Integer permissionLevel); @RequestMapping(value = "/security/role/listbyaccountid", method = RequestMethod.GET) ApiData GetRolesByAccountId(@RequestParam("accountid") String accountid); @RequestMapping(value = "/security/role/listbypositionid", method = RequestMethod.GET) ApiData GetRolesByPositionId(@RequestParam("positionid") String positionid); @RequestMapping(value = "/security/permission/create", method = RequestMethod.POST) ApiData CreatePermission(@RequestBody PermissionMasterViewModel model); @RequestMapping(value = "/security/permission/update", method = RequestMethod.POST) ApiData UpdatePermission(@RequestBody PermissionMasterViewModel model); @RequestMapping(value = "/security/permission/uripermission", method = RequestMethod.GET) PermissionMasterViewModel GetUriPermission(@RequestParam("appcode") String appcode, @RequestParam("uri") String uri); //login & register @RequestMapping(value = "/oauth/register", method = RequestMethod.POST) ApiData RegisterAccount(@RequestBody AccountMasterViewModel model); @RequestMapping(value = "/oauth/resetpasswordbysms", method = RequestMethod.POST) ApiData ResetPasswordSMSCode(@RequestBody PasswordViewModel model); @RequestMapping(value = "/oauth/resetpasswordbyemail", method = RequestMethod.POST) ApiData ResetPasswordByEmail(@RequestBody PasswordViewModel model); @RequestMapping(value = "/oauth/retrievepasswordbyemail", method = RequestMethod.POST) ApiData RetrievePasswordByEmail(@RequestParam("email") String email, @RequestParam("ticket") String ticket); @RequestMapping(value = "/oauth/login", method = RequestMethod.POST) ApiData LoginByAccountPassword(@RequestBody AuthBean authBean); @RequestMapping(value = "/oauth/loginBySMSCode", method = RequestMethod.POST) ApiData LoginBySMSCode(@RequestBody AuthBean authBean); @RequestMapping(value = "/oauth/logout", method = RequestMethod.GET) ApiData GetLogout(@RequestParam("accountid") String accountid); @RequestMapping(value = "/oauth/setverifycode", method = RequestMethod.GET) void SetVerifyCode(@RequestParam("account") String account, @RequestParam("code") String code); @RequestMapping(value = "/oauth/sendsmscode", method = RequestMethod.GET) ApiData GetSMSCode(@RequestParam("cellphone") String cellphone); @RequestMapping(value = "/oauth/accountroles", method = RequestMethod.POST) ApiData GetAccountRolesByAccountId(@RequestParam("id") String id); @RequestMapping(value = "/oauth/rolepermissions", method = RequestMethod.POST) ApiData GetRolePermissions(@RequestParam("applicationcode") String applicationcode); @RequestMapping(value = "/oauth/getaccountbycode", method = RequestMethod.GET) ApiData LoadAccountByAccount(@RequestParam("code") String code); @RequestMapping(value = "/oauth/accountdetail", method = RequestMethod.POST) ApiData GetAccountDetail(@RequestBody AccountMasterQueryObject queryObject); @RequestMapping(value = "/oauth/checkpermission", method = RequestMethod.POST) ApiData CheckPermission(@RequestParam("applicationcode") String applicationcode, @RequestBody AccountMasterViewModel account, @RequestParam("uri") String uri); @RequestMapping(value = "/oauth/getaccountwithrolesandpermissions", method = RequestMethod.GET) ApiData GetAccountWithRolesAndPermissions(@RequestParam("accountid") String accountid); }