类中的静态方法如何调用?-------Bosent中同一类下面的两个服务怎么调用

时间:2022-05-22 19:31:01
有两种方法: 
1:类名.静态方法 
2: 对象名.静态方法 

一般只用第一种


//注意二者的方法的参数可不一样哟。。

  public static Map<String, Object> updateRecruitmentJob(<span style="color:#ff0000;">DispatchContext dctx, Map<String, Object> context</span>) throws BusinessException {
        GenericDelegator delegator = dctx.getDelegator();
        Map<String, Object> returnMap = ReturnMapUtil.getSuccessMap();
        Map<String, Object> updateFields = FastMap.newInstance();
  <span style="white-space:pre">	</span><span style="color:#3333ff;">RecruitmentBusiness.updateRecruitmentCondition(delegator, context);//调用下面的方法</span>
        returnMap.put("recruitmentId", recruitmentId);
        return returnMap;
    }

       public static void updateRecruitmentCondition(<span style="color:#3366ff;">GenericDelegator delegator, Map<String, Object> context</span>) throws BusinessException {  .................
}