| | |
| | | // TODO 赋值操作 |
| | | int i = bizUserService.saveUserInfo(bizUser); |
| | | |
| | | checkNeedToBeSalesman(bizUser, loginUser); |
| | | if (i == 0) { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "更新失败"); |
| | | } |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, Collections.singletonList(bizUser)); |
| | | } |
| | | |
| | | |
| | | |
| | | void checkNeedToBeSalesman(BizUser bizUser, BizUser loginUser) { |
| | | //查询是否需要自动成为分销员 |
| | | if ((loginUser.getIsSales() == null || loginUser.getIsSales() == 2) |
| | | && StringUtils.isNotBlank(bizUser.getNickName())) {//目前还不是分销员 |
| | |
| | | queryWrapper.eq("apply_status", ShopSalesmanApply.APPLY_STATUS_DSH); |
| | | ShopSalesmanApply shopSalesmanApply = salesmanApplyDao.selectOne(queryWrapper); |
| | | if (shopSalesmanApply == null) {//没有待审核记录 |
| | | shopSalesmanApplyService.applyToBeAnSalesman(loginUser.getOpenId(), null, null, 2); |
| | | try { |
| | | shopSalesmanApplyService.applyToBeAnSalesman(loginUser.getOpenId(), null, null, 2); |
| | | }catch (Exception e){ |
| | | LogUtil.debug(e.getMessage()); |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if (i == 0) { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "更新失败"); |
| | | } |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, Collections.singletonList(bizUser)); |
| | | } |
| | | |
| | | |