Category: Yii
-
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…
-
Post Views: 12 1. Reference URL:https://www.php.net/manual/zh/function.memory-get-usage.php 2. Based on an example of memory_get_usage(), after adjustment, as shown in Figure 1, the code is as follows: 3. The execution result, unset() is effective for reducing the amount of memory actually used by the php script. 4. In Yii 2.0, run the same code, check the memory usage of the debug data,…
-
Post Views: 15 1. In Yii 2.0, an error is reported: “Calling unknown method: API\modules\v1\models\plantask::claimProcess()”, as shown in Figure 1 2. View the \API\modules\v1\models\plantask.php file, the code is as follows 3. To view the \common\logics\plantask.php file, the method ClaimProcess is defined as private (private), and it can only be accessed by the class where it is defined. The code is…
-
Post Views: 17 1. Obtain the topic details interface, the operation permission of the topic includes all the permission buttons of the current user, which can be customized for the mobile terminal 2. Edit method file: \api\rests\plan\viewaction.php, get the controller ID (yii::$app->controller->id), when its route is: /v1/plans/2, its value is: plan, as shown in Figure 1 3. Edit the method…
-
Post Views: 14 1. The requirements put forward by the new colleagues are required to realize the following requirements: (1) Logged in, desktop \api\rests\resource Modified to: \API\RESTS\PLAN_TASK_RESOURCE (2) Tourists, do not make changes \API\RESTS\CLIENT_RESOURCE (3) Logged in, mobile terminal Task Management – Delete Task Materials Task Management – Manage background material list \API\RESTS\MOBILE\PLAN_TASK_RESOURCE (4) Logged in, mobile terminal /v1/mobile/resources/resource material…