Category: Web Framework
-
Post Views: 15 1. View the task list page of Zen Tao, and its sorting is based on the descending order of ID, as shown in Figure 1 2. After clicking on the consumption field, the triangle is displayed as dark, indicating that the current sorting is based on the consumption ascending order, and if its value is the same,…
-
Post Views: 14 1. Open the URL in Postman:http://api.pcs-api.localhost/v1/plans/have?login_id=2e368664c41b8bf511bcc9c65d86dbc3&login_tid=f347ba5bb18cb3fbef94c0b37c796bf5&filter[and][0][or][0][title][like]=Shenzhen &Filter[status][neq]=0&filter[and][0][or][1][keyword]= keyword, as shown in Figure 1 2. Print request parameter: $requestParams 3. Print the filter: $filter 4. The final generated SQL is as follows, as shown in Figure 2 5. The current requirement is that the field keyword, keywords, multiple uses, and numbers are separated, and accurate matching is required,…
-
Post Views: 15 1. In the console command of Yii 2.0, an error is reported: yii\db\exception: redis error: err Invalid DB index Redis command was: Select 29 in /vendor/yiisoft/yii2-redis/src/connection.php:736, view /console/runtime/logs/app.log 2. The analysis found that when executing the command: Select 29, switch to the corresponding database: 29 errors, and a Redis instance has 16 databases by default, from 0…
-
Post Views: 50 1. Data validation failed in Yii 2.0: the source publishing user ID must be a string. as shown in Figure 1 2. The reason is the field: source_pub_user_id was int(11) in the table before, and later modified to varchar(64), in the model file regenerated based on GII, the verification rules are as follows 3. The interface has…
-
Post Views: 17 1. Table: Fields in pub_log: The type of data is: text, as shown in Figure 1 2. Table: field in pub_log: data structure of data is: json, the formatted data is as follows, as shown in Figure 2 3. The current requirement is that if “channel_app_task_status”: 6, it needs to be changed to: “channel_app_task_status”: 7, that is,…
-
Post Views: 16 1. Reference URL:https://www.shuijingwanwq.com/2019/08/15/3427/ 2. Update table: field in channel_app_source: The value of Permission is: 3, as shown in Figure 1 3. Based on the database migration command, generate the implementation of a SQL as shown above, edit \console\migrations\m190815_020034_permission.php 4. Execute the database migration command, as shown in Figure 2 5. Check the table: the field in channel_app_source:…
-
Post Views: 13 1. Error in Yii 2.0: Calling unknown method yii2tech\\ar\\softdelete\\softdeleteBehavior::IsTransactional(), as shown in Figure 1 2. Check the code, because the operation of the Redis model uses soft delete (SoftDelete) 3. Edit the code, and use the hard delete (delete) to delete the Redis model 4. Summary: In Yii 2.0, yii2tech\ar\\softdelete\\softdeleteBehavior does not support the soft deletion of…
-
Post Views: 13 1. In Postman, open the URL:http://api.pcs-api.localhost/v1/plan-config-column-users?login_id=2e368664c41b8bf511bcc9c65d86dbc3&login_tid=685f805f71faedfe215f55bbb01b50c6&filter[config_column_id]=1 , only the fields are supported: config_column_id queries, the response is as follows: 2. The SQL statement is as follows: 3. Existing new requirements need to support the fuzzy query of user_nick, but the field: user_nick does not exist in mysql ActiveRecord, but exists in Redis ActiveRecord. And Redis ActiveRecord does…