作者 yangfu

分红订单修改/提示语优化

... ... @@ -87,6 +87,7 @@ func DividendOrders(header *protocol.RequestHeader, request *protocol.DividendOr
rsp = &protocol.DividendOrdersResponse{List: make([]*protocol.DividendOrderListItem, 0)}
count, orders, err = OrderDao.DividendOrders(&domain.DividendOrdersQueryOption{
OrderType: domain.OrderReal,
PartnerId: header.UserId,
DetailAction: request.DetailAction,
DividendAction: request.DividendAction,
... ...
... ... @@ -127,7 +127,7 @@ func (m *Order) OrderAmountCancel() float64 {
if m.OrderAmount <= m.OrderActualAmount {
return 0
}
return utils.Decimal((m.OrderAmount - m.OrderActualAmount))
return utils.Decimal(m.OrderAmount - m.OrderActualAmount)
}
//订单是否已读
... ... @@ -152,6 +152,7 @@ type OrderQueryOption struct {
type DividendOrdersQueryOption struct {
PartnerId int64 `json:"partnerId"`
OrderType int `json:"orderType"` //订单类型
DetailAction int `json:"detailAction"` //明细类型(0已收明细、1未收明细)
DividendAction int `json:"dividendAction"` //分红类型(0累计分红、1分红支出)
StartTime int64 `json:"startTime" `
... ...
... ... @@ -49,6 +49,9 @@ func (dao *OrderDao) DividendOrders(option *domain.DividendOrdersQueryOption) (c
q := tx.Model(&orders)
q.Column(`order.id`, `order.order_code`, `order.order_actual_amount`, `order.partner_bonus_percent`)
//q.Where(`"order".order_status >=?`, domain.OrderStatusDeliverSome) //已经发货
if option.OrderType > 0 {
q.Where(`"order".order_type=?`, option.OrderType)
}
if option.PartnerId > 0 {
q.Where(`"order".partner_id=?`, option.PartnerId)
}
... ...
... ... @@ -26,7 +26,7 @@ type Order struct {
//订单实际金额
OrderActualAmount float64
//订单已支付金额(货款)
OrderPaymentAmount float64
OrderPaymentAmount float64 `pg:",notnull,default:0"`
//订单区域信息
OrderRegionInfo *domain.RegionInfo
... ...
... ... @@ -13,7 +13,7 @@ var errmessge ErrorMap = map[int]string{
1012: "请输入正确的验证码",
1013: "凭证已失效,请重新操作",
2002: "您还不是正式用户,请联系管理员",
2002: "当前账号已被禁用",
2021: "登录失败,手机号或密码错误",
2025: "短信验证码验证失败",
2026: "新密码与确认密码不一致",
... ...