作者 yangfu
... ... @@ -11,7 +11,6 @@ type CreateDividendsReturnedOrderCommand struct {
DividendsOrderNumber string `json:"dividendsOrderNumber"` //分红单号
OriginalOrderNum string `json:"originalOrderNum"` //源单号
OrderGoods []struct {
OrderGoodId int64 `json:"orderGoodId,string"` // 订单产品id
CooperationContractNumber string `json:"cooperationContractNumber"` //关联的共创合约编号
// OrderGoodAmount float64 `json:"orderGoodAmount"` //订单产品金额
OrderGoodName string `json:"orderGoodName"` //订单产品名称
... ...
... ... @@ -2,7 +2,6 @@ package service
import (
"strconv"
"time"
"github.com/linmadan/egglib-go/core/application"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/dividendsReturnedOrder/command"
... ... @@ -18,8 +17,7 @@ type DividendsReturnedOrderService struct {
// 创建分红退货单服务
func (dividendsReturnedOrderService *DividendsReturnedOrderService) CreateDividendsReturnedOrder(createDividendsReturnedOrderCommand *command.CreateDividendsReturnedOrderCommand) (interface{}, error) {
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(createDividendsReturnedOrderCommand.Operator)
dividendsReturnedDate := time.Unix(createDividendsReturnedOrderCommand.DividendsReturnedDate/1e3, 0)
orderDate := time.Unix(createDividendsReturnedOrderCommand.OrderTime/1e3, 0)
var orderGooods []allied_creation_cooperation.ReqDividendsReturnedOrderGood
for _, v := range createDividendsReturnedOrderCommand.OrderGoods {
good := allied_creation_cooperation.ReqDividendsReturnedOrderGood{
... ... @@ -37,8 +35,8 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) CreateDivide
DividendsOrderNumber: createDividendsReturnedOrderCommand.DividendsOrderNumber,
OriginalOrderNum: createDividendsReturnedOrderCommand.OriginalOrderNum,
OrderGoods: orderGooods,
DividendsReturnedDate: dividendsReturnedDate,
OrderTime: orderDate,
DividendsReturnedDate: createDividendsReturnedOrderCommand.DividendsReturnedDate,
OrderTime: createDividendsReturnedOrderCommand.OrderTime,
OrgId: int(createDividendsReturnedOrderCommand.Operator.OrgId),
Remarks: createDividendsReturnedOrderCommand.Remarks,
RegionName: createDividendsReturnedOrderCommand.RegionName,
... ... @@ -96,8 +94,6 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) SearchDivide
// 更新分红退货单服务
func (dividendsReturnedOrderService *DividendsReturnedOrderService) UpdateDividendsReturnedOrder(updateDividendsReturnedOrderCommand *command.UpdateDividendsReturnedOrderCommand) (interface{}, error) {
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateDividendsReturnedOrderCommand.Operator)
dividendsReturnedDate := time.Unix(updateDividendsReturnedOrderCommand.DividendsReturnedDate/1e3, 0)
orderDate := time.Unix(updateDividendsReturnedOrderCommand.OrderTime/1e3, 0)
var orderGooods []allied_creation_cooperation.ReqDividendsReturnedOrderGood
for _, v := range updateDividendsReturnedOrderCommand.OrderGoods {
good := allied_creation_cooperation.ReqDividendsReturnedOrderGood{
... ... @@ -116,8 +112,8 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) UpdateDivide
DividendsOrderNumber: updateDividendsReturnedOrderCommand.DividendsOrderNumber,
OriginalOrderNum: updateDividendsReturnedOrderCommand.OriginalOrderNum,
OrderGoods: orderGooods,
DividendsReturnedDate: dividendsReturnedDate,
OrderTime: orderDate,
DividendsReturnedDate: updateDividendsReturnedOrderCommand.DividendsReturnedDate,
OrderTime: updateDividendsReturnedOrderCommand.OrderTime,
OrgId: int(updateDividendsReturnedOrderCommand.Operator.OrgId),
Remarks: updateDividendsReturnedOrderCommand.Remarks,
RegionName: updateDividendsReturnedOrderCommand.RegionName,
... ...
... ... @@ -24,6 +24,8 @@ func (noticeSettingService *NoticeSettingService) NoticeSettingList(noticeSettin
creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(
noticeSettingListQuery.Operator,
)
var orgIds []int
if len(noticeSettingListQuery.OrgName) > 0 {
orgResult, err := creationUserGateway.OrgSearch(allied_creation_user.ReqOrgSearch{
Offset: 1,
Limit: 20,
... ... @@ -39,10 +41,11 @@ func (noticeSettingService *NoticeSettingService) NoticeSettingList(noticeSettin
if len(orgResult.Orgs) == 0 {
return 0, []dto.NoticeSettingItem{}, nil
}
var orgIds []int
for _, v := range orgResult.Orgs {
orgIds = append(orgIds, v.OrgID)
}
}
result, err := creationBasicGateway.NoticeSettingSearch(allied_creation_basic.ReqNoticeSettingSearch{
PageIndex: noticeSettingListQuery.PageNumber,
PageSize: noticeSettingListQuery.PageSize,
... ...
... ... @@ -206,8 +206,9 @@ func (gateway HttplibAlliedCreationCooperation) DividendsOrderGet(param ReqDivid
if len(param.DividendsOrderNumber) > 0 {
req.Param("dividendsOrderNumber", param.DividendsOrderNumber)
}
fmt.Printf("=========>param %+v", param)
log.Logger.Debug("向业务模块请求数据:返回分红订单详情。", map[string]interface{}{
"api": method + ":" + url,
"api": method + ":" + req.GetRequest().URL.String(),
"param": param,
})
req, err := req.JSONBody(param)
... ...
... ... @@ -227,7 +227,7 @@ type (
DividendsEstimateIds []string `json:"dividendsEstimateIds"`
}
DataDividendsEstimateBatchCancel struct {
DataDividendsEstimateBatchCancel []struct {
}
)
... ...
... ... @@ -61,8 +61,8 @@ type (
DividendsOrderNumber string `json:"dividendsOrderNumber"` //分红单号
OriginalOrderNum string `json:"originalOrderNum"`
OrderGoods []ReqDividendsReturnedOrderGood `json:"orderGoods"`
DividendsReturnedDate time.Time `json:"dividendsReturnedDate"`
OrderTime time.Time `json:"orderTime"`
DividendsReturnedDate int64 `json:"dividendsReturnedDate,string"`
OrderTime int64 `json:"orderTime,string"`
OrgId int `json:"orgId"`
Remarks string `json:"remarks"`
RegionName string `json:"regionName"`
... ... @@ -81,8 +81,8 @@ type (
DividendsOrderNumber string `json:"dividendsOrderNumber"` //分红单号
OriginalOrderNum string `json:"originalOrderNum"`
OrderGoods []ReqDividendsReturnedOrderGood `json:"orderGoods"`
DividendsReturnedDate time.Time `json:"dividendsReturnedDate"`
OrderTime time.Time `json:"orderTime"`
DividendsReturnedDate int64 `json:"dividendsReturnedDate,string"`
OrderTime int64 `json:"orderTime,string"`
OrgId int `json:"orgId"`
Remarks string `json:"remarks"`
RegionName string `json:"regionName"`
... ...
... ... @@ -2,6 +2,9 @@ package controllers
import (
"fmt"
"io"
"path/filepath"
"github.com/linmadan/egglib-go/core/application"
"github.com/linmadan/egglib-go/utils/json"
"github.com/linmadan/egglib-go/web/beego"
... ... @@ -9,8 +12,6 @@ import (
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/port/beego/middleware"
"io"
"path/filepath"
)
type BaseController struct {
... ... @@ -59,21 +60,21 @@ func (controller *BaseController) Response(data interface{}, err error) {
controller.ServeJSON()
}
func (controller *BaseController) GetUserId() int64 {
return 1
}
// func (controller *BaseController) GetUserId() int64 {
// return 1
// }
func (controller *BaseController) GetCompanyId() int64 {
return 1
}
// func (controller *BaseController) GetCompanyId() int64 {
// return 1
// }
func (controller *BaseController) GetUserBaseId() int64 {
return 1
}
// func (controller *BaseController) GetUserBaseId() int64 {
// return 1
// }
func (controller *BaseController) GetOrgId() int64 {
return 1
}
// func (controller *BaseController) GetOrgId() int64 {
// return 1
// }
func (controller *BaseController) GetOperator() domain.Operator {
token := controller.Ctx.Input.Header("X-Mmm-Accesstoken")
... ...