Commit ddb7b336 by xiongzs

Merge all from rop-merchant-SCRM-V3.11.0-0529

1 parent f24e5dba
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,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>3.9.0-SNAPSHOT</version> <version>3.11.0-SNAPSHOT</version>
</dependency> </dependency>
<!--引用GSON,用于打印--> <!--引用GSON,用于打印-->
<dependency> <dependency>
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
<dependency> <dependency>
<groupId>cn.com.glsx.stoassistant</groupId> <groupId>cn.com.glsx.stoassistant</groupId>
<artifactId>rpc-scrm-stoassistant-api</artifactId> <artifactId>rpc-scrm-stoassistant-api</artifactId>
<version>3.9.0-SNAPSHOT</version> <version>3.11.0-SNAPSHOT</version>
</dependency> </dependency>
</dependencies> </dependencies>
</project> </project>
\ No newline at end of file \ No newline at end of file
...@@ -11,6 +11,7 @@ import cn.com.glsx.merchants.request.withdrawal.MerchantStaffWithdrawalUpdateRop ...@@ -11,6 +11,7 @@ import cn.com.glsx.merchants.request.withdrawal.MerchantStaffWithdrawalUpdateRop
import cn.com.glsx.merchants.request.withdrawal.StaffWithdrawalImportRopRequest; import cn.com.glsx.merchants.request.withdrawal.StaffWithdrawalImportRopRequest;
import cn.com.glsx.merchants.response.withdrawal.MerchantStaffWithdrawalListRopResponse; import cn.com.glsx.merchants.response.withdrawal.MerchantStaffWithdrawalListRopResponse;
import cn.com.glsx.merchants.response.withdrawal.StaffImportWithdrawalRopResponse; import cn.com.glsx.merchants.response.withdrawal.StaffImportWithdrawalRopResponse;
import cn.com.glsx.merchants.response.withdrawal.StaffWithdrawalUrlRopResponse;
import cn.com.glsx.merchants.service.MerchantStaffWithdrawalService; import cn.com.glsx.merchants.service.MerchantStaffWithdrawalService;
import cn.com.glsx.merchants.util.WithdrawalPagination; import cn.com.glsx.merchants.util.WithdrawalPagination;
import cn.com.glsx.stoassistant.model.request.withdrawal.MerchantStaffWithdrawalSearchRpcRequest; import cn.com.glsx.stoassistant.model.request.withdrawal.MerchantStaffWithdrawalSearchRpcRequest;
...@@ -122,7 +123,7 @@ public class MerchantStaffWithdrawalController { ...@@ -122,7 +123,7 @@ public class MerchantStaffWithdrawalController {
@ServiceMethod(method = "merchants.api.staff.withdrawal.exportBankWithdrawal", needInSession = NeedInSessionType.NO) @ServiceMethod(method = "merchants.api.staff.withdrawal.exportBankWithdrawal", needInSession = NeedInSessionType.NO)
@ApiOperation("导出提现结果") @ApiOperation("导出提现结果")
public RopResponse<String> exportBankWithdrawal(MerchantStaffWithdrawalSearchRopRequest request){ public RopResponse<StaffWithdrawalUrlRopResponse> exportBankWithdrawal(MerchantStaffWithdrawalSearchRopRequest request){
try { try {
return RopResponse.success(merchantStaffWithdrawalService.exportBankWithdrawal(request)); return RopResponse.success(merchantStaffWithdrawalService.exportBankWithdrawal(request));
} catch (RpcServiceException e) { } catch (RpcServiceException e) {
......
package cn.com.glsx.merchants.controller; package cn.com.glsx.merchants.controller;
import cn.com.glsx.framework.core.enums.DefaultErrorEnum;
import cn.com.glsx.framework.core.exception.RpcServiceException; import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.framework.rop.response.RopResponse; import cn.com.glsx.framework.rop.response.RopResponse;
import cn.com.glsx.merchants.model.response.MerchantStaffResponse; import cn.com.glsx.merchants.model.response.MerchantStaffResponse;
...@@ -631,4 +632,19 @@ public class OpenController { ...@@ -631,4 +632,19 @@ public class OpenController {
return RopResponse.error(e.getErrId(), e.getMessage()); return RopResponse.error(e.getErrId(), e.getMessage());
} }
} }
@ServiceMethod(method = "merchants.api.open.findStaffListByUuidList", needInSession = NeedInSessionType.NO)
@ApiOperation("根据uuid查询员工列表")
public RopResponse<List<StaffResponse>> findStaffListByUuidList(StaffListUuidOpenRequest request) {
try {
List<StaffResponse> list = openService.findStaffListByUuidList(request);
return RopResponse.success(list);
} catch (RpcServiceException e) {
log.info("根据uuid查询员工列表异常:{}", e.getMessage(),e);
return RopResponse.error(e.getErrId(), e.getMessage());
}catch (Exception e) {
log.info("根据uuid查询员工列表异常:{}", e);
return RopResponse.error(DefaultErrorEnum.UNKNOW_ERROR,e.getMessage());
}
}
} }
\ No newline at end of file \ No newline at end of file
...@@ -232,7 +232,7 @@ public class StaffController { ...@@ -232,7 +232,7 @@ public class StaffController {
@ApiOperation("批量新增员工") @ApiOperation("批量新增员工")
public RopResponse<Boolean> insertStaffBatchByPhone(StaffJsonRopRequest ropRequest) { public RopResponse<Boolean> insertStaffBatchByPhone(StaffJsonRopRequest ropRequest) {
try { try {
staffService.insertStaffBatchByPhone(ropRequest.getStaffJson()); staffService.insertStaffBatchByPhone(ropRequest.getMerchantNos());
return RopResponse.success(true); return RopResponse.success(true);
} catch (RpcServiceException e) { } catch (RpcServiceException e) {
log.info("=======StaffController__invoke__insertStaffBatchByPhone__exception:{}", e.getMessage()); log.info("=======StaffController__invoke__insertStaffBatchByPhone__exception:{}", e.getMessage());
......
package cn.com.glsx.merchants.request.open;
import com.rop.AbstractRopRequest;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.util.List;
@ToString
@Data
@ApiModel("根据uuid查询员工列表param")
public class StaffListUuidOpenRequest extends AbstractRopRequest {
@ApiModelProperty(value = "员工uuid")
private List<String> staffUuidList;
}
...@@ -7,6 +7,6 @@ import lombok.Data; ...@@ -7,6 +7,6 @@ import lombok.Data;
@Data @Data
public class StaffJsonRopRequest extends DefaultRequest { public class StaffJsonRopRequest extends DefaultRequest {
@ApiModelProperty(notes = "批量新增员工",required = true) @ApiModelProperty(notes = "批量插入员工入参",required = true)
private String staffJson; private String merchantNos;
} }
...@@ -17,7 +17,7 @@ public class StaffListRequest extends DefaultRequest { ...@@ -17,7 +17,7 @@ public class StaffListRequest extends DefaultRequest {
/** /**
* 商户id * 商户id
*/ */
@ApiModelProperty(notes = "商户id", required = true) @ApiModelProperty(notes = "商户id")
private Integer merchantId; private Integer merchantId;
/** /**
...@@ -33,6 +33,10 @@ public class StaffListRequest extends DefaultRequest { ...@@ -33,6 +33,10 @@ public class StaffListRequest extends DefaultRequest {
@ApiModelProperty(notes = "员工标签:0-「1.0新车权益销售」,1-「1.1次新车精品升级」,2-「1.2次新车线上转化」,3-「1.3存量用户众筹」") @ApiModelProperty(notes = "员工标签:0-「1.0新车权益销售」,1-「1.1次新车精品升级」,2-「1.2次新车线上转化」,3-「1.3存量用户众筹」")
private String staffLabel; private String staffLabel;
@ApiModelProperty(example = "角色名字")
private String roleName;
@ApiModelProperty(example = "员工uuid")
private String staffUuid;
} }
package cn.com.glsx.merchants.response.withdrawal;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@Data
public class StaffWithdrawalUrlRopResponse implements Serializable {
@ApiModelProperty(notes = "全字段导出模板")
private String fullFileUrl;
@ApiModelProperty(notes = "导出文件url:无流水号、状态和失败原因")
private String fileUrl;
}
...@@ -11,6 +11,7 @@ import cn.com.glsx.merchants.request.withdrawal.MerchantStaffWithdrawalUpdateRop ...@@ -11,6 +11,7 @@ import cn.com.glsx.merchants.request.withdrawal.MerchantStaffWithdrawalUpdateRop
import cn.com.glsx.merchants.request.withdrawal.StaffWithdrawalImportRopRequest; import cn.com.glsx.merchants.request.withdrawal.StaffWithdrawalImportRopRequest;
import cn.com.glsx.merchants.response.withdrawal.MerchantStaffWithdrawalListRopResponse; import cn.com.glsx.merchants.response.withdrawal.MerchantStaffWithdrawalListRopResponse;
import cn.com.glsx.merchants.response.withdrawal.StaffImportWithdrawalRopResponse; import cn.com.glsx.merchants.response.withdrawal.StaffImportWithdrawalRopResponse;
import cn.com.glsx.merchants.response.withdrawal.StaffWithdrawalUrlRopResponse;
import cn.com.glsx.merchants.util.WithdrawalPagination; import cn.com.glsx.merchants.util.WithdrawalPagination;
import cn.com.glsx.stoassistant.model.request.withdrawal.MerchantStaffFailBatchRpcRequest; import cn.com.glsx.stoassistant.model.request.withdrawal.MerchantStaffFailBatchRpcRequest;
import cn.com.glsx.stoassistant.model.request.withdrawal.MerchantStaffWithdrawalInsertRpcRequest; import cn.com.glsx.stoassistant.model.request.withdrawal.MerchantStaffWithdrawalInsertRpcRequest;
...@@ -19,6 +20,7 @@ import cn.com.glsx.stoassistant.model.request.withdrawal.StaffWithdrawalImportRp ...@@ -19,6 +20,7 @@ import cn.com.glsx.stoassistant.model.request.withdrawal.StaffWithdrawalImportRp
import cn.com.glsx.stoassistant.model.response.withdrawal.MerchantStaffWithdrawalListRpcResponse; import cn.com.glsx.stoassistant.model.response.withdrawal.MerchantStaffWithdrawalListRpcResponse;
import cn.com.glsx.stoassistant.model.response.withdrawal.MerchantStaffWithdrawalPageRpcResponse; import cn.com.glsx.stoassistant.model.response.withdrawal.MerchantStaffWithdrawalPageRpcResponse;
import cn.com.glsx.stoassistant.model.response.withdrawal.StaffImportWithdrawalRpcResponse; import cn.com.glsx.stoassistant.model.response.withdrawal.StaffImportWithdrawalRpcResponse;
import cn.com.glsx.stoassistant.model.response.withdrawal.StaffWithdrawalUrlRpcResponse;
import cn.com.glsx.stoassistant.remote.MerchantStaffWithdrawalRemote; import cn.com.glsx.stoassistant.remote.MerchantStaffWithdrawalRemote;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -124,11 +126,11 @@ public class MerchantStaffWithdrawalService { ...@@ -124,11 +126,11 @@ public class MerchantStaffWithdrawalService {
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage()); throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
} }
public String exportBankWithdrawal(MerchantStaffWithdrawalSearchRopRequest request) { public StaffWithdrawalUrlRopResponse exportBankWithdrawal(MerchantStaffWithdrawalSearchRopRequest request) {
MerchantStaffWithdrawalSearchRpcRequest rpcRequest = ConvertRequest.convertRequest(request, new MerchantStaffWithdrawalSearchRpcRequest()); MerchantStaffWithdrawalSearchRpcRequest rpcRequest = ConvertRequest.convertRequest(request, new MerchantStaffWithdrawalSearchRpcRequest());
RpcResponse<String> rpcResponse = merchantStaffWithdrawalRemote.exportBankWithdrawal(rpcRequest); RpcResponse<StaffWithdrawalUrlRpcResponse> rpcResponse = merchantStaffWithdrawalRemote.exportBankWithdrawal(rpcRequest);
if (rpcResponse.isSuccess()) { if (rpcResponse.isSuccess()) {
return rpcResponse.getResult(); return ConvertResponse.convertObject(rpcResponse.getResult(),StaffWithdrawalUrlRopResponse.class);
} }
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage()); throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
......
...@@ -32,21 +32,18 @@ import cn.com.glsx.merchants.util.Pagination; ...@@ -32,21 +32,18 @@ import cn.com.glsx.merchants.util.Pagination;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.rop.RopRequestContext; import com.rop.RopRequestContext;
import com.rop.session.SimpleSession; import com.rop.session.SimpleSession;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.compress.utils.Lists;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.oreframework.boot.autoconfigure.rop.session.RopSessionManager; import org.oreframework.boot.autoconfigure.rop.session.RopSessionManager;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.xml.crypto.Data;
import java.util.Arrays;
import java.util.HashSet; import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream;
/** /**
* @author zhouhaibao * @author zhouhaibao
...@@ -54,6 +51,7 @@ import java.util.stream.Stream; ...@@ -54,6 +51,7 @@ import java.util.stream.Stream;
* @description: TODO * @description: TODO
* @date 2021/9/17 9:52 * @date 2021/9/17 9:52
*/ */
@Slf4j
@Service @Service
public class OpenService { public class OpenService {
...@@ -469,4 +467,13 @@ public class OpenService { ...@@ -469,4 +467,13 @@ public class OpenService {
return ConvertResponse.convertList(rpcResponse.getResult(),VisibleMerchantRopResponse.class); return ConvertResponse.convertList(rpcResponse.getResult(),VisibleMerchantRopResponse.class);
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage()); throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
} }
public List<StaffResponse> findStaffListByUuidList(StaffListUuidOpenRequest request) {
log.info("入参:{}",request);
RpcResponse<List<MerchantStaffResponse>> response = merchantStaffRemote.selectStaffListByStaffUUID(request.getStaffUuidList());
if (response.isSuccess()) {
return ConvertResponse.convertList(response.getResult(), StaffResponse.class);
}
throw new RpcServiceException(response.getError(),response.getException().getErrId(), response.getMessage());
}
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!