store wise orders change
This commit is contained in:
@@ -21,6 +21,15 @@ func (ctl *PartnerController) GetActiveRiders(c *fiber.Ctx) error {
|
||||
aid, _ := strconv.Atoi(c.Query("applocationid"))
|
||||
uid, _ := strconv.Atoi(c.Query("userid"))
|
||||
tid, _ := strconv.Atoi(c.Query("tenantid"))
|
||||
|
||||
if pid == 0 && aid == 0 && uid == 0 && tid == 0 {
|
||||
return c.Status(http.StatusBadRequest).JSON(fiber.Map{
|
||||
"status": false,
|
||||
"code": http.StatusBadRequest,
|
||||
"message": "At least one of tenantid, partnerid, applocationid or userid is required",
|
||||
})
|
||||
}
|
||||
|
||||
result, err := ctl.partnerService.GetActiveRiders(pid, aid, uid, tid)
|
||||
|
||||
if err != nil {
|
||||
@@ -113,7 +122,15 @@ func (ctl *PartnerController) GetRiderLogs(c *fiber.Ctx) error {
|
||||
pid, _ := strconv.Atoi(c.Query("partnerid"))
|
||||
aid, _ := strconv.Atoi(c.Query("applocationid"))
|
||||
fdate := c.Query("fromdate")
|
||||
tdate := c.Query("fromdate")
|
||||
tdate := c.Query("todate")
|
||||
|
||||
if pid == 0 && aid == 0 {
|
||||
return c.Status(http.StatusBadRequest).JSON(fiber.Map{
|
||||
"status": false,
|
||||
"code": http.StatusBadRequest,
|
||||
"message": "At least one of partnerid or applocationid is required",
|
||||
})
|
||||
}
|
||||
|
||||
data, err := ctl.partnerService.GetRiderLogs(pid, aid, fdate, tdate)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user