Category: Web Application Development
-
Post Views: 17 1. The current Excel export progress is displayed by the front-end and is not controlled by the back-end. as shown in Figure 1 The decision is adjusted to display according to the actual export progress of Excel, and the final implementation rules are as follows: Now exporting the Excel file, generally speaking, after the backend receives the…
-
Post Views: 18 1. In a list page, when there are 2 sets of time fields, each group is 2, one is the beginning and the other is the end, and it is necessary to verify that there must be a set of time fields. as shown in Figure 1 2. A total of 4 fields are: shipping_at_gmt_start, shipping_at_gmt_end, operated_at_gmt_start,…
-
Post Views: 15 1. The request parameters are as follows, you need to ensure that the shipping_at_gmt_end cannot exceed the shipping_at_gmt_start for 3 months. as shown in Figure 1 2. Use closure to customize the verification rules, based on Carbon. After adding SHIPPING_AT_GMT_START for 3 months before comparing with SHIPPING_AT_GMT_END, if SHIPPING_AT_GMT_END is still later than Shipping_at_gmt_start adds the value…
-
Post Views: 20 1. In MySQL 8, the IN condition is used for multiple fields, and the query result is empty. as shown in Figure 1 2. Reference:In MySQL 8, the in condition is used for multiple fields The query result is not empty for sql as follows 3. Reference:Error when using native expression query in Laravel 9: SQLState[42000]: syntax…
-
Post Views: 17 1. Reference:In MySQL 8.0, when querying the total number of table records, the analysis optimization of the timeout. The execution time in Navicat is: 3.075 seconds. as shown in Figure 1 2. The execution time in Laravel 9 is: 60317.74ms. It is equivalent to 60 seconds. as shown in Figure 2 3. Verify another count(*) SQL, the…
-
Post Views: 17 1. Reference: In mysql 8.0, when the total number of table records is checked, the analysis and optimization of the timeout is optimized. Add WHERE ID > 0 when a COUNT SQL does not exist where condition exists. 2. Reference:How to check if table is already has a where Clause in Laravel Query Builder? The final implementation…
-
Post Views: 24 1. An interface request response timeout, because count(*) SQL takes 54 seconds. The amount of data in the table exceeds 10 million. as shown in Figure 1 2. The table field Shipping_Type has an index to add, and its value is only 1 and 2 possibilities. Decide to add the where condition Shipping_Type in (1,2). The query…
-
Post Views: 15 1. The request parameters are as follows, you need to ensure the uniqueness of logistics_freight_no in the table. Since batch overriding writes are supported, the final implementation is to clear all records of RETURN_ORDER_ID of 28, and then rewrite them all. 2. The verification rules are implemented as follows 3. When there is a duplicate value in…
-
Post Views: 17 1. The implementation at this stage is as follows. The final generated SQL will always need to be associated with several other tables, otherwise an error will be reported. 2. The adjusted implementation is as follows. After preparing new request($criteria), then judge whether to join, and the generated sql is associated with other tables on demand, which…
-
Post Views: 17 1. In Laravel 9, an error is reported: call to undefined method illuminate\\http\\resources\\missingValue::isempty(). as shown in Figure 1 2. Check the code implementation 3. Print $this->whenloaded(Customtagsenable), the result is as follows, which are the results of the resource after the model association is not loaded, and the resource after the model association is loaded 4. Re-implement the…