Skip to content

Instantly share code, notes, and snippets.

@hitechqb
Created May 20, 2019 02:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hitechqb/4c02d8e80b0111b6132cf999518eb9c6 to your computer and use it in GitHub Desktop.
Save hitechqb/4c02d8e80b0111b6132cf999518eb9c6 to your computer and use it in GitHub Desktop.
Model Request:
type SearchStoreRequest struct {
StoreId *int `json:"storeId" form:"storeId"`
FromCreatedDate *time.Time `json:"fromCreatedDate" form:"fromCreatedDate"`
ToCreatedDate *time.Time `json:"toCreatedDate" form:"toCreatedDate"`
FromUpdatedDate *time.Time `json:"fromUpdatedDate" form:"fromUpdatedDate"`
ToUpdatedDate *time.Time `json:"toUpdatedDate" form:"toUpdatedDate"`
FromDateReview *time.Time `json:"fromDateReview" form:"fromDateReview"`
ToDateReview *time.Time `json:"toDateReview" form:"toDateReview"`
ShopStatus *enum.StoreStatus `json:"shopStatus" form:"shopStatus"`
IsReview *enum.IsReview `json:"isReview" form:"isReview"` // Hau Kiem
ShopTypes []int `json:"shopTypes" form:"shopTypes"`
IsShopAddress *enum.IsYesNo `json:"isShopAddress" form:"isShopAddress"`
ShopRegionId *int `json:"shopRegionId" form:"shopRegionId"`
IsAutoApprove *enum.SupportAutoApprove `json:"isAutoApprove" form:"isAutoApprove"`
IsCertifiedNotApprove *enum.IsYesNo `json:"isCertifiedNotApprove" form:"isCertifiedNotApprove"` // Cam Duyet SHS
IsStoreBrand *enum.IsYesNo `json:"isStoreBrand" form:"isStoreBrand"` //Shop Thuong Hieu
Mobile *string `json:"mobile" form:"mobile"`
IsCPC *enum.IsYesNo `json:"isCPC" form:"isCPC"`
IsAffiliate *enum.IsYesNo `json:"isAffiliate" form:"isAffiliate"`
IsDeposit *enum.IsYesNo `json:"isDeposit" form:"isDeposit"` // Ky Quy
ExternalId *int `json:"externalId" form:"externalId"`
Email *string `json:"email" form:"email"`
Name *string `json:"name" form:"name"`
PageIndex int `json:"pageIndex" form:"pageIndex"`
PageSize int `json:"pageSize" form:"pageSize"`
OrderBy *string `json:"orderBy" form:"orderBy"`
TotalRecord int `json:"totalRecord" form:"totalRecord"`
}
Store Proc:
"EXEC usp_SelectPaging_ListStoreKey @pageIndex=?, @pageSize=?, @orderBy=?, @totalRecord=?, "+
"@storeId=?, @fromCreatedDate=?, @toCreatedDate=?, "+
"@fromUpdatedDate=?, @toUpdatedDate=?, "+
"@fromDateReview=?, @toDateReview=?, @shopStatus=?, @isReview=?, @shopTypes=?, "+
"@isShopAddress=?, @shopRegionId=?, @isAutoApprove=?, @isCertifiedNotApprove=?, @isStoreBrand=?, "+
"@mobile=?, @isCPC=?, @isDeposit=?, @externalId=?, @email=?, @name=?"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment