typedao.java

来自「电信的网厅的整站代码」· Java 代码 · 共 77 行

JAVA
77
字号
package com.doone.wskfmgr.business.netstore;

import com.doone.data.DacClient;
import com.doone.data.DataTable;
import com.doone.fj1w.common.entity.impl.TFNetTypeImpl;
import com.doone.util.FileLogger;

/**
 * @author wushaol
 *
 */
public class TypeDAO {

	/**
	 * @return
	 */
	public static DataTable getStoreType(String cityCode) {
		try {
			TFNetTypeImpl impl = new TFNetTypeImpl(new DacClient());
			impl.setUpNetTypeId(0L);
			impl.setCityCode(cityCode);
			return (DataTable)impl.queryObj();
		} catch (Exception ex) {
			FileLogger.getLogger().warn(ex.getMessage(), ex);
		}
		return null;
	}

	
	/**
	 * @param id
	 * @return
	 */
	public static String getStoreTypeName(long id) {
		try {
			TFNetTypeImpl impl = new TFNetTypeImpl(new DacClient(),id);
			return impl.getName();
		} catch (Exception ex) {
			FileLogger.getLogger().warn(ex.getMessage(), ex);
		}
		return null;
	}
	
	
	/**
	 * 通过商店类型取商品类型.
	 * @param upNetTypeId
	 * @return
	 */
	public static DataTable getGoodsType(long upNetTypeId) {
		try {
			TFNetTypeImpl impl = new TFNetTypeImpl(new DacClient());
			impl.setUpNetTypeId(upNetTypeId);
			return (DataTable)impl.queryObj();
		} catch (Exception ex) {
			FileLogger.getLogger().warn(ex.getMessage(), ex);
		}
		return null;
	}

	/**
	 * 
	 * @param upNetTypeId
	 * @param id
	 * @return
	 */
	public static String getGoodsTypeName(long id) {
		try {
			TFNetTypeImpl impl = new TFNetTypeImpl(new DacClient(),id);
			return impl.getName();
		} catch (Exception ex) {
			FileLogger.getLogger().warn(ex.getMessage(), ex);
		}
		return null;
	}
	
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?