Commit 65bf9322 by guojuxing

Merge remote-tracking branch 'origin/developer' into developer

# Conflicts:
#	gic-platform-operation-web/src/main/java/com/gic/operation/web/exception/GlobalExceptionHandler.java
parents 198e92bf 50abc93f
package com.gic.enterprise.dto;
import java.io.Serializable;
public class PlatformBrandDTO implements Serializable {
private static final long serialVersionUID = -6619834227070771185L;
private Integer platformBrandId;
/**
* 经营类目
*/
private Integer platformBrandCategoryId;
/**
* 经营类目名
*/
private String platformBrandCategoryName;
/**
* 品牌name
*/
private String platformBrandName;
/**
* 1:运维平台 2:商户后台
*/
private Integer createType;
public Integer getPlatformBrandId() {
return platformBrandId;
}
public void setPlatformBrandId(Integer platformBrandId) {
this.platformBrandId = platformBrandId;
}
public Integer getPlatformBrandCategoryId() {
return platformBrandCategoryId;
}
public void setPlatformBrandCategoryId(Integer platformBrandCategoryId) {
this.platformBrandCategoryId = platformBrandCategoryId;
}
public String getPlatformBrandCategoryName() {
return platformBrandCategoryName;
}
public void setPlatformBrandCategoryName(String platformBrandCategoryName) {
this.platformBrandCategoryName = platformBrandCategoryName;
}
public String getPlatformBrandName() {
return platformBrandName;
}
public void setPlatformBrandName(String platformBrandName) {
this.platformBrandName = platformBrandName;
}
public Integer getCreateType() {
return createType;
}
public void setCreateType(Integer createType) {
this.createType = createType;
}
}
package com.gic.enterprise.dto;
import java.io.Serializable;
public class PlatformBrandRefDTO implements Serializable {
private static final long serialVersionUID = -1183766055952427246L;
private Integer platformBrandRefId;
/**
*
*/
private Integer platformBrandId;
/**
* 企业id
*/
private Integer enterpriseId;
/**
* 商户品牌id
*/
private Integer enterpriseBrandId;
/**
* 商户品牌name
*/
private String enterpriseBrandName;
/**
* 商户品牌code
*/
private String enterpriseBrandCode;
public Integer getPlatformBrandRefId() {
return platformBrandRefId;
}
public void setPlatformBrandRefId(Integer platformBrandRefId) {
this.platformBrandRefId = platformBrandRefId;
}
public Integer getPlatformBrandId() {
return platformBrandId;
}
public void setPlatformBrandId(Integer platformBrandId) {
this.platformBrandId = platformBrandId;
}
public Integer getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(Integer enterpriseId) {
this.enterpriseId = enterpriseId;
}
public Integer getEnterpriseBrandId() {
return enterpriseBrandId;
}
public void setEnterpriseBrandId(Integer enterpriseBrandId) {
this.enterpriseBrandId = enterpriseBrandId;
}
public String getEnterpriseBrandName() {
return enterpriseBrandName;
}
public void setEnterpriseBrandName(String enterpriseBrandName) {
this.enterpriseBrandName = enterpriseBrandName;
}
public String getEnterpriseBrandCode() {
return enterpriseBrandCode;
}
public void setEnterpriseBrandCode(String enterpriseBrandCode) {
this.enterpriseBrandCode = enterpriseBrandCode;
}
}
package com.gic.enterprise.service;
import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.enterprise.dto.PlatformBrandDTO;
import com.gic.enterprise.dto.PlatformBrandRefDTO;
/**
* 平台品牌
* @ClassName: PlatfromBrandApiService
* @Description: 平台品牌
* @author zhiwj
* @date 2019/8/5 16:26
*/
public interface PlatfromBrandApiService {
/**
* gic添加一个平台级品牌
* @Title: addBrandFromGic
* @Description:
* @author zhiwj
* @param categoryId
* @param platformBrandName
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Integer> id
* @throws
*/
ServiceResponse<Integer> saveBrandFromGic(Integer categoryId, String platformBrandName);
/**
* 运维平台添加一个平台级品牌
* @Title: addBrandFromOperation
* @Description:
* @author zhiwj
* @param categoryId
* @param platformBrandName
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Integer> id
* @throws
*/
ServiceResponse<Integer> saveOrUpdateBrandFromOperation(Integer categoryId, String platformBrandName);
/**
* 根据id删除
* @Title: delBrandById
* @Description:
* @author zhiwj
* @param platformBrandId
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Integer>
* @throws
*/
ServiceResponse<Integer> delBrandById(Integer platformBrandId);
/**
* 查询品牌list, 条件为:名称:platformBrandCategoryId 类目:platformBrandName 来源:createType
* @Title: listPlatformBrand
* @Description:
* @author zhiwj
* @param platformBrandDTO
* @return com.gic.api.base.commons.ServiceResponse<com.gic.api.base.commons.Page<com.gic.enterprise.dto.PlatformBrandDTO>>
* @throws
*/
ServiceResponse<Page<PlatformBrandDTO>> listPlatformBrand(PlatformBrandDTO platformBrandDTO, Integer pageNum, Integer pageSize);
/**
* 添加商户品牌和平台品牌的关联关系
* @Title: addRef
* @Description: 添加商户品牌和平台品牌的关联关系
* @author zhiwj
* @param enterpriseBrandName 商户品牌名
* @param enterpriseBrandCode 商户品牌code
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Integer> 影响行数
* @throws
*/
ServiceResponse<Integer> addRef(String enterpriseBrandName, String enterpriseBrandCode);
/**
* 删除一个关联关系
* @Title: delRef
* @Description: 删除一个关联关系
* @author zhiwj
* @param enterpriseBrandName
* @param enterpriseBrandCode
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Integer>
* @throws
*/
ServiceResponse<Integer> delRef(String enterpriseBrandName, String enterpriseBrandCode);
/**
* 更新一个关联关系
* @Title: updateRef
* @Description:
* @author zhiwj
* @param enterpriseBrandName
* @param enterpriseBrandCode
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Integer>
* @throws
*/
ServiceResponse<Integer> updateRef(String enterpriseBrandName, String enterpriseBrandCode);
/**
* 按品牌名去查询详情
* @Title: getByBrandName
* @Description:
* @author zhiwj
* @param enterpriseBrandName
* @return com.gic.api.base.commons.ServiceResponse<com.gic.enterprise.dto.PlatformBrandDTO>
* @throws
*/
ServiceResponse<PlatformBrandDTO> getByBrandName(String enterpriseBrandName);
/**
* 查询平台品牌对应的商品品牌
* @Title: listByPlatformBrandRef
* @Description:
* @author zhiwj
* @param brandName
* @return com.gic.api.base.commons.ServiceResponse<com.gic.api.base.commons.Page<com.gic.enterprise.dto.PlatformBrandRefDTO>>
* @throws
*/
ServiceResponse<Page<PlatformBrandRefDTO>> listByPlatformBrandRef(String brandName);
/**
* 并入操作,将fromBrandId关联的商户品牌, 并入到toBrandId平台品牌下; 并删除fromBrandId平台品牌
* @Title: mergeBrandRef
* @Description:
* @author zhiwj
* @param fromBrandId
* @param toBrandId
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Integer>
* @throws
*/
ServiceResponse<Integer> mergeBrandRef(Integer fromBrandId, Integer toBrandId);
}
package com.gic.enterprise.dao.mapper;
import com.gic.enterprise.entity.TabPlatformBrand;
public interface TabPlatformBrandMapper {
/**
* 根据主键删除
*
* @param platformBrandId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer platformBrandId);
/**
* 插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int insert(TabPlatformBrand record);
/**
* 动态插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int insertSelective(TabPlatformBrand record);
/**
* 根据主键查询
*
* @param platformBrandId 主键
* @return 实体对象
*/
TabPlatformBrand selectByPrimaryKey(Integer platformBrandId);
/**
* 根据主键动态更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int updateByPrimaryKeySelective(TabPlatformBrand record);
/**
* 根据主键更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int updateByPrimaryKey(TabPlatformBrand record);
}
\ No newline at end of file
package com.gic.enterprise.dao.mapper;
import com.gic.enterprise.entity.TabPlatformBrandRef;
public interface TabPlatformBrandRefMapper {
/**
* 根据主键删除
*
* @param platformBrandRefId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer platformBrandRefId);
/**
* 插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int insert(TabPlatformBrandRef record);
/**
* 动态插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int insertSelective(TabPlatformBrandRef record);
/**
* 根据主键查询
*
* @param platformBrandRefId 主键
* @return 实体对象
*/
TabPlatformBrandRef selectByPrimaryKey(Integer platformBrandRefId);
/**
* 根据主键动态更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int updateByPrimaryKeySelective(TabPlatformBrandRef record);
/**
* 根据主键更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int updateByPrimaryKey(TabPlatformBrandRef record);
}
\ No newline at end of file
package com.gic.enterprise.entity;
import java.util.Date;
/**
* tab_platform_brand
*/
public class TabPlatformBrand {
/**
*
*/
private Integer platformBrandId;
/**
* 经营类目
*/
private Integer platformBrandCategoryId;
/**
* 经营类目名
*/
private String platformBrandCategoryName;
/**
* 品牌name
*/
private String platformBrandName;
/**
* 1:运维平台 2:商户后台
*/
private Integer createType;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
/**
*
*/
private Integer status;
public Integer getPlatformBrandId() {
return platformBrandId;
}
public void setPlatformBrandId(Integer platformBrandId) {
this.platformBrandId = platformBrandId;
}
public Integer getPlatformBrandCategoryId() {
return platformBrandCategoryId;
}
public void setPlatformBrandCategoryId(Integer platformBrandCategoryId) {
this.platformBrandCategoryId = platformBrandCategoryId;
}
public String getPlatformBrandCategoryName() {
return platformBrandCategoryName;
}
public void setPlatformBrandCategoryName(String platformBrandCategoryName) {
this.platformBrandCategoryName = platformBrandCategoryName;
}
public String getPlatformBrandName() {
return platformBrandName;
}
public void setPlatformBrandName(String platformBrandName) {
this.platformBrandName = platformBrandName;
}
public Integer getCreateType() {
return createType;
}
public void setCreateType(Integer createType) {
this.createType = createType;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
}
\ No newline at end of file
package com.gic.enterprise.entity;
import java.util.Date;
/**
* tab_platform_brand_ref
*/
public class TabPlatformBrandRef {
/**
*
*/
private Integer platformBrandRefId;
/**
*
*/
private Integer platformBrandId;
/**
* 企业id
*/
private Integer enterpriseId;
/**
* 商户品牌id
*/
private Integer enterpriseBrandId;
/**
* 商户品牌name
*/
private String enterpriseBrandName;
/**
* 商户品牌code
*/
private String enterpriseBrandCode;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
/**
*
*/
private Integer status;
public Integer getPlatformBrandRefId() {
return platformBrandRefId;
}
public void setPlatformBrandRefId(Integer platformBrandRefId) {
this.platformBrandRefId = platformBrandRefId;
}
public Integer getPlatformBrandId() {
return platformBrandId;
}
public void setPlatformBrandId(Integer platformBrandId) {
this.platformBrandId = platformBrandId;
}
public Integer getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(Integer enterpriseId) {
this.enterpriseId = enterpriseId;
}
public Integer getEnterpriseBrandId() {
return enterpriseBrandId;
}
public void setEnterpriseBrandId(Integer enterpriseBrandId) {
this.enterpriseBrandId = enterpriseBrandId;
}
public String getEnterpriseBrandName() {
return enterpriseBrandName;
}
public void setEnterpriseBrandName(String enterpriseBrandName) {
this.enterpriseBrandName = enterpriseBrandName;
}
public String getEnterpriseBrandCode() {
return enterpriseBrandCode;
}
public void setEnterpriseBrandCode(String enterpriseBrandCode) {
this.enterpriseBrandCode = enterpriseBrandCode;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
}
\ No newline at end of file
......@@ -67,7 +67,7 @@ public class GlobalExceptionHandler {
.append(fieldError.getDefaultMessage())
.append(",");
});
return getRestResponse(StoreGroupErrorEnum.Error.getCode(), errorMessage.toString());
return getRestResponse(StoreGroupErrorEnum.ERROR.getCode(), errorMessage.toString());
}
@ResponseBody
......
package com.gic.operation.web.exception;
import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.enterprise.error.ErrorCode;
import com.gic.enterprise.exception.EnterpriseException;
import com.gic.store.constant.StoreGroupErrorEnum;
import com.gic.store.exception.StoreException;
import com.gic.store.exception.StoreGroupException;
import java.io.ByteArrayOutputStream;
import java.io.PrintWriter;
import java.util.List;
import java.util.Set;
import javax.servlet.http.HttpServletResponse;
import javax.validation.ConstraintViolation;
import javax.validation.ConstraintViolationException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.validation.BindException;
......@@ -14,13 +17,10 @@ import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletResponse;
import javax.validation.ConstraintViolation;
import javax.validation.ConstraintViolationException;
import java.io.ByteArrayOutputStream;
import java.io.PrintWriter;
import java.util.List;
import java.util.Set;
import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.enterprise.error.ErrorCode;
import com.gic.enterprise.exception.EnterpriseException;
import com.gic.store.exception.StoreException;
/**
* 全局异常处理类
......
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