Isnull is used to determine whether the property field is null. It is more convenient to use isempty, including null and null strings.
Example 1:
Isequal is equivalent to equals. The number is much more than that. Generally, it is used to determine the status value.
<Isequal property = "state" comparevalue = "0">
</Isequal>
Or
<Isequal property = "state" compareproperty = "nextstate">
</Isequal>
Example 1:
Is the name of the incoming map or Class Attribute equal to "1"? It attaches and vvvv = 'haha'
<Isequal property = "name" comparevalue = "1" prepend = "and">
Vvvv = 'haha'
</Isequal>
Is the name of the input map or Class Attribute null? Is it null, and vvvv = NULL?
<Isnull property = "name" prepend = "and">
Vvvv = NULL
</Isnull>
My applications:
### Description
1. Function Description
You can set some non-important pop-up announcement settings.
2. Functional Requirements
1) Users are allowed to block three types of announcements: "Return announcement", "bank deposit notice", and "online deposit notice.
2) You can use the check box settings on the above three announcement pop-up pages to stop notifying such announcements.
3. interface requirements
1) The announcement page is displayed:
On the "Return announcement" (25), "bank deposit notice" (63), and "online deposit notice" (64), add the check box "No such announcement will pop up ".
2) Announcement prompt settings:
You can directly block the above three announcements (enable 10 | disable 11 ).
4. Business Process
5. Logic requirements
The user storage blocking status is stored in the "sale_back", "remittance_bank", and "remittance_online" Fields in t_bussiness_set.
6. Performance Requirements
7. Related modules
8. database related tables
1) t_bussiness_set merchant settings table
2) t_notice announcement table
1. sqlmap
<select id="querySingleModelByOut" parameterClass="com.hanpeng.base.phone.model.TBussinessNotice" resultClass="com.hanpeng.base.phone.model.TBussinessNotice">select * from (select row_.*, rownum rownum_ from (SELECTi.NOTICE_NUM as noticeNum ,i.BUSSINESS_ID as bussinessId ,i.STATE as state ,i.READ_DATE as readDate ,n.NOTICE_TITLE as noticeTitle ,n.NOTICE_INFO as noticeInfo ,n.CREATE_DATE as createDate ,n.EMPLOYEE_ID as employeeId ,n.NOTICE_TYPE as noticeType ,n.NOTICE_SHOW_TYPE as noticeShowType ,n.FINISH_DATE as finishDate ,n.PUBLISH_DATE as publishDate FROM T_BUSSINESS_NOTICE i left join T_NOTICE n on n.NOTICE_NUM = i.NOTICE_NUM WHEREn.PUBLISH_DATE <= sysdate AND n.FINISH_DATE >= sysdate<isNotEmpty prepend=" AND " property="bussinessId"> i.BUSSINESS_ID = #bussinessId# </isNotEmpty><isNotEmpty prepend=" AND " property="state"> i.STATE = #state# </isNotEmpty><isNotEmpty prepend=" AND " property="noticeShowType"> n.NOTICE_SHOW_TYPE = #noticeShowType# </isNotEmpty><isEqual property="saleBack" compareValue="10" prepend=" AND ">n.NOTICE_TYPE!='25'</isEqual><isEqual property="remittanceBank" compareValue="10" prepend=" AND ">n.NOTICE_TYPE!='63'</isEqual><isEqual property="remittanceOnline" compareValue="10" prepend=" AND ">n.NOTICE_TYPE!='64'</isEqual> )row_ where rownum <=1 ) where rownum_>=0</select>
2. Action
/*** Query announcement pop-up * @ return * @ author wwy * @ date 2011-10-13 13:35:11 */Public void querybyout () {try {printwriter out = This. getresponse (). getwriter (); If (getuserid ()! = NULL) {bussinessnotice = noticeservice. selectsinglemodelbyout ("26", getuserid (); If (bussinessnotice = NULL) {out. print ("");} else {out. print ("{\" noticenum \ ": \" "+ bussinessnotice. getnoticenum () + "\"} ") ;}} else {out. print ("") ;}} catch (exception e) {log. error ("An error occurred while querying the pop-up announcement" + E. fillinstacktrace ());}}
3. serviceimpl
Public tbussinessnotice selectsinglemodelbyout (string state, string bussinessid) {tbussinessnotice TBN = new tbussinessnotice (); TBN. setbussinessid (bussinessid); TBN. setstate ("17"); TBN. setnoticeshowtype (State); tbussinessset bussinessset = bussinesssetservice. querybyid (bussinessid); // sets the status. sqlmap judges TBN Based on the status isequal. setsaleback (bussinessset. getsaleback (); TBN. setremittancebank (bussinessset. getremittancebank (); TBN. setremittanceonline (bussinessset. getremittanceonline (); Return bussinessnoticedao. selectsinglemodelbyout (TBN );}
4. frametop. jsp
<SCRIPT type = "text/JavaScript"> // pop-up announcement query var autonotice = setinterval (getnotice, 1000*60); function getnotice () {clearinterval (autonotice); $. ajax ({type: 'post', URL: 'notice _ querybyout ', datatype: 'json', success: function (data) {If (Data! = NULL) {$. hpdialog. Open ('notice _ detailbynotice? Initloadmethod = C & id = '+ data. noticenum);} else {autonotice = setinterval (getnotice, 1000*60) ;}}) ;}function noticecallback () {getnotice () ;}</SCRIPT>