|
|
|
@ -64,8 +64,12 @@ public class HighMerchantController { |
|
|
|
|
try { |
|
|
|
|
SessionObject sessionObject = userCenter.getSessionObject(request); |
|
|
|
|
UserInfoModel userInfoModel = (UserInfoModel) sessionObject.getObject(); |
|
|
|
|
if (highMerchant.getCompanyId() == null |
|
|
|
|
|| StringUtils.isBlank(highMerchant.getMerchantKey()) |
|
|
|
|
if (userInfoModel.getBsCompany() == null) { |
|
|
|
|
log.error("HighMerchantController -> updateMerchant() error!","该主角色没有权限"); |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.MENU_TREE_HAS_NOT_ERROR, ""); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (StringUtils.isBlank(highMerchant.getMerchantKey()) |
|
|
|
|
|| StringUtils.isBlank(highMerchant.getMerchantName()) |
|
|
|
|
|| StringUtils.isBlank(highMerchant.getTelephone()) |
|
|
|
|
|| StringUtils.isBlank(highMerchant.getAddress()) |
|
|
|
@ -91,6 +95,7 @@ public class HighMerchantController { |
|
|
|
|
highMerchant.setStatus(1); // 状态:0:不可用,1:可用
|
|
|
|
|
highMerchant.setCreateTime(new Date()); |
|
|
|
|
highMerchant.setUpdateTime(new Date()); |
|
|
|
|
highMerchant.setCompanyId(userInfoModel.getBsCompany().getId()); |
|
|
|
|
highMerchant.setOperatorId(userInfoModel.getSecUser().getId()); |
|
|
|
|
highMerchant.setOperatorName(userInfoModel.getSecUser().getUserName()); |
|
|
|
|
highMerchantService.insertMerchant(highMerchant); |
|
|
|
@ -110,8 +115,11 @@ public class HighMerchantController { |
|
|
|
|
try { |
|
|
|
|
SessionObject sessionObject = userCenter.getSessionObject(request); |
|
|
|
|
UserInfoModel userInfoModel = (UserInfoModel) sessionObject.getObject(); |
|
|
|
|
if (userInfoModel.getBsCompany() == null) { |
|
|
|
|
log.error("HighMerchantController -> updateMerchant() error!","该主角色没有权限"); |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.MENU_TREE_HAS_NOT_ERROR, ""); |
|
|
|
|
} |
|
|
|
|
if (highMerchant.getId() == null |
|
|
|
|
|| highMerchant.getCompanyId() == null |
|
|
|
|
|| StringUtils.isBlank(highMerchant.getMerchantKey()) |
|
|
|
|
|| StringUtils.isBlank(highMerchant.getMerchantName()) |
|
|
|
|
|| StringUtils.isBlank(highMerchant.getTelephone()) |
|
|
|
@ -151,6 +159,7 @@ public class HighMerchantController { |
|
|
|
|
highMerchant.setUpdateTime(new Date()); |
|
|
|
|
highMerchant.setOperatorId(userInfoModel.getSecUser().getId()); |
|
|
|
|
highMerchant.setOperatorName(userInfoModel.getSecUser().getUserName()); |
|
|
|
|
highMerchant.setCompanyId(userInfoModel.getBsCompany().getId()); |
|
|
|
|
highMerchantService.updateMerchant(highMerchant); |
|
|
|
|
|
|
|
|
|
return ResponseMsgUtil.success(highMerchant); |
|
|
|
|