Commit c0f74881 by xiongzs

Merge all from rop-merchant 1118版本

1 parent 9d9dbba5
......@@ -92,10 +92,10 @@ public class MerchantController {
* status: 1
* sign: 2198C1C6567D159D46B177F167AF9426DCF1CE0
*/
String param = merchantSaveRequest.getParam();
String param = merchantSaveRequest.getUrl();
//父商户
MerchantSaveRequest parent = new MerchantSaveRequest();
parent.setMerchantName(merchantSaveRequest.getParam() + "p");
parent.setMerchantName(merchantSaveRequest.getUrl() + "p");
String tel = getTel();
parent.setIsloginName((byte)0);
parent.setMerchantLegalPersonPhone(tel);
......
......@@ -68,7 +68,7 @@ public class MerchantMenuController {
}
}
@ServiceMethod(method = "merchants.api.menu.buildMenuAndFunction", needInSession = NeedInSessionType.NO)
/*@ServiceMethod(method = "merchants.api.menu.buildMenuAndFunction", needInSession = NeedInSessionType.NO)
@ApiOperation("构建版本菜单")
public RopResponse<Boolean> buildMenuAndFunction(BuildMenuParam param){
......@@ -82,7 +82,7 @@ public class MerchantMenuController {
log.info("=======MerchantMenuController__invoke__buildMenuAndFunction__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(),e.getMessage());
}
}
}*/
/**
* 查询菜单列表
......@@ -143,9 +143,6 @@ public class MerchantMenuController {
public RopResponse<Boolean> rebuildVersionMenu(BuildMenuParam param){
try {
if(!"Thomas".equals(param.getParam())){
throw new RpcServiceException("FBI警告", "不要乱搞");
}
merchantMenuService.rebuildVersionMenu(param);
return RopResponse.success(true);
} catch (RpcServiceException e) {
......@@ -155,13 +152,9 @@ public class MerchantMenuController {
}
@ServiceMethod(method = "merchants.api.menu.buildVersionMenuFunctionNew", needInSession = NeedInSessionType.NO)
@ApiOperation("构建版本菜单---全新版本")
@ApiOperation("根据menuJson构建版本菜单-新增")
public RopResponse<Boolean> buildVersionMenuFunctionNew(BuildMenuParam param){
try {
if(!"Thomas".equals(param.getParam())){
throw new RpcServiceException("FBI警告", "不要乱搞");
}
merchantMenuService.buildVersionMenuFunctionNew(param);
return RopResponse.success(true);
} catch (RpcServiceException e) {
......@@ -171,13 +164,10 @@ public class MerchantMenuController {
}
@ServiceMethod(method = "merchants.api.menu.updateVersionMenuAndFunction", needInSession = NeedInSessionType.NO)
@ApiOperation("构建版本菜单-根据json更新菜单及功能")
@ApiOperation("根据menuJson构建版本菜单-修改")
public RopResponse<Boolean> updateVersionMenuAndFunction(BuildMenuParam param){
try {
if(!"Thomas".equals(param.getParam())){
throw new RpcServiceException("FBI警告", "不要乱搞");
}
merchantMenuService.updateVersionMenuAndFunction(param);
return RopResponse.success(true);
} catch (RpcServiceException e) {
......@@ -187,13 +177,10 @@ public class MerchantMenuController {
}
@ServiceMethod(method = "merchants.api.menu.deleteVersionMenuAndFunction", needInSession = NeedInSessionType.NO)
@ApiOperation("构建版本菜单-根据json删除菜单及功能")
@ApiOperation("根据menuJson构建版本菜单-删除")
public RopResponse<Boolean> deleteVersionMenuAndFunction(BuildMenuParam param){
try {
if(!"Thomas".equals(param.getParam())){
throw new RpcServiceException("FBI警告", "不要乱搞");
}
merchantMenuService.deleteVersionMenuAndFunction(param);
return RopResponse.success(true);
} catch (RpcServiceException e) {
......
......@@ -5,6 +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;
......@@ -375,11 +376,11 @@ public class OpenController {
@ServiceMethod(method = "merchants.api.open.getAccountInfoByUuid", needInSession = NeedInSessionType.NO)
@ApiOperation("根据uuid获取账户信息")
public RopResponse<OpenUserResponse> getAccountInfoByUuid(AccountInfoOpenRequest accountInfoOpenRequest){
public RopResponse<OpenUserResponse> getAccountInfoByUuid(AccountInfoOpenRequest accountInfoOpenRequest) {
try {
OpenUserResponse openUserResponse = openService.getAccountInfoByUuid(accountInfoOpenRequest.getUuid());
return RopResponse.success(openUserResponse);
}catch (RpcServiceException e){
} catch (RpcServiceException e) {
log.info("根据uuid获取账户信息异常:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
......@@ -387,11 +388,11 @@ public class OpenController {
@ServiceMethod(method = "merchants.api.open.findStaffListByMerchantNo", needInSession = NeedInSessionType.NO)
@ApiOperation("根据商户号查询员工列表")
public RopResponse<List<StaffResponse>> findStaffListByMerchantNo(StaffListOpenRequest staffListOpenRequest){
public RopResponse<List<StaffResponse>> findStaffListByMerchantNo(StaffListOpenRequest staffListOpenRequest) {
try {
List<StaffResponse> list = openService.findStaffListByMerchantNo(staffListOpenRequest);
return RopResponse.success(list);
}catch (RpcServiceException e){
} catch (RpcServiceException e) {
log.info("根据商户号查询员工列表异常:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
......@@ -399,11 +400,11 @@ public class OpenController {
@ServiceMethod(method = "merchants.api.open.findLoginInfoByMerchantNo", needInSession = NeedInSessionType.NO)
@ApiOperation("根据商户号获取登录信息")
public RopResponse<OpenUserResponse> findLoginInfoByMerchantNo(StaffListOpenRequest staffListOpenRequest){
public RopResponse<OpenUserResponse> findLoginInfoByMerchantNo(StaffListOpenRequest staffListOpenRequest) {
try {
OpenUserResponse openUserResponse = openService.findLoginInfoByMerchantNo(staffListOpenRequest);
return RopResponse.success(openUserResponse);
}catch (RpcServiceException e){
} catch (RpcServiceException e) {
log.info("根据商户号查询员工列表异常:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
......@@ -411,12 +412,12 @@ public class OpenController {
@ServiceMethod(method = "merchants.api.open.confirmPermissions")
@ApiOperation("根据uuid,menuId查询是否存在该权限")
public RopResponse<Boolean> confirmPermissionsByUuidAndMenuId(ConfirmPermissionsRequest confirmPermissionsRequest){
public RopResponse<Boolean> confirmPermissionsByUuidAndMenuId(ConfirmPermissionsRequest confirmPermissionsRequest) {
log.info("根据uuid,menuId查询是否存在该权限入参:{}", confirmPermissionsRequest);
try {
Boolean bl = openService.confirmPermissionsByUuidAndMenuId(confirmPermissionsRequest);
return RopResponse.success(bl);
}catch (RpcServiceException e){
} catch (RpcServiceException e) {
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
......@@ -424,18 +425,18 @@ public class OpenController {
@ServiceMethod(method = "merchants.api.open.updateMerchantByMerchantNo")
@ApiOperation("根据商户号修改商户信息(企微名称)")
public RopResponse<Boolean> updateMerchantByMerchantNo(@Validated UpdateMerchantByMerchantNoRequest updateMerchantByMerchantNoReq){
public RopResponse<Boolean> updateMerchantByMerchantNo(@Validated UpdateMerchantByMerchantNoRequest updateMerchantByMerchantNoReq) {
try {
Boolean bl = openService.updateMerchantByMerchantNo(updateMerchantByMerchantNoReq);
return RopResponse.success(bl);
}catch (RpcServiceException e){
} catch (RpcServiceException e) {
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.open.findSubMerchantbySupMerchantNo", needInSession = NeedInSessionType.NO)
@ApiOperation("根据商户号查询商户下一级列表")
public RopResponse<List<MerchantSubListResponse>> findSubMerchantbySupMerchantNo(OpenMerchantDetailRequest openMerchantDetailRequest){
public RopResponse<List<MerchantSubListResponse>> findSubMerchantbySupMerchantNo(OpenMerchantDetailRequest openMerchantDetailRequest) {
try {
List<MerchantSubListResponse> responses = openService.findSubMerchantbySupMerchantNo(openMerchantDetailRequest);
return RopResponse.success(responses);
......@@ -447,7 +448,7 @@ public class OpenController {
@ServiceMethod(method = "merchants.api.open.findJoinEntMicroStaffByMerchantNo", needInSession = NeedInSessionType.NO)
@ApiOperation("根据商户号查询已加入企微员工")
public RopResponse<List<MerchantStaffResponse>> findJoinEntMicroStaffByMerchantNo(OpenFindEntMicroStaffByMerchantNoRequest request){
public RopResponse<List<MerchantStaffResponse>> findJoinEntMicroStaffByMerchantNo(OpenFindEntMicroStaffByMerchantNoRequest request) {
try {
List<MerchantStaffResponse> responses = openService.findJoinEntMicroStaffByMerchantNo(request);
return RopResponse.success(responses);
......@@ -459,7 +460,7 @@ public class OpenController {
@ServiceMethod(method = "merchants.api.open.findMerchantNoList", needInSession = NeedInSessionType.NO)
@ApiOperation("根据条件查询商户号集合")
public RopResponse<List<Integer>> findMerchantNoList(MerchantNosRopRequest request){
public RopResponse<List<Integer>> findMerchantNoList(MerchantNosRopRequest request) {
try {
List<Integer> responses = openService.findMerchantNoList(request);
return RopResponse.success(responses);
......@@ -471,7 +472,7 @@ public class OpenController {
@ServiceMethod(method = "merchants.api.open.findMerchantNoListByMerAccTypeId", needInSession = NeedInSessionType.NO)
@ApiOperation("根据商户层级查询商户号集合")
public RopResponse<List<MerchantListByConditionRopResponse>> findMerchantNoListByMerAccTypeId(MerchantListByConditionRopRequest request){
public RopResponse<List<MerchantListByConditionRopResponse>> findMerchantNoListByMerAccTypeId(MerchantListByConditionRopRequest request) {
try {
List<MerchantListByConditionRopResponse> responses = openService.findMerchantNoListByMerAccTypeId(request);
return RopResponse.success(responses);
......@@ -480,4 +481,17 @@ public class OpenController {
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.open.findMerchantBySupMerchantNo", needInSession = NeedInSessionType.NO)
@ApiOperation("根据上级查询商户号集合")
public RopResponse<List<MerchantNoNameRopResponse>> findMerchantBySupMerchantNo(FindBySupMerchantNoRopRequest ropRequest) {
try {
List<MerchantNoNameRopResponse> responses = openService.findMerchantBySupMerchantNo(ropRequest);
return RopResponse.success(responses);
} catch (RpcServiceException e) {
log.info("=======OpenController__invoke__findMerchantBySupMerchantNo__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
}
\ No newline at end of file
package cn.com.glsx.merchants.request.menu;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class BuildMenuParam extends DefaultRequest {
private String param;
@ApiModelProperty("菜单文档url")
private String url;
}
package cn.com.glsx.merchants.request.merchant;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author Hayreal
* @Description TODO
* @date 2022/11/22 11:47
* @Version 1.0
*/
@Data
public class FindBySupMerchantNoRopRequest extends DefaultRequest {
@ApiModelProperty(value = "上级商户号",required = true)
private Integer supMerchantNo;
@ApiModelProperty(value = "商户层级 1:工厂 2:省代 3:市代 4:门店",required = true)
private Integer merchantAccountLevel;
}
......@@ -69,7 +69,7 @@ public class StaffSaveRequest extends DefaultRequest {
@ApiModelProperty(notes = "员工标签:0-「1.0新车权益销售」,1-「1.1次新车精品升级」,2-「1.2次新车线上转化」,3-「1.3存量用户众筹」")
private String staffLabel;
@ApiModelProperty(notes = "1-销售部、2-售后部、3-客服部、4-续保部")
@ApiModelProperty(notes = "0-其他、1-销售部、2-售后部、3-客服部、4-续保部")
private Integer department;
......
package cn.com.glsx.merchants.response;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @Author Hayreal
* @Description TODO
* @date 2022/11/22 11:47
* @Version 1.0
*/
@Data
public class MerchantNoNameRopResponse implements Serializable {
@ApiModelProperty(notes = "商户号")
private Integer merchantNo;
@ApiModelProperty(notes = "商户名")
private String merchantName;
}
......@@ -185,6 +185,6 @@ public class StaffResponse implements Serializable {
private String weChatPhone;
@ApiModelProperty(notes = "员工标签:0-「1.0新车权益销售」,1-「1.1次新车精品升级」,2-「1.2次新车线上转化」,3-「1.3存量用户众筹」", dataType = "String")
private String staffLabel;
@ApiModelProperty(notes = "1-销售部、2-售后部、3-客服部、4-续保部", dataType = "String")
@ApiModelProperty(notes = "0-其他、1-销售部、2-售后部、3-客服部、4-续保部", dataType = "Integer")
private Integer department;
}
\ No newline at end of file
......@@ -73,7 +73,7 @@ public class MerchantMenuService {
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(),booleanRpcResponse.getMessage());
}
}
@Deprecated
public void buildMenuAndFunction(BuildMenuParam param) {
RpcResponse<Boolean> booleanRpcResponse = merchantProductMenuRemote.buildMenuAndFunction(ConvertRequest.convertRequest(param, new BuildMenuRpcParam()));
if (booleanRpcResponse.isFailed()) {
......
......@@ -7,6 +7,7 @@ import cn.com.glsx.merchants.contants.Contants;
import cn.com.glsx.merchants.convert.ConvertRequest;
import cn.com.glsx.merchants.convert.ConvertResponse;
import cn.com.glsx.merchants.model.request.*;
import cn.com.glsx.merchants.model.request.merchant.FindBySupMerchantNoRpcRequest;
import cn.com.glsx.merchants.model.request.merchant.MerchantListByConditionRpcRequest;
import cn.com.glsx.merchants.model.response.*;
import cn.com.glsx.merchants.remote.MerchantRemote;
......@@ -14,6 +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;
......@@ -373,4 +375,12 @@ public class OpenService {
return ConvertResponse.convertList(rpcResponse.getResult(),MerchantListByConditionRopResponse.class);
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
}
public List<MerchantNoNameRopResponse> findMerchantBySupMerchantNo(FindBySupMerchantNoRopRequest ropRequest){
FindBySupMerchantNoRpcRequest remoteRequest = ConvertRequest.convertRequest(ropRequest,new FindBySupMerchantNoRpcRequest());
RpcResponse<List<MerchantNoNameRpcResponse>> rpcResponse = merchantRemote.findMerchantBySupMerchantNo(remoteRequest);
if (rpcResponse.isSuccess())
return ConvertResponse.convertList(rpcResponse.getResult(),MerchantNoNameRopResponse.class);
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
}
}
package cn.com.glsx.merchants.controller;
import java.net.URL;
import java.util.Base64;
import cn.com.glsx.merchants.model.request.MerchantRequest;
......@@ -81,6 +82,7 @@ public class ExampleControllerTest extends BaseControllerTest {
@Test
public void test() throws Exception{
MerchantRequest merchantRequest=new MerchantRequest();
merchantRequest.setSource("OP");
System.out.println(merchantRemote.findAllMerchantRemote(merchantRequest));
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!