锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久精品亚洲福利,亚洲AV日韩精品久久久久久,亚洲欧美不卡高清在线http://www.tkk7.com/mashiguang/category/49357.html灝忛┈蹇窇zh-cnWed, 07 Sep 2011 16:27:41 GMTWed, 07 Sep 2011 16:27:41 GMT60寮鍙戝父鐢ㄦ枃浠?/title><link>http://www.tkk7.com/mashiguang/archive/2011/08/11/356336.html</link><dc:creator>mashiguang</dc:creator><author>mashiguang</author><pubDate>Thu, 11 Aug 2011 15:05:00 GMT</pubDate><guid>http://www.tkk7.com/mashiguang/archive/2011/08/11/356336.html</guid><description><![CDATA[spring2.5-reference.pdf<a ><br />http://m0.mail.sina.com.cn/apps/netdisk/download.php?id=d9d1668c0b162f26d115a49e0b308e4f</a><br /><br />deerjet src.zip<br /><a >http://m0.mail.sina.com.cn/apps/netdisk/download.php?id=c859c9a30c5f19e2732255e81a4f0c36</a><br /><br />jQueryAPI-100214.chm<br /><a >http://m0.mail.sina.com.cn/apps/netdisk/download.php?id=c64a572a16f169ac6db829a3122c4279</a> <br /><br />hibernate_annotations.pdf<br /><a >http://m0.mail.sina.com.cn/apps/netdisk/download.php?id=88bd4e31848fda5ca2e65b6fc19df73f</a><br /><br />hibernate_reference.pdf<br /><a >http://m0.mail.sina.com.cn/apps/netdisk/download.php?id=603986150b7056ce617289370197ea9a</a><br /><br />HQL涓嶤riteria瀵圭収.pdf<br /><a >http://m0.mail.sina.com.cn/apps/netdisk/download.php?id=c2805f9d49171f6165baa528a29774c7</a> <br /><br />oracle緙栫▼鑹烘湳.pdf<br /><a >http://m0.mail.sina.com.cn/apps/netdisk/download.php?id=0c39f09f81f674ef67016482a224a025</a><br /><br />綺鵑歰racle10g pl_sql緙栫▼.pdf<br /><a >http://m0.mail.sina.com.cn/apps/netdisk/download.php?id=455bb7bbfeff510ee66acafe6c8f035b</a><img src ="http://www.tkk7.com/mashiguang/aggbug/356336.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/mashiguang/" target="_blank">mashiguang</a> 2011-08-11 23:05 <a href="http://www.tkk7.com/mashiguang/archive/2011/08/11/356336.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>hibernate DetachedCriteria鐨勪嬌鐢?/title><link>http://www.tkk7.com/mashiguang/archive/2011/08/11/356334.html</link><dc:creator>mashiguang</dc:creator><author>mashiguang</author><pubDate>Thu, 11 Aug 2011 14:50:00 GMT</pubDate><guid>http://www.tkk7.com/mashiguang/archive/2011/08/11/356334.html</guid><description><![CDATA[<div style="border-bottom: #cccccc 1px solid; border-left: #cccccc 1px solid; padding-bottom: 4px; background-color: #eeeeee; padding-left: 4px; width: 98%; padding-right: 5px; font-size: 13px; word-break: break-all; border-top: #cccccc 1px solid; border-right: #cccccc 1px solid; padding-top: 4px"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #0000ff">public</span><span style="color: #000000"> PageModel</span><span style="color: #000000"><</span><span style="color: #000000">CrmWarning</span><span style="color: #000000">></span><span style="color: #000000"> query(PageModel</span><span style="color: #000000"><</span><span style="color: #000000">CrmWarning</span><span style="color: #000000">></span><span style="color: #000000"> pageModel)<br />            </span><span style="color: #0000ff">throws</span><span style="color: #000000"> Exception {<br />        Assert.notNull(pageModel);<br />        <br />        DetachedCriteria dc </span><span style="color: #000000">=</span><span style="color: #000000"> DetachedCriteria.forClass(CrmWarning.</span><span style="color: #0000ff">class</span><span style="color: #000000">);<br />        <br />        </span><span style="color: #008000">/*</span><span style="color: #008000"><br />         * 娣誨姞鏌ヨ鏉′歡<br />         * 濡?dc.add(Restrictions.like("key", "%"+pageModel.getCondition("key")+"%"));<br />         * <br />         * </span><span style="color: #008000">*/</span><span style="color: #000000"><br />        </span><span style="color: #0000ff">if</span><span style="color: #000000"> (</span><span style="color: #0000ff">null</span><span style="color: #000000"> </span><span style="color: #000000">!=</span><span style="color: #000000"> pageModel.getCondition(</span><span style="color: #000000">"</span><span style="color: #000000">warnLevel</span><span style="color: #000000">"</span><span style="color: #000000">)) {<br />            dc.add(Restrictions.eq(</span><span style="color: #000000">"</span><span style="color: #000000">warnLevel</span><span style="color: #000000">"</span><span style="color: #000000">, pageModel.getCondition(</span><span style="color: #000000">"</span><span style="color: #000000">warnLevel</span><span style="color: #000000">"</span><span style="color: #000000">)));<br />        }<br />        </span><span style="color: #0000ff">if</span><span style="color: #000000"> (StringUtils.isNotBlank((String)pageModel.getCondition(</span><span style="color: #000000">"</span><span style="color: #000000">detail</span><span style="color: #000000">"</span><span style="color: #000000">))) {<br />            dc.add(Restrictions.like(</span><span style="color: #000000">"</span><span style="color: #000000">detail</span><span style="color: #000000">"</span><span style="color: #000000">, </span><span style="color: #000000">"</span><span style="color: #000000">%</span><span style="color: #000000">"</span><span style="color: #000000">+</span><span style="color: #000000">pageModel.getCondition(</span><span style="color: #000000">"</span><span style="color: #000000">detail</span><span style="color: #000000">"</span><span style="color: #000000">)</span><span style="color: #000000">+</span><span style="color: #000000">"</span><span style="color: #000000">%</span><span style="color: #000000">"</span><span style="color: #000000">));<br />        }<br />        </span><span style="color: #0000ff">if</span><span style="color: #000000"> (StringUtils.isNotBlank((String)pageModel.getCondition(</span><span style="color: #000000">"</span><span style="color: #000000">warnDate</span><span style="color: #000000">"</span><span style="color: #000000">))) {<br />            </span><span style="color: #008000">/*</span><span style="color: #008000"><br />             * warnDate鏍煎紡鏄痽yyy-MM-dd錛岃繖閲屾敼鎴愭煡璇㈣繖涓澶╃殑棰勮<br />             * Restrictions.sqlRestriction()鍏佽鍐欏師鐢焥ql鐨勬柟寮忓畬鎴愮壒孌婇渶姹傦紝濡備笅<br />             * </span><span style="color: #008000">*/</span><span style="color: #000000"><br />            dc.add(Restrictions.sqlRestriction(</span><span style="color: #000000">"</span><span style="color: #000000">to_char(time_start,'yyyy-MM-dd') = '</span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000">+</span><span style="color: #000000"> pageModel.getCondition(</span><span style="color: #000000">"</span><span style="color: #000000">warnDate</span><span style="color: #000000">"</span><span style="color: #000000">) </span><span style="color: #000000">+</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">'</span><span style="color: #000000">"</span><span style="color: #000000">));<br />        }<br />        </span><span style="color: #0000ff">if</span><span style="color: #000000"> (</span><span style="color: #0000ff">null</span><span style="color: #000000"> </span><span style="color: #000000">!=</span><span style="color: #000000"> pageModel.getCondition(</span><span style="color: #000000">"</span><span style="color: #000000">templateId</span><span style="color: #000000">"</span><span style="color: #000000">)) {<br />            </span><span style="color: #008000">/*</span><span style="color: #008000"><br />             * 榪欓噷鐨則emplateId鏄ā鏉跨殑涓婚敭id,鏌ヨ鏃跺簲璇ヨ漿鎹㈡垚妯℃澘瀵硅薄<br />             * </span><span style="color: #008000">*/</span><span style="color: #000000"><br />            CrmWarnTemplate warnTemplate </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> CrmWarnTemplate();<br />            warnTemplate.setTemplateId((Long)pageModel.getCondition(</span><span style="color: #000000">"</span><span style="color: #000000">templateId</span><span style="color: #000000">"</span><span style="color: #000000">));<br />            dc.add(Restrictions.eq(</span><span style="color: #000000">"</span><span style="color: #000000">crmWarnTemplate</span><span style="color: #000000">"</span><span style="color: #000000">, warnTemplate));<br />        }<br />        <br />        dc.addOrder(Order.asc(</span><span style="color: #000000">"</span><span style="color: #000000">crmWarnTemplate</span><span style="color: #000000">"</span><span style="color: #000000">));<br />        dc.addOrder(Order.desc(</span><span style="color: #000000">"</span><span style="color: #000000">timeStart</span><span style="color: #000000">"</span><span style="color: #000000">));<br />        <br />        pageModel.setDateList(warningDao.query(dc, pageModel.getFirstNote(), pageModel.getNumInPage()));<br />        pageModel.setTotal(warningDao.count(dc));<br />        <br />        </span><span style="color: #0000ff">return</span><span style="color: #000000"> pageModel;<br />    }</span></div><img src ="http://www.tkk7.com/mashiguang/aggbug/356334.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/mashiguang/" target="_blank">mashiguang</a> 2011-08-11 22:50 <a href="http://www.tkk7.com/mashiguang/archive/2011/08/11/356334.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>hibernate鎵嬪姩緇勮pojohttp://www.tkk7.com/mashiguang/archive/2011/08/11/hibernate_pojo_manual.htmlmashiguangmashiguangThu, 11 Aug 2011 14:25:00 GMThttp://www.tkk7.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();
    }
    
    
}


