Commit 2299e320 by 叶立庆

Merge branch 'v5.8.4' into 'master'

上线合并

See merge request !21
2 parents eb228a64 e83f4e5d
......@@ -7,7 +7,7 @@
</parent>
<groupId>cn.com.glsx.merchants</groupId>
<artifactId>platform-merchants-api</artifactId>
<version>5.8.0-SNAPSHOT</version>
<version>5.8.4-SNAPSHOT</version>
<name>platform-merchants-api</name>
<properties>
<deploy.scanPackage>cn.com.glsx.merchants.remote</deploy.scanPackage>
......
package cn.com.glsx.merchants.model.request.merchant;
import cn.com.glsx.merchants.model.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* 4S店信息回显请求DTO
*
* @author yangwei_by_claude
* @version 1.0
* @since 2026/07/09 15:10
*/
@Data
public class MerchantDetailRpcRequest extends DefaultRequest implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 商户号(唯一标识)
*/
@ApiModelProperty(value = "商户号", required = true, example = "10086")
@NotNull(message = "商户号不能为空")
private Integer merchantNo;
}
package cn.com.glsx.merchants.model.request.merchant;
import cn.com.glsx.merchants.model.request.DefaultRequest;
import cn.com.glsx.merchants.model.request.MerchantBrandRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;
/**
* 4S店信息修改请求DTO
*
* @author yangwei_by_claude
* @version 1.0
* @since 2026/07/09 15:00
*/
@Data
public class MerchantEditRpcRequest extends DefaultRequest implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 商户号(唯一标识)
*/
@ApiModelProperty(value = "商户号", required = true, example = "10086")
@NotNull(message = "商户号不能为空")
private Integer merchantNo;
/**
* 商户名称
*/
@ApiModelProperty(value = "商户名称", required = true, example = "深圳4S店")
@NotBlank(message = "商户名称不能为空")
@Size(max = 50, message = "商户名称最大50个字")
private String merchantName;
/**
* 账户等级:1-工厂、2-省代、3-市代、4-门店
*/
@ApiModelProperty(value = "账户等级:1-工厂、2-省代、3-市代、4-门店", required = true, example = "4")
@NotNull(message = "账户等级不能为空")
private Integer merchantAccountLevel;
/**
* 上级商户号(账户等级≠工厂时必填)
*/
@ApiModelProperty(value = "上级商户号,账户等级≠工厂时必填", example = "10001")
private Integer parentMerchantNo;
/**
* 联系电话
*/
@ApiModelProperty(value = "联系电话", required = true, example = "13800138000")
@NotBlank(message = "联系电话不能为空")
@Pattern(regexp = "^\\d{11}$", message = "联系电话必须为11位纯数字")
private String merchantLegalPersonPhone;
/**
* 商户地址(详细地址)
*/
@ApiModelProperty(value = "商户地址", required = true, example = "科技园南路88号")
@NotBlank(message = "商户地址不能为空")
private String merchantAddress;
/**
* 省编码
*/
@ApiModelProperty(value = "省编码", required = true, example = "440000")
@NotBlank(message = "省编码不能为空")
private String provinceCode;
/**
* 省名称
*/
@ApiModelProperty(value = "省名称", required = true, example = "广东省")
@NotBlank(message = "省名称不能为空")
private String provinceName;
/**
* 市编码
*/
@ApiModelProperty(value = "市编码", required = true, example = "440100")
@NotBlank(message = "市编码不能为空")
private String cityCode;
/**
* 市名称
*/
@ApiModelProperty(value = "市名称", required = true, example = "深圳市")
@NotBlank(message = "市名称不能为空")
private String cityName;
/**
* 区县编码
*/
@ApiModelProperty(value = "区县编码", required = true, example = "440106")
@NotBlank(message = "区县编码不能为空")
private String districtCode;
/**
* 区县名称
*/
@ApiModelProperty(value = "区县名称", required = true, example = "南山区")
@NotBlank(message = "区县名称不能为空")
private String districtName;
/**
* 经度
*/
@ApiModelProperty(value = "经度", required = true, example = "113.9433")
@NotNull(message = "经度不能为空")
private Float lng;
/**
* 纬度
*/
@ApiModelProperty(value = "纬度", required = true, example = "22.5485")
@NotNull(message = "纬度不能为空")
private Float lat;
/**
* 主营品牌列表(需选择至子品牌)
*/
@ApiModelProperty(value = "主营品牌列表")
private List<MerchantBrandRequest> merchantBrandList;
/**
* 登录密码(6-20位字母+数字)
*/
@ApiModelProperty(value = "登录密码", required = true, example = "Dj123456")
@NotBlank(message = "登录密码不能为空")
@Pattern(regexp = "^(?=.*[a-zA-Z])(?=.*\\d)[a-zA-Z\\d]{6,20}$", message = "登录密码需6-20个字母+数字")
private String merchantLoginPassword;
}
package cn.com.glsx.merchants.model.response.merchant;
import cn.com.glsx.merchants.dto.MerchantBrandDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 4S店信息回显响应DTO
*
* @author yangwei_by_claude
* @version 1.0
* @since 2026/07/09 15:15
*/
@Data
public class MerchantEditDetailRpcResponse implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 商户号
*/
@ApiModelProperty(value = "商户号", example = "10086")
private Integer merchantNo;
/**
* 商户名称
*/
@ApiModelProperty(value = "商户名称", example = "深圳4S店")
private String merchantName;
/**
* 商户类型(默认为4S店,不可编辑)
*/
@ApiModelProperty(value = "商户类型", example = "2")
private Integer merchantType;
/**
* 商户类型名称
*/
@ApiModelProperty(value = "商户类型名称", example = "4S店")
private String merchantTypeName;
/**
* 账户等级:1-工厂、2-省代、3-市代、4-门店
*/
@ApiModelProperty(value = "账户等级:1-工厂、2-省代、3-市代、4-门店", example = "4")
private Integer merchantAccountLevel;
/**
* 账户等级名称
*/
@ApiModelProperty(value = "账户等级名称", example = "门店")
private String merchantAccountLevelName;
/**
* 上级商户号
*/
@ApiModelProperty(value = "上级商户号", example = "10001")
private Integer parentMerchantNo;
/**
* 上级商户名称
*/
@ApiModelProperty(value = "上级商户名称", example = "广东省代")
private String parentMerchantName;
/**
* 法定联系人
*/
@ApiModelProperty(value = "法定联系人", example = "张三")
private String merchantLegalPerson;
/**
* 联系电话
*/
@ApiModelProperty(value = "联系电话", example = "13800138000")
private String merchantLegalPersonPhone;
/**
* 商户地址(详细地址)
*/
@ApiModelProperty(value = "商户地址", example = "科技园南路88号")
private String merchantAddress;
/**
* 省编码
*/
@ApiModelProperty(value = "省编码", example = "440000")
private String provinceCode;
/**
* 省名称
*/
@ApiModelProperty(value = "省名称", example = "广东省")
private String provinceName;
/**
* 市编码
*/
@ApiModelProperty(value = "市编码", example = "440100")
private String cityCode;
/**
* 市名称
*/
@ApiModelProperty(value = "市名称", example = "深圳市")
private String cityName;
/**
* 区县编码
*/
@ApiModelProperty(value = "区县编码", example = "440106")
private String districtCode;
/**
* 区县名称
*/
@ApiModelProperty(value = "区县名称", example = "南山区")
private String districtName;
/**
* 经度
*/
@ApiModelProperty(value = "经度", example = "113.9433")
private Float lng;
/**
* 纬度
*/
@ApiModelProperty(value = "纬度", example = "22.5485")
private Float lat;
/**
* 主营品牌-一级(车系)
*/
@ApiModelProperty(value = "主营品牌-一级", example = "宝马;奥迪;")
private String merchantBrandCars;
/**
* 主营品牌-二级(子品牌)
*/
@ApiModelProperty(value = "主营品牌-二级", example = "华晨宝马;一汽奥迪;")
private String merchantBrandMain;
/**
* 主营品牌树
*/
@ApiModelProperty(value = "主营品牌树")
private List<MerchantBrandDTO> brandTreeList;
/**
* 登录账号(不可编辑)
*/
@ApiModelProperty(value = "登录账号", example = "djstore001")
private String merchantLoginAccount;
/**
* 登录密码
*/
@ApiModelProperty(value = "登录密码", example = "Abc12345")
private String merchantLoginPassword;
/**
* 门店模式
*/
@ApiModelProperty(value = "门店模式", example = "1")
private Integer merchantModel;
/**
* 门店模式名称
*/
@ApiModelProperty(value = "门店模式名称", example = "单店模式")
private String merchantModelName;
/**
* 渠道ID(不可编辑)
*/
@ApiModelProperty(value = "渠道ID", example = "1")
private Integer channelId;
/**
* 渠道名称(不可编辑)
*/
@ApiModelProperty(value = "渠道名称", example = "全国渠道")
private String channelName;
/**
* 商户状态:1-正常、2-发布、3-注销、4-过期
*/
@ApiModelProperty(value = "商户状态", example = "1")
private Integer status;
}
package cn.com.glsx.merchants.remote;
import cn.com.glsx.framework.core.annotation.ApiMethod;
import cn.com.glsx.framework.core.annotation.ApiParam;
import cn.com.glsx.framework.core.annotation.ApiParams;
import cn.com.glsx.framework.core.annotation.ApiResponse;
import cn.com.glsx.framework.core.annotation.ApiService;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.merchants.model.request.merchant.MerchantDetailRpcRequest;
import cn.com.glsx.merchants.model.request.merchant.MerchantEditRpcRequest;
import cn.com.glsx.merchants.model.response.merchant.MerchantEditDetailRpcResponse;
/**
* 4S店信息编辑Remote接口
*
* @author yangwei_by_claude
* @version 1.0
* @since 2026/07/09 15:20
*/
@ApiService(value = "4S店信息编辑服务", version = "1.0.0", protocol = ApiService.ProtocolEnum.dubbo, type = ApiService.ApiTypeEnum.DUBBO, alias = "MerchantEditRemote", owner = "yangwei")
public interface MerchantEditRemote {
/**
* 4S店信息修改
*
* @param request 修改请求参数
* @return 修改结果
*/
@ApiMethod("4S店信息修改")
@ApiParams({@ApiParam(name = "request", notes = "4S店信息修改请求", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)})
@ApiResponse("4S店信息修改结果")
RpcResponse<Boolean> updateMerchantInfo(MerchantEditRpcRequest request);
/**
* 4S店信息回显
*
* @param request 查询请求参数(包含商户号)
* @return 商户详细信息
*/
@ApiMethod("4S店信息回显")
@ApiParams({@ApiParam(name = "request", notes = "4S店信息回显请求", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)})
@ApiResponse("4S店详细信息")
RpcResponse<MerchantEditDetailRpcResponse> getMerchantDetail(MerchantDetailRpcRequest request);
}
......@@ -14,7 +14,7 @@
<dependency>
<groupId>cn.com.glsx.merchants</groupId>
<artifactId>platform-merchants-api</artifactId>
<version>5.8.0-SNAPSHOT</version>
<version>5.8.4-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.glsx</groupId>
......
......@@ -59,6 +59,8 @@ public enum BusinessExceptionEnum implements ErrorEnum {
OWE_CUS_GROUP_EMPTY("13110042", "所属客户群体为空"),
EMPTY_FILE("13110043", "导入文件为空"),
CITY_LEVEL_ERROR("13110044", "市代商户不可挂靠在工厂下"),
MERCHANT_NOT_4S_STORE("13110045", "该商户非4S店类型,无法回显4S店信息"),
MERCHANT_4S_DETAIL_ERROR("13110046", "4S店信息回显失败,请稍后重试"),
;
......
......@@ -60,6 +60,7 @@ import org.springframework.core.env.Environment;
import org.springframework.core.io.ClassPathResource;
import org.springframework.http.*;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.client.RestTemplate;
import tk.mybatis.mapper.entity.Example;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!