test_class.file: service/settlement-service/src/test/java/com/meiduimall/service/settlement/api/AgentControllerTest.java
test_class.identifier: AgentControllerTest
test_class.superclass: extends BaseTest
test_case.body: @Test
  	public void testShareDeposit() throws Exception {
  		ResultActions results = mockMvc.perform(MockMvcRequestBuilders
  				.post("/settlementservice/agentservice/v1/sharedeposit")
  				.param("id", "115").param("agentNo", "9999991112").param("bindPhone", "13410899920")
  				.param("userName", "大区个代小天天").param("misUserId", "1gw_13410899920").param("companyName", "美兑o2o115")
  				.param("cashDeposit", "6500").param("depositLeftAmount", "0").param("recommenderCode", "999999")
  				.param("recommenderName", "大区联系人").param("recommenderPhone", "18999999999").param("recNo", "QTG999999161212001")
  				.param("recType", "1").param("addAgentNo", "999999").param("addBindPhone", "18999999999")
  				.param("addCompanyName", "大区").param("addDepositLeftAmount", "300"))
  				.andExpect(status().isOk());
  		
  		results.andDo(new ResultHandler() {
  			@Override
  			public void handle(MvcResult result) throws Exception {
  				System.out.println("*********" + result.getResponse().getContentAsString());
  			}
  		});
  	}
test_case.class_method_signature: AgentControllerTest.testShareDeposit()
test_case.full_signature: @Test public void testShareDeposit()
test_case.identifier: testShareDeposit
test_case.invocations: andExpect perform m("ad param param param param No",  ommen param param param param Name" Id",  param param param param post isOk status andDo println getContentAsString getResponse
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testShareDeposit()
focal_class.declarator: logger = LoggerFactory.getLogger(AgentController.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(AgentController.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: depositService
focal_class.modifier: @Autowired
  	private
focal_class.original_string: @Autowired
  	private DepositService depositService;
focal_class.type: DepositService
focal_class.var_name: depositService
focal_class.declarator: agentService
focal_class.modifier: @Autowired
  	private
focal_class.original_string: @Autowired
  	private AgentService agentService;
focal_class.type: AgentService
focal_class.var_name: agentService
focal_class.file: service/settlement-service/src/main/java/com/meiduimall/service/settlement/api/AgentController.java
focal_class.identifier: AgentController
focal_class.class_method_signature: AgentController.shareDeposit(@Validated EcmAgent ecmAgent)
focal_class.full_signature: @PostMapping("/sharedeposit") public ResBodyData shareDeposit(@Validated EcmAgent ecmAgent)
focal_class.identifier: shareDeposit
focal_class.modifiers: @PostMapping("/sharedeposit") public
focal_class.parameters: (@Validated EcmAgent ecmAgent)
focal_class.return: ResBodyData
focal_class.signature: ResBodyData shareDeposit(@Validated EcmAgent ecmAgent)
focal_class.class_method_signature: AgentController.sendScore(@Validated EcmStore ecmStore)
focal_class.full_signature: @PostMapping("/sendscore") public ResBodyData sendScore(@Validated EcmStore ecmStore)
focal_class.identifier: sendScore
focal_class.modifiers: @PostMapping("/sendscore") public
focal_class.parameters: (@Validated EcmStore ecmStore)
focal_class.return: ResBodyData
focal_class.signature: ResBodyData sendScore(@Validated EcmStore ecmStore)
focal_class.class_method_signature: AgentController.createAccoutBalance(@Validated EcmMzfAccount ecmMzfAccount)
focal_class.full_signature: @PostMapping("/createaccoutbalance") public ResBodyData createAccoutBalance(@Validated EcmMzfAccount ecmMzfAccount)
focal_class.identifier: createAccoutBalance
focal_class.modifiers: @PostMapping("/createaccoutbalance") public
focal_class.parameters: (@Validated EcmMzfAccount ecmMzfAccount)
focal_class.return: ResBodyData
focal_class.signature: ResBodyData createAccoutBalance(@Validated EcmMzfAccount ecmMzfAccount)
focal_method.body: @PostMapping("/sharedeposit")
  	public ResBodyData shareDeposit(@Validated EcmAgent ecmAgent) {
  		
  		long start = System.currentTimeMillis();
  		logger.info("share profit for agent start:{}", start);
  		
  		//判断当前个代是否已分润过
  		List<EcmMzfAgentWater> shareResults = agentService.getShareProfitResult(ecmAgent.getId(), ecmAgent.getRecNo());
  		if(CollectionUtils.isNotEmpty(shareResults)){
  			throw new ServiceException(SettlementApiCode.ALREADY_SHAREPROIFT, BaseApiCode.getZhMsg(SettlementApiCode.ALREADY_SHAREPROIFT));
  		}
  		
  		//调用分润方法
  		List<Map<String, Object>> resultList = depositService.shareDeposit(ecmAgent);
  		
  		long end = System.currentTimeMillis();
  		logger.info("share profit for agent end:{}", end);
  		logger.info("total time(second) for shareprofit:{}", (end - start) / 1000);
  		
  		if(CollectionUtils.isNotEmpty(resultList)){
  			return SettlementUtil.success(resultList);
  		}
  		return null;
  		
  
  	}
focal_method.class_method_signature: AgentController.shareDeposit(@Validated EcmAgent ecmAgent)
focal_method.full_signature: @PostMapping("/sharedeposit") public ResBodyData shareDeposit(@Validated EcmAgent ecmAgent)
focal_method.identifier: shareDeposit
focal_method.invocations: currentTimeMillis info getShareProfitResult getId getRecNo isNotEmpty getZhMsg shareDeposit currentTimeMillis info info isNotEmpty success
focal_method.modifiers: @PostMapping("/sharedeposit") public
focal_method.parameters: (@Validated EcmAgent ecmAgent)
focal_method.return: ResBodyData
focal_method.signature: ResBodyData shareDeposit(@Validated EcmAgent ecmAgent)