Documentation ¶
Index ¶
- Variables
- func DeleteMission(args *ArgsDeleteMission) (err error)
- func FinishMission(args *ArgsFinishMission) (err error)
- func GetAnalysisMissionCount(args *ArgsGetAnalysis) (count int64)
- func GetAnalysisMissionRunPrice(args *ArgsGetAnalysis) (count int64)
- func GetMissionTakeCodeByID(args *ArgsGetMissionID) (code string, err error)
- func Init()
- func PayOrder(args *ArgsPayOrder) (payData FinancePay.FieldsPayType, errCode string, err error)
- func PayRunAndOrder(args *ArgsPayRunAndOrder) (payData FinancePay.FieldsPayType, errCode string, err error)
- func PayRunPay(args *ArgsPayRunPay) (payData FinancePay.FieldsPayType, errCode string, err error)
- func TakeMission(args *ArgsTakeMission) (err error)
- func UpdateMission(args *ArgsUpdateMission) (err error)
- func UpdateMissionReject(args *ArgsUpdateMissionReject) (err error)
- func UpdateMissionRunner(args *ArgsUpdateMissionRunner) (err error)
- func UpdateMissionRunnerSelf(args *ArgsUpdateMissionRunner) (err error)
- func UpdateOrderPrice(args *ArgsUpdateOrderPrice) (err error)
- func UpdateRunPayPrice(args *ArgsUpdateRunPayPrice) (err error)
- type ArgsCreateMission
- type ArgsDeleteMission
- type ArgsFinishMission
- type ArgsGetAnalysis
- type ArgsGetMissionID
- type ArgsGetMissionList
- type ArgsGetRunPrice
- type ArgsPayOrder
- type ArgsPayRunAndOrder
- type ArgsPayRunPay
- type ArgsTakeMission
- type ArgsUpdateMission
- type ArgsUpdateMissionReject
- type ArgsUpdateMissionRunner
- type ArgsUpdateOrderPrice
- type ArgsUpdateRunPayPrice
- type DataGetRunPrice
- type FieldsMission
- func CreateMission(args *ArgsCreateMission) (data FieldsMission, err error)
- func GetMissionAllInfoID(args *ArgsGetMissionID) (data FieldsMission, err error)
- func GetMissionID(args *ArgsGetMissionID) (data FieldsMission, err error)
- func GetMissionList(args *ArgsGetMissionList) (dataList []FieldsMission, dataCount int64, err error)
- type FieldsMissionLog
- type FieldsMissionLogs
Constants ¶
This section is empty.
Variables ¶
var ( //OpenSub 是否启动订阅 OpenSub = false )
跑腿服务 * 1. 用于可以申请成为跑腿人员接单 2. 用户可以在个人中心进入跑腿页面接单 3. 逻辑和配送很像,但可能只是指定某一条信息,需自行理解沟通处理 4. 支持跑腿代付、二维码付款,每次行为需记录相关证据,方便追溯关系
Functions ¶
func GetAnalysisMissionCount ¶
func GetAnalysisMissionCount(args *ArgsGetAnalysis) (count int64)
GetAnalysisMissionCount 获取时间范围内的接单量
func GetAnalysisMissionRunPrice ¶
func GetAnalysisMissionRunPrice(args *ArgsGetAnalysis) (count int64)
GetAnalysisMissionRunPrice 获取时间范围内的跑腿费用合计
func GetMissionTakeCodeByID ¶
func GetMissionTakeCodeByID(args *ArgsGetMissionID) (code string, err error)
GetMissionTakeCodeByID 获取任务领取代码
func PayOrder ¶
func PayOrder(args *ArgsPayOrder) (payData FinancePay.FieldsPayType, errCode string, err error)
PayOrder 缴纳订单费用
func PayRunAndOrder ¶
func PayRunAndOrder(args *ArgsPayRunAndOrder) (payData FinancePay.FieldsPayType, errCode string, err error)
PayRunAndOrder 融合发起支付 支付跑腿单和订单费用
func PayRunPay ¶
func PayRunPay(args *ArgsPayRunPay) (payData FinancePay.FieldsPayType, errCode string, err error)
PayRunPay 缴纳跑腿费用参数
func UpdateMissionReject ¶
func UpdateMissionReject(args *ArgsUpdateMissionReject) (err error)
UpdateMissionReject 拒绝跑腿单
func UpdateMissionRunner ¶
func UpdateMissionRunner(args *ArgsUpdateMissionRunner) (err error)
UpdateMissionRunner 分配跑腿员到任务
func UpdateMissionRunnerSelf ¶
func UpdateMissionRunnerSelf(args *ArgsUpdateMissionRunner) (err error)
UpdateMissionRunnerSelf 分配跑腿员到任务,跑腿员自己接单
func UpdateOrderPrice ¶
func UpdateOrderPrice(args *ArgsUpdateOrderPrice) (err error)
UpdateOrderPrice 修改跑腿单订单费用
func UpdateRunPayPrice ¶
func UpdateRunPayPrice(args *ArgsUpdateRunPayPrice) (err error)
UpdateRunPayPrice 修改跑腿单跑腿费用
Types ¶
type ArgsCreateMission ¶
type ArgsCreateMission struct { //跑腿单类型 // 0 帮我送 ; 1 帮我买; 2 帮我取 RunType int `db:"run_type" json:"runType" check:"intThan0" empty:"true"` //期望上门时间 WaitAt string `db:"wait_at" json:"waitAt" check:"isoTime"` //物品类型 GoodType string `db:"good_type" json:"goodType" check:"mark"` //关联组织 OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"` //关联用户 UserID int64 `db:"user_id" json:"userID" check:"id" empty:"true"` //关联订单ID // 可能没有关联订单 OrderID int64 `db:"order_id" json:"orderID" check:"id" empty:"true"` //商品等待缴纳费用 OrderWaitPrice int64 `db:"order_wait_price" json:"orderWaitPrice" check:"price" empty:"true"` //等待缴纳的费用 RunWaitPrice int64 `db:"run_wait_price" json:"runWaitPrice" check:"price" empty:"true"` //跑腿费是否货到付款 RunPayAfter bool `db:"run_pay_after" json:"runPayAfter" check:"bool"` //订单是否已经缴纳了所有费用 OrderPayAllPrice bool `json:"orderPayAllPrice" check:"bool"` //商品内容描述 OrderDes string `db:"order_des" json:"orderDes" check:"des" min:"1" max:"3000" empty:"true"` //跑腿单描述信息 Des string `db:"des" json:"des" check:"des" min:"1" max:"1200" empty:"true"` //物品重量 GoodWidget int `db:"good_widget" json:"goodWidget" check:"intThan0" empty:"true"` //发货地址 FromAddress CoreSQLAddress.FieldsAddress `db:"from_address" json:"fromAddress" check:"address_data" empty:"true"` //送货地址 ToAddress CoreSQLAddress.FieldsAddress `db:"to_address" json:"toAddress" check:"address_data" empty:"true"` //扩展参数 Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params" check:"params" empty:"true"` }
ArgsCreateMission 创建新的任务参数
type ArgsDeleteMission ¶
type ArgsDeleteMission struct { //ID ID int64 `db:"id" json:"id" check:"id"` //关联用户 UserID int64 `db:"user_id" json:"userID" check:"id" empty:"true"` }
ArgsDeleteMission 删除任务参数
type ArgsFinishMission ¶
type ArgsFinishMission struct { //ID ID int64 `db:"id" json:"id" check:"id"` //履约跑腿员 // 用户角色ID RoleID int64 `db:"role_id" json:"roleID" check:"id" empty:"true"` //是否需要取件码 NeedTakeCode bool `json:"needTakeCode" check:"mark"` //取货码 TakeCode string `json:"takeCode" check:"mark"` }
ArgsFinishMission 完成任务参数
type ArgsGetAnalysis ¶
type ArgsGetAnalysis struct { //关联组织 OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"` //关联用户 UserID int64 `db:"user_id" json:"userID" check:"id" empty:"true"` //履约跑腿员 // 用户角色ID RoleID int64 `db:"role_id" json:"roleID" check:"id" empty:"true"` //时间范围 TimeBetween CoreSQLTime2.DataCoreTime `json:"timeBetween"` }
ArgsGetAnalysis 获取统计通用参数
type ArgsGetMissionID ¶
type ArgsGetMissionID struct { //ID ID int64 `db:"id" json:"id" check:"id"` //关联组织 OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"` //关联用户 UserID int64 `db:"user_id" json:"userID" check:"id" empty:"true"` //履约跑腿员 // 用户角色ID RoleID int64 `db:"role_id" json:"roleID" check:"id" empty:"true"` }
ArgsGetMissionID 获取指定任务信息参数
type ArgsGetMissionList ¶
type ArgsGetMissionList struct { //分页 Pages CoreSQLPages.ArgsDataList `json:"pages"` //跑腿单类型 // 0 帮我送 ; 1 帮我买; 2 帮我取 RunType int `db:"run_type" json:"runType" check:"intThan0" empty:"true"` //关联组织 OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"` //用户ID // 允许为0,则该信息不属于任何用户,或不和任何用户关联 UserID int64 `db:"user_id" json:"userID" check:"id" empty:"true"` //是否完成取货 NeedIsTake bool `json:"needIsTake" check:"bool"` IsTake bool `json:"isTake" check:"bool"` //是否完成 NeedIsFinish bool `json:"needIsFinish" check:"bool"` IsFinish bool `json:"isFinish" check:"bool"` //关联订单ID // 可能没有关联订单 OrderID int64 `db:"order_id" json:"orderID" check:"id" empty:"true"` //履约跑腿员 // 用户角色ID RoleID int64 `db:"role_id" json:"roleID" check:"id" empty:"true"` //是否支付跑腿费 // 当前费用部分 NeedIsRunPay bool `json:"needIsRunPay" check:"bool"` IsRunPay bool `json:"isRunPay" check:"bool"` //是否已经支付过跑腿费 // 存在支付过的费用 NeedHaveRunPay bool `json:"needHaveRunPay" check:"bool"` HaveRunPay bool `json:"haveRunPay" check:"bool"` //是否被删除 IsRemove bool `db:"is_remove" json:"isRemove" check:"bool" empty:"true"` //搜索 Search string `json:"search" check:"search" empty:"true"` }
ArgsGetMissionList 获取任务列表参数
type ArgsGetRunPrice ¶
type ArgsGetRunPrice struct { //期望上门时间 WaitAt string `db:"wait_at" json:"waitAt" check:"isoTime"` //物品类型 // order 订单类; 其他类型需前端约定 GoodType string `db:"good_type" json:"goodType" check:"mark"` //物品重量,单位克 GoodWidget int `db:"good_widget" json:"goodWidget" check:"intThan0" empty:"true"` //发货地址 FromAddress CoreSQLAddress.FieldsAddress `db:"from_address" json:"fromAddress" check:"address_data" empty:"true"` //送货地址 ToAddress CoreSQLAddress.FieldsAddress `db:"to_address" json:"toAddress" check:"address_data" empty:"true"` }
ArgsGetRunPrice 自动计算跑腿费用参数
type ArgsPayOrder ¶
type ArgsPayOrder struct { //ID ID int64 `db:"id" json:"id" check:"id"` //关联用户 UserID int64 `db:"user_id" json:"userID" check:"id" empty:"true"` //支付方式 // 如果为退单,则为付款方式 PaymentChannel CoreSQLFrom.FieldsFrom `json:"paymentChannel"` }
ArgsPayOrder 缴纳订单费用参数
type ArgsPayRunAndOrder ¶
type ArgsPayRunAndOrder struct { //ID ID int64 `db:"id" json:"id" check:"id"` //关联用户 UserID int64 `db:"user_id" json:"userID" check:"id" empty:"true"` //支付方式 // 如果为退单,则为付款方式 PaymentChannel CoreSQLFrom.FieldsFrom `json:"paymentChannel"` }
ArgsPayRunAndOrder 融合发起支付参数
type ArgsPayRunPay ¶
type ArgsPayRunPay struct { //ID ID int64 `db:"id" json:"id" check:"id"` //关联用户 UserID int64 `db:"user_id" json:"userID" check:"id" empty:"true"` //支付方式 // 如果为退单,则为付款方式 PaymentChannel CoreSQLFrom.FieldsFrom `json:"paymentChannel"` }
ArgsPayRunPay 缴纳跑腿费用参数
type ArgsTakeMission ¶
type ArgsTakeMission struct { //ID ID int64 `db:"id" json:"id" check:"id"` //履约跑腿员 // 用户角色ID RoleID int64 `db:"role_id" json:"roleID" check:"id" empty:"true"` }
ArgsTakeMission 确认完成取货参数
type ArgsUpdateMission ¶
type ArgsUpdateMission struct { //ID ID int64 `db:"id" json:"id" check:"id"` //期望上门时间 WaitAt string `db:"wait_at" json:"waitAt" check:"isoTime"` //物品类型 GoodType string `db:"good_type" json:"goodType" check:"mark"` //取货时间 TakeAt string `db:"take_at" json:"takeAt"` //是否完结 FinishAt string `db:"finish_at" json:"finishAt"` //取货码 TakeCode string `db:"take_code" json:"takeCode"` //跑腿单类型 // 0 帮我送 ; 1 帮我买; 2 帮我取 RunType int `db:"run_type" json:"runType" check:"intThan0" empty:"true"` //关联组织 OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"` //关联用户 UserID int64 `db:"user_id" json:"userID" check:"id" empty:"true"` //关联订单ID // 可能没有关联订单 OrderID int64 `db:"order_id" json:"orderID" check:"id" empty:"true"` //履约跑腿员 // 用户角色ID RoleID int64 `db:"role_id" json:"roleID" check:"id" empty:"true"` //跑腿付费时间 RunPayAt string `db:"run_pay_at" json:"runPayAt" check:"isoTime" empty:"true"` //是否完成跑腿费支付 RunPayID int64 `db:"run_pay_id" json:"runPayID" check:"id" empty:"true"` //跑腿费用总计 // 已经支付的部分 RunPrice int64 `db:"run_price" json:"runPrice" check:"price" empty:"true"` //等待缴纳的费用 RunWaitPrice int64 `db:"run_wait_price" json:"runWaitPrice" check:"price" empty:"true"` //跑腿费是否货到付款 RunPayAfter bool `db:"run_pay_after" json:"runPayAfter" check:"bool"` //订单是否货到付款 OrderPayAfter bool `db:"order_pay_after" json:"orderPayAfter" check:"bool"` //订单费用 OrderPrice int64 `db:"order_price" json:"orderPrice" check:"price" empty:"true"` //订单是否已经支付 OrderPayAt string `db:"order_pay_at" json:"orderPayAt" check:"isoTime" empty:"true"` //订单支付ID OrderPayID int64 `db:"order_pay_id" json:"orderPayID" check:"id" empty:"true"` //跑腿单描述信息 Des string `db:"des" json:"des" check:"des" min:"1" max:"1200" empty:"true"` //跑腿单核对订单数据包 OrderDesFiles pq.Int64Array `db:"order_des_files" json:"orderDesFiles" check:"ids" empty:"true"` //跑腿单追加订单描述 OrderDes string `db:"order_des" json:"orderDes" check:"des" min:"1" max:"3000" empty:"true"` //物品重量 GoodWidget int `db:"good_widget" json:"goodWidget" check:"intThan0" empty:"true"` //发货地址 FromAddress CoreSQLAddress.FieldsAddress `db:"from_address" json:"fromAddress" check:"address_data" empty:"true"` //送货地址 ToAddress CoreSQLAddress.FieldsAddress `db:"to_address" json:"toAddress" check:"address_data" empty:"true"` //扩展参数 Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params" check:"params" empty:"true"` }
ArgsUpdateMission 修改跑腿单信息参数
type ArgsUpdateMissionReject ¶
type ArgsUpdateMissionReject struct { //ID ID int64 `db:"id" json:"id" check:"id"` //履约跑腿员 // 用户角色ID RoleID int64 `db:"role_id" json:"roleID" check:"id" empty:"true"` //描述信息 Des string `json:"des" check:"des" min:"1" max:"600" empty:"true"` }
ArgsUpdateMissionReject 拒绝跑腿单参数
type ArgsUpdateMissionRunner ¶
type ArgsUpdateMissionRunner struct { //ID ID int64 `db:"id" json:"id" check:"id"` //履约跑腿员 // 用户角色ID RoleID int64 `db:"role_id" json:"roleID" check:"id" empty:"true"` //描述信息 Des string `json:"des" check:"des" min:"1" max:"600"` }
ArgsUpdateMissionRunner 分配跑腿员到任务参数
type ArgsUpdateOrderPrice ¶
type ArgsUpdateOrderPrice struct { //ID ID int64 `db:"id" json:"id" check:"id"` //履约跑腿员 // 用户角色ID RoleID int64 `db:"role_id" json:"roleID" check:"id" empty:"true"` //订单费用 OrderPrice int64 `db:"order_price" json:"orderPrice" check:"price" empty:"true"` //跑腿单核对订单数据包 OrderDesFiles pq.Int64Array `db:"order_des_files" json:"orderDesFiles" check:"ids" empty:"true"` //跑腿单追加订单描述 OrderDes string `db:"order_des" json:"orderDes" check:"des" min:"1" max:"3000" empty:"true"` }
ArgsUpdateOrderPrice 修改跑腿单订单费用参数
type ArgsUpdateRunPayPrice ¶
type ArgsUpdateRunPayPrice struct { //ID ID int64 `db:"id" json:"id" check:"id"` //关联用户 UserID int64 `db:"user_id" json:"userID" check:"id" empty:"true"` //追加缴费的费用 Price int64 `db:"run_wait_price" json:"runWaitPrice" check:"price" empty:"true"` }
ArgsUpdateRunPayPrice 修改跑腿单跑腿费用参数
type DataGetRunPrice ¶
type DataGetRunPrice struct { //米数 BetweenM int64 `json:"betweenM"` //公里数 BetweenKM int64 `json:"betweenKM"` //距离收费 BetweenPrice int64 `json:"betweenPrice"` //重量增收费用 WidgetPrice int64 `json:"widgetPrice"` //特殊时间段追加费用 WaitPrice int64 `json:"waitPrice"` //总费用 TotalPrice int64 `json:"totalPrice"` }
func GetRunPrice ¶
func GetRunPrice(args *ArgsGetRunPrice) (data DataGetRunPrice)
GetRunPrice 自动计算跑腿费用
type FieldsMission ¶
type FieldsMission struct { //ID ID int64 `db:"id" json:"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"` //期望上门时间 WaitAt time.Time `db:"wait_at" json:"waitAt" check:"isoTime"` //物品类型 GoodType string `db:"good_type" json:"goodType" check:"mark"` //取货时间 TakeAt time.Time `db:"take_at" json:"takeAt"` //是否完结 FinishAt time.Time `db:"finish_at" json:"finishAt"` //取货码 TakeCode string `db:"take_code" json:"takeCode"` //跑腿单类型 // 0 帮我送 ; 1 帮我买; 2 帮我取 RunType int `db:"run_type" json:"runType" check:"intThan0" empty:"true"` //关联组织 OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"` //关联用户 UserID int64 `db:"user_id" json:"userID" check:"id" empty:"true"` //关联订单ID // 可能没有关联订单 OrderID int64 `db:"order_id" json:"orderID" check:"id" empty:"true"` //履约跑腿员 // 用户角色ID RoleID int64 `db:"role_id" json:"roleID" check:"id" empty:"true"` //跑腿付费时间 RunPayAt time.Time `db:"run_pay_at" json:"runPayAt" check:"isoTime" empty:"true"` //是否完成跑腿费支付 RunPayID int64 `db:"run_pay_id" json:"runPayID" check:"id" empty:"true"` //跑腿费用总计 // 已经支付的部分 RunPrice int64 `db:"run_price" json:"runPrice" check:"price" empty:"true"` //等待缴纳的费用 RunWaitPrice int64 `db:"run_wait_price" json:"runWaitPrice" check:"price" empty:"true"` //跑腿追加费用清单 // 开始的跑腿费和追加费用,都会被列入此列表 RunPayList pq.Int64Array `db:"run_pay_list" json:"runPayList" check:"ids" empty:"true"` //跑腿费是否货到付款 RunPayAfter bool `db:"run_pay_after" json:"runPayAfter" check:"bool"` //订单是否货到付款 OrderPayAfter bool `db:"order_pay_after" json:"orderPayAfter" check:"bool"` //商品等待缴纳费用 OrderWaitPrice int64 `db:"order_wait_price" json:"orderWaitPrice" check:"price" empty:"true"` //订单费用 OrderPrice int64 `db:"order_price" json:"orderPrice" check:"price" empty:"true"` //订单是否已经支付 OrderPayAt time.Time `db:"order_pay_at" json:"orderPayAt" check:"isoTime" empty:"true"` //订单支付ID // 如果>0,则关联到订单;否则其他参数将用于商品的价格等信息描述 OrderPayID int64 `db:"order_pay_id" json:"orderPayID" check:"id" empty:"true"` //平台服务费 ServicePrice int64 `db:"service_price" json:"servicePrice" check:"price"` //跑腿单描述信息 Des string `db:"des" json:"des" check:"des" min:"1" max:"1200" empty:"true"` //跑腿单核对订单数据包 OrderDesFiles pq.Int64Array `db:"order_des_files" json:"orderDesFiles" check:"ids" empty:"true"` //跑腿单追加订单描述 OrderDes string `db:"order_des" json:"orderDes" check:"des" min:"1" max:"3000" empty:"true"` //物品重量 GoodWidget int `db:"good_widget" json:"goodWidget" check:"intThan0" empty:"true"` //发货地址 FromAddress CoreSQLAddress.FieldsAddress `db:"from_address" json:"fromAddress" check:"address_data" empty:"true"` //送货地址 ToAddress CoreSQLAddress.FieldsAddress `db:"to_address" json:"toAddress" check:"address_data" empty:"true"` //日志 Logs FieldsMissionLogs `db:"logs" json:"logs"` //扩展参数 Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params" check:"params" empty:"true"` }
FieldsMission 跑腿单数据
func CreateMission ¶
func CreateMission(args *ArgsCreateMission) (data FieldsMission, err error)
CreateMission 创建新的任务
func GetMissionAllInfoID ¶
func GetMissionAllInfoID(args *ArgsGetMissionID) (data FieldsMission, err error)
GetMissionAllInfoID 获取指定任务全部信息
func GetMissionID ¶
func GetMissionID(args *ArgsGetMissionID) (data FieldsMission, err error)
GetMissionID 获取指定任务信息
func GetMissionList ¶
func GetMissionList(args *ArgsGetMissionList) (dataList []FieldsMission, dataCount int64, err error)
GetMissionList 获取任务列表
type FieldsMissionLog ¶
type FieldsMissionLog struct { //时间 CreateAt time.Time `db:"create_at" json:"createAt"` //日志描述 Des string `db:"des" json:"des" check:"des" min:"1" max:"600"` //附加文件 DesFiles pq.Int64Array `db:"des_files" json:"desFiles" check:"ids" empty:"true"` }
func (*FieldsMissionLog) Scan ¶
func (t *FieldsMissionLog) Scan(value interface{}) error
type FieldsMissionLogs ¶
type FieldsMissionLogs []FieldsMissionLog
func (*FieldsMissionLogs) Scan ¶
func (t *FieldsMissionLogs) Scan(value interface{}) error