/**
  * 订单跟踪信息列表页面跳转
  *
  * @return
  */
 @RequestMapping(params = "addorupdate")
 public ModelAndView addorupdate(TbOrderTrackingEntity tbOrderTracking, HttpServletRequest req) {
   if (StringUtil.isNotEmpty(tbOrderTracking.getId())) {
     tbOrderTracking =
         tbOrderTrackingService.getEntity(TbOrderTrackingEntity.class, tbOrderTracking.getId());
     req.setAttribute("tbOrderTrackingPage", tbOrderTracking);
   }
   return new ModelAndView("jeecg/test/orders/tbOrderTracking");
 }
  /**
   * 删除订单跟踪信息
   *
   * @return
   */
  @RequestMapping(params = "del")
  @ResponseBody
  public AjaxJson del(TbOrderTrackingEntity tbOrderTracking, HttpServletRequest request) {
    AjaxJson j = new AjaxJson();
    tbOrderTracking = systemService.getEntity(TbOrderTrackingEntity.class, tbOrderTracking.getId());
    message = "删除成功";
    tbOrderTrackingService.delete(tbOrderTracking);
    systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);

    j.setMsg(message);
    return j;
  }
  /**
   * 添加订单跟踪信息
   *
   * @param ids
   * @return
   */
  @RequestMapping(params = "save")
  @ResponseBody
  public AjaxJson save(TbOrderTrackingEntity tbOrderTracking, HttpServletRequest request) {
    AjaxJson j = new AjaxJson();
    if (StringUtil.isNotEmpty(tbOrderTracking.getId())) {
      message = "更新成功";
      TbOrderTrackingEntity t =
          tbOrderTrackingService.get(TbOrderTrackingEntity.class, tbOrderTracking.getId());
      try {
        MyBeanUtils.copyBeanNotNull2Bean(tbOrderTracking, t);
        tbOrderTrackingService.saveOrUpdate(t);
        systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO);
      } catch (Exception e) {
        e.printStackTrace();
      }
    } else {
      message = "添加成功";
      tbOrderTrackingService.save(tbOrderTracking);
      systemService.addLog(message, Globals.Log_Type_INSERT, Globals.Log_Leavel_INFO);
    }

    return j;
  }