Documentation ¶
Index ¶
- func AuditWeeklyRecipe(args *ArgsAuditWeeklyRecipe) (err error)
- func CreateWeeklyRecipe(args *ArgsCreateWeeklyRecipe) (id int64, err error)
- func CreateWeeklyRecipeItem(args *ArgsCreateWeeklyRecipeItem) (id int64, err error)
- func CreateWeeklyRecipeMargeByDay(args *ArgsCreateWeeklyRecipeMargeByDay) (id int64, err error)
- func DeleteWeeklyRecipe(args *ArgsDeleteWeeklyRecipe) (err error)
- func DeleteWeeklyRecipeItem(args *ArgsDeleteWeeklyRecipeItem) (err error)
- func GetWeeklyRecipeItemNameByID(id int64) (name string)
- func GetWeeklyRecipeMargeByID(args *ArgsGetWeeklyRecipeByID) (headData FieldsWeeklyRecipe, itemList []FieldsWeeklyRecipeItem, err error)
- func GetWeeklyRecipeNameByID(id int64) (name string)
- func Init()
- func UpdateWeeklyRecipe(args *ArgsUpdateWeeklyRecipe) (err error)
- func UpdateWeeklyRecipeItem(args *ArgsUpdateWeeklyRecipeItem) (err error)
- type ArgsAuditWeeklyRecipe
- type ArgsCreateWeeklyRecipe
- type ArgsCreateWeeklyRecipeItem
- type ArgsCreateWeeklyRecipeMargeByDay
- type ArgsCreateWeeklyRecipeMargeByDayItem
- type ArgsDeleteWeeklyRecipe
- type ArgsDeleteWeeklyRecipeItem
- type ArgsGetWeeklyRecipeByID
- type ArgsGetWeeklyRecipeItemByID
- type ArgsGetWeeklyRecipeItemList
- type ArgsGetWeeklyRecipeList
- type ArgsGetWeeklyRecipeMargeList
- type ArgsUpdateWeeklyRecipe
- type ArgsUpdateWeeklyRecipeItem
- type DataWeeklyRecipeMargeMore
- type DataWeeklyRecipeMargeMoreHeader
- type DataWeeklyRecipeMargeMoreHeaderDiningTime
- type DataWeeklyRecipeMargeMoreItem
- type FieldsWeeklyRecipe
- func GetWeeklyRecipeByID(args *ArgsGetWeeklyRecipeByID) (data FieldsWeeklyRecipe, err error)
- func GetWeeklyRecipeList(args *ArgsGetWeeklyRecipeList) (dataList []FieldsWeeklyRecipe, dataCount int64, err error)
- func GetWeeklyRecipeMargeList(args *ArgsGetWeeklyRecipeMargeList) ([]FieldsWeeklyRecipe, error)
- type FieldsWeeklyRecipeItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuditWeeklyRecipe ¶
func AuditWeeklyRecipe(args *ArgsAuditWeeklyRecipe) (err error)
AuditWeeklyRecipe 审核每周菜谱上报
func CreateWeeklyRecipe ¶
func CreateWeeklyRecipe(args *ArgsCreateWeeklyRecipe) (id int64, err error)
CreateWeeklyRecipe 创建WeeklyRecipe
func CreateWeeklyRecipeItem ¶
func CreateWeeklyRecipeItem(args *ArgsCreateWeeklyRecipeItem) (id int64, err error)
CreateWeeklyRecipeItem 创建WeeklyRecipeItem
func CreateWeeklyRecipeMargeByDay ¶
func CreateWeeklyRecipeMargeByDay(args *ArgsCreateWeeklyRecipeMargeByDay) (id int64, err error)
CreateWeeklyRecipeMargeByDay 打包创建某一天的菜谱
func DeleteWeeklyRecipe ¶
func DeleteWeeklyRecipe(args *ArgsDeleteWeeklyRecipe) (err error)
DeleteWeeklyRecipe 删除WeeklyRecipe
func DeleteWeeklyRecipeItem ¶
func DeleteWeeklyRecipeItem(args *ArgsDeleteWeeklyRecipeItem) (err error)
DeleteWeeklyRecipeItem 删除WeeklyRecipeItem
func GetWeeklyRecipeItemNameByID ¶
GetWeeklyRecipeItemNameByID 获取菜品名称
func GetWeeklyRecipeMargeByID ¶
func GetWeeklyRecipeMargeByID(args *ArgsGetWeeklyRecipeByID) (headData FieldsWeeklyRecipe, itemList []FieldsWeeklyRecipeItem, err error)
GetWeeklyRecipeMargeByID 获取打包数据
func GetWeeklyRecipeNameByID ¶
GetWeeklyRecipeNameByID 获取菜品名称
func UpdateWeeklyRecipe ¶
func UpdateWeeklyRecipe(args *ArgsUpdateWeeklyRecipe) (err error)
UpdateWeeklyRecipe 修改WeeklyRecipe
func UpdateWeeklyRecipeItem ¶
func UpdateWeeklyRecipeItem(args *ArgsUpdateWeeklyRecipeItem) (err error)
UpdateWeeklyRecipeItem 修改WeeklyRecipeItem
Types ¶
type ArgsAuditWeeklyRecipe ¶
type ArgsAuditWeeklyRecipe struct { //ID ID int64 `db:"id" json:"id" check:"id"` //当前组织ID // 用于验证数据是否属于当前组织 RawOrgID int64 `db:"raw_org_id" json:"rawOrgID" check:"id"` //审核状态 // 0 未审核; 1 审核通过; 2 审核不通过 AuditStatus int `db:"audit_status" json:"auditStatus" check:"intThan0" empty:"true"` //审核人ID AuditOrgBindID int64 `db:"audit_org_bind_id" json:"auditOrgBindID" check:"id" empty:"true"` //审核用户ID // 与组织ID二选一,如果组织成员ID为空,则使用用户ID;如果组织ID不为空,则使用组织成员ID+用户ID AuditUserID int64 `db:"audit_user_id" json:"auditUserID" check:"id" empty:"true"` //审核人姓名 AuditUserName string `db:"audit_user_name" json:"auditUserName" check:"des" min:"1" max:"300" empty:"true"` }
ArgsAuditWeeklyRecipe 审核每周菜谱上报参数
type ArgsCreateWeeklyRecipe ¶
type ArgsCreateWeeklyRecipe struct { //分公司ID OrgID int64 `db:"org_id" json:"orgID" check:"id"` //门店ID StoreID int64 `db:"store_id" json:"storeID" check:"id"` //提交组织成员ID SubmitOrgBindID int64 `db:"submit_org_bind_id" json:"submitOrgBindID" check:"id" empty:"true"` //提交用户ID // 与组织ID二选一,如果组织成员ID为空,则使用用户ID;如果组织ID不为空,则使用组织成员ID+用户ID SubmitUserID int64 `db:"submit_user_id" json:"submitUserID" check:"id" empty:"true"` //提交人姓名 SubmitUserName string `db:"submit_user_name" json:"submitUserName" check:"des" min:"1" max:"300" empty:"true"` //名称 Name string `db:"name" json:"name" check:"des" min:"1" max:"300" empty:"true"` //备注 Remark string `db:"remark" json:"remark" check:"des" min:"1" max:"1000" empty:"true"` // 用餐时间 //0 早餐; 1 午餐; 2 晚餐 DiningTime int `db:"dining_time" json:"diningTime" check:"intThan0" empty:"true"` // 用餐日期 DiningDate time.Time `db:"dining_date" json:"diningDate"` }
ArgsCreateWeeklyRecipe 创建WeeklyRecipe参数
type ArgsCreateWeeklyRecipeItem ¶
type ArgsCreateWeeklyRecipeItem struct { //分公司ID OrgID int64 `db:"org_id" json:"orgID" check:"id"` //门店ID StoreID int64 `db:"store_id" json:"storeID" check:"id"` //菜谱ID WeeklyRecipeID int64 `db:"weekly_recipe_id" json:"weeklyRecipeID" check:"id"` //菜品ID RecipeID int64 `db:"recipe_id" json:"recipeID" check:"id"` //菜品名称 Name string `db:"name" json:"name" check:"des" min:"1" max:"300" empty:"true"` //售价 Price int64 `db:"price" json:"price" check:"int64Than0"` }
ArgsCreateWeeklyRecipeItem 创建WeeklyRecipeItem参数
type ArgsCreateWeeklyRecipeMargeByDay ¶
type ArgsCreateWeeklyRecipeMargeByDay struct { //头部关键信息 HeaderData ArgsCreateWeeklyRecipe `json:"headerData"` //行信息列 RowData []ArgsCreateWeeklyRecipeMargeByDayItem `json:"rowData"` }
ArgsCreateWeeklyRecipeMargeByDay 打包创建某一天的菜谱参数
type ArgsDeleteWeeklyRecipe ¶
type ArgsDeleteWeeklyRecipe struct { //ID ID int64 `db:"id" json:"id" check:"id"` }
ArgsDeleteWeeklyRecipe 删除WeeklyRecipe参数
type ArgsDeleteWeeklyRecipeItem ¶
type ArgsDeleteWeeklyRecipeItem struct { //ID ID int64 `db:"id" json:"id" check:"id"` }
ArgsDeleteWeeklyRecipeItem 删除WeeklyRecipeItem参数
type ArgsGetWeeklyRecipeByID ¶
type ArgsGetWeeklyRecipeByID struct { //ID ID int64 `db:"id" json:"id" check:"id"` //分公司ID OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"` //门店ID StoreID int64 `db:"store_id" json:"storeID" check:"id" empty:"true"` }
ArgsGetWeeklyRecipeByID 获取WeeklyRecipe数据包参数
type ArgsGetWeeklyRecipeItemByID ¶
type ArgsGetWeeklyRecipeItemByID struct { //ID ID int64 `db:"id" json:"id" check:"id"` //分公司ID OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"` //门店ID StoreID int64 `db:"store_id" json:"storeID" check:"id" empty:"true"` }
ArgsGetWeeklyRecipeItemByID 获取WeeklyRecipeItem数据包参数
type ArgsGetWeeklyRecipeItemList ¶
type ArgsGetWeeklyRecipeItemList struct { //分页参数 Pages CoreSQL2.ArgsPages `json:"pages"` //分公司ID OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"` //门店ID StoreID int64 `db:"store_id" json:"storeID" check:"id" empty:"true"` //菜谱ID WeeklyRecipeID int64 `db:"weekly_recipe_id" json:"weeklyRecipeID" check:"id" empty:"true"` //菜品ID RecipeID int64 `db:"recipe_id" json:"recipeID" check:"id" empty:"true"` //是否删除 IsRemove bool `json:"isRemove" check:"bool"` //搜索 Search string `json:"search" check:"search" empty:"true"` }
ArgsGetWeeklyRecipeItemList 获取WeeklyRecipeItem列表参数
type ArgsGetWeeklyRecipeList ¶
type ArgsGetWeeklyRecipeList struct { //分页参数 Pages CoreSQL2.ArgsPages `json:"pages"` //分公司ID OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"` //分公司ID组 OrgIDs []int64 `db:"org_ids" json:"orgIDs" check:"ids" empty:"true"` //门店ID StoreID int64 `db:"store_id" json:"storeID" check:"id" empty:"true"` //门店ID列 StoreIDs []int64 `db:"store_ids" json:"storeIDs" check:"ids" empty:"true"` //提交组织成员ID SubmitOrgBindID int64 `db:"submit_org_bind_id" json:"submitOrgBindID" check:"id" empty:"true"` //提交用户ID // 与组织ID二选一,如果组织成员ID为空,则使用用户ID;如果组织ID不为空,则使用组织成员ID+用户ID SubmitUserID int64 `db:"submit_user_id" json:"submitUserID" check:"id" empty:"true"` //审核状态 // 0 未审核; 1 审核通过; 2 审核不通过 AuditStatus int `db:"audit_status" json:"auditStatus" check:"intThan0" empty:"true"` //审核人ID AuditOrgBindID int64 `db:"audit_org_bind_id" json:"auditOrgBindID" check:"id" empty:"true"` //审核用户ID // 与组织ID二选一,如果组织成员ID为空,则使用用户ID;如果组织ID不为空,则使用组织成员ID+用户ID AuditUserID int64 `db:"audit_user_id" json:"auditUserID" check:"id" empty:"true"` //是否删除 IsRemove bool `json:"isRemove" check:"bool"` //搜索 Search string `json:"search" check:"search" empty:"true"` }
ArgsGetWeeklyRecipeList 获取WeeklyRecipe列表参数
type ArgsGetWeeklyRecipeMargeList ¶
type ArgsGetWeeklyRecipeMargeList struct { //分公司ID OrgID int64 `db:"org_id" json:"orgID" check:"id"` //门店ID StoreID int64 `db:"store_id" json:"storeID" check:"id"` //开始日期 // 例如: 2021-01-01 StartDate string `json:"start_date"` //结束日期 // 例如: 2021-01-07 EndDate string `json:"end_date"` }
ArgsGetWeeklyRecipeMargeList 获取指定时间段内的菜谱参数
type ArgsUpdateWeeklyRecipe ¶
type ArgsUpdateWeeklyRecipe struct { //ID ID int64 `db:"id" json:"id" check:"id"` //名称 Name string `db:"name" json:"name" check:"des" min:"1" max:"300" empty:"true"` //备注 Remark string `db:"remark" json:"remark" check:"des" min:"1" max:"1000" empty:"true"` // 用餐时间 //0 早餐; 1 午餐; 2 晚餐 DiningTime int `db:"dining_time" json:"diningTime" check:"intThan0" empty:"true"` // 用餐日期 DiningDate time.Time `db:"dining_date" json:"diningDate"` }
ArgsUpdateWeeklyRecipe 修改WeeklyRecipe参数
type ArgsUpdateWeeklyRecipeItem ¶
type ArgsUpdateWeeklyRecipeItem struct { //ID ID int64 `db:"id" json:"id" check:"id"` //分公司ID OrgID int64 `db:"org_id" json:"orgID" check:"id"` //门店ID StoreID int64 `db:"store_id" json:"storeID" check:"id"` //菜谱ID WeeklyRecipeID int64 `db:"weekly_recipe_id" json:"weeklyRecipeID" check:"id"` //菜品ID RecipeID int64 `db:"recipe_id" json:"recipeID" check:"id"` //菜品名称 Name string `db:"name" json:"name" check:"des" min:"1" max:"300" empty:"true"` //售价 Price int64 `db:"price" json:"price" check:"int64Than0"` }
ArgsUpdateWeeklyRecipeItem 修改WeeklyRecipeItem参数
type DataWeeklyRecipeMargeMore ¶
type DataWeeklyRecipeMargeMore struct { //分公司ID OrgID int64 `db:"org_id" json:"orgID" check:"id"` //门店ID StoreID int64 `db:"store_id" json:"storeID" check:"id"` //提交组织成员ID SubmitOrgBindID int64 `db:"submit_org_bind_id" json:"submitOrgBindID" check:"id" empty:"true"` //提交用户ID // 与组织ID二选一,如果组织成员ID为空,则使用用户ID;如果组织ID不为空,则使用组织成员ID+用户ID SubmitUserID int64 `db:"submit_user_id" json:"submitUserID" check:"id" empty:"true"` //提交人姓名 SubmitUserName string `db:"submit_user_name" json:"submitUserName" check:"des" min:"1" max:"300" empty:"true"` //审核时间 AuditAt time.Time `db:"audit_at" json:"auditAt"` //审核状态 // 0 未审核; 1 审核通过; 2 审核不通过 AuditStatus int `db:"audit_status" json:"auditStatus" check:"intThan0" empty:"true"` //审核人ID AuditOrgBindID int64 `db:"audit_org_bind_id" json:"auditOrgBindID" check:"id" empty:"true"` //审核用户ID // 与组织ID二选一,如果组织成员ID为空,则使用用户ID;如果组织ID不为空,则使用组织成员ID+用户ID AuditUserID int64 `db:"audit_user_id" json:"auditUserID" check:"id" empty:"true"` //审核人姓名 AuditUserName string `db:"audit_user_name" json:"auditUserName" check:"des" min:"1" max:"300" empty:"true"` //开始日期 // 例如:2021-01-01 StartDate string `json:"startDate"` //结束日期 // 例如:2021-01-01 EndDate string `json:"endDate"` //数据 // 两种方法提供,一种不含该此数据;另外一种会包含此数据 DataList []DataWeeklyRecipeMargeMoreHeader `json:"dataList"` }
DataWeeklyRecipeMargeMore 打包主数据
type DataWeeklyRecipeMargeMoreHeader ¶
type DataWeeklyRecipeMargeMoreHeader struct { // ID ID int64 `db:"id" json:"id" check:"id"` //创建时间 CreateAt time.Time `db:"create_at" json:"createAt"` //更新时间 UpdateAt time.Time `db:"update_at" json:"updateAt"` //删除时间 DeleteAt time.Time `db:"delete_at" json:"deleteAt"` //名称 Name string `db:"name" json:"name" check:"des" min:"1" max:"300" empty:"true"` //备注 Remark string `db:"remark" json:"remark" check:"des" min:"1" max:"1000" empty:"true"` // 用餐日期 DiningDate time.Time `db:"dining_date" json:"diningDate"` //数据 DataList []DataWeeklyRecipeMargeMoreHeaderDiningTime `json:"dataList"` }
type DataWeeklyRecipeMargeMoreHeaderDiningTime ¶
type DataWeeklyRecipeMargeMoreHeaderDiningTime struct { // 用餐时间 //0 早餐; 1 午餐; 2 晚餐 DiningTime int `db:"dining_time" json:"diningTime" check:"intThan0" empty:"true"` //数据 DataList []DataWeeklyRecipeMargeMoreItem `json:"dataList"` }
type DataWeeklyRecipeMargeMoreItem ¶
type DataWeeklyRecipeMargeMoreItem struct { // ID ID int64 `db:"id" json:"id" check:"id"` //创建时间 CreateAt time.Time `db:"create_at" json:"createAt"` //更新时间 UpdateAt time.Time `db:"update_at" json:"updateAt"` //删除时间 DeleteAt time.Time `db:"delete_at" json:"deleteAt"` //菜品ID RecipeID int64 `db:"recipe_id" json:"recipeID" check:"id"` //菜品名称 Name string `db:"name" json:"name" check:"des" min:"1" max:"300" empty:"true"` //售价 Price int64 `db:"price" json:"price" check:"int64Than0"` }
type FieldsWeeklyRecipe ¶
type FieldsWeeklyRecipe struct { // ID ID int64 `db:"id" json:"id" check:"id"` //创建时间 CreateAt time.Time `db:"create_at" json:"createAt"` //更新时间 UpdateAt time.Time `db:"update_at" json:"updateAt"` //删除时间 DeleteAt time.Time `db:"delete_at" json:"deleteAt"` //分公司ID OrgID int64 `db:"org_id" json:"orgID" check:"id"` //门店ID StoreID int64 `db:"store_id" json:"storeID" check:"id"` //提交组织成员ID SubmitOrgBindID int64 `db:"submit_org_bind_id" json:"submitOrgBindID" check:"id" empty:"true"` //提交用户ID // 与组织ID二选一,如果组织成员ID为空,则使用用户ID;如果组织ID不为空,则使用组织成员ID+用户ID SubmitUserID int64 `db:"submit_user_id" json:"submitUserID" check:"id" empty:"true"` //提交人姓名 SubmitUserName string `db:"submit_user_name" json:"submitUserName" check:"des" min:"1" max:"300" empty:"true"` //审核时间 AuditAt time.Time `db:"audit_at" json:"auditAt"` //审核状态 // 0 未审核; 1 审核通过; 2 审核不通过 AuditStatus int `db:"audit_status" json:"auditStatus" check:"intThan0" empty:"true"` //审核人ID AuditOrgBindID int64 `db:"audit_org_bind_id" json:"auditOrgBindID" check:"id" empty:"true"` //审核用户ID // 与组织ID二选一,如果组织成员ID为空,则使用用户ID;如果组织ID不为空,则使用组织成员ID+用户ID AuditUserID int64 `db:"audit_user_id" json:"auditUserID" check:"id" empty:"true"` //审核人姓名 AuditUserName string `db:"audit_user_name" json:"auditUserName" check:"des" min:"1" max:"300" empty:"true"` //名称 Name string `db:"name" json:"name" check:"des" min:"1" max:"300" empty:"true"` //备注 Remark string `db:"remark" json:"remark" check:"des" min:"1" max:"1000" empty:"true"` // 用餐时间 //0 早餐; 1 午餐; 2 晚餐 DiningTime int `db:"dining_time" json:"diningTime" check:"intThan0" empty:"true"` // 用餐日期 DiningDate time.Time `db:"dining_date" json:"diningDate"` }
FieldsWeeklyRecipe 每周提交菜谱表头
func GetWeeklyRecipeByID ¶
func GetWeeklyRecipeByID(args *ArgsGetWeeklyRecipeByID) (data FieldsWeeklyRecipe, err error)
GetWeeklyRecipeByID 获取WeeklyRecipe数
func GetWeeklyRecipeList ¶
func GetWeeklyRecipeList(args *ArgsGetWeeklyRecipeList) (dataList []FieldsWeeklyRecipe, dataCount int64, err error)
GetWeeklyRecipeList 获取WeeklyRecipe列表
func GetWeeklyRecipeMargeList ¶
func GetWeeklyRecipeMargeList(args *ArgsGetWeeklyRecipeMargeList) ([]FieldsWeeklyRecipe, error)
GetWeeklyRecipeMargeList 获取指定时间段内的菜谱
type FieldsWeeklyRecipeItem ¶
type FieldsWeeklyRecipeItem struct { // ID ID int64 `db:"id" json:"id" check:"id"` //创建时间 CreateAt time.Time `db:"create_at" json:"createAt"` //更新时间 UpdateAt time.Time `db:"update_at" json:"updateAt"` //删除时间 DeleteAt time.Time `db:"delete_at" json:"deleteAt"` //分公司ID OrgID int64 `db:"org_id" json:"orgID" check:"id"` //门店ID StoreID int64 `db:"store_id" json:"storeID" check:"id"` //菜谱ID WeeklyRecipeID int64 `db:"weekly_recipe_id" json:"weeklyRecipeID" check:"id"` //菜品ID RecipeID int64 `db:"recipe_id" json:"recipeID" check:"id"` //菜品名称 Name string `db:"name" json:"name" check:"des" min:"1" max:"300" empty:"true"` //售价 Price int64 `db:"price" json:"price" check:"int64Than0"` }
FieldsWeeklyRecipeItem 每周提交菜谱表行
func GetWeeklyRecipeItemByID ¶
func GetWeeklyRecipeItemByID(args *ArgsGetWeeklyRecipeItemByID) (data FieldsWeeklyRecipeItem, err error)
GetWeeklyRecipeItemByID 获取WeeklyRecipeItem数
func GetWeeklyRecipeItemList ¶
func GetWeeklyRecipeItemList(args *ArgsGetWeeklyRecipeItemList) (dataList []FieldsWeeklyRecipeItem, dataCount int64, err error)
GetWeeklyRecipeItemList 获取WeeklyRecipeItem列表