Commit 95677968 by zhiwj

Merge branch 'developer' of…

Merge branch 'developer' of http://115.159.76.241/base_platform_enterprise/gic-platform-enterprise into developer
parents aebfc05f d8636978
......@@ -56,6 +56,17 @@ public interface EnterpriseApiService {
ServiceResponse<Integer> editEnterpriseInfo(EnterpriseDTO enterpriseDTO);
/**
* 修改商户logo
* @Title: modifyEnterpriseLogo

* @Description:

* @author guojuxing
* @param enterpriseId 商户ID
* @param logoUrl
logo的图片地址
* @return com.gic.api.base.commons.ServiceResponse<java.lang.String>


*/
ServiceResponse<String> modifyEnterpriseLogo(Integer enterpriseId, String logoUrl);
/**
* 查询单条数据
* @Title: getEnterpriseById

* @Description:
......
......@@ -176,6 +176,19 @@ public class EnterpriseApiServiceImpl implements EnterpriseApiService {
}
@Override
public ServiceResponse<String> modifyEnterpriseLogo(Integer enterpriseId, String logoUrl) {
TabEnterprise tabEnterprise = enterpriseService.getEnterpriseById(enterpriseId);
if (tabEnterprise == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "企业ID错误,查询不到数据");
}
EnterpriseDTO enterpriseDTO = new EnterpriseDTO();
enterpriseDTO.setEnterpriseId(enterpriseId);
enterpriseDTO.setLogo(logoUrl);
enterpriseService.editEnterprise(enterpriseDTO);
return ServiceResponse.success(tabEnterprise.getEnterpriseName());
}
@Override
public ServiceResponse<EnterpriseDTO> getEnterpriseById(Integer enterpriseId) {
TabEnterprise tabEnterprise = enterpriseService.getEnterpriseById(enterpriseId);
if (tabEnterprise == null) {
......
......@@ -193,6 +193,11 @@ public class EnterpriseController {
return ResultControllerUtils.commonResult(enterpriseApiService.editEnterprise(enterpriseDTO));
}
@RequestMapping("/modify-enterprise-logo")
public RestResponse modifyEnterpriseLogo(Integer enterpriseId, String logoUrl) {
return ResultControllerUtils.commonResult(enterpriseApiService.modifyEnterpriseLogo(enterpriseId, logoUrl));
}
@RequestMapping("/edit-user")
public RestResponse editUser(UserDTO userDTO) {
//自动密码
......
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