Commit 2e249919 by guojuxing

商户logo修改接口添加

parent f3ea8aaf
......@@ -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();
}
@Override
public ServiceResponse<EnterpriseDTO> getEnterpriseById(Integer enterpriseId) {
TabEnterprise tabEnterprise = enterpriseService.getEnterpriseById(enterpriseId);
if (tabEnterprise == null) {
......
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