DengBiao пре 8 месеци
родитељ
комит
dc233b38db
4 измењених фајлова са 52 додато и 0 уклоњено
  1. +10
    -0
      app/admin/hdl/enterprise_manage/hdl_central_kitchen_for_school.go
  2. +36
    -0
      app/admin/hdl/hdl_demo.go
  3. +2
    -0
      app/admin/md/md_enterprise_manage.go
  4. +4
    -0
      app/admin/svc/enterprise_manage/svc_central_kitchen_for_school.go

+ 10
- 0
app/admin/hdl/enterprise_manage/hdl_central_kitchen_for_school.go Прегледај датотеку

@@ -860,6 +860,16 @@ func CentralKitchenForSchoolOrdList(c *gin.Context) {
"value": "4",
},
},
"pay_way_list": []map[string]interface{}{
{
"name": "支付宝",
"value": 1,
},
{
"name": "微信",
"value": 2,
},
},
"state_list": []map[string]interface{}{
{
"name": enum.CentralKitchenForSchoolPackageOrdState.String(enum.CentralKitchenForSchoolPackageOrdStateForWait),


+ 36
- 0
app/admin/hdl/hdl_demo.go Прегледај датотеку

@@ -22,6 +22,42 @@ import (

// Demo 测试
func Demo(c *gin.Context) {
var m []model.CentralKitchenForSchoolUserWithDay
eg := db.Db
if err1 := eg.Where("state = 3").Asc("id").Find(&m); err1 != nil {
e.OutErr(c, e.ERR, err1.Error())
return
}
now := time.Now()
var records []int
for _, v := range m {
mm := new(model.CentralKitchenForSchoolUserRefundDay)
has, err := db.Db.Where("records_id =? and state = 1", v.Id).Get(mm)
if err != nil {
fmt.Println(err)
return
}
if has == false {
centralKitchenForSchoolUserRefundDayDb := db.CentralKitchenForSchoolUserRefundDayDb{}
centralKitchenForSchoolUserRefundDayDb.Set(0)
_, err = centralKitchenForSchoolUserRefundDayDb.CentralKitchenForSchoolUserRefundDayInsert(&model.CentralKitchenForSchoolUserRefundDay{
OutTradeNo: v.OrdNo,
OutRequestNo: "",
Uid: v.Uid,
IdentityId: v.IdentityId,
RecordsId: v.Id,
State: enum.CentralKitchenForSchoolUserRefundDayStateForAuditing,
Amount: v.Amount,
Memo: "fill",
CreateAt: now.Format("2006-01-02 15:04:05"),
UpdateAt: now.Format("2006-01-02 15:04:05"),
})
records = append(records, v.Id)
}
}
e.OutSuc(c, records, nil)
return

var req md.CentralKitchenForSchoolOrderRefundAuditReq
err := c.ShouldBindJSON(&req)
if err != nil {


+ 2
- 0
app/admin/md/md_enterprise_manage.go Прегледај датотеку

@@ -231,6 +231,7 @@ type CentralKitchenForSchoolOrdListResp struct {
TradeNo string `json:"trade_no"`
State int `json:"state"`
OrdState int `json:"ord_state"`
PayWay int `json:"pay_way"`
CreateAt string `json:"create_at"`
Phone string `json:"phone" label:"家长联系电话"`
Name string `json:"name" label:"姓名"`
@@ -251,6 +252,7 @@ type CentralKitchenForSchoolOrdListReq struct {
EnterPriseKind int `json:"enterprise_kind" label:"校企类型"`
Sate int `json:"state" label:"支付状态"`
OrdSate int `json:"ord_state" label:"订单状态"`
PayWay int `json:"pay_way" label:"支付方式(1:支付宝 2:微信)"`
GradeId int `json:"grade_id" label:"年级id"`
ClassId int `json:"class_id" label:"班级id"`
Phone string `json:"phone" label:"家长联系电话"`


+ 4
- 0
app/admin/svc/enterprise_manage/svc_central_kitchen_for_school.go Прегледај датотеку

@@ -656,6 +656,9 @@ func CentralKitchenForSchoolOrdList(req md.CentralKitchenForSchoolOrdListReq) (r
if req.OrdSate != -1 {
sess.And("central_kitchen_for_school_package_ord.ord_state = ?", req.OrdSate)
}
if req.PayWay != 0 {
sess.And("central_kitchen_for_school_package_ord.pay_way = ?", req.PayWay)
}
if req.OutTradeNo != "" {
sess.And("central_kitchen_for_school_package_ord.out_trade_no like ?", "%"+req.OutTradeNo+"%")
}
@@ -715,6 +718,7 @@ func CentralKitchenForSchoolOrdList(req md.CentralKitchenForSchoolOrdListReq) (r
TradeNo: v.CentralKitchenForSchoolPackageOrd.TradeNo,
State: v.CentralKitchenForSchoolPackageOrd.State,
OrdState: v.CentralKitchenForSchoolPackageOrd.OrdState,
PayWay: v.CentralKitchenForSchoolPackageOrd.PayWay,
CreateAt: v.CentralKitchenForSchoolPackageOrd.CreateAt,
Phone: v.User.Phone,
Name: v.UserIdentity.Name,


Loading…
Откажи
Сачувај