Commit 58ab4ef4 by xiongzs

Merge all from rop-merchant-SCRMV3.4.0-20221117

1 parent 9fb7eda9
......@@ -5,10 +5,7 @@ import cn.com.glsx.framework.rop.response.RopResponse;
import cn.com.glsx.merchants.model.response.MerchantStaffResponse;
import cn.com.glsx.merchants.model.response.MerchantSubListResponse;
import cn.com.glsx.merchants.request.accounttype.MerchantListByConditionRopRequest;
import cn.com.glsx.merchants.request.merchant.FindBySupMerchantNoRopRequest;
import cn.com.glsx.merchants.request.merchant.MerchantNosRopRequest;
import cn.com.glsx.merchants.request.merchant.MerchantSaveOpenRequest;
import cn.com.glsx.merchants.request.merchant.OpenMerchantPageRequest;
import cn.com.glsx.merchants.request.merchant.*;
import cn.com.glsx.merchants.request.open.*;
import cn.com.glsx.merchants.request.staff.MerchantNoListByStaffPhone;
import cn.com.glsx.merchants.response.*;
......@@ -507,5 +504,14 @@ public class OpenController {
}
}
@ServiceMethod(method = "merchants.api.open.findTopMerchantInfo", needInSession = NeedInSessionType.NO)
@ApiOperation("根据商户号集合查询所属工厂")
public RopResponse<List<MerchantAndTopMerchantRopResponse>> findTopMerchantInfo(TopMerchantRopRequest ropRequest) {
try {
return RopResponse.success(openService.findTopMerchantInfo(ropRequest));
} catch (RpcServiceException e) {
log.info("=======OpenController__invoke__findTopMerchantInfo__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
}
\ No newline at end of file
package cn.com.glsx.merchants.request.merchant;
import com.rop.AbstractRopRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class TopMerchantRopRequest extends AbstractRopRequest {
@ApiModelProperty(notes = "商户号集合(用,分隔)",required = true)
private String merchantNoStr;
}
package cn.com.glsx.merchants.response;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@Data
public class MerchantAndTopMerchantRopResponse implements Serializable {
@ApiModelProperty(notes = "商户号")
private Integer merchantId;
@ApiModelProperty(notes = "商户名")
private String merchantName;
@ApiModelProperty(notes = "商户层级")
private Integer merchantAccountLevel;
@ApiModelProperty(notes = "企微授权模式")
private Integer merchantModel;
@ApiModelProperty(notes = "所属工厂商户号")
private Integer topMerchantId;
@ApiModelProperty(notes = "所属工厂商户名")
private String topMerchantName;
}
......@@ -15,10 +15,7 @@ import cn.com.glsx.merchants.remote.MerchantStaffRemote;
import cn.com.glsx.merchants.remote.MerchantUserRemote;
import cn.com.glsx.merchants.request.accounttype.MerchantListByConditionRopRequest;
import cn.com.glsx.merchants.request.file.FileSaveRequest;
import cn.com.glsx.merchants.request.merchant.FindBySupMerchantNoRopRequest;
import cn.com.glsx.merchants.request.merchant.MerchantNosRopRequest;
import cn.com.glsx.merchants.request.merchant.MerchantSaveOpenRequest;
import cn.com.glsx.merchants.request.merchant.OpenMerchantPageRequest;
import cn.com.glsx.merchants.request.merchant.*;
import cn.com.glsx.merchants.request.open.*;
import cn.com.glsx.merchants.request.open.MerchantListOpenRequest;
import cn.com.glsx.merchants.response.*;
......@@ -391,4 +388,12 @@ public class OpenService {
return rpcResponse.getResult();
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
}
public List<MerchantAndTopMerchantRopResponse> findTopMerchantInfo(TopMerchantRopRequest ropRequest){
RpcResponse<List<MerchantAndTopMerchantRpcResponse>> rpcResponse = merchantRemote.findTopMerchantInfo(ropRequest.getMerchantNoStr());
if (rpcResponse.isSuccess())
return ConvertResponse.convertList(rpcResponse.getResult(),MerchantAndTopMerchantRopResponse.class);
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!