Does the user create an order in OrderController or UserController?

problem description

should the user create an order in UserController or OrderController?

//
public void UserController{

}
//
public void OrderController{

}

for example, adding users to a group, should it be placed in GroupController or UserController?

//UserController
public void UserController{

}
//GroupController
public void GroupController{
    
}

personally, from the point of view of code implementation, no matter which controller is placed, it can be implemented. But from a business point of view, there should be a basic principle of division . I would like to ask you usually develop according to what principles to divide ?
Thank you!

Mar.25,2021

personal understanding:
when the user creates an order, the result is that a new record is added to the order table, so I think it should be placed in OrderController.

I hope I can help you. Thank you


if designed according to the restful-style interface, the order created by the user can be designed as follows:

POST /user/{userId}/order

this interface I will write under UserController
can also be designed as

POST /order?userId={userId}

if this is the interface, I will write it under OrderController.
you can use whatever you are used to

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3aca9-4eea7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3aca9-4eea7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?