| | |
| | | model.setLoginSafeword(passwordManager.decryptPassword(model.getLoginSafeword())); |
| | | SysUser sysUser = sysUserService.getSysUserById(SecurityUtils.getSysUser().getUserId()); |
| | | if (!passwordEncoder.matches(model.getLoginSafeword(), sysUser.getSafePassword())) { |
| | | throw new YamiShopBindException("资金密码不正确!"); |
| | | throw new YamiShopBindException("Incorrect fund password!"); |
| | | } |
| | | if (StrUtil.isEmpty(model.getImage())){ |
| | | throw new YamiShopBindException("展示图片不能为空"); |
| | | throw new YamiShopBindException("Display image cannot be empty"); |
| | | } |
| | | Banner banner = new Banner(); |
| | | banner.setContentCode(model.getContentCode()); |
| | |
| | | model.setLoginSafeword(passwordManager.decryptPassword(model.getLoginSafeword())); |
| | | SysUser sysUser = sysUserService.getSysUserById(SecurityUtils.getSysUser().getUserId()); |
| | | if (!passwordEncoder.matches(model.getLoginSafeword(), sysUser.getSafePassword())) { |
| | | throw new YamiShopBindException("资金密码不正确!"); |
| | | throw new YamiShopBindException("Incorrect fund password!"); |
| | | } |
| | | if (StrUtil.isEmpty(model.getImage())){ |
| | | throw new YamiShopBindException("展示图片不能为空"); |
| | | throw new YamiShopBindException("Display image cannot be empty"); |
| | | } |
| | | Banner banner = bannerService.getById(model.getId()); |
| | | if (banner == null) { |
| | | throw new YamiShopBindException("参数错误!"); |
| | | throw new YamiShopBindException("Invalid parameters!"); |
| | | } |
| | | banner.setContentCode(model.getContentCode()); |
| | | banner.setImage(model.getImage()); |