Author: 永夜
-
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: 21 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. The front-end response timeout, the response time is: 1 m 0.06 s. as shown in Figure 1 2. The response of the back-end interface does not time out, and the response time is: 1 m 5.70 s. as shown in Figure 2 3. Adjust the proxy settings and add 3 timeout-related settings. The default is 60s,…
-
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: 25 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: 16 1. When pulling in TortoiseGit, an error is reported: Error: Some local refs could not be updated; try runningGit Remote Prune OriginTo remove any old, conflicting branches. as shown in Figure 1 2. Check the prompt information carefully and find that there is: error: cannot lock refrefs/remotes/origin/sc/fix/to-be-merged-table-scroller:refs/remotes/origin/sc/fixexists; cannot createrefs/remotes/origin/sc/fix/to-be-merged-table-scroller. as shown in Figure 2 3. Reference: When…
-
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…