|  |  |  | 
|---|
|  |  |  | //            return new FebsResponse().fail().message("当前城市已经无法申请"); | 
|---|
|  |  |  | //        } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | MallAgentRecord mallAgentRecordNew = MallAgentRecordConversion.INSTANCE.dtoToEntity(apiAgentApplyDto); | 
|---|
|  |  |  | mallAgentRecordNew.setMemberId(memberId); | 
|---|
|  |  |  | mallAgentRecordNew.setState(MallAgentRecord.APPLY_ING); | 
|---|
|  |  |  | mallAgentRecordMapper.insert(mallAgentRecordNew); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | DataDictionaryCustom agentAmountDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(DataDictionaryEnum.PRICE_AMOUNT.getType() | 
|---|
|  |  |  | , DataDictionaryEnum.PRICE_AMOUNT.getCode()); | 
|---|
|  |  |  | String agentAmount = agentAmountDic.getValue(); | 
|---|
|  |  |  | BigDecimal bigDecimal = new BigDecimal(agentAmount); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | MallAgentRecord mallAgentRecordNew = MallAgentRecordConversion.INSTANCE.dtoToEntity(apiAgentApplyDto); | 
|---|
|  |  |  | mallAgentRecordNew.setMemberId(memberId); | 
|---|
|  |  |  | mallAgentRecordNew.setState(MallAgentRecord.APPLY_ING); | 
|---|
|  |  |  | mallAgentRecordNew.setAgentLevel(apiAgentApplyDto.getType()); | 
|---|
|  |  |  | if(apiAgentApplyDto.getType().equals(AgentLevelEnum.LEVEL_THREE.getName())){ | 
|---|
|  |  |  | mallAgentRecordNew.setAmount(bigDecimal); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | mallAgentRecordMapper.insert(mallAgentRecordNew); | 
|---|
|  |  |  | return new FebsResponse().success().data(bigDecimal); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|