锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久66热这里只有精品,亚洲一区二区伦理,亚洲激情网址http://www.aygfsteel.com/mashiguang/category/49357.html灝忛┈蹇窇zh-cnWed, 07 Sep 2011 16:27:41 GMTWed, 07 Sep 2011 16:27:41 GMT60- 寮鍙戝父鐢ㄦ枃浠?/title>http://www.aygfsteel.com/mashiguang/archive/2011/08/11/356336.htmlmashiguangmashiguangThu, 11 Aug 2011 15:05:00 GMThttp://www.aygfsteel.com/mashiguang/archive/2011/08/11/356336.html
http://m0.mail.sina.com.cn/apps/netdisk/download.php?id=d9d1668c0b162f26d115a49e0b308e4f
deerjet src.zip
http://m0.mail.sina.com.cn/apps/netdisk/download.php?id=c859c9a30c5f19e2732255e81a4f0c36
jQueryAPI-100214.chm
http://m0.mail.sina.com.cn/apps/netdisk/download.php?id=c64a572a16f169ac6db829a3122c4279
hibernate_annotations.pdf
http://m0.mail.sina.com.cn/apps/netdisk/download.php?id=88bd4e31848fda5ca2e65b6fc19df73f
hibernate_reference.pdf
http://m0.mail.sina.com.cn/apps/netdisk/download.php?id=603986150b7056ce617289370197ea9a
HQL涓嶤riteria瀵圭収.pdf
http://m0.mail.sina.com.cn/apps/netdisk/download.php?id=c2805f9d49171f6165baa528a29774c7
oracle緙栫▼鑹烘湳.pdf
http://m0.mail.sina.com.cn/apps/netdisk/download.php?id=0c39f09f81f674ef67016482a224a025
綺鵑歰racle10g pl_sql緙栫▼.pdf
http://m0.mail.sina.com.cn/apps/netdisk/download.php?id=455bb7bbfeff510ee66acafe6c8f035b
]]> - hibernate DetachedCriteria鐨勪嬌鐢?/title>http://www.aygfsteel.com/mashiguang/archive/2011/08/11/356334.htmlmashiguangmashiguangThu, 11 Aug 2011 14:50:00 GMThttp://www.aygfsteel.com/mashiguang/archive/2011/08/11/356334.htmlpublic PageModel<CrmWarning> query(PageModel<CrmWarning> pageModel)
throws Exception {
Assert.notNull(pageModel);
DetachedCriteria dc = DetachedCriteria.forClass(CrmWarning.class);
/*
* 娣誨姞鏌ヨ鏉′歡
* 濡?dc.add(Restrictions.like("key", "%"+pageModel.getCondition("key")+"%"));
*
* */
if (null != pageModel.getCondition("warnLevel")) {
dc.add(Restrictions.eq("warnLevel", pageModel.getCondition("warnLevel")));
}
if (StringUtils.isNotBlank((String)pageModel.getCondition("detail"))) {
dc.add(Restrictions.like("detail", "%"+pageModel.getCondition("detail")+"%"));
}
if (StringUtils.isNotBlank((String)pageModel.getCondition("warnDate"))) {
/*
* warnDate鏍煎紡鏄痽yyy-MM-dd錛岃繖閲屾敼鎴愭煡璇㈣繖涓澶╃殑棰勮
* Restrictions.sqlRestriction()鍏佽鍐欏師鐢焥ql鐨勬柟寮忓畬鎴愮壒孌婇渶姹傦紝濡備笅
* */
dc.add(Restrictions.sqlRestriction("to_char(time_start,'yyyy-MM-dd') = '" + pageModel.getCondition("warnDate") + "'"));
}
if (null != pageModel.getCondition("templateId")) {
/*
* 榪欓噷鐨則emplateId鏄ā鏉跨殑涓婚敭id,鏌ヨ鏃跺簲璇ヨ漿鎹㈡垚妯℃澘瀵硅薄
* */
CrmWarnTemplate warnTemplate = new CrmWarnTemplate();
warnTemplate.setTemplateId((Long)pageModel.getCondition("templateId"));
dc.add(Restrictions.eq("crmWarnTemplate", warnTemplate));
}
dc.addOrder(Order.asc("crmWarnTemplate"));
dc.addOrder(Order.desc("timeStart"));
pageModel.setDateList(warningDao.query(dc, pageModel.getFirstNote(), pageModel.getNumInPage()));
pageModel.setTotal(warningDao.count(dc));
return pageModel;
}
]]> - hibernate鎵嬪姩緇勮pojohttp://www.aygfsteel.com/mashiguang/archive/2011/08/11/hibernate_pojo_manual.htmlmashiguangmashiguangThu, 11 Aug 2011 14:25:00 GMThttp://www.aygfsteel.com/mashiguang/archive/2011/08/11/hibernate_pojo_manual.htmlpackage com.jl.dao.bookplatform.impl;
import java.util.List;
import org.hibernate.Hibernate;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.transform.Transformers;
import org.springframework.dao.DataAccessException;
import com.jl.dao.baseDao.GenericDao;
import com.jl.dao.bookplatform.ProductItemDao;
import com.jl.entity.bookplatform.CrmProduct;
import com.jl.entity.bookplatform.CrmProductItem;
import com.jl.entity.bookplatform.ProductItemConfig;
public class ProductItemDaoImpl extends GenericDao<CrmProductItem, Long> implements ProductItemDao {
public List<ProductItemConfig> getProductItemConfigs(Long productId, Long planetypeId) throws DataAccessException{
String sql = "select chi.charge_item_id \"chargeItemId\"," +
" chi.charge_item \"chargeItem\"," +
" chi.charge_unit \"chargeUnit\"," +
" cpi.product_id \"productId\"," +
" cpi.product_item_id \"productItemId\"," +
" cpi.sale_planetype_id \"salePlanetypeId\"," +
" cpi.inland_price \"inlandPrice\"," +
" cpi.outland_price \"outlandPrice\"" +
" from (select * from crm_charge_item chi2 where chi2.if_regular = 1) chi left join crm_product_item cpi" +
" on cpi.charge_item_id = chi.charge_item_id " +
" and cpi.product_id = ?" +
" and cpi.sale_planetype_id = ?" +
" order by chi.charge_item_id";
Session session = getSession();
Query query = session.createSQLQuery(sql)
.addScalar("chargeItemId", Hibernate.LONG)
.addScalar("chargeItem",Hibernate.STRING)
.addScalar("chargeUnit",Hibernate.STRING)
.addScalar("productId",Hibernate.LONG)
.addScalar("productItemId",Hibernate.LONG)
.addScalar("salePlanetypeId",Hibernate.LONG)
.addScalar("inlandPrice",Hibernate.DOUBLE)
.addScalar("outlandPrice",Hibernate.DOUBLE)
.setResultTransformer(Transformers.aliasToBean(ProductItemConfig.class))
.setParameter(0, productId)
.setParameter(1, planetypeId);
List<ProductItemConfig> configs = query.list();
return configs;
}
public List<CrmProductItem> getProductItem(CrmProduct product) throws DataAccessException {
String hql = "from CrmProductItem cpi where cpi.crmProduct = ?";
Session session = getSession();
Query query = session.createSQLQuery(hql).setParameter(0, product);
List<CrmProductItem> items = query.list();
return items;
}
public void copy(Long productId_dest,Long productId_orig,String createMan) throws DataAccessException {
String sql = "insert into crm_product_item " +
" select hibernate_sequence.nextval," +
" ?," +
" cpi.charge_item_id," +
" cpi.sale_planetype_id," +
" cpi.inland_price," +
" cpi.outland_price," +
" ?," +
" sysdate" +
" from crm_product_item cpi" +
" where cpi.product_id = ?";
Session session = getSession();
Query sqlQuery = session.createSQLQuery(sql)
.setParameter(0, productId_dest)
.setParameter(1, createMan)
.setParameter(2, productId_orig);
sqlQuery.executeUpdate();
}
}

]]>
主站蜘蛛池模板:
汉寿县|
通州区|
依兰县|
建德市|
巴林左旗|
绥阳县|
广河县|
临漳县|
科技|
大姚县|
平舆县|
隆化县|
彰化县|
玉林市|
靖江市|
札达县|
清流县|
满洲里市|
北海市|
长治市|
资溪县|
庆城县|
凌海市|
苍山县|
梁河县|
万全县|
门头沟区|
铜山县|
长宁区|
肇源县|
惠州市|
赣州市|
济源市|
浦北县|
天台县|
宜兰市|
凤凰县|
仪征市|
略阳县|
凤阳县|
积石山|