master
cody 3 months ago
parent cf7b13b699
commit 749b8a7b4c

@ -236,10 +236,6 @@ class SupplyDemandController extends CommonController
if ($validator->fails()) {
return $this->fail([ResponseCode::ERROR_PARAMETER, implode(',', $validator->errors()->all())]);
}
if (isset($all['supply_demand_id']) && !empty($all['supply_demand_id'])) {
// 增加view_count
SupplyDemand::where('id', $all['supply_demand_id'])->increment('view_count');
}
// 判断是否有会话,没有则创建
$dialogue = Dialogue::where(function ($query) use ($all) {
$query->where('user_id', $this->getUserId())->where('to_user_id', $all['to_user_id']);
@ -253,6 +249,8 @@ class SupplyDemandController extends CommonController
'to_user_id' => $all['to_user_id'],
'supply_demand_id' => $all['supply_demand_id'] ?? 0
]);
// 增加联系次数
SupplyDemand::where('id', $all['supply_demand_id'])->increment('contact_count');
}
// 每天限制私信次数限制
$message_limit = Config::getValueByKey('message_limit');

@ -16,6 +16,7 @@ return new class extends Migration {
$table->comment('图书表');
$table->increments('id');
$table->string('title')->comment('书名');
$table->string('code')->comment('编码');
$table->string('author')->nullable()->comment('作者');
$table->string('isbn')->nullable()->comment('ISBN');
$table->string('publisher')->nullable()->comment('出版社');

Loading…
Cancel
Save