package com.chenyang.nse.bussiness.dao.table.core.file;

import com.chenyang.nse.bussiness.dao.BaseDao;
import com.chenyang.nse.bussiness.entity.orm.table.core.file.TCoreFileStructurecolumn;
import org.springframework.stereotype.Repository;

@Repository
public class TCoreFileStructurecolumnDao extends BaseDao<TCoreFileStructurecolumn, String> {
   public void dataWidthDouble(String structureid, String strtype) {
      String sql = "";
      if ("0".equals(strtype)) {
         sql = "update t_core_file_structurecolumn set columnaccuracy =(columnaccuracy+0)*2 where filestructureid='" + structureid + "'";
      } else if ("1".equals(strtype)) {
         sql = "update t_core_file_structurecolumn set columnaccuracy =(columnaccuracy+0)/2 where filestructureid='" + structureid + "'";
      }

      this.getSession().createNativeQuery(sql).executeUpdate();
   }
}
