| | |
| | | return ajaxResult; |
| | | } |
| | | |
| | | @ApiOperation(value = "查询分销商城开关", notes = "1开启分销,2关闭分销") |
| | | @GetMapping(value = "/getSalesMallSetting") |
| | | public AjaxResult getSalesMallSwith() { |
| | | BusParameterSettings fxSwith = busParameterSettingsDao.selectCompanyParamByCode(FenxiaoSettingConstant.FX_SWITCH, HostInterceptor.getCompanyId()); |
| | | BusParameterSettings fxModel = busParameterSettingsDao.selectCompanyParamByCode(FenxiaoSettingConstant.FX_MODEL, HostInterceptor.getCompanyId()); |
| | | AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("查询成功"); |
| | | ajaxResult.putInMap("fxSwith",fxSwith.getParamValue()); |
| | | ajaxResult.putInMap("fxModel",fxModel.getParamValue()); |
| | | return ajaxResult; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "申请成为推广员", notes = "传入参数invitationId 邀请人openId ,非必填 例: {invitationId:openId}") |
| | | @ApiResponses({ |
| | |
| | | public AjaxResult applyToBeAnSalesman(@RequestBody Map<String,String> param) { |
| | | BizUser loginUser = redisUserLoginUtils.getLoginUser(BizUser.class); |
| | | String invitationId = param.get("invitationId"); |
| | | if(StringUtils.isNotBlank(invitationId)){ |
| | | BizUser invitationUser = bizUserDao.findByOpenId(invitationId); |
| | | if(invitationUser!=null && invitationUser.getOpenId().equals(loginUser.getOpenId())) { |
| | | return AjaxResult.buildFailInstance("不能邀请自己成为推广员"); |
| | | } |
| | | } |
| | | |
| | | ShopSalesmanApply shopSalesmanApply= shopSalesmanApplyService.applyToBeAnSalesman(loginUser.getOpenId(),"",invitationId,ShopSalesmanApply.APPLY_WAY_SELF); |
| | | loginUser=bizUserDao.selectById(loginUser.getUserId()); |
| | | redisUserLoginUtils.updateUserInfo(loginUser); |
| | | return AjaxResult.buildSuccessInstance(shopSalesmanApply); |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | BizUser loginUser = redisUserLoginUtils.getLoginUser(BizUser.class); |
| | | QueryWrapper<ShopSalesmanApply> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("user_id",loginUser.getOpenId()); |
| | | queryWrapper.eq("apply_status",ShopSalesmanApply.APPLY_STATUS_DSH); |
| | | ShopSalesmanApply shopSalesmanApply = salesmanApplyDao.selectOne(queryWrapper); |
| | | return AjaxResult.buildSuccessInstance(shopSalesmanApply); |
| | | } |