Querylist interface, new collection, old storage, closed, and uncompleted functions errors and gains

Source: Internet
Author: User

1. About date, when using date as the filter condition, a day is missing if you do not pay attention to it.

The reason is that a reasonable segmentation rule should be set for the date so that no time is missed in each time period.

Improvement Method: Because the storage time is in the yyyy-mm-dd format, the time and second of all parameters are 0. Therefore, the end of a time period is processed.

The number of days + 1. When this time period is used, the <End Time is used as the unified standard, and the rules before and after the package are guaranteed.

 

2. When you query the four conditions, you need to filter the conditions. Except for common conditions, there are special cases.

Condition is the same field, two possibilities: both possibilities, for example: filters. Add (New propertyflter ("eqs_status_or_status", judconstant. jud_case_status_close,

Judconstant. jud_case_status_archive); or means or.

The condition is two fields, each of which has its own possibility: both fields need to be determined, for example: filters. Add (New oorpropertyfilter ("eqs_closetime_oor_eqs_registertime", end, begin ));

 

3. when normal conditions and special conditions cannot be accurately filtered, the page method of the query is rewritten. When the normal condition query is ensured, parameters and judgments are added, to meet the needs of complex queries.

For example, the uncompleted function:

Rewrite the PAGE method of the query condition to add a map-type parameter. Pass the condition parameter to map and process the condition in Dao.

TIPS:

Concatenate SQL statements and Add 1 = 1 to SQL statements that meet the basic conditions to meet normal queries.

When determining a parameter (for example, ("01"). Equals (x), place the result on the front side to avoid NULL pointer exceptions.

* ** If other parameters of the object class are required on the interface, you can use jdbcdao. findpage (SQL, tjudcaseinfo. class, page, Params); method, the second parameter is the object class. class,

Page is a paging method parameter and Params is a map parameter. If not, remove the second parameter.

Querylist interface, new collection, old storage, closed, and uncompleted functions errors and gains

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.