|
|
@ -64,8 +64,12 @@ public class HighMerchantController { |
|
|
|
try { |
|
|
|
try { |
|
|
|
SessionObject sessionObject = userCenter.getSessionObject(request); |
|
|
|
SessionObject sessionObject = userCenter.getSessionObject(request); |
|
|
|
UserInfoModel userInfoModel = (UserInfoModel) sessionObject.getObject(); |
|
|
|
UserInfoModel userInfoModel = (UserInfoModel) sessionObject.getObject(); |
|
|
|
if (highMerchant.getCompanyId() == null |
|
|
|
if (userInfoModel.getBsCompany() == null) { |
|
|
|
|| StringUtils.isBlank(highMerchant.getMerchantKey()) |
|
|
|
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.getMerchantName()) |
|
|
|
|| StringUtils.isBlank(highMerchant.getTelephone()) |
|
|
|
|| StringUtils.isBlank(highMerchant.getTelephone()) |
|
|
|
|| StringUtils.isBlank(highMerchant.getAddress()) |
|
|
|
|| StringUtils.isBlank(highMerchant.getAddress()) |
|
|
@ -91,6 +95,7 @@ public class HighMerchantController { |
|
|
|
highMerchant.setStatus(1); // 状态:0:不可用,1:可用
|
|
|
|
highMerchant.setStatus(1); // 状态:0:不可用,1:可用
|
|
|
|
highMerchant.setCreateTime(new Date()); |
|
|
|
highMerchant.setCreateTime(new Date()); |
|
|
|
highMerchant.setUpdateTime(new Date()); |
|
|
|
highMerchant.setUpdateTime(new Date()); |
|
|
|
|
|
|
|
highMerchant.setCompanyId(userInfoModel.getBsCompany().getId()); |
|
|
|
highMerchant.setOperatorId(userInfoModel.getSecUser().getId()); |
|
|
|
highMerchant.setOperatorId(userInfoModel.getSecUser().getId()); |
|
|
|
highMerchant.setOperatorName(userInfoModel.getSecUser().getUserName()); |
|
|
|
highMerchant.setOperatorName(userInfoModel.getSecUser().getUserName()); |
|
|
|
highMerchantService.insertMerchant(highMerchant); |
|
|
|
highMerchantService.insertMerchant(highMerchant); |
|
|
@ -110,8 +115,11 @@ public class HighMerchantController { |
|
|
|
try { |
|
|
|
try { |
|
|
|
SessionObject sessionObject = userCenter.getSessionObject(request); |
|
|
|
SessionObject sessionObject = userCenter.getSessionObject(request); |
|
|
|
UserInfoModel userInfoModel = (UserInfoModel) sessionObject.getObject(); |
|
|
|
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 |
|
|
|
if (highMerchant.getId() == null |
|
|
|
|| highMerchant.getCompanyId() == null |
|
|
|
|
|
|
|
|| StringUtils.isBlank(highMerchant.getMerchantKey()) |
|
|
|
|| StringUtils.isBlank(highMerchant.getMerchantKey()) |
|
|
|
|| StringUtils.isBlank(highMerchant.getMerchantName()) |
|
|
|
|| StringUtils.isBlank(highMerchant.getMerchantName()) |
|
|
|
|| StringUtils.isBlank(highMerchant.getTelephone()) |
|
|
|
|| StringUtils.isBlank(highMerchant.getTelephone()) |
|
|
@ -151,6 +159,7 @@ public class HighMerchantController { |
|
|
|
highMerchant.setUpdateTime(new Date()); |
|
|
|
highMerchant.setUpdateTime(new Date()); |
|
|
|
highMerchant.setOperatorId(userInfoModel.getSecUser().getId()); |
|
|
|
highMerchant.setOperatorId(userInfoModel.getSecUser().getId()); |
|
|
|
highMerchant.setOperatorName(userInfoModel.getSecUser().getUserName()); |
|
|
|
highMerchant.setOperatorName(userInfoModel.getSecUser().getUserName()); |
|
|
|
|
|
|
|
highMerchant.setCompanyId(userInfoModel.getBsCompany().getId()); |
|
|
|
highMerchantService.updateMerchant(highMerchant); |
|
|
|
highMerchantService.updateMerchant(highMerchant); |
|
|
|
|
|
|
|
|
|
|
|
return ResponseMsgUtil.success(highMerchant); |
|
|
|
return ResponseMsgUtil.success(highMerchant); |
|
|
|