隨筆 - 23  文章 - 3  trackbacks - 0
          <2006年4月>
          2627282930311
          2345678
          9101112131415
          16171819202122
          23242526272829
          30123456

          常用鏈接

          留言簿(1)

          隨筆檔案

          搜索

          •  

          最新評(píng)論

          閱讀排行榜

          評(píng)論排行榜

          注意writer的參數(shù)有多個(gè),特別是有一個(gè)boolean的參數(shù)決定刷新或在附加文本

          ????????????log? = ?? new ?PrintWriter( new ?FileOutputStream(fl, true ), true );
          ????????????SimpleDateFormat?df?
          = ? new ?SimpleDateFormat( " yyyy.MM.dd?'at'?hh:mm:ss\n "
          );
          ????????????Date?now?
          = ? new
          ?Date();
          ????????????String?dateformat?
          =
          ?df.format(now)
          ????????????BufferedWriter?bf??
          = ? new ?BufferedWriter( new ?FileWriter(fl,? true
          ));
          ????????????bf.append(dateformat);
          ????????????bf.close();
          ????????????log.println(
          " start?connection?databse: "
          );
          ????????????log.println(
          " driver?name: " .concat(driveName);


          輸出的結(jié)果示例:
          2006.12.12?at?10:21:13
          start?connection?databse:
          driver?name:oracle.jdbc.driver.OracleDriver

          posted @ 2006-12-12 12:16 aimy 閱讀(222) | 評(píng)論 (0)編輯 收藏
          1、org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.xindeco.business.pojo.NonageRegister#82]
          ?at org.hibernate.ObjectNotFoundException.throwIfNull(ObjectNotFoundException.java:27)
          ?at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:65)
          ?at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(ApplicationFilterChain.java:252)
          ?at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
          ?at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
          ?at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
          ?at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
          ?at org.apache.catalina.core.ApplicationDispatcher.forward

          錯(cuò)誤的原因:
          在nonregsiter中已經(jīng)手動(dòng)刪除了id=‘82’的記錄,而在WF_task以及wf-proces中還有bizclass = '3' && bizId = '82'的記錄,只要?jiǎng)h除wf-task中相應(yīng)的記錄.
          posted @ 2006-07-09 16:17 aimy 閱讀(233) | 評(píng)論 (0)編輯 收藏

          ProcessInstance.hbm.xml:

          <? xml?version = " 1.0 " ?encoding = " UTF-8 " ?>

          <! DOCTYPE?hibernate - mapping?PUBLIC
          ????
          " -//Hibernate/Hibernate?Mapping?DTD?3.0//EN " ?
          ????
          " http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd " >

          < hibernate - mapping
          >
          ????
          < class
          ????????name
          = " com.xindeco.workflow.ProcessInstance "
          ????????table
          = " WF_PROCESS "
          ????????dynamic
          - update = " true "
          ????????dynamic
          - insert = " true "
          ????????select
          - before - update = " false "
          ????????optimistic
          - lock = " version "
          ????
          >

          ????????
          < id
          ????????????name
          = " ID "
          ????????????column
          = " ID "
          ????????????type
          = " long "
          ????????????length
          = " 30 "
          ????????
          >
          ????????????
          < generator? class = " native " >
          ????????????
          </ generator >
          ????????
          </ id >

          ????????
          < discriminator
          ????????????column
          = " bizClass "
          ????????????type
          = " string "
          ????????
          />
          ????????
          ????????
          < property
          ????????????name
          = " state "
          ????????????type
          = " java.lang.Integer "
          ????????????update
          = " true "
          ????????????insert
          = " true "
          ????????????access
          = " property "
          ????????????column
          = " state "
          ????????????length
          = " 10 "
          ????????
          />
          ????????
          ????????
          < many - to - one
          ????????????name
          = " flow "
          ????????????
          class = " com.xindeco.workflow.WFFlow "
          ????????????cascade
          = " none "
          ????????????outer
          - join = " auto "
          ????????????update
          = " true "
          ????????????insert
          = " true "
          ????????????access
          = " property "
          ????????????column
          = " flowId "
          ????????
          />

          ????????
          < set
          ????????????name
          = " tasks "
          ????????????lazy
          = " true "
          ????????????inverse
          = " true "
          ????????????cascade
          = " delete "
          ????????????sort
          = " unsorted "
          ????????
          >

          ??????????????
          < key
          ??????????????????column
          = " processId "
          ??????????????
          >
          ??????????????
          </ key >

          ??????????????
          < one - to - many
          ??????????????????
          class = " com.xindeco.workflow.WFTask "
          ??????????????
          />

          ????????
          </ set >

          ????
          </ class >

          </ hibernate - mapping >

          CollRegPI.hbm.xml:

          <?xml?version="1.0"?>
          <!DOCTYPE?hibernate-mapping?PUBLIC
          ??????
          "-//Hibernate/Hibernate?Mapping?DTD?3.0//EN"
          ??????????
          "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

          <hibernate-mapping?default-access="field"?>

          ??
          <subclass?name="com.xindeco.business.pojo.wf.CollRegPI"
          ????????????discriminator
          -value="2"
          ????????????
          extends="com.xindeco.workflow.ProcessInstance"
          ????????????lazy
          ="false">

          ????????????
          <many-to-one?name="collReg"
          ?????????????????
          class="com.xindeco.business.pojo.CollReg"
          ?????????????????column
          ="bizId"
          ?????????????????cascade
          ="none"/>
          </subclass>
          </hibernate-mapping>

          數(shù)據(jù)庫(kù)的數(shù)據(jù):
          ???? id??? flowid????bizId???bizClass???state
          ??21????? ?2????????? ?9 ???????? 2???????? ???? 0
          ?22???????? 2???????? 10???????? 2???????????? ?0
          ?23???????? 2???????? 11???????? 2??????????????0
          ?24???????? 2???????? 12???????? 2????????????? 0
          ?25???????? 2???????? 13???????? 2????????????? 0
          ?26???????? 2???????? 14???????? 2????????????? 0
          ?29???????? 2???????? 17???????? 2???????????? ?0
          ?30???????? 2???????? 18???????? 2??????????? ? 1
          ?44????? ?? 4?????? ??1?????? ?? 32????? ?????? 0
          ?45????? ?? 4?????? ? 2?????? ??? 32????? ?????? 1
          ?46????? ?? 5??????????1??????????33?????????????0
          ?47?????? ? 5??????????2???????????33?????????????1
          ?48??????? ?5??????????3???????????33????? ?????? 0
          ?50????? ? ?3????????? 1????????????3??????????????0
          ?51????? ? ?3???????? 1????????????3??????????????0

          如果bizclass=2是同一種類(lèi)型的class。由????????
          ?????????<discriminator
          ????????????column
          ="bizClass"
          ????????????type
          ="string"
          ????????
          />來(lái)表示。
          posted @ 2006-07-06 10:37 aimy 閱讀(391) | 評(píng)論 (0)編輯 收藏
          org.hibernate.hql.QuerySplitter - no persistent classes found for query class:
          意味著你沒(méi)有將someclass的配置文件放在hibernate.config或沒(méi)有寫(xiě)配置文件。
          posted @ 2006-07-04 10:30 aimy 閱讀(1174) | 評(píng)論 (0)編輯 收藏
          1,通過(guò)構(gòu)造函數(shù)創(chuàng)建bean
          ?<bean?id="baseDAO"?class="com.aimy.core.dao.impl.BaseDAOImpl">
          相當(dāng)于
          basedaoimpl?baseDAO?
          =?new?BaseDAOImpl();
          2,通過(guò)靜態(tài)工廠創(chuàng)建bean
          <bean?id="driver1"?class="com.aimy.driver.driverManager"
          factory
          -method="createInstance"/>
          相當(dāng)于
          Object?driver1?
          =?driverManager.createInstance();

          其中沒(méi)有指定driverManager.createInstance();返回對(duì)象的類(lèi)型,而且createInstance()必須是static方法
          3,通過(guò)實(shí)例工廠方法創(chuàng)建bean
          <bean?id="father"?class="com.aimy.Father"/>
          ........
          <bean?id="son"?factory-bean="father"?factory-method="createSon"/>
          相當(dāng)于
          Father?father?
          =?new?Father();
          Object?son?
          =?father.createSon();

          其中father和son必須在同一個(gè)bean工廠或父bean工廠,即在同一個(gè)applicationcontext或子applicationcontext


          二、如果applicationcontext默認(rèn)預(yù)實(shí)例化那些singleton bean,這樣就可以在beanfactory裝載時(shí)就檢查出錯(cuò)誤,而如果singleton bean設(shè)置為lazy-mode,
          posted @ 2006-06-26 23:26 aimy 閱讀(237) | 評(píng)論 (0)編輯 收藏
          hibernate 保存空值的細(xì)節(jié)
          1。如果字段在pojo類(lèi)中是復(fù)雜對(duì)象類(lèi)型,則在數(shù)據(jù)庫(kù)用nulll表示。
          2。如果字段在pojo類(lèi)中是簡(jiǎn)單數(shù)據(jù)類(lèi)型,則在數(shù)據(jù)庫(kù)用0表示。
          posted @ 2006-06-26 09:56 aimy 閱讀(174) | 評(píng)論 (0)編輯 收藏
          1. document.name.value----->document.all.name.value
          2. eval(document.all.name)---->eval('document.all.name')
          3.javascript:window.history.go(-1)
          4、在action方法中只要拋出exception,就會(huì)跳到j(luò)spexception頁(yè)面中,怎么處理。
          posted @ 2006-06-22 13:19 aimy 閱讀(193) | 評(píng)論 (0)編輯 收藏
          為了將業(yè)務(wù)邏輯放到service層,比如判斷登陸用戶的信息,而在service層無(wú)法用SysUser user = (SysUser) request.getSession().getAttribute(WebConstants.SESSION_USER);因此在BaseService設(shè)一個(gè)屬性為
          ??????public void setOperator(Entity operator);
          ??????public Entity getOperator();
          posted @ 2006-05-17 11:17 aimy 閱讀(298) | 評(píng)論 (0)編輯 收藏
          ???private static WFEngine instance;
          ??? public static final WFEngine getInstance() {
          ??????? return instance;
          ??? }
          posted @ 2006-05-17 10:05 aimy 閱讀(199) | 評(píng)論 (0)編輯 收藏

          <sqlMap namespace="PersonnelRegist">

          ? <typeAlias alias="ID" type="com.xindeco.core.pojo.IDEntity"/>
          ? </select>
          ?? <select id="GraAppInfo.searchUpApply" parameterClass="com.xindeco.business.dto.GraAppInfoDTO"????resultClass="ID" cacheModel="userCache">
          ?? select distinct a.ID AS id
          ?? from TGraAppInfo a? left join TEMPLOYUNITBASEINFO b on a.unit=b.MEMBERID
          ?? where appstatus = '1'
          ?? <dynamic>
          ?? <isNotEmpty prepend="AND" property="name">(a.name like '%' + #name# + '%')</isNotEmpty>
          ?? <isNotEmpty prepend="AND" property="unit">(b.UNITNAME like '%' + #unit# + '%')</isNotEmpty>
          ?? </dynamic>
          ? </select>
          </sqlMap>

          注意sqlmapGraAppInfoDTO的name,unit只能是基本數(shù)據(jù)類(lèi)型,不能是復(fù)雜數(shù)據(jù)類(lèi)型.
          2、<script>的位置
          <script>
          form1.srchEdit.value='<%=srchEdit%>';
          form1.srchType.value='<%=srchType%>';????
          </script>
          <form>
          <input type="text" name="srchEdit"/>
          <input type="text" name="srchType"/></form>
          與<form>
          <input type="text" name="srchEdit"/>
          <input type="text" name="srchType"/>
          </form>
          <script>
          form1.srchEdit.value='<%=srchEdit%>';
          form1.srchType.value='<%=srchType%>';????
          </script>
          的差別,必須在form加載完對(duì)它賦值,否則srchEdit又重新加載,為null

          3、hibernate屬性設(shè)置出現(xiàn)錯(cuò)誤:
          ????? 如果pojo類(lèi)取fSUnit屬性名,系統(tǒng)將無(wú)法識(shí)別。get和set將取不到值。

          posted @ 2006-05-11 10:06 aimy 閱讀(313) | 評(píng)論 (0)編輯 收藏
          5-8
          昨天晚上我給他講了英文笑話,雖然他指出了很多錯(cuò)誤,但那是個(gè)好的開(kāi)始。
          ???? A redneck bought a tickect and won the lottery.
          ???? He went to claim it .He said:"I want $20 million right now"
          who verified his tickect number replied to him :"No,sir.It doesn't work this way.we give you $1 million today,you will get the rest spread on for the next 19 years."
          ???? The redneck said:"I want all my money.I won it,and i want it"
          ????? The man had to explained to him patiently:"you would get $1 million,and the rest during the next 19 years."
          ????? The redneck ,furious with the man ,screamed out:"I want all my money.If you don't give??me all my money ,i want my dollar back!"
          注意讀音:money、million、battle zone。

          我的叔叔silas?? H.E.Bates
          ????? 我的叔叔silas??活了九十五歲,有充足的時(shí)間去嘗試很多事情.他一度做過(guò)掘墓人.
          ????? In a life of 95 years ,my uncle found time to try most things, there was a time he become a gravedigger.
          posted @ 2006-05-09 14:34 aimy 閱讀(110) | 評(píng)論 (0)編輯 收藏

          1、get是從服務(wù)器上取得數(shù)據(jù),post是向服務(wù)器上傳送數(shù)據(jù)。
          2、get是將參數(shù)數(shù)據(jù)隊(duì)列(表單)加到提交表單的action所指定的url中,值和表單的各個(gè)字段是相互對(duì)應(yīng)的,Get將表單中數(shù)據(jù)的按照variable=value的形式,添加到action所指向的URL后面,并且兩者使用“?”連接,而各個(gè)變量之間使用“&”連接,在url中是可以看見(jiàn)的,
          post是將表單各個(gè)字段放在http header內(nèi)一起傳送到action中的URL中,
          3、get,服務(wù)器通過(guò)request.getQuery()獲得對(duì)應(yīng)的值;對(duì)于post,服務(wù)器通過(guò)request.getForm()表單的值。
          4、get,傳送的數(shù)據(jù)小,post,傳送的數(shù)據(jù)大,上傳文件一般用post
          特別注意:
          <form action="/GraAppInfo/GraAppInfo.do?method=UpList"? method="post">
          <select name="srchType">
          ???? <option value="0">名字</option>
          ???? <option value="1">用人單位</option>
          ???</select>
          ???<input height="18" name="srchEdit" type="text" align="right">
          ? <input? type="submit" value="查詢(xún)">

          顯示的URL:http://localhost:8080/GraAppInfo/GraAppInfo.do?method=UpList
          <form action="/GraAppInfo/GraAppInfo.do?method=UpList"? method="get">
          顯示的URL:http://localhost:8080/GraAppInfo/GraAppInfo.do?srchType=0&srchEdit=da
          可見(jiàn)post 會(huì)覆蓋action中的參數(shù),
          5、中文用post傳遞不會(huì)出現(xiàn)亂碼,用get傳遞會(huì)出現(xiàn)亂碼
          所以傳到action后要通過(guò)
          String srchEdit = new String(graForm.getSrchEdit().getBytes("iso8859-1"), "gb2312");
          處理。
          二、傳到頁(yè)面的值亂碼

          posted @ 2006-05-08 09:50 aimy 閱讀(218) | 評(píng)論 (0)編輯 收藏
          <props>
          ??????? <prop key="add*">PROPAGATION_REQUIRED</prop>
          ??????? <prop key="cancel*">PROPAGATION_REQUIRED</prop>
          ??????? <prop key="create*">PROPAGATION_REQUIRED</prop>
          ??????? <prop key="save*">PROPAGATION_REQUIRED</prop>
          </props>
          如果service層沒(méi)有用這些字母開(kāi)頭命名,spring自動(dòng)將它處理為默認(rèn)的訪問(wèn)模式--PROPAGATION_REQUIRED,readOnly
          如果在action直接調(diào)用dao層也不行,比如service.getbaseDAO.update(object)也會(huì)出現(xiàn)類(lèi)似的錯(cuò)誤,因?yàn)槭聞?wù)被攔截了,所以dao層的方法最好用protect,這樣只有同一個(gè)包里的類(lèi)可以調(diào)用它的方法。
          posted @ 2006-04-30 14:37 aimy 閱讀(85) | 評(píng)論 (0)編輯 收藏

          MENUID?UPMENUID?MENUNAME?MENUURL?MENUSEQ?LAYERLEVEL?RIGHTCODE?ISSHOW?TABLETYPE?STARTSTATE
          ?
          ?1083?1001?畢業(yè)生招聘?#?1?1?1083?1??
          ?1084?1083?畢業(yè)生申報(bào)?/GraAppInfo/GraAppInfo.do?method=graappinfolist?6?9?1084?1??

          menuid 該層菜單的id ?upmenuid 上一層菜單id? menuname 菜單名字
          menuurl 該層菜單的地址(首層菜單為#,沒(méi)有地址)
          menuseq 該層菜單在上一層菜單的順序
          layerlevel 如果是最后一層的菜單為9,其他為1
          rigntcode關(guān)聯(lián)到權(quán)限表=menuid
          idshow 是否顯示

          權(quán)限表:
          RIGHTID?RIGHTCODE?ROLETYPE?ROLEID?DEPTID?USERID?MENUID?FUNNAME
          1084??????????????? 1084????????????? 2????????????????????2??????????????????
          ?????????????????????0??????? 0??????????? 1084?????????? 畢業(yè)生申報(bào)
          rightid=menuid=rightcode,roletype,roleid

          這是單位的菜單設(shè)置和權(quán)限設(shè)置(1000〈menuid〈2000)

          2、人事單位內(nèi)部的設(shè)置(4000〈munuid〈5000)
          權(quán)限的設(shè)置通過(guò)頁(yè)面來(lái)控制

          posted @ 2006-04-30 11:19 aimy 閱讀(145) | 評(píng)論 (0)編輯 收藏
          為了在每個(gè)dao和service 類(lèi)都能用到log,在basedaoimpl和baseserviceimpl都實(shí)現(xiàn)方法:
          ??? public Log getLogger() {
          ??????? if (log == null) {
          ??????????? log = LogFactory.getLog(this.getClass());
          ??????? }
          ??????? return log;
          ??? }

          在類(lèi)中就可以調(diào)用log
          this.getLogger

          2、<input type="text" name="password">
          與form的屬性對(duì)應(yīng),password是大小分別。
          posted @ 2006-04-25 18:07 aimy 閱讀(128) | 評(píng)論 (0)編輯 收藏

          public class EmployUnitBaseInfo
          {???
          ?
          ??? private long ID; //用人單位系統(tǒng)編號(hào)---邏輯主鍵
          ??? private String unitCode; //用人單位代號(hào)--業(yè)務(wù)主鍵
          }
          1、??? 使用邏輯主鍵,分頁(yè)比較方便
          2、??? 有可能unitcode會(huì)改變,用id可以保證當(dāng)unitcode改變時(shí),這個(gè)實(shí)體還存在

          {C5A4CCF8-A282-4700-A5F3-FA6A5246D9F2}0.jpg

          在頁(yè)面上必須返回workpost + demandid,,
          pojo 中的demand類(lèi)如下:只有以下屬性的setter和getter
          ??? private String usedNeedNum;
          ??? private int unitId;
          ??? private String demandInfo;
           private long ID;
          ??? private String needNum;
          ??? private String position;
          必須再添加一個(gè)屬性demandInfo,
          而在另一個(gè)畢業(yè)生申報(bào)中又要如圖上操作,,如何在service層向頁(yè)面層傳遞這些信息(測(cè)試程序員(剩2需求數(shù)))
           public class DemandServiceImpl
          ??? extends BaseServiceImpl implements DemandService{
          ??? public List getDemandList(int unitId)
          ??? {
          ????????? long demandId;
          ????????? int needNum;
          ????????? int usedNeedNum;
          ????????? int lastNum;
          ?????????
          ????????? String demandInfo;
          ????????? TRealDemandDAOImpl dao = (TRealDemandDAOImpl) this.getBaseDAO();
          ????????? List list = dao.getSpareDemandByUnitId(unitId);
          ????????? Iterator it = list.iterator();
          ????????? while(it.hasNext())
          ????????? {
          ????????????? TRealDemand demand = (TRealDemand) it.next();
          ????????????? demandId = demand.getID();
          ????????????? needNum =? Integer.parseInt(demand.getNeedNum());?
          ????????????? usedNeedNum = Integer.parseInt(demand.getUsedNeedNum());
          ????????????? if(needNum>usedNeedNum)
          ????????????? {
          ????????????????? lastNum = usedNeedNum-needNum;
          ????????????????? demandInfo = demand.getPosition()+" 剩 " + lastNum +" 需求數(shù) ";
          ????????????? }
          ?????????????
          ????????? }
          ????????? return list;
          ??? }
          }

          在action層再通過(guò)以下代碼向頁(yè)面?zhèn)鬟f數(shù)據(jù):

          DemandService demandService = (DemandService) this.getBean("DemandService");
          ?request.setAttribute("demandList",demandService.findDemandListByUnitId(unitInfo.getID()));



          4、注意DemandServiceImpl 是實(shí)現(xiàn)類(lèi),DemandService 是interface
          DemandService demandService = (DemandService) this.getBean("DemandService");
          和DemandServiceImpl demandService = (DemandServiceImpl) this.getBean("DemandService");

          雖然兩個(gè)的操作一樣,但是demandService是接口但可以執(zhí)行相應(yīng)的操作,起到黑箱子的作用。

          5、記得在action中添加一個(gè)實(shí)體時(shí),要通過(guò)idcard取得sex和birthday的屬性加到內(nèi)存中(表相對(duì)應(yīng)的pojo)

          posted @ 2006-04-21 10:36 aimy 閱讀(100) | 評(píng)論 (0)編輯 收藏
          ?String mSqlStr = " SELECT ";
          ??mSqlStr += " UnitName, ";
          ??mSqlStr += " FSUName, FSUPostNumber, FSUAddress ";
          ??mSqlStr += " FROM xmpi.v_UnitInfoAll ";
          ???mSqlStr += " WHERE UnitCode = '" + s_sUserName + "'";?
          ??
          ??? 如果s_sUserName="hello",則" WHERE UnitCode = '" + s_sUserName + "'"就相當(dāng)于" WHERE UnitCode = '" +?"hello" + "'" ,? 最后等于" WHERE UnitCode = ' hello';

          1、value="<logic:notEmpty name="IDCardNo"><bean:write name="IDCardNo"/></logic:notEmpty>"
          ????? 如果直接用value="<%=IDCardNo%>",當(dāng)IDCardNo為null時(shí),頁(yè)面會(huì)出錯(cuò)。而logic:notEmpty表示不為空時(shí),才執(zhí)行note中間的代碼。
          2、<logic:iterate id="nation" name="nationList" >
          ???? <option value="<bean:write name="nation" property="codeID"/>"><bean:write name="nation" property="codeName"/></option>
          ??? </logic:iterate>
          表示一組循環(huán),每次循環(huán)都從list nationlist(name="nationList")中取出一個(gè)個(gè)體nation(id="nation")
          注意:當(dāng)IDCardNo為string,只要指明name屬性(name="IDCardNo"),當(dāng)nation為對(duì)象,不僅要指明object名(name="nation" ),還要指明這個(gè)對(duì)象內(nèi)的屬性(property="codeID")

          3、在serviceimpl層通過(guò) PersonnelDAO dao = (PersonnelDAO)this.getBaseDAO()取得dao類(lèi)操作,在action層PersonnelService service = (PersonnelService)this.getBean("personnelService")取得serviceimpl類(lèi),,同樣在application中設(shè)置為什么方法不一樣??

          4、單個(gè)條件查詢(xún)
          ????? string id;
          ????? string hql =?new String(" from??PersonnelBaseInfo??where idCardNO=?");
          ????? Object[] object = new Object[] {id}
          ???????this.getHIbernateTemplate().find(hql,object);

          ???? 多個(gè)條件查詢(xún)
          ????? string id,name;
          ????? string hql =?new String(" from??PersonnelBaseInfo??where id=?&&name=?");
          ?? ?? Object[] object = new Object[] {id,name}
          ???? //object[0]=id;
          ???? //object[1]=name
          ????? this.getHIbernateTemplate().find(hql,object);

          5、記得研究jslib.jsp中的getBaseCode??

          6、不用身份證做TGraAppInfo主鍵的原因是有可能兩家公司同時(shí)抱同一個(gè)人,,但審核只能通過(guò)一份。

          7,pojo與actionform的不同:pojo中對(duì)應(yīng)于數(shù)據(jù)庫(kù)外鍵的屬性,實(shí)體來(lái)表示;比如表user內(nèi)有一個(gè)字段為studentid,則pojo--userinfo中有一個(gè)屬性為student。
          而對(duì)應(yīng)于web頁(yè)面有一個(gè)類(lèi)為userform,有一個(gè)屬性為long。

          8。dto與pojo類(lèi)的不同
          ????? dto是中間傳遞類(lèi),是用來(lái)封裝參數(shù)的類(lèi),比如將查詢(xún)條件太多,則封裝成一個(gè)dto


          9。import com.xindeco.business.IEmployUnitData;==相當(dāng)于現(xiàn)在系統(tǒng)的service
          import com.xindeco.business.employunitdata.EmployUnitAPI;相當(dāng)于現(xiàn)在系統(tǒng)的serviceimpl
          import com.xindeco.business.employunitdata.EmployUnitBaseInfoVO;//相當(dāng)于現(xiàn)在系統(tǒng)的pojo

          10 codeApi類(lèi)
          ??? ??? codeApi.findCodeInfoByCodeID(sexID).getCodeName()
          ???? 根據(jù)codeid查找一行記錄;
          ?????????codeApi.findCodeList(BaseCodeConstants.CODETYPE_NATION)
          ???? 根據(jù)codetypeid查找一串記錄;
          ???????? tcode的表結(jié)構(gòu)為
          ???????CODEID?????? ?CODETYPEID????? CODEVALU?????? ?CODENAME?????? ?ACTIVE?
          比如:????? 1???????????? ???????????1????????????????????????1?????????????????????????????男????????????????? ? 1
          CODECOMPAREVALUE????????? UPCODEID???
          ????????????????? 1????????????????????????????????????? 0
          ???????? tcodetype的表結(jié)構(gòu)為:

          ?? CODETYPEID????? CODETYPENAME
          ????????????? ?1???????????????????? ? ?性別?
          ????
          ????學(xué)制:? CODETYPE_EDUSYSTME??? 培養(yǎng)方式:CODETYPE_UNITGRADE???? 五大生: CODETYPE_RECRUITTARGET
          posted @ 2006-04-19 16:56 aimy 閱讀(168) | 評(píng)論 (0)編輯 收藏
          <hibernate-mapping>
          <class
          name="org.hibernate.sample.TUser"
          table="t_user"
          dynamic-update="true"
          dynamic-insert="true"
          >
          ……
          <set
          name="addresses"
          table="t_address"
          lazy="false"?? \\延遲加載,當(dāng)映射到對(duì)應(yīng)的pojo時(shí),沒(méi)有加載到addresses對(duì)應(yīng)的屬性,通過(guò)Taddress.getAddress()取不到值,而且特別注意當(dāng)session一關(guān)閉時(shí),就取不到了
          inverse="false" \\反轉(zhuǎn)控制,當(dāng)inverse="true"時(shí),時(shí)通過(guò)被控方address.setUer()來(lái)維系他們之間的關(guān)系.
          cascade="all"?
          sort="unsorted"?? \\是否排序
          order-by="zipcode asc"? \\以什么方式排序
          >
          <key
          column="user_id"
          >
          </key>? \\外鍵
          <one-to-many
          class="org.hibernate.sample.TAddress"
          />
          </set>
          ……
          </class>
          posted @ 2006-04-19 10:37 aimy 閱讀(231) | 評(píng)論 (0)編輯 收藏
          1.注意安裝程序的時(shí)候要改變log文件的目錄,在log4j.properties中l(wèi)og4j.appender.R.File=E:\\NewFroject\\JmrlProject\\06.NewSourceCode\\newJmrl\\webapp\\WEB-INF\\classes\\jmrl.log
          2、開(kāi)始一個(gè)新的項(xiàng)目,必須重新設(shè)置tomcat,否則tomcat可能老是啟動(dòng)原來(lái)的項(xiàng)目
          3、開(kāi)始一個(gè)新的webapp要把webapp-->properties--->build-->build app archive 設(shè)為never ,還有build app?directory為never這樣可以加快編譯的過(guò)程.
          ??????
          posted @ 2006-04-17 17:05 aimy 閱讀(97) | 評(píng)論 (0)編輯 收藏

          1、
          org.springframework.orm.ObjectRetrievalFailureException: Object of class [com.xindeco.myregister.pojo.MyRegisterInfo] with identifier [14]: not found
          MyRegisterInfo在數(shù)據(jù)庫(kù)沒(méi)有identifier [14]對(duì)象。


          2、
          org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is org.hibernate.MappingException: Repeated column in mapping for entity: com.xindeco.myregister.pojo.MyRegisterInfo column: password (should be mapped with insert="false" update="false")

          出錯(cuò)原因:password 和repassword同時(shí)對(duì)應(yīng)數(shù)據(jù)庫(kù)表中的password一列,同時(shí)update和insert都設(shè)為true。
          xml文件如下:
          ??? <property name="password"
          ????????????????????????? type="java.lang.String"
          ????????????????????????? update="true"
          ????????????????????????? insert="true"
          ????????????????????????? access="property"
          ????????????????????????? column="password"
          ????????????????????????? length = "32"
          ????????????????????????? />

          ???????????????????????? <property name="repassword"
          ????????????????????????? type="java.lang.String"
          ????????????????????????? update="false"
          ????????????????????????? insert="false"
          ????????????????????????? access="property"
          ????????????????????????? column="password"
          ????????????????????????? length = "32"
          ????????????????????????? />
          解決的方法:
          將repassword的insert和update設(shè)為false。


          3、
          org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed;
          nested exception is org.hibernate.PropertyNotFoundException: Could not find a getter for ID in class

          錯(cuò)誤原因:hibernate的映射文件中ID是大寫(xiě)的,而pojo的類(lèi)中id是小寫(xiě)的

          注意事項(xiàng):每個(gè)pojo的類(lèi)都要繼承abstractEntity,其中abstractEntity類(lèi)有個(gè)ID的屬性要重寫(xiě)
          ?public abstract class AbstractEntity
          ??? implements Entity, BaseDTO {

          ??? abstract public long getID();

          ??? abstract public void setID(long id);

          ??? public int hashCode() {
          ??????? return (int)this.getID();
          ??? }

          ??? public boolean equals(Object obj) {
          ??????? if (obj == this) {
          ??????????? return true;
          ??????? }
          ??????? if (obj instanceof Entity) {
          ??????????? return this.getID() == ( (Entity) obj).getID();
          ??????? }
          ??????? return false;
          ??? }
          }

          4、
          org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read-only mode (FlushMode.NEVER) - turn your Session into FlushMode.AUTO or remove 'readOnly' marker from transaction definition

          錯(cuò)誤原因:
          在application.xml文件中deleteRegister方法以delete開(kāi)頭,并沒(méi)有被設(shè)定為可更改的,應(yīng)如下設(shè)置:
          ?<!--為事物創(chuàng)建代理類(lèi),并指定方法的事物類(lèi)型-->
          ? <bean id="baseTxProxy" lazy-init="true" abstract="true" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
          ??? <property name="transactionManager">
          ????? <ref bean="transactionManager"/>
          ??? </property>
          ??? <property name="transactionAttributes">
          ????? <props>
          ??????? <prop key="add*">PROPAGATION_REQUIRED</prop>
          ??????? <prop key="cancel*">PROPAGATION_REQUIRED</prop>
          ???????????</props>
          ??? </property>
          ? </bean>
          加上一行
          ? <prop key="delete*">PROPAGATION_REQUIRED</prop>

          5、
          ???ERROR org.apache.struts.util.RequestUtils - Error creating form bean of class com.xindeco.business.web.form.GraAppInfoForm

          public class? GraAppInfoForm
          extends ActionForm 錯(cuò)誤寫(xiě)成
          public abstratic?class? GraAppInfoForm
          extends ActionForm

          6、
          2006-04-25 08:56:38,495 ERROR com.xindeco.business.web.action.GraAppAction - com.xindeco.business.web.action.GraAppAction@8e2fb5
          java.lang.ClassCastException: $Proxy0
          ?at com.xindeco.business.web.action.GraAppAction.newone(GraAppAction.java:30)
          ?at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          ?at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          ?at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          ?at java.lang.reflect.Method.invoke(Method.java:585)
          ?at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274)
          ?at com.xindeco.core.web.action.BaseAction.dispatchMethod(BaseAction.java:153)
          ?at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194)


          actioin類(lèi)中的newone方法如下:
          public? class GraAppAction
          ??? extends BaseAction {
          ??? public ActionForward newone(ActionMapping mapping, ActionForm form,
          ????????????????????????????? HttpServletRequest request,
          ????????????????????????????? HttpServletResponse response) throws Exception {
          ???????GraAppService ?graservice = (GraAppService) this.getBean("GraAppService");
          }

          applicationcontext中的GraAppService的配置如下:
          ??? <bean id="GraAppDAO" class="com.xindeco.business.dao.impl.GraAppDAOImpl">
          ??? <property name="support">
          ????? <ref local="support"/>
          ??? </property>
          ??? <property name="sessionFactory">
          ????? <ref local="sessionFactory"/>
          ??? </property>
          ? </bean>
          ? <bean id="GraAppService" parent="baseTxProxy">
          ??? <property name="target">
          ????? <bean class="com.xindeco.business.service.impl.GraAppServiceImpl" autowire="byName">
          ??????? <property name="baseDAO">
          ????????? <ref bean="GraAppDAO"/>
          ??????? </property>
          ????? </bean>
          ??? </property>
          ? </bean>

          因此this.getBean("GraAppService");是為了得到GraAppServicImpl類(lèi)的實(shí)現(xiàn)。GraAppService是interface
          public class GraAppServiceImpl extends BaseServiceImpl
          ??? implements GraAppService{
          }

          7、org.hibernate.hql.ast.QuerySyntaxException: Demand is not mapped. [from Demand where unitid = ? and needNum > usedNeedNum]

          hibernate.cfg.xml沒(méi)有配置Demand.hbm.xml文件的目錄

          8、org.springframework.jdbc.BadSqlGrammarException: Bad SQL grammar [] in task 'Hibernate operation'; nested exception is java.sql.SQLException: 列名 'id' 無(wú)效。
          java.sql.SQLException: 列名 'name' 無(wú)效。

          因?yàn)閔ibernate聲明的id,name的columnid屬性沒(méi)有與數(shù)據(jù)庫(kù)的字段對(duì)應(yīng),所以id,name無(wú)效。


          9、java.lang.NumberFormatException: null
          ?at java.lang.Integer.parseInt(Integer.java:415)
          ?at java.lang.Integer.parseInt(Integer.java:497)
          ?at com.xindeco.business.service.impl.DemandServiceImpl.findDemandListByUnitId(DemandServiceImpl.java:33)

          錯(cuò)誤語(yǔ)句為
          ?needNum = Integer.parseInt(demand.getNeedNum());
          ?usedNeedNum = Integer.parseInt(demand.getUsedNeedNum());
          因?yàn)閐emand.getUsedNeedNum()==null,無(wú)法轉(zhuǎn)化為string 類(lèi)型,

          10、rg.apache.jasper.JasperException: /GraAppInfo/GraAppInfoNew.jsp(343,29) According to TLD, tag bean:write must be empty, but is not

          錯(cuò)誤的原因:
          ????????????? <select name="politicsID" >
          ??????????? ?<option value="">請(qǐng)選擇</option>
          ?????? <logic:notEmpty name="politicsList">
          ??????????????? <logic:iterate id="politics" name="politicsList">
          ????????????????????????? </logic:notEmpty>
          ???????????<option value="<bean:write name="politics" property="codeID"/>"><bean:write name="politics" property="codeName"/></option>
          ????????? </logic:iterate>
          ?</select>
          就因?yàn)樯倭?>
          以后懂得通過(guò)查找字?jǐn)?shù),來(lái)檢查錯(cuò)誤


          11、2006-04-26 13:27:54,812 ERROR com.xindeco.core.util.BeanUtils - bean property [Nation] copy failed
          com.xindeco.core.exception.ConvertException: org.springframework.orm.hibernate3.HibernateSystemException: Unknown entity: java.lang.String; nested exception is org.hibernate.MappingException: Unknown entity: java.lang.String

          beanUtil.beanCopy(grapojo,form,BizConstants.CONVERTER);
          要求:
          1、pojo類(lèi)的屬性只有與form屬性名字相同,才能beancopy成功
          2、pojo中屬性是實(shí)體,在form中一定要用int,long表示
          出現(xiàn)這錯(cuò)誤的原因是pojo中的屬性不是實(shí)體,而錯(cuò)誤寫(xiě)成:
          string
          ?private String nation;應(yīng)改成 private?Syscode nation;

          12、
          2006-04-26 14:38:37,843 ERROR com.xindeco.business.web.action.GraAppAction - com.xindeco.business.web.action.GraAppAction@fa1b2d
          java.lang.NullPointerException
          ?at com.xindeco.business.web.action.GraAppAction.newone(GraAppAction.java:43)
          ?at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          ?at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

          hibernate配置文件沒(méi)改,程序找不到相應(yīng)的類(lèi)
          ??????? <many-to-one
          ??????????? name="FSUnit"
          ??????????? class="com.xindeco.business.pojo.EmployUnitBaseInfo"
          ??????????? cascade="none"
          ??????????? outer-join="auto"
          ??????????? update="true"
          ??????????? insert="true"
          ??????????? access="property"
          ??????????? column="fSUnit"
          ??????? />

          其實(shí)FSUnit對(duì)應(yīng)的類(lèi)應(yīng)該是FSUnit
          ??????? <many-to-one
          ??????????? name="FSUnit"
          ??????????? class="com.xindeco.business.pojo.FSUnit"
          ??????????? cascade="none"
          ??????????? outer-join="auto"
          ??????????? update="true"
          ??????????? insert="true"
          ??????????? access="property"
          ??????????? column="fSUnit"
          ??????? />

          13、
          org.hibernate.MappingException: An association from the table GraAppInfo refers to an unmapped class: com.xindeco.business.pojo.FSUnit

          錯(cuò)誤原因:hibernate.cfg.xml沒(méi)有配置fsunit.hbm.xml文件的位置

          14、
          java.lang.ClassCastException: com.xindeco.business.dao.impl.GraAppDAOImpl
          at com.xindeco.business.service.impl.GraAppServiceImpl.addGraduateApp(GraAppServiceImpl.java:16)
          GraAppServiceImpl.java:16
          第16行: GraAppDAO dao = (GraAppDAO) this.getBaseDAO();//其實(shí)得到的是GraAppDAOImpl

          錯(cuò)誤的原因是
          public class GraAppDAOImpl
          ??? extends BaseDAOImpl {

          }
          沒(méi)有實(shí)現(xiàn)GraAppDAO接口,正確的做法是
          public class GraAppDAOImpl
          ??? extends BaseDAOImpl implements GraAppDAO {
          }
          先繼承后實(shí)現(xiàn)


          15、2006-04-27 08:38:54,078 ERROR com.xindeco.business.web.action.GraAppAction - com.xindeco.business.web.action.GraAppAction@1d6399b
          java.lang.ClassCastException: com.xindeco.business.pojo.SysCode
          ?at org.hibernate.type.StringType.set(StringType.java:26)
          ?at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:63)
          ?at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:40)

          一般是因?yàn)閔ibernate聲明類(lèi)型和pojo類(lèi)聲明的類(lèi)型不一樣,并且前面已經(jīng)出現(xiàn)了Hibernate: insert into TGraAppInfo (name, whereFrom, degree, college, speciality, studentRelTel, remark, higherEduLength, highSchool, studyResume, normalOrNot, proxyUnit, workPost, workPlace, studentAddress, studentPostNumber, nation, appStatus) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
          的操作提示,查出錯(cuò)誤的原因有:
          ??????? <many-to-one
          ??????????? name="demand"
          ??????????? class="com.xindeco.business.pojo.Syscode"
          ??????????? cascade="none"
          ??????????? outer-join="auto"
          ??????????? update="true"
          ??????????? insert="true"
          ??????????? access="property"
          ??????????? column="demandID"
          ??????? />
          ???????? <property
          ??????????? name="appStatus"
          ??????????? type="int"
          ??????????? update="true"
          ??????????? insert="true"
          ??????????? access="property"
          ??????????? column="appStatus"
          ??????????? length="10"
          ??????? />
          應(yīng)改為????
          ??????? <many-to-one
          ??????????? name="demand"
          ??????????? class="com.xindeco.business.pojo.Demand"
          ??????????? cascade="none"
          ??????????? outer-join="auto"
          ??????????? update="true"
          ??????????? insert="true"
          ??????????? access="property"
          ??????????? column="demandID"
          ??????? />

          ??<many-to-one
          ??????????? name="nation"
          ??????????? class="com.xindeco.business.pojo.SysCode"
          ??????????? cascade="none"
          ??????????? outer-join="auto"
          ??????????? update="true"
          ??????????? insert="true"
          ??????????? access="property"
          ??????????? column="nation"
          ??????? />

          16、
          org.springframework.dao.InvalidDataAccessApiUsageException: object references an unsaved transient instance - save the transient instance before flushing: com.xindeco.business.pojo.SysCode
          ?at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:626)
          ?at org.springframework.orm.hibernate3.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:570)
          ?at
          org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:482)




          pojo類(lèi)為:
          public class GraAppInfo{
          ???????????? private College college;
          }

          action 類(lèi)為
          public class GraAppAction
          ??? extends BaseAction {
          ?????? public ActionForward add(ActionMapping mapping, ActionForm form,
          ???????????????????????????? HttpServletRequest request,
          ???????????????????????????? HttpServletResponse response) throws Exception {

          ????????graInfo.setCollege(new College());\\必須從數(shù)據(jù)庫(kù)找到college這個(gè)對(duì)象,而不能新生成
          ???????
          ??????? graInfo.getCollege().setID(graForm.getCollegeID());
          ??????? graInfo.setAppStatus(Integer.parseInt("0"));
          ??????service.addGraduateApp(graInfo);
          }

          public class GraAppServiceImpl extends BaseServiceImpl
          ??? implements GraAppService{

          ??? public boolean addGraduateApp(GraAppInfo info)
          ??? {
          ??????? this.getBaseDAO().save(info);
          ??????? return true;
          ??? }
          }
          dao類(lèi)save方法為
          ??? getHibernateTemplate().save(obj);

          當(dāng)cascade="all",插入new college 除了id和原來(lái)的記錄一樣,其他的字段全部都被更新,為null
          當(dāng)cascase=“insert”,插入new college 只會(huì)把它的id插入grainfo表中,其他字段不變。

          17、java.sql.SQLException: Unable to convert between java.lang.Integer and BLOB.
          因?yàn)?br />??????? <property
          ??????????? name="province"
          ??????????? type="com.xindeco.business.pojo.SysCode"http://不能用復(fù)雜類(lèi),
          ??????????? update="true"
          ??????????? insert="true"
          ??????????? access="property"
          ??????????? column="provinceId"
          ??????? />
          應(yīng)該改為
          ??? ??????? <many-to-one
          ??????????? name="province"
          ??????????? class="com.xindeco.business.pojo.SysCode"
          ??????????? cascade="none"
          ??????????? outer-join="auto"
          ??????????? update="true"
          ??????????? insert="true"
          ??????????? access="property"
          ??????????? column="provinceId"
          ??????? />

          18、javax.servlet.jsp.JspException: Cannot create iterator for this collection
          ?at org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:265)
          jsp文件如下:
          ? ?<logic:notEmpty name="graduateList" >
          ? ?<logic:iterate id="graduate"? name="graduateList" >
          ?? </ogic:notEmpty >
          ?? </ogic:iterat>
          graduateList是一個(gè)類(lèi),而logic:iterator要求必須是ArrayList,HashSet....這樣的集合類(lèi),而graduateList中一個(gè)屬性是ArrayList或HashSet的
          應(yīng)改為:
          <logic:notEmpty name="graduateList" property="items">
          ?<logic:iterate id="graduate"? name="graduateList" property="items" >
          ?</ogic:notEmpty >
          ??</ogic:iterat>


          19、2006-05-11 17:13:37,468 ERROR com.xindeco.business.web.action.GraAppAction - com.xindeco.business.web.action.GraAppAction@bc22eb
          org.hibernate.LazyInitializationException: could not initialize proxy - the owning Session was closed

          SysUser user= (SysUser) request.getSession().getAttribute(WebConstants.SESSION_USER);
          ??????? System.out.println(user.getRole().getRoleName());
          當(dāng)hibernate session取出數(shù)據(jù)放到http session時(shí),
          由于sysuser中role的lazy=“true”,所以沒(méi)有將RoleName放到http session中,當(dāng)System.out.println(user.getRole().getRoleName());
          時(shí),雖然http session還開(kāi)著, hibernat seesion已經(jīng)關(guān)閉
          ??????? <many-to-one
          ??????????? name="role"
          ??????????? class="com.xindeco.business.pojo.SysRole"
          ??????????? lazy="false"
          ??????????? cascade="none"
          ??????????? outer-join="auto"
          ??????????? update="true"
          ??????????? insert="true"
          ??????????? access="property"
          ??????????? column="roleID"
          ??????? />
          20、Association references unmapped class: com.xindeco.workflow.WFNode
          因?yàn)閍pplication.xml文件中沒(méi)有配置<mapping resource="com/xindeco/workflow/WFNode.hbm.xml"/>
          系統(tǒng)找不到WFNode

          ??????? < set
          ????????????name
          = " nodes "
          ????????????table
          = " WF_ROLENODES "
          ????????????lazy
          = " true "
          ????????????inverse
          = " false "
          ????????????cascade
          = " none "
          ????????????sort
          = " unsorted "
          ????????
          >

          ??????????????
          < key
          ??????????????????column
          = " roleID "
          ??????????????
          >
          ??????????????
          </ key >

          ?????????????????
          < many - to - many
          ??????????????????
          class = " com.xindeco.workflow.WFNode "
          ??????????????????column
          = " nodeId "
          ??????????????????outer
          - join = " auto "
          ???????????????
          />
          ???????????????

          ????????
          </ set >
          posted @ 2006-04-16 15:54 aimy 閱讀(2710) | 評(píng)論 (1)編輯 收藏
          主站蜘蛛池模板: 南溪县| 东阳市| 台南市| 遂平县| 新田县| 井冈山市| 阳西县| 鸡东县| 长岭县| 柳州市| 保亭| 高碑店市| 安溪县| 宁津县| 禄丰县| 威信县| 宝清县| 赤峰市| 抚顺县| 昌乐县| 淮南市| 肇东市| 长子县| 弋阳县| 濉溪县| 朝阳区| 成安县| 贵州省| 江阴市| 延安市| 雷波县| 许昌市| 长丰县| 宣汉县| 沾化县| 青神县| 涞水县| 高邮市| 安宁市| 曲松县| 盘山县|