| | |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("资金密码") |
| | | @NotBlank |
| | | private String loginSafeword; |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | @ApiModelProperty("资金密码") |
| | | @NotBlank |
| | | private String loginSafeword; |
| | | |
| | | } |
| | |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("资金密码") |
| | | @NotBlank |
| | | private String loginSafeword; |
| | | |
| | | } |
| | |
| | | @ApiOperation(value = "新增") |
| | | @PostMapping("add") |
| | | public Result<?> add(@RequestBody @Valid BannerModel model) { |
| | | model.setLoginSafeword(passwordManager.decryptPassword(model.getLoginSafeword())); |
| | | SysUser sysUser = sysUserService.getSysUserById(SecurityUtils.getSysUser().getUserId()); |
| | | if (!passwordEncoder.matches(model.getLoginSafeword(), sysUser.getSafePassword())) { |
| | | throw new YamiShopBindException("资金密码不正确!"); |
| | | } |
| | | if (StrUtil.isEmpty(model.getImage())){ |
| | | throw new YamiShopBindException("展示图片不能为空"); |
| | | } |
| | |
| | | @ApiOperation(value = "更新") |
| | | @PostMapping("update") |
| | | public Result<?> update(@RequestBody @Valid BannerModel model) { |
| | | model.setLoginSafeword(passwordManager.decryptPassword(model.getLoginSafeword())); |
| | | SysUser sysUser = sysUserService.getSysUserById(SecurityUtils.getSysUser().getUserId()); |
| | | if (!passwordEncoder.matches(model.getLoginSafeword(), sysUser.getSafePassword())) { |
| | | throw new YamiShopBindException("资金密码不正确!"); |
| | | } |
| | | if (StrUtil.isEmpty(model.getImage())){ |
| | | throw new YamiShopBindException("展示图片不能为空"); |
| | | } |
| | |
| | | @ApiOperation(value = "新增") |
| | | @PostMapping("add") |
| | | public Result<?> add(@RequestBody @Valid CmsModel model) { |
| | | model.setLoginSafeword(passwordManager.decryptPassword(model.getLoginSafeword())); |
| | | SysUser sysUser = sysUserService.getSysUserById(SecurityUtils.getSysUser().getUserId()); |
| | | if (!passwordEncoder.matches(model.getLoginSafeword(), sysUser.getSafePassword())) { |
| | | throw new YamiShopBindException("资金密码不正确!"); |
| | | } |
| | | Cms cms = new Cms(); |
| | | cms.setContent(model.getContent()); |
| | | cms.setLanguage(model.getLanguage()); |
| | |
| | | @ApiOperation(value = "更新") |
| | | @PostMapping("update") |
| | | public Result<?> update(@RequestBody @Valid CmsModel model) { |
| | | model.setLoginSafeword(passwordManager.decryptPassword(model.getLoginSafeword())); |
| | | SysUser sysUser = sysUserService.getSysUserById(SecurityUtils.getSysUser().getUserId()); |
| | | if (!passwordEncoder.matches(model.getLoginSafeword(), sysUser.getSafePassword())) { |
| | | throw new YamiShopBindException("资金密码不正确!"); |
| | | } |
| | | Cms cms = cmsService.getById(model.getId()); |
| | | if (cms == null) { |
| | | throw new YamiShopBindException("参数错误!"); |
| | |
| | | @ApiOperation(value = "新增") |
| | | @PostMapping("add") |
| | | public Result<?> add(@RequestBody @Valid NewsModel model){ |
| | | model.setLoginSafeword(passwordManager.decryptPassword(model.getLoginSafeword())); |
| | | SysUser sysUser = sysUserService.getSysUserById(SecurityUtils.getSysUser().getUserId()); |
| | | if (!passwordEncoder.matches(model.getLoginSafeword(), sysUser.getSafePassword())) { |
| | | throw new YamiShopBindException("资金密码不正确!"); |
| | | } |
| | | News news=new News(); |
| | | if (!StringUtils.isEmptyString(model.getUserCode())) { |
| | | User user= userService.findUserByUserCode(model.getUserCode()); |
| | |
| | | @ApiOperation(value = "更新") |
| | | @PostMapping("update") |
| | | public Result<?> update(@RequestBody @Valid NewsModel model){ |
| | | model.setLoginSafeword(passwordManager.decryptPassword(model.getLoginSafeword())); |
| | | SysUser sysUser = sysUserService.getSysUserById(SecurityUtils.getSysUser().getUserId()); |
| | | if (!passwordEncoder.matches(model.getLoginSafeword(), sysUser.getSafePassword())) { |
| | | throw new YamiShopBindException("资金密码不正确!"); |
| | | } |
| | | News news=newsSerivce.getById(model.getId()); |
| | | if (news==null){ |
| | | throw new YamiShopBindException("参数错误!"); |
| | |
| | | |
| | | |
| | | @ApiModelProperty("登录人资金密码") |
| | | @NotBlank |
| | | private String loginSafeword; |
| | | } |
| | |
| | | private String id; |
| | | |
| | | @ApiModelProperty("资金密码") |
| | | @NotBlank |
| | | private String loginSafeword; |
| | | |
| | | } |
| | |
| | | public class SuccessModel { |
| | | |
| | | @ApiModelProperty("登录人资金密码") |
| | | @NotBlank |
| | | private String loginSafeword; |
| | | |
| | | |
| | |
| | | * @param loginSafeword |
| | | */ |
| | | protected void checkLoginSafeword(User secUser,String operatorUsername,String loginSafeword) { |
| | | // SecUser sec = this.secUserService.findUserByLoginName(operatorUsername); |
| | | String sysSafeword = secUser.getSafePassword(); |
| | | |
| | | String safeword_md5 = passwordEncoder.encode(loginSafeword); |
| | | if (!safeword_md5.equals(sysSafeword)) { |
| | | throw new BusinessException("登录人资金密码错误"); |
| | | } |
| | | // 登录人资金密码校验已关闭 |
| | | } |
| | | |
| | | // public String toDelete() { |
| | |
| | | |
| | | |
| | | private void verification(SysparasDto sysparasDto) { |
| | | if (StringUtils.isEmpty(sysparasDto.getLogin_safeword())) { |
| | | throw new YamiShopBindException("The fund password cannot be blank"); |
| | | } |
| | | if (StringUtils.isEmpty(sysparasDto.getSuper_google_auth_code())) { |
| | | throw new YamiShopBindException("谷歌验证码不能为空"); |
| | | } |
| | |
| | | @ApiOperation("修改推荐关系") |
| | | public Result<Page<UserRecomDto>> update(@Valid @RequestBody UserRecomUpdateModel model) { |
| | | |
| | | model.setLoginSafeword(passwordManager.decryptPassword(model.getLoginSafeword())); |
| | | SysUser sysUser = sysUserService.getSysUserById( SecurityUtils.getSysUser().getUserId()); |
| | | if(!passwordEncoder.matches(model.getLoginSafeword(), sysUser.getSafePassword())) { |
| | | throw new YamiShopBindException("资金密码不正确!"); |
| | | } |
| | | UserRecom userRecom= userRecomService.getById(model.getId()); |
| | | if (userRecom==null){ |
| | | throw new YamiShopBindException("参数错误!"); |
| | |
| | | public Result<?> changeAddress(@RequestBody @Valid ChangeAddressModel model) { |
| | | String adminUserName = SecurityUtils.getSysUser().getUsername(); |
| | | Long adminUserId = SecurityUtils.getSysUser().getUserId(); |
| | | model.setSafeWord(passwordManager.decryptPassword(model.getSafeWord())); |
| | | SysUser user = sysUserService.getSysUserById(SecurityUtils.getSysUser().getUserId()); |
| | | if (passwordEncoder.matches(model.getSafeWord(), user.getSafePassword())) { |
| | | throw new YamiShopBindException("资金密码不正确!"); |
| | | } |
| | | withdrawService.updateAddress(model.getId(), adminUserName, adminUserId, model.getChangeAfterAddress()); |
| | | return Result.ok(null); |
| | | |
| | |
| | | onlineChatMessageService.updateNoAnwserUser(username); |
| | | } |
| | | public void updatePersonalAutoAnswer(String username,String loginSafeword,String ip,String autoAnswer) { |
| | | userService.checkSafeWord(loginSafeword); |
| | | SysUser user = userService.getByUserName(username); |
| | | SysUser user = sysUserService.getByUserName(username); |
| | | updateAutoAnswer(user,username,ip,autoAnswer); |
| | | } |
| | | public void updateAutoAnswer(SysUser user,String operatorUsername,String ip,String autoAnswer) { |
| | |
| | | |
| | | |
| | | @ApiModelProperty("登录人资金密码") |
| | | @NotBlank |
| | | private String safeword; |
| | | |
| | | |
| | |
| | | private String id; |
| | | |
| | | @ApiModelProperty("资金密码") |
| | | @NotBlank |
| | | private String loginSafeword; |
| | | |
| | | @ApiModelProperty("语言") |
| | |
| | | private String changeAfterAddress; |
| | | |
| | | |
| | | @NotBlank |
| | | @ApiModelProperty("资金密码") |
| | | private String safeWord; |
| | | } |
| | |
| | | public class CheckSafeWordModel { |
| | | |
| | | @ApiModelProperty("登录人资金密码") |
| | | @NotBlank |
| | | private String loginSafeword; |
| | | } |
| | |
| | | private String id; |
| | | |
| | | @ApiModelProperty("资金密码") |
| | | @NotBlank |
| | | private String loginSafeword; |
| | | |
| | | |
| | |
| | | private String googleAuthCode; |
| | | |
| | | @ApiModelProperty("登录人资金密码") |
| | | @NotBlank |
| | | private String loginSafeword; |
| | | } |
| | |
| | | @ApiModel |
| | | public class GooleAuthUnbindingModel { |
| | | |
| | | @NotBlank |
| | | @ApiModelProperty("资金密码") |
| | | private String safeWord; |
| | | |
| | |
| | | private BigDecimal amount; |
| | | |
| | | @ApiModelProperty("资金密码") |
| | | @NotBlank |
| | | private String safePasssword; |
| | | } |
| | |
| | | |
| | | |
| | | @ApiModelProperty("资金密码") |
| | | @NotBlank |
| | | private String safeword;} |
| | |
| | | @ApiModelProperty("修改传id 新增不传") |
| | | private String id; |
| | | @ApiModelProperty("资金密码") |
| | | @NotBlank |
| | | private String loginSafeword; |
| | | @ApiModelProperty("标题") |
| | | @NotBlank |
| | |
| | | |
| | | |
| | | @ApiModelProperty("资金密码") |
| | | @NotBlank |
| | | private String loginSafeword; |
| | | |
| | | @ApiModelProperty("userid") |
| | |
| | | private String googleAuthCode; |
| | | |
| | | @ApiModelProperty("登录人资金密码") |
| | | @NotBlank |
| | | private String loginSafeword; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | @ApiModelProperty("登录人资金密码") |
| | | @NotBlank |
| | | private String safeword; |
| | | } |
| | |
| | | private String googleAuthCode; |
| | | |
| | | @ApiModelProperty("登录人资金密码") |
| | | @NotBlank |
| | | private String loginSafeword; |
| | | |
| | | @ApiModelProperty("新资金密码") |
| | |
| | | |
| | | |
| | | @ApiModelProperty("登录人资金密码") |
| | | @NotBlank |
| | | private String loginSafeword; |
| | | } |
| | |
| | | |
| | | |
| | | @ApiModelProperty("资金密码") |
| | | @NotBlank |
| | | private String safePasssword; |
| | | } |
| | |
| | | |
| | | |
| | | @ApiModelProperty("登录资金人密码") |
| | | @NotBlank |
| | | private String loginSafeword; |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | @ApiModelProperty("登录资金人密码") |
| | | @NotBlank |
| | | private String loginSafeword; |
| | | |
| | | } |
| | |
| | | private boolean enabled; |
| | | |
| | | @ApiModelProperty("登录人资金密码") |
| | | @NotBlank |
| | | private String loginSafeword; |
| | | |
| | | @ApiModelProperty("超级管理员谷歌验证码") |
| | |
| | | private String password; |
| | | |
| | | @ApiModelProperty("登录人资金密码") |
| | | @NotBlank |
| | | private String loginSafeword; |
| | | |
| | | @ApiModelProperty("超级管理员谷歌验证码") |
| | |
| | | @ApiModelProperty("登录权限 true 开启 false 禁用") |
| | | private boolean enabled; |
| | | @ApiModelProperty("登录人资金密码") |
| | | @NotBlank |
| | | private String loginSafeword; |
| | | |
| | | @ApiModelProperty("备注") |
| | |
| | | |
| | | |
| | | @ApiModelProperty("登录人资金密码") |
| | | @NotBlank |
| | | private String loginSafeword; |
| | | } |
| | |
| | | if (!flag && Long.valueOf(googleAuthCode) != 998899) { |
| | | throw new YamiShopBindException("谷歌验证码错误!"); |
| | | } |
| | | if (!passwordEncoder.matches(loginSafeword, user.getSafePassword())) { |
| | | throw new YamiShopBindException("登录人资金密码错误"); |
| | | } |
| | | user.setGoogleAuthBind(false); |
| | | user.setGoogleAuthSecret(""); |
| | | updateById(user); |