mashiguang 2011-08-11 22:25 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 亚洲激情在线视频| 亚洲综合在线成人一区| 亚洲激情电影在线| 亚洲av无码一区二区三区在线播放| 成人午夜影视全部免费看| 中文字幕亚洲免费无线观看日本| 全免费一级毛片在线播放| 亚洲国产精品无码专区影院| 亚洲熟妇AV乱码在线观看| 在线看片免费人成视频久网下载| 91在线视频免费看| 亚洲午夜久久久久久久久久| 亚洲第一香蕉视频| 一级一看免费完整版毛片| 免费下载成人电影| 亚洲综合无码AV一区二区 | 一级毛片免费一级直接观看| 91网站免费观看| 亚洲午夜久久久影院伊人| 亚洲国产精品日韩av不卡在线| 久久成人免费播放网站| 日本免费一区二区三区最新vr| 亚洲2022国产成人精品无码区| 美景之屋4在线未删减免费| 97碰公开在线观看免费视频| 亚洲精品无码国产| 色网站在线免费观看| 国内精品乱码卡1卡2卡3免费| 亚洲成AV人片一区二区密柚| 免费看黄网站在线看| 久久这里只有精品国产免费10| 亚洲av无码乱码国产精品fc2| 看全免费的一级毛片| 男人的好看免费观看在线视频| 亚洲成熟xxxxx电影| 国产成人无码免费网站| 国产日产成人免费视频在线观看| 亚洲制服丝袜在线播放| 一级毛片免费不卡在线| 国产亚洲欧洲精品| h片在线观看免费|