Commit dfe9d6f3 by 叶立庆

Revert "Merge branch 'v5.8.0' into 'master'"

This reverts merge request !16
1 parent 7688e630
Showing 26 changed files with 11 additions and 928 deletions
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
</parent> </parent>
<groupId>cn.com.glsx.merchants</groupId> <groupId>cn.com.glsx.merchants</groupId>
<artifactId>platform-merchants-api</artifactId> <artifactId>platform-merchants-api</artifactId>
<version>5.8.0-SNAPSHOT</version> <version>5.7.0-SNAPSHOT</version>
<name>platform-merchants-api</name> <name>platform-merchants-api</name>
<properties> <properties>
<deploy.scanPackage>cn.com.glsx.merchants.remote</deploy.scanPackage> <deploy.scanPackage>cn.com.glsx.merchants.remote</deploy.scanPackage>
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<dependency> <dependency>
<groupId>cn.com.glsx.merchants</groupId> <groupId>cn.com.glsx.merchants</groupId>
<artifactId>platform-merchants-api</artifactId> <artifactId>platform-merchants-api</artifactId>
<version>5.8.0-SNAPSHOT</version> <version>5.7.0-SNAPSHOT</version>
</dependency> </dependency>
</dependencies> </dependencies>
</plugin> </plugin>
......
package cn.com.glsx.merchants.model.request;
import io.swagger.annotations.ApiModel;
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;
/**
* 创建园区店商户并分配权限请求DTO
*
* @author glsx
* @version 1.0
* @date 2026-04-20
*/
@Data
@ApiModel(value = "创建园区店商户并分配权限请求DTO", description = "园区店商户创建请求参数")
public class CreateMerchantWithPermissionsRequest implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 商户类型(园区店=9)
*/
@ApiModelProperty(value = "商户类型,园区店=9", required = true, example = "9")
@NotNull(message = "商户类型不能为空")
private Integer merchantType;
/**
* 账户等级:1-工厂、2-省代、3-市代、4-门店
*/
@ApiModelProperty(value = "账户等级:1-工厂、2-省代、3-市代、4-门店", required = true, example = "4")
@NotNull(message = "账户等级不能为空")
private Integer merchantAccountLevel;
@ApiModelProperty(value = "开通模式ID,账户等级=工厂时必填", example = "1")
private Integer accessModeId;
/**
* 上级商户ID(账户等级≠工厂时必填)
*/
@ApiModelProperty(value = "上级商户ID,账户等级≠工厂时必填", example = "1001")
private Integer parentId;
/**
* 渠道ID(账户等级=工厂时必填)
*/
@ApiModelProperty(value = "渠道ID,账户等级=工厂时必填", example = "1")
@NotNull(message = "渠道ID不能为空")
private Integer channelId;
/**
* 商户名称
*/
@ApiModelProperty(value = "商户名称", required = true, example = "深圳嘀加店")
@NotBlank(message = "商户名称不能为空")
@Size(max = 50, message = "商户名称最大50个字")
private String merchantName;
/**
* 联系电话
*/
@ApiModelProperty(value = "联系电话", required = true, example = "13800138000")
@NotBlank(message = "联系电话不能为空")
@Pattern(regexp = "^\\d{11}$", message = "联系电话必须为11位纯数字")
private String contactPhone;
/**
* 省编码
*/
@ApiModelProperty(value = "省编码", required = true, example = "440000")
@NotNull(message = "省编码不能为空")
private String provinceCode;
/**
* 省名称
*/
@ApiModelProperty(value = "省名称", required = true, example = "广东省")
@NotBlank(message = "省名称不能为空")
private String provinceName;
/**
* 市编码
*/
@ApiModelProperty(value = "市编码", required = true, example = "440100")
@NotNull(message = "市编码不能为空")
private String cityCode;
/**
* 市名称
*/
@ApiModelProperty(value = "市名称", required = true, example = "深圳市")
@NotBlank(message = "市名称不能为空")
private String cityName;
/**
* 区县编码
*/
@ApiModelProperty(value = "区县编码", required = true, example = "440106")
@NotNull(message = "区县编码不能为空")
private String districtCode;
/**
* 区县名称
*/
@ApiModelProperty(value = "区县名称", required = true, example = "南山区")
@NotBlank(message = "区县名称不能为空")
private String districtName;
/**
* 详细地址
*/
@ApiModelProperty(value = "详细地址", required = true, example = "科技园南路88号")
@NotBlank(message = "详细地址不能为空")
private String detailAddress;
/**
* 经度
*/
@ApiModelProperty(value = "经度", example = "113.9433")
private Float longitude;
/**
* 纬度
*/
@ApiModelProperty(value = "纬度", example = "22.5485")
private Float latitude;
/**
* 主营品牌列表
*/
@ApiModelProperty(value = "主营品牌列表", required = true)
@NotNull(message = "主营品牌不能为空")
private List<MerchantBrandRequest> merchantBrandList;
/**
* 登录账号
*/
@ApiModelProperty(value = "登录账号", required = true, example = "djstore001")
@NotBlank(message = "登录账号不能为空")
@Pattern(regexp = "^[a-zA-Z0-9]{1,15}$", message = "登录账号仅支持字母、数字,最大15位")
private String loginAccount;
/**
* 登录密码
*/
@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 loginPassword;
/**
* 创建人
*/
@ApiModelProperty(value = "创建人", example = "admin")
@NotBlank(message = "创建人不能为空")
private String createdBy;
/**
* 渠道来源
*/
@ApiModelProperty(value = "渠道来源", example = "1")
@NotNull(message = "渠道来源不能为空")
private String source;
/**
* 门店模式
*/
private Integer merchantModel;
}
...@@ -66,9 +66,4 @@ public class DefaultRequest { ...@@ -66,9 +66,4 @@ public class DefaultRequest {
public DefaultRequest(Integer createdBy) { public DefaultRequest(Integer createdBy) {
this.createdBy = createdBy; this.createdBy = createdBy;
} }
public DefaultRequest(String createdAccount,String source) {
this.createdAccount = createdAccount;
this.source = source;
}
} }
...@@ -9,9 +9,9 @@ import java.util.List; ...@@ -9,9 +9,9 @@ import java.util.List;
@Data @Data
public class MerchantBrandRequest implements Serializable { public class MerchantBrandRequest implements Serializable {
@ApiModelProperty(notes = "车系id,一级品牌") @ApiModelProperty(notes = "车系id,一级品牌", hidden = true)
private Integer cars; private Integer cars;
@ApiModelProperty(notes = "车品牌id ,二级品牌") @ApiModelProperty(notes = "车品牌id ,二级品牌", hidden = true)
private List<Integer> merchantBrandId; private List<Integer> merchantBrandId;
} }
...@@ -18,16 +18,6 @@ public class MerchantOpenRequest implements Serializable { ...@@ -18,16 +18,6 @@ public class MerchantOpenRequest implements Serializable {
private String merchantName; private String merchantName;
/**
* 单个精确匹配商户名称
*/
private String merchantNameAccurate;
/**
* 批量精确匹配商户名称
*/
private List<String> merchantNameAccurateList;
//1.广联 2.广汇 //1.广联 2.广汇
private Integer channelType = 1; private Integer channelType = 1;
......
package cn.com.glsx.merchants.model.request;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* 查询上级商户列表请求DTO
*
* @author glsx
* @version 1.0
* @date 2026-04-20
*/
@Data
@ApiModel(value = "查询上级商户列表请求DTO", description = "查询上级商户列表请求参数")
public class QueryParentMerchantListRequest implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 当前商户的账户等级:1-工厂、2-省代、3-市代、4-门店
*/
@ApiModelProperty(value = "当前商户的账户等级:1-工厂、2-省代、3-市代、4-门店", required = true, example = "4")
@NotNull(message = "账户等级不能为空")
private Integer currentAccountLevel;
/**
* 商户类型:2-4S店、6-园区店、7-服务商
*/
@ApiModelProperty(value = "商户类型:2-4S店、6-园区店、7-服务商", required = true, example = "6")
@NotNull(message = "商户类型不能为空")
private Integer merchantType;
}
package cn.com.glsx.merchants.model.response;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* 创建园区店商户并分配权限响应DTO
*
* @author glsx
* @version 1.0
* @date 2026-04-20
*/
@Data
@ApiModel(value = "创建园区店商户并分配权限响应DTO", description = "园区店商户创建响应结果")
public class CreateMerchantWithPermissionsResponse implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 商户ID
*/
@ApiModelProperty(value = "商户ID", example = "10001")
private Integer merchantId;
/**
* 商户号
*/
@ApiModelProperty(value = "商户号", example = "100010001")
private Integer merchantNo;
/**
* 操作结果:true-成功,false-失败
*/
@ApiModelProperty(value = "操作结果:true-成功,false-失败", example = "true")
private Boolean success;
/**
* 提示信息
*/
@ApiModelProperty(value = "提示信息", example = "商户创建成功")
private String message;
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.merchants.model.response;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* 上级商户信息响应DTO
*
* @author glsx
* @version 1.0
* @date 2026-04-20
*/
@Data
@ApiModel(value = "上级商户信息响应DTO", description = "上级商户信息")
public class ParentMerchantInfoResponse implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 商户ID
*/
@ApiModelProperty(value = "商户ID", example = "1001")
private Integer merchantId;
/**
* 商户号
*/
@ApiModelProperty(value = "商户号", example = "100010001")
private Integer merchantNo;
/**
* 商户名称
*/
@ApiModelProperty(value = "商户名称", example = "广东总代理")
private String merchantName;
/**
* 账户等级:1-工厂、2-省代、3-市代、4-门店
*/
@ApiModelProperty(value = "账户等级:1-工厂、2-省代、3-市代、4-门店", example = "2")
private Byte accountLevel;
/**
* 商户类型:2-4S店、6-园区店、7-服务商
*/
@ApiModelProperty(value = "商户类型:2-4S店、6-园区店、7-服务商", example = "6")
private String merchantType;
}
package cn.com.glsx.merchants.model.response;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 查询商户列表响应DTO
*
* @author glsx
* @version 1.0
* @date 2026-04-20
*/
@Data
@ApiModel(value = "查询商户列表响应DTO", description = "查询商户列表响应")
public class QueryMerchantListResponse implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 商户ID
*/
@ApiModelProperty(value = "商户ID", example = "1001")
private Integer merchantId;
/**
* 商户号
*/
@ApiModelProperty(value = "商户号", example = "100010001")
private Integer merchantNo;
/**
* 商户名称
*/
@ApiModelProperty(value = "商户名称", example = "广东总代理")
private String merchantName;
/**
* 账户等级:1-工厂、2-省代、3-市代、4-门店
*/
@ApiModelProperty(value = "账户等级:1-工厂、2-省代、3-市代、4-门店", example = "2")
private Integer accountLevel;
/**
* 商户类型:2-4S店、6-园区店、7-服务商
*/
@ApiModelProperty(value = "商户类型:2-4S店、6-园区店、7-服务商", example = "6")
private Integer merchantType;
/**
* 商户类型名称
*/
@ApiModelProperty(value = "商户类型名称", example = "园区店")
private String merchantTypeName;
}
...@@ -13,7 +13,6 @@ import cn.com.glsx.framework.core.beans.rpc.RpcResponse; ...@@ -13,7 +13,6 @@ import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.merchants.dto.beisen.BeiSenEmployeeListRequestDTO; import cn.com.glsx.merchants.dto.beisen.BeiSenEmployeeListRequestDTO;
import cn.com.glsx.merchants.dto.beisen.BeiSenEmployeeListResonseDTO; import cn.com.glsx.merchants.dto.beisen.BeiSenEmployeeListResonseDTO;
import cn.com.glsx.merchants.dto.beisen.BeiSenEmployeeMapperDTO; import cn.com.glsx.merchants.dto.beisen.BeiSenEmployeeMapperDTO;
import cn.com.glsx.merchants.dto.beisen.BeisenEmployeeInfoDTO;
import cn.com.glsx.merchants.model.request.MerchantStaffRequest; import cn.com.glsx.merchants.model.request.MerchantStaffRequest;
import cn.com.glsx.merchants.model.request.StaffBatchRequest; import cn.com.glsx.merchants.model.request.StaffBatchRequest;
import cn.com.glsx.merchants.model.request.StaffOpenRequest; import cn.com.glsx.merchants.model.request.StaffOpenRequest;
...@@ -161,6 +160,7 @@ public interface MerchantStaffRemote { ...@@ -161,6 +160,7 @@ public interface MerchantStaffRemote {
@ApiParams({@ApiParam(name = "merchantStaffRequest", notes = "新增或者更新员工", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)}) @ApiParams({@ApiParam(name = "merchantStaffRequest", notes = "新增或者更新员工", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)})
RpcResponse<String> saveOrUpdateStaffFromDJ(MerchantStaffRequest merchantStaffRequest); RpcResponse<String> saveOrUpdateStaffFromDJ(MerchantStaffRequest merchantStaffRequest);
/** /**
* 同步企微员工 * 同步企微员工
* *
...@@ -338,15 +338,4 @@ public interface MerchantStaffRemote { ...@@ -338,15 +338,4 @@ public interface MerchantStaffRemote {
@ApiParams({@ApiParam(name = "merchantRequest", notes = "查询园区店员工列表", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)}) @ApiParams({@ApiParam(name = "merchantRequest", notes = "查询园区店员工列表", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)})
@ApiResponse("查询园区店员工列表") @ApiResponse("查询园区店员工列表")
RpcResponse<RpcPagination<MerchantStaffResponse>> findYqStaffByPageRemote(RpcPagination<MerchantStaffRequest> merchantStaffRequestRpcPagination); RpcResponse<RpcPagination<MerchantStaffResponse>> findYqStaffByPageRemote(RpcPagination<MerchantStaffRequest> merchantStaffRequestRpcPagination);
/**
* 通过北森 userId 查询北森员工详情
*
* @param userId 北森 userId
* @return 北森员工详情
*/
@ApiMethod("通过北森 userId 查询北森员工详情")
@ApiParams({@ApiParam(name = "userId", notes = "北森 userId", dataType = DataTypeEnum.INTEGER, required = true)})
@ApiResponse("北森员工详情")
RpcResponse<BeisenEmployeeInfoDTO> getBeisenUserByUserId(Integer userId);
} }
...@@ -203,35 +203,4 @@ public interface MerchantUserRemote { ...@@ -203,35 +203,4 @@ public interface MerchantUserRemote {
@ApiResponse("根据手机号获取北森员工信息") @ApiResponse("根据手机号获取北森员工信息")
RpcResponse<List<BeisenEmployeeInfoDTO>> selectByPhones(@NotNull List<String> phoneNumbers); RpcResponse<List<BeisenEmployeeInfoDTO>> selectByPhones(@NotNull List<String> phoneNumbers);
/**
* 获取新入职北森员工信息
* @param filterPhoneList 已在职手机号集合(排除这些手机号对应的员工)
* @param jobPostKeywords 岗位关键字列表,非空时在 SQL 层进行岗位过滤;传 null 或空列表则不过滤
* @return BeisenEmployeeInfoDTO
*/
@ApiMethod("获取新入职北森员工信息")
@ApiParam(name = "filterPhoneList", notes = "已在职手机号集合", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("获取新入职北森员工信息")
RpcResponse<List<BeisenEmployeeInfoDTO>> selectNewBeisenEmployeeInfo(@NotNull List<String> filterPhoneList, List<String> jobPostKeywords);
/**
* 通过北森 userId 查询北森员工详情
* @param userId 北森员工 userId
* @return BeisenEmployeeInfoDTO
*/
@ApiMethod("通过北森 userId 查询北森员工详情")
@ApiParam(name = "userId", notes = "北森员工 userId", dataType = ApiParam.DataTypeEnum.INTEGER, required = true)
@ApiResponse("北森员工详情")
RpcResponse<BeisenEmployeeInfoDTO> getBeisenUserByUserId(@NotNull Integer userId);
/**
* 根据北森 userId 集合批量查询员工详情(含直属上级信息)
* @param userIds 北森员工 userId 集合
* @return 员工详情列表
*/
@ApiMethod("根据 userId 集合批量查询北森员工详情")
@ApiParam(name = "userIds", notes = "北森员工 userId 集合", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
@ApiResponse("北森员工详情列表")
RpcResponse<List<BeisenEmployeeInfoDTO>> batchGetBeisenUserByUserIds(@NotNull List<Integer> userIds);
} }
package cn.com.glsx.merchants.remote;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.merchants.model.request.CreateMerchantWithPermissionsRequest;
import cn.com.glsx.merchants.model.request.QueryParentMerchantListRequest;
import cn.com.glsx.merchants.model.response.CreateMerchantWithPermissionsResponse;
import cn.com.glsx.merchants.model.response.ParentMerchantInfoResponse;
import java.util.List;
/**
* 创建商户并分配权限远程接口
*
* @author glsx
* @version 1.0
* @date 2026-04-20
*/
public interface MerchantWithPermissionsRemote {
/**
* 创建园区店商户并分配权限
*
* @param request 创建商户请求参数
* @return 创建结果
*/
RpcResponse<CreateMerchantWithPermissionsResponse> createMerchantWithPermissions(CreateMerchantWithPermissionsRequest request);
/**
* 查询上级商户列表
* <p>
* 根据当前商户的账户等级和商户类型,查询账户等级大于当前等级的全部商户
* </p>
*
* @param request 查询参数
* @return 上级商户列表
*/
RpcResponse<List<ParentMerchantInfoResponse>> queryParentMerchantList(QueryParentMerchantListRequest request);
}
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<dependency> <dependency>
<groupId>cn.com.glsx.merchants</groupId> <groupId>cn.com.glsx.merchants</groupId>
<artifactId>platform-merchants-api</artifactId> <artifactId>platform-merchants-api</artifactId>
<version>5.8.0-SNAPSHOT</version> <version>5.7.0-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.glsx</groupId> <groupId>com.glsx</groupId>
......
...@@ -17,22 +17,4 @@ public interface BeisenEmployeeInfoMapper extends CommonBaseMapper<BeisenEmploye ...@@ -17,22 +17,4 @@ public interface BeisenEmployeeInfoMapper extends CommonBaseMapper<BeisenEmploye
List<BeiSenEmployeeListResonseDTO> selectByConditions(@Param("req") BeiSenEmployeeListRequestDTO req); List<BeiSenEmployeeListResonseDTO> selectByConditions(@Param("req") BeiSenEmployeeListRequestDTO req);
List<BeisenEmployeeInfo> selectByPhones(@Param("phoneNumbers") List<String> phoneNumbers); List<BeisenEmployeeInfo> selectByPhones(@Param("phoneNumbers") List<String> phoneNumbers);
List<BeisenEmployeeInfo> selectNewBeisenEmployeeInfo(@Param("filterPhoneList") List<String> filterPhoneList, @Param("jobPostKeywords") List<String> jobPostKeywords);
/**
* 根据用户ID获取带上级信息的员工详情
*
* @param userID
* @return
*/
BeisenEmployeeInfo getBeisenUserByUserId(@Param("userId") Integer userID);
/**
* 根据用户ID集合批量查询北森员工详情(含直属上级信息)
*
* @param userIds 北森员工 userId 集合
* @return 员工详情列表
*/
List<BeisenEmployeeInfo> batchGetBeisenUserByUserIds(@Param("userIds") List<Integer> userIds);
} }
...@@ -6,7 +6,6 @@ import cn.com.glsx.framework.core.exception.RpcServiceException; ...@@ -6,7 +6,6 @@ import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.merchants.dto.beisen.BeiSenEmployeeListRequestDTO; import cn.com.glsx.merchants.dto.beisen.BeiSenEmployeeListRequestDTO;
import cn.com.glsx.merchants.dto.beisen.BeiSenEmployeeListResonseDTO; import cn.com.glsx.merchants.dto.beisen.BeiSenEmployeeListResonseDTO;
import cn.com.glsx.merchants.dto.beisen.BeiSenEmployeeMapperDTO; import cn.com.glsx.merchants.dto.beisen.BeiSenEmployeeMapperDTO;
import cn.com.glsx.merchants.dto.beisen.BeisenEmployeeInfoDTO;
import cn.com.glsx.merchants.entity.MerchantLog; import cn.com.glsx.merchants.entity.MerchantLog;
import cn.com.glsx.merchants.enums.MethodEnum; import cn.com.glsx.merchants.enums.MethodEnum;
import cn.com.glsx.merchants.enums.ModuleEnum; import cn.com.glsx.merchants.enums.ModuleEnum;
...@@ -509,17 +508,4 @@ public class MerchantStaffRemoteImpl implements MerchantStaffRemote { ...@@ -509,17 +508,4 @@ public class MerchantStaffRemoteImpl implements MerchantStaffRemote {
return RpcResponse.error(e); return RpcResponse.error(e);
} }
} }
@Override
public RpcResponse<BeisenEmployeeInfoDTO> getBeisenUserByUserId(Integer userId) {
try {
return RpcResponse.success(merchantStaffService.getBeisenUserByUserId(userId));
} catch (RpcServiceException e) {
log.error("getBeisenUserByUserId error: ", e);
return RpcResponse.error(e);
} catch (Exception e) {
log.error("getBeisenUserByUserId error: ", e);
return RpcResponse.error(e);
}
}
} }
...@@ -263,31 +263,4 @@ public class MerchantUserRemoteImpl implements MerchantUserRemote { ...@@ -263,31 +263,4 @@ public class MerchantUserRemoteImpl implements MerchantUserRemote {
return RpcResponse.error(e); return RpcResponse.error(e);
} }
} }
@Override
public RpcResponse<List<BeisenEmployeeInfoDTO>> selectNewBeisenEmployeeInfo(List<String> filterPhoneList, List<String> jobPostKeywords) {
try {
return RpcResponse.success(beiSenService.selectNewBeisenEmployeeInfo(filterPhoneList, jobPostKeywords));
}catch (Exception e){
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<BeisenEmployeeInfoDTO> getBeisenUserByUserId(Integer userId) {
try {
return RpcResponse.success(beiSenService.getBeisenUserByUserId(userId));
} catch (Exception e) {
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<List<BeisenEmployeeInfoDTO>> batchGetBeisenUserByUserIds(List<Integer> userIds) {
try {
return RpcResponse.success(beiSenService.batchGetBeisenUserByUserIds(userIds));
} catch (Exception e) {
return RpcResponse.error(e);
}
}
} }
package cn.com.glsx.merchants.remote.impl;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.merchants.model.request.CreateMerchantWithPermissionsRequest;
import cn.com.glsx.merchants.model.request.QueryParentMerchantListRequest;
import cn.com.glsx.merchants.model.response.CreateMerchantWithPermissionsResponse;
import cn.com.glsx.merchants.model.response.MerchantResponse;
import cn.com.glsx.merchants.model.response.ParentMerchantInfoResponse;
import cn.com.glsx.merchants.remote.MerchantWithPermissionsRemote;
import cn.com.glsx.merchants.service.MerchantService;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.collections4.CollectionUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
/**
* 创建商户并分配权限远程接口实现类
*
* @author glsx
* @version 1.0
* @date 2026-04-20
*/
@Slf4j
@DubboService(version = "1.0.0", timeout = 30000)
public class MerchantWithPermissionsRemoteImpl implements MerchantWithPermissionsRemote {
@Autowired
private MerchantService merchantService;
@Override
public RpcResponse<CreateMerchantWithPermissionsResponse> createMerchantWithPermissions(CreateMerchantWithPermissionsRequest request) {
log.info("RPC创建园区店商户并分配权限,商户名称:{}", request.getMerchantName());
try {
CreateMerchantWithPermissionsResponse response = merchantService.createMerchantWithPermissions(request);
log.info("RPC创建园区店商户成功,商户ID:{}", response);
return RpcResponse.success(response);
} catch (RpcServiceException e) {
log.error("RPC创建园区店商户失败:{}", e.getMessage(), e);
return RpcResponse.error(e.getError(), e.getMessage());
} catch (Exception e) {
log.error("RPC创建园区店商户发生异常:{}", e.getMessage(), e);
return RpcResponse.error(cn.com.glsx.framework.core.enums.DefaultErrorEnum.SERVER_ERROR, "系统异常,请稍后重试");
}
}
@Override
public RpcResponse<List<ParentMerchantInfoResponse>> queryParentMerchantList(
QueryParentMerchantListRequest request) {
log.info("RPC查询上级商户列表,当前账户等级:{},商户类型:{}",
request.getCurrentAccountLevel(), request.getMerchantType());
try {
// 调用MerchantService查询上级商户列表
List<MerchantResponse> merchantList = merchantService.queryParentMerchantList(
request.getCurrentAccountLevel(),
request.getMerchantType()
);
// 转换为ParentMerchantInfoResponse列表
List<ParentMerchantInfoResponse> responseList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(merchantList)) {
for (MerchantResponse merchant : merchantList) {
ParentMerchantInfoResponse response = new ParentMerchantInfoResponse();
response.setMerchantId(merchant.getId());
response.setMerchantNo(merchant.getMerchantNo());
response.setMerchantName(merchant.getMerchantName());
response.setAccountLevel(merchant.getMerchantAccountLevel());
response.setMerchantType(merchant.getAccountType());
responseList.add(response);
}
}
log.info("RPC查询上级商户列表成功,返回{}条记录", responseList.size());
return RpcResponse.success(responseList);
} catch (RpcServiceException e) {
log.error("RPC查询上级商户列表失败:{}", e.getMessage(), e);
return RpcResponse.error(e.getError(), e.getMessage());
} catch (Exception e) {
log.error("RPC查询上级商户列表发生异常:{}", e.getMessage(), e);
return RpcResponse.error(cn.com.glsx.framework.core.enums.DefaultErrorEnum.SERVER_ERROR, "系统异常,请稍后重试");
}
}
}
...@@ -832,59 +832,4 @@ public class BeiSenService { ...@@ -832,59 +832,4 @@ public class BeiSenService {
}).collect(Collectors.toList()); }).collect(Collectors.toList());
} }
/**
* 查询新入职员工信息
*
* @param filterPhoneList 过滤手机号列表(已在职手机号)
* @param jobPostKeywords 岗位关键字列表,非空时在 SQL 层过滤岗位;传 null 或空列表则不过滤
* @return
*/
public List<BeisenEmployeeInfoDTO> selectNewBeisenEmployeeInfo(List<String> filterPhoneList, List<String> jobPostKeywords) {
List<BeisenEmployeeInfo> list = beisenEmployeeInfoMapper.selectNewBeisenEmployeeInfo(filterPhoneList, jobPostKeywords);
if (CollectionUtils.isEmpty(list)){
return Collections.emptyList();
}
return list.stream().map(s -> {
BeisenEmployeeInfoDTO beisenEmployeeInfoDTO = new BeisenEmployeeInfoDTO();
BeanUtils.copyProperties(s, beisenEmployeeInfoDTO);
return beisenEmployeeInfoDTO;
}).collect(Collectors.toList());
}
/**
* 通过北森 userId 查询北森员工详情
*
* @param userId 北森员工 userId
* @return BeisenEmployeeInfoDTO
*/
public BeisenEmployeeInfoDTO getBeisenUserByUserId(Integer userId) {
BeisenEmployeeInfo beisenEmployeeInfo = beisenEmployeeInfoMapper.getBeisenUserByUserId(userId);
if (beisenEmployeeInfo == null) {
return null;
}
BeisenEmployeeInfoDTO dto = new BeisenEmployeeInfoDTO();
BeanUtils.copyProperties(beisenEmployeeInfo, dto);
return dto;
}
/**
* 根据北森 userId 集合批量查询员工详情(含直属上级信息)
*
* @param userIds 北森员工 userId 集合
* @return 员工详情列表
*/
public List<BeisenEmployeeInfoDTO> batchGetBeisenUserByUserIds(List<Integer> userIds) {
if (userIds == null || userIds.isEmpty()) {
return new java.util.ArrayList<>();
}
List<BeisenEmployeeInfo> list = beisenEmployeeInfoMapper.batchGetBeisenUserByUserIds(userIds);
if (list == null || list.isEmpty()) {
return new java.util.ArrayList<>();
}
return list.stream().map(info -> {
BeisenEmployeeInfoDTO dto = new BeisenEmployeeInfoDTO();
BeanUtils.copyProperties(info, dto);
return dto;
}).collect(java.util.stream.Collectors.toList());
}
} }
...@@ -9,7 +9,6 @@ import cn.com.glsx.merchants.config.SystemProperty; ...@@ -9,7 +9,6 @@ import cn.com.glsx.merchants.config.SystemProperty;
import cn.com.glsx.merchants.contants.Constants; import cn.com.glsx.merchants.contants.Constants;
import cn.com.glsx.merchants.dto.beisen.BeiSenEmployeeListRequestDTO; import cn.com.glsx.merchants.dto.beisen.BeiSenEmployeeListRequestDTO;
import cn.com.glsx.merchants.dto.beisen.BeiSenEmployeeListResonseDTO; import cn.com.glsx.merchants.dto.beisen.BeiSenEmployeeListResonseDTO;
import cn.com.glsx.merchants.dto.beisen.BeisenEmployeeInfoDTO;
import cn.com.glsx.merchants.entity.*; import cn.com.glsx.merchants.entity.*;
import cn.com.glsx.merchants.enums.*; import cn.com.glsx.merchants.enums.*;
import cn.com.glsx.merchants.enums.beisen.AccountEventSyncBeiSenEnum; import cn.com.glsx.merchants.enums.beisen.AccountEventSyncBeiSenEnum;
...@@ -1527,17 +1526,6 @@ public class MerchantStaffService { ...@@ -1527,17 +1526,6 @@ public class MerchantStaffService {
ThreadUtil.execute(()->sendStaffMessage(merchantStaff1.getStaffUuid())); ThreadUtil.execute(()->sendStaffMessage(merchantStaff1.getStaffUuid()));
} }
/** /**
* 通过北森 userId 查询北森员工详情
*/
public BeisenEmployeeInfoDTO getBeisenUserByUserId(Integer userId) {
log.info("查询北森员工详情, userId:{}", userId);
BeisenEmployeeInfo employeeInfo = beisenEmployeeInfoMapper.getBeisenUserByUserId(userId);
BeisenEmployeeInfoDTO employeeInfoDTO = new BeisenEmployeeInfoDTO();
BeanUtils.copyProperties(employeeInfo, employeeInfoDTO);
return employeeInfoDTO;
}
/**
* 查询北森员工列表 * 查询北森员工列表
*/ */
public RpcPagination<BeiSenEmployeeListResonseDTO> getBeisenUserWithConditions(RpcPagination<BeiSenEmployeeListRequestDTO> request) { public RpcPagination<BeiSenEmployeeListResonseDTO> getBeisenUserWithConditions(RpcPagination<BeiSenEmployeeListRequestDTO> request) {
......
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
<result column="direct_leader_userId" jdbcType="VARCHAR" property="directLeaderUserId"/> <result column="direct_leader_userId" jdbcType="VARCHAR" property="directLeaderUserId"/>
<result column="directLeaderName" jdbcType="VARCHAR" property="directLeaderName"/> <result column="directLeaderName" jdbcType="VARCHAR" property="directLeaderName"/>
<result column="regularization_months" jdbcType="INTEGER" property="regularizationMonth"/> <result column="regularization_months" jdbcType="INTEGER" property="regularizationMonth"/>
<result column="directLeaderMobilePhone" jdbcType="VARCHAR" property="directLeaderMobilePhone"/> <result column="directLeaderPhone" jdbcType="VARCHAR" property="directLeaderPhone"/>
...@@ -282,40 +282,4 @@ ...@@ -282,40 +282,4 @@
#{phone} #{phone}
</foreach> </foreach>
</select> </select>
<select id="selectNewBeisenEmployeeInfo" resultMap="BaseResultMap">
select
t1.*,t2.name as directLeaderName,t2.mobile_phone as directLeaderMobilePhone
from beisen_employee_info t1
left join beisen_employee_info t2 on t1.direct_leader_userId = t2.user_id
where t1.std_is_deleted = 0 and t1.zz_status = 0
and t1.mobile_phone not in
<foreach collection="filterPhoneList" item="phone" open="(" separator="," close=")">
#{phone}
</foreach>
<if test="jobPostKeywords != null and jobPostKeywords.size() > 0">
and (
<foreach collection="jobPostKeywords" item="keyword" separator="or">
t1.oId_job_post like concat('%', #{keyword}, '%')
</foreach>
)
</if>
</select>
<select id="getBeisenUserByUserId" resultMap="BaseResultMap">
select
t1.*,t2.name as directLeaderName,t2.mobile_phone as directLeaderMobilePhone
from beisen_employee_info t1
left join beisen_employee_info t2 on t1.direct_leader_userId = t2.user_id
where t1.user_id = #{userId}
</select>
<select id="batchGetBeisenUserByUserIds" resultMap="BaseResultMap">
select
t1.*,t2.name as directLeaderName,t2.mobile_phone as directLeaderMobilePhone
from beisen_employee_info t1
left join beisen_employee_info t2 on t1.direct_leader_userId = t2.user_id
where t1.user_id in
<foreach collection="userIds" item="userId" open="(" separator="," close=")">
#{userId}
</foreach>
</select>
</mapper> </mapper>
...@@ -54,7 +54,6 @@ ...@@ -54,7 +54,6 @@
--> -->
<id column="id" jdbcType="INTEGER" property="id"/> <id column="id" jdbcType="INTEGER" property="id"/>
<result column="merchant_name" jdbcType="VARCHAR" property="merchantName"/> <result column="merchant_name" jdbcType="VARCHAR" property="merchantName"/>
<result column="parentName" jdbcType="VARCHAR" property="parentMerchant"/>
<result column="merchant_abbreviation" jdbcType="VARCHAR" property="merchantAbbreviation"/> <result column="merchant_abbreviation" jdbcType="VARCHAR" property="merchantAbbreviation"/>
<result column="merchant_type" jdbcType="TINYINT" property="merchantType"/> <result column="merchant_type" jdbcType="TINYINT" property="merchantType"/>
<result column="merchant_orgcode" jdbcType="VARCHAR" property="merchantOrgcode"/> <result column="merchant_orgcode" jdbcType="VARCHAR" property="merchantOrgcode"/>
...@@ -431,15 +430,6 @@ ...@@ -431,15 +430,6 @@
select * from platform_merchant t1 select * from platform_merchant t1
left join platform_merchant_channel t2 on t1.channel_id=t2.id left join platform_merchant_channel t2 on t1.channel_id=t2.id
where t1.del_flag = 0 where t1.del_flag = 0
<if test="merchantOpenRequest.merchantNameAccurate !=null and merchantOpenRequest.merchantNameAccurate != ''">
and t1.merchant_name = #{merchantOpenRequest.merchantNameAccurate}
</if>
<if test="merchantOpenRequest.merchantNameAccurateList !=null and merchantOpenRequest.merchantNameAccurateList.size() > 0">
and t1.merchant_name in
<foreach collection="merchantOpenRequest.merchantNameAccurateList" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="merchantOpenRequest.merchantName !=null and merchantOpenRequest.merchantName != ''"> <if test="merchantOpenRequest.merchantName !=null and merchantOpenRequest.merchantName != ''">
and t1.merchant_name like concat('%',#{merchantOpenRequest.merchantName},'%') and t1.merchant_name like concat('%',#{merchantOpenRequest.merchantName},'%')
</if> </if>
...@@ -538,9 +528,7 @@ ...@@ -538,9 +528,7 @@
</if> </if>
</select> </select>
<select id="findMerchantListByPage" resultMap="resultMap"> <select id="findMerchantListByPage" resultMap="resultMap">
select t1.*,t5.merchantNo as parentId,t5.merchant_name as parentName, select t1.*,t5.merchantNo as parentId,
(select dict_label from platform_merchant_dict_data where dict_type='merchant_type' and
dict_value=t1.merchant_type) as merchantTypeName,
(select dict_label from platform_merchant_dict_data where dict_type='merchant_model' and (select dict_label from platform_merchant_dict_data where dict_type='merchant_model' and
dict_value=t1.merchant_model) as merchantModelName, dict_value=t1.merchant_model) as merchantModelName,
(select merchant_name from platform_merchant where id=t4.superior_id) as parentMerchant, (select merchant_name from platform_merchant where id=t4.superior_id) as parentMerchant,
...@@ -932,9 +920,6 @@ ...@@ -932,9 +920,6 @@
<if test="request.status != null"> <if test="request.status != null">
AND status = #{request.status} AND status = #{request.status}
</if> </if>
<if test="request.accountType != null">
AND find_in_set(#{request.accountType},account_type)
</if>
</select> </select>
<select id="findAccountTypeNameByIds" resultType="java.lang.String"> <select id="findAccountTypeNameByIds" resultType="java.lang.String">
......
package cn.com.glsx.merchants.remote;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.merchants.model.request.CreateMerchantWithPermissionsRequest;
import cn.com.glsx.merchants.model.request.MerchantBrandRequest;
import cn.com.glsx.merchants.model.request.QueryParentMerchantListRequest;
import cn.com.glsx.merchants.model.response.CreateMerchantWithPermissionsResponse;
import cn.com.glsx.merchants.model.response.ParentMerchantInfoResponse;
import com.alibaba.fastjson.JSONObject;
import java.util.Arrays;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import java.util.ArrayList;
import java.util.List;
import static org.junit.Assert.*;
/**
* MerchantWithPermissionsRemote 接口测试类
*
* @author glsx
* @version 1.0
* @date 2026-04-20
*/
@Slf4j
@RunWith(SpringRunner.class)
@SpringBootTest
public class MerchantWithPermissionsRemoteTest {
@DubboReference(version = "1.0.0")
private MerchantWithPermissionsRemote merchantWithPermissionsRemote;
/**
* 测试创建园区店商户并分配权限 - 成功场景
*/
@Test
public void testCreateMerchantWithPermissions_Success() {
// 准备测试数据
CreateMerchantWithPermissionsRequest request = buildCreateMerchantRequest();
// 调用接口
RpcResponse<CreateMerchantWithPermissionsResponse> response =
merchantWithPermissionsRemote.createMerchantWithPermissions(request);
// 验证结果
assertNotNull("响应不应为空", response);
assertTrue("操作应成功", response.isSuccess());
assertNotNull("响应结果不应为空", response.getResult());
assertTrue("商户创建应成功", response.getResult().getSuccess());
assertNotNull("商户ID不应为空", response.getResult().getMerchantId());
log.info("创建商户成功,商户ID:{}", response.getResult().getMerchantId());
}
/**
* 测试创建园区店商户并分配权限 - 参数校验失败场景
*/
@Test
public void testCreateMerchantWithPermissions_ValidationFailed() {
// 准备测试数据 - 缺少必填字段
CreateMerchantWithPermissionsRequest request = new CreateMerchantWithPermissionsRequest();
// 不设置必填字段
// 调用接口
RpcResponse<CreateMerchantWithPermissionsResponse> response =
merchantWithPermissionsRemote.createMerchantWithPermissions(request);
// 验证结果
assertNotNull("响应不应为空", response);
assertFalse("操作应失败", response.isSuccess());
log.info("参数校验失败,错误信息:{}", response.getMessage());
}
/**
* 测试查询上级商户列表 - 成功场景
*/
@Test
public void testQueryParentMerchantList_Success() {
// 准备测试数据
QueryParentMerchantListRequest request = new QueryParentMerchantListRequest();
request.setCurrentAccountLevel(4); // 门店
request.setMerchantType(6); // 园区店
// 调用接口
RpcResponse<List<ParentMerchantInfoResponse>> response =
merchantWithPermissionsRemote.queryParentMerchantList(request);
// 验证结果
assertNotNull("响应不应为空", response);
assertTrue("操作应成功", response.isSuccess());
assertNotNull("响应结果不应为空", response.getResult());
List<ParentMerchantInfoResponse> merchantList = response.getResult();
log.info("查询到{}个上级商户", merchantList.size());
// 验证返回的商户等级都大于当前等级
for (ParentMerchantInfoResponse merchant : merchantList) {
assertNotNull("商户ID不应为空", merchant.getMerchantId());
assertNotNull("商户名称不应为空", merchant.getMerchantName());
assertNotNull("账户等级不应为空", merchant.getAccountLevel());
assertTrue("账户等级应大于当前等级",
merchant.getAccountLevel() < request.getCurrentAccountLevel());
}
}
/**
* 测试查询上级商户列表 - 工厂级别查询(无上级)
*/
@Test
public void testQueryParentMerchantList_FactoryLevel() {
// 准备测试数据 - 工厂级别(无上级)
QueryParentMerchantListRequest request = new QueryParentMerchantListRequest();
request.setCurrentAccountLevel(2); // 工厂
request.setMerchantType(6); // 园区店
// 调用接口
RpcResponse<List<ParentMerchantInfoResponse>> response =
merchantWithPermissionsRemote.queryParentMerchantList(request);
// 验证结果
assertNotNull("响应不应为空", response);
assertTrue("操作应成功", response.isSuccess());
assertNotNull("响应结果不应为空", response.getResult());
// 工厂级别应该没有上级商户
List<ParentMerchantInfoResponse> merchantList = response.getResult();
log.info("工厂级别查询到{}个上级商户", merchantList.size());
log.info("工厂级别查询到{}", JSONObject.toJSONString(merchantList));
}
/**
* 构建创建商户请求对象
*/
private CreateMerchantWithPermissionsRequest buildCreateMerchantRequest() {
CreateMerchantWithPermissionsRequest request = new CreateMerchantWithPermissionsRequest();
request.setMerchantType(6); // 园区店
request.setMerchantAccountLevel(4); // 门店
request.setParentId(43756); // 上级商户ID
request.setMerchantName("测试园区店_" + System.currentTimeMillis());
request.setContactPhone("13800138000");
request.setDetailAddress("科技园南路88号");
request.setLongitude(113.9433f);
request.setLatitude(22.5485f);
// 设置主营品牌
List<MerchantBrandRequest> brandList = new ArrayList<>();
MerchantBrandRequest brand = new MerchantBrandRequest();
brand.setCars(3256);
brand.setMerchantBrandId(Arrays.asList(3257));
brandList.add(brand);
request.setMerchantBrandList(brandList);
request.setLoginAccount("teststo" + 935874);
request.setLoginPassword("Aa123456");
request.setCreatedBy("system2");
request.setSource("DJ");
return request;
}
}
...@@ -33,7 +33,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; ...@@ -33,7 +33,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = Main.class) @SpringBootTest(classes = Main.class)
public class BeiSenServiceTest extends BaseServiceTest { public class BeiSenServiceTest {
@Autowired @Autowired
private BeiSenService beiSenService; private BeiSenService beiSenService;
...@@ -171,16 +171,4 @@ public class BeiSenServiceTest extends BaseServiceTest { ...@@ -171,16 +171,4 @@ public class BeiSenServiceTest extends BaseServiceTest {
Arrays.asList("15944445555","13714139064")); Arrays.asList("15944445555","13714139064"));
System.out.println(JSONObject.toJSONString(beisenEmployeeInfos)); System.out.println(JSONObject.toJSONString(beisenEmployeeInfos));
} }
@Test
public void testSelectNewBeisenEmployeeInfo() {
List<BeisenEmployeeInfoDTO> beisenEmployeeInfoDTOS = beiSenService.selectNewBeisenEmployeeInfo(Arrays.asList("13729407587"), Arrays.asList("销售", "技师"));
System.out.println(JSONObject.toJSONString(beisenEmployeeInfoDTOS));
}
@Test
public void testBatchGetBeisenUserByUserIds() {
List<BeisenEmployeeInfoDTO> beisenEmployeeInfoDTOS = beiSenService.batchGetBeisenUserByUserIds(Arrays.asList(409001160));
System.out.println(JSONObject.toJSONString(beisenEmployeeInfoDTOS));
}
} }
...@@ -43,7 +43,7 @@ import java.util.List; ...@@ -43,7 +43,7 @@ import java.util.List;
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = Main.class) @SpringBootTest(classes = Main.class)
public class MerchantServiceTest extends BaseServiceTest { public class MerchantServiceTest {
@Autowired @Autowired
private MerchantService merchantService; private MerchantService merchantService;
...@@ -375,8 +375,7 @@ public class MerchantServiceTest extends BaseServiceTest { ...@@ -375,8 +375,7 @@ public class MerchantServiceTest extends BaseServiceTest {
MerchantOpenRequest merchantOpenRequest = new MerchantOpenRequest(); MerchantOpenRequest merchantOpenRequest = new MerchantOpenRequest();
List<Integer> integerList = new ArrayList<>(); List<Integer> integerList = new ArrayList<>();
integerList.add(44209604); integerList.add(44209604);
// merchantOpenRequest.setMerchantBrandCarsList(Arrays.asList(2232,2236)); merchantOpenRequest.setMerchantBrandCarsList(Arrays.asList(2232,2236));
merchantOpenRequest.setMerchantNameAccurateList(Arrays.asList("冒烟商户省代"));
List<MerchantResponse> merchantListRemote = merchantService.findMerchantListRemote(merchantOpenRequest); List<MerchantResponse> merchantListRemote = merchantService.findMerchantListRemote(merchantOpenRequest);
System.out.println(merchantListRemote); System.out.println(merchantListRemote);
} }
......
...@@ -36,17 +36,4 @@ public class MerchantStaffServiceTest extends BaseServiceTest { ...@@ -36,17 +36,4 @@ public class MerchantStaffServiceTest extends BaseServiceTest {
Page<MerchantStaffResponse> page = merchantStaffService.findOnJobMerchantStaffPage(pagination); Page<MerchantStaffResponse> page = merchantStaffService.findOnJobMerchantStaffPage(pagination);
TestCase.assertNotNull(page); TestCase.assertNotNull(page);
} }
@Test
public void testSaveOrUpdateFromDJ() {
MerchantStaffRequest merchantRequest = new MerchantStaffRequest();
merchantRequest.setMerchantNo(44209813);
merchantRequest.setStaffName("谢海旭");
merchantRequest.setStaffPhone("13603070903");
merchantRequest.setRoleName("飞行督导");
merchantRequest.setDelFlag((byte) 0);
merchantRequest.setCreatedSource(4);
merchantStaffService.saveOrUpdateFromDJ(merchantRequest);
}
} }
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!