@RequestMapping(value = "/addHit", method = { RequestMethod.POST,
RequestMethod.GET })
public @ResponseBody
@Transactional //传入参数不为八大基本类型,可传可不传,否则必传;
Object addHit(HttpServletRequest request, String userId, String mediaType,
String playsId, Double playPercent, Integer playDuration, double number,int type) {//number,type 必传
}

  

@RequestMapping(value = "/addHit", method = { RequestMethod.POST,
RequestMethod.GET })
public @ResponseBody
@Transactional /
Object addHit(HttpServletRequest request,
@RequestParam(value="userId",required=true,defaultValue="0") String userId,//必传参数 @RequestParam(value="videoId",required=false,defaultValue="0") String videoId,//非必传参数
String playsId, Double playPercent, Integer playDuration) {//非必传参数
}

  

05-11 11:27