|  |  |  | 
|---|
|  |  |  | import com.matrix.system.fenxiao.dto.ShopSalesmanDetailDto; | 
|---|
|  |  |  | import com.matrix.system.fenxiao.dto.UnbundlingSaleManDto; | 
|---|
|  |  |  | import com.matrix.system.fenxiao.dto.UpdateFyfaDto; | 
|---|
|  |  |  | import com.matrix.system.fenxiao.dto.UpdateTgjhDto; | 
|---|
|  |  |  | import com.matrix.system.fenxiao.dto.UpdateTgtpDto; | 
|---|
|  |  |  | import com.matrix.system.fenxiao.entity.ShopSalesmanApply; | 
|---|
|  |  |  | import com.matrix.system.fenxiao.entity.ShopSalesmanGrade; | 
|---|
|  |  |  | import com.matrix.system.fenxiao.vo.FyfaManageVo; | 
|---|
|  |  |  | 
|---|
|  |  |  | if(StrUtil.isEmpty(name)) { | 
|---|
|  |  |  | return AjaxResult.buildFailInstance("请输入方案名称"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | Double sealesCommission = updateFyfaDto.getSealesCommission(); | 
|---|
|  |  |  | if(ObjectUtil.isEmpty(sealesCommission)) { | 
|---|
|  |  |  | return AjaxResult.buildFailInstance("请输入正确的推广提成"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | Double invitationCommission = updateFyfaDto.getInvitationCommission(); | 
|---|
|  |  |  | if(ObjectUtil.isEmpty(invitationCommission)) { | 
|---|
|  |  |  | return AjaxResult.buildFailInstance("请输入正确的邀请提成"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //设置用户公司ID | 
|---|
|  |  |  | QueryUtil.setQueryLimitCom(updateFyfaDto); | 
|---|
|  |  |  | selectById.setCompanyId(updateFyfaDto.getCompanyId()); | 
|---|
|  |  |  | selectById.setName(updateFyfaDto.getName()); | 
|---|
|  |  |  | selectById.setSealesCommission(updateFyfaDto.getSealesCommission()); | 
|---|
|  |  |  | selectById.setInvitationCommission(updateFyfaDto.getInvitationCommission()); | 
|---|
|  |  |  | selectById.setSealesCommission(sealesCommission); | 
|---|
|  |  |  | selectById.setInvitationCommission(invitationCommission); | 
|---|
|  |  |  | selectById.setGradeCondition(updateFyfaDto.getGradeCondition()); | 
|---|
|  |  |  | shopSalesmanGradeDao.updateById(selectById); | 
|---|
|  |  |  | return AjaxResult.buildFailInstance("操作成功"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Transactional(rollbackFor = Exception.class) | 
|---|
|  |  |  | public AjaxResult updateTgjh(UpdateTgjhDto updateTgjhDto) { | 
|---|
|  |  |  | //设置用户公司ID | 
|---|
|  |  |  | QueryUtil.setQueryLimitCom(updateTgjhDto); | 
|---|
|  |  |  | //获取推广计划的Param | 
|---|
|  |  |  | Long companyId = updateTgjhDto.getCompanyId(); | 
|---|
|  |  |  | BusParameterSettings busParameterSettings = busParameterSettingsDao.selectCompanyParamByCode(FenxiaoSettingConstant.FX_TG_PLAN, companyId); | 
|---|
|  |  |  | busParameterSettings.setParamValue3(updateTgjhDto.getTgfa()); | 
|---|
|  |  |  | busParameterSettingsDao.updateByModel(busParameterSettings); | 
|---|
|  |  |  | return AjaxResult.buildFailInstance("保存成功"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Transactional(rollbackFor = Exception.class) | 
|---|
|  |  |  | public AjaxResult updateTgtp(UpdateTgtpDto updateTgtpDto) { | 
|---|
|  |  |  | //设置用户公司ID | 
|---|
|  |  |  | QueryUtil.setQueryLimitCom(updateTgtpDto); | 
|---|
|  |  |  | //获取推广计划的Param | 
|---|
|  |  |  | Long companyId = updateTgtpDto.getCompanyId(); | 
|---|
|  |  |  | BusParameterSettings busParameterSettings = busParameterSettingsDao.selectCompanyParamByCode(FenxiaoSettingConstant.FX_TG_POSTER, companyId); | 
|---|
|  |  |  | busParameterSettings.setParamValue(updateTgtpDto.getImageUrl()); | 
|---|
|  |  |  | busParameterSettingsDao.updateByModel(busParameterSettings); | 
|---|
|  |  |  | return AjaxResult.buildFailInstance("保存成功"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|