Revert "修改售后状态"

This reverts commit e9fbd33ee6.
master
datang 3 years ago
parent e9fbd33ee6
commit df2e16f888

@ -49,10 +49,10 @@ func QueryAfterSalesGoodsList(c *gin.Context) {
//p.Type=1未完结2已完成
//默认获取未完结的售后订单
if p.Type == 1 {
p.ReturnStatus = []uint{1, 3, 4}
} else if p.Type == 2 {
p.ReturnStatus = []uint{2, 5, 6}
if p.Type == 2 {
p.ReturnStatus = []uint{5}
} else if p.Type == 1 {
p.ReturnStatus = []uint{1, 2, 3, 4, 6}
} else {
p.ReturnStatus = []uint{1, 2, 3, 4, 5, 6}
}

@ -41,19 +41,19 @@ func SetupMysql() {
log.Println("当前为正式数据库")
} else {
//c = &MysqlConfig{
// Dsn: "db_recook_v2:H6568h4Y7BDsWcYe@tcp(127.0.0.1:3306)/db_recook_v2?timeout=3s&readTimeout=3s&writeTimeout=3s&parseTime=true&loc=Local&charset=utf8mb4,utf8",
// Idle: 10,
// Active: 500,
//}
//log.Println("当前为测试数据库")
c = &MysqlConfig{
Dsn: "root:123123@tcp(127.0.0.1:3306)/db_recook_v2?timeout=3s&readTimeout=3s&writeTimeout=3s&parseTime=true&loc=Local&charset=utf8mb4,utf8",
Dsn: "db_recook_v2:H6568h4Y7BDsWcYe@tcp(127.0.0.1:3306)/db_recook_v2?timeout=3s&readTimeout=3s&writeTimeout=3s&parseTime=true&loc=Local&charset=utf8mb4,utf8",
Idle: 10,
Active: 50,
Active: 500,
}
log.Println("当前为本地数据库")
log.Println("当前为测试数据库")
//c = &MysqlConfig{
// Dsn: "root:root@tcp(127.0.0.1:3306)/recook?timeout=3s&readTimeout=3s&writeTimeout=3s&parseTime=true&loc=Local&charset=utf8mb4,utf8",
// Idle: 10,
// Active: 50,
//}
//log.Println("当前为本地数据库")
}
@ -97,8 +97,8 @@ func SetupNewMysql() {
}
} else {
err := mysql2.InitMysql(&mysql2.DbConfig{
Username: "root",
Password: "123123",
Username: "db_recook_v2",
Password: "H6568h4Y7BDsWcYe",
Host: "127.0.0.1",
Port: 3306,
Extend: "timeout=3s&readTimeout=3s&writeTimeout=3s&parseTime=true&loc=Local&charset=utf8mb4,utf8\n",

@ -520,7 +520,7 @@ func Refund(tx *gorm.DB, asGoods after.RecookAfterSalesGoodsModel, orderInfo man
if err := tx.Model(&asGoods).Updates(after.RecookAfterSalesGoodsModel{
ReturnStatus: 5,
RefundStatus: 2,
RefundStatus: 1,
CheckTime: formatime.NewSecondNow(),
SupplierPrice: q.SupplierPrice,
}).Error; err != nil {
@ -802,7 +802,7 @@ func (o afterLogic) ReviewReturnAfter(q *UpdateOrderCheckStatusReq, user manage2
{
if err := tx.Model(&asGoods).Updates(after.RecookAfterSalesGoodsModel{
ReturnStatus: 5,
RefundStatus: 2,
RefundStatus: 1,
}).Error; err != nil {
tx.Rollback()
return err

@ -45,7 +45,7 @@ type RecookAfterSalesGoodsModel struct {
ExpressFree decimal.Decimal `gorm:"column:express_free" json:"expressFree"` //运费补偿
ExpressTime formatime.Second `gorm:"column:express_time" json:"expressTime"`
RefundNo string `gorm:"column:refund_no" json:"refundNo"`
RefundStatus uint `gorm:"column:refund_status" json:"refundStatus"` //0正常1退款中2退款完成
RefundStatus uint `gorm:"column:refund_status" json:"refundStatus"`
FinishTime formatime.Second `gorm:"column:finish_time" json:"finishTime"`
CreatedAt formatime.Second `gorm:"column:created_at" json:"createdAt"`
IsClosed int `gorm:"is_closed" json:"isClosed"`

BIN
recook

Binary file not shown.
Loading…
Cancel
Save