Commit 0c054990 by guojuxing

报名修改

parent fdaa5f8f
......@@ -70,9 +70,9 @@ public class EnterpriseController {
@RequestMapping("/get-enterprise")
public RestResponse editEnterprise(Integer enterpriseId) {
ServiceResponse enterpriseResult = enterpriseApiService.getEnterpriseById(enterpriseId);
ServiceResponse<EnterpriseDTO> enterpriseResult = enterpriseApiService.getEnterpriseById(enterpriseId);
if (enterpriseResult.isSuccess()) {
return RestResponse.success();
return RestResponse.success(enterpriseResult.getResult());
} else {
return EnterpriseRestResponse.failure(enterpriseResult);
}
......
......@@ -59,11 +59,21 @@ public class UserController {
}
}
@RequestMapping("/get-user-by-id")
public RestResponse getUserById(Integer userId) {
ServiceResponse<UserDTO> enterpriseResult = userApiService.getUserById(userId);
if (enterpriseResult.isSuccess()) {
return RestResponse.success(enterpriseResult.getResult());
} else {
return EnterpriseRestResponse.failure(enterpriseResult);
}
}
@RequestMapping("/get-user")
public RestResponse getUser(Integer userId) {
ServiceResponse enterpriseResult = userApiService.getUserById(userId);
public RestResponse getUser() {
ServiceResponse<UserDTO> enterpriseResult = userApiService.getUserByEnterpriseId(StoreGroupConstant.TEST_ENTERPRISE_ID);
if (enterpriseResult.isSuccess()) {
return RestResponse.success();
return RestResponse.success(enterpriseResult.getResult());
} else {
return EnterpriseRestResponse.failure(enterpriseResult);
}
......
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