diff --git a/app/admin/hdl/enterprise_manage/hdl_central_kitchen_for_school.go b/app/admin/hdl/enterprise_manage/hdl_central_kitchen_for_school.go index a993c7e..5a98173 100644 --- a/app/admin/hdl/enterprise_manage/hdl_central_kitchen_for_school.go +++ b/app/admin/hdl/enterprise_manage/hdl_central_kitchen_for_school.go @@ -727,9 +727,9 @@ func GetBasicCentralKitchenForSchool(c *gin.Context) { if spec == nil { spec = &model.CentralKitchenForSchoolWithSpec{ EnterpriseId: enterpriseId, - IsOpenBreakfast: 0, - IsOpenLunch: 0, - IsOpenDinner: 0, + IsOpenBreakfast: 1, + IsOpenLunch: 1, + IsOpenDinner: 1, BreakfastUnitPrice: "0", LunchUnitPrice: "0", DinnerUnitPrice: "0", diff --git a/app/admin/svc/svc_central_kitchen_for_school_package.go b/app/admin/svc/svc_central_kitchen_for_school_package.go index 71c2adf..f7440ef 100644 --- a/app/admin/svc/svc_central_kitchen_for_school_package.go +++ b/app/admin/svc/svc_central_kitchen_for_school_package.go @@ -24,14 +24,14 @@ func AddCentralKitchenForSchoolPackage(req md.SaveCentralKitchenForSchoolPackage return errors.New("请勿重复添加【" + req.Month + "】套餐") } - //1、查询`central_kitchen_for_school_with_spec` - centralKitchenForSchoolWithSpec := db.CentralKitchenForSchoolWithSpec{} - centralKitchenForSchoolWithSpec.Set(req.EnterpriseId) - spec, err := centralKitchenForSchoolWithSpec.GetCentralKitchenForSchoolWithSpec() - if err != nil { - _ = session.Rollback() - return err - } + ////1、查询`central_kitchen_for_school_with_spec` + //centralKitchenForSchoolWithSpec := db.CentralKitchenForSchoolWithSpec{} + //centralKitchenForSchoolWithSpec.Set(req.EnterpriseId) + //spec, err := centralKitchenForSchoolWithSpec.GetCentralKitchenForSchoolWithSpec() + //if err != nil { + // _ = session.Rollback() + // return err + //} //1、新增`central_kitchen_for_school_package` packageId, err := centralKitchenForSchoolPackageDb.CentralKitchenForSchoolPackageInsertBySession(session, &model.CentralKitchenForSchoolPackage{ EnterpriseId: req.EnterpriseId, @@ -53,13 +53,13 @@ func AddCentralKitchenForSchoolPackage(req md.SaveCentralKitchenForSchoolPackage var centralKitchenForSchoolPackageWithDays []*model.CentralKitchenForSchoolPackageWithDay for _, v := range req.DateList { var isOpenBreakfast, isOpenLunch, isOpenDinner, isOpenReplenish = md.CloseBreakfast, md.CloseLunch, md.CloseDinner, md.CloseReplenish - if spec.IsOpenBreakfast == md.OpenBreakfast && v.IsOpenBreakfast == md.OpenBreakfast { + if v.IsOpenBreakfast == md.OpenBreakfast { isOpenBreakfast = md.OpenBreakfast } - if spec.IsOpenLunch == md.OpenLunch && v.IsOpenLunch == md.OpenLunch { + if v.IsOpenLunch == md.OpenLunch { isOpenLunch = md.OpenLunch } - if spec.IsOpenDinner == md.OpenDinner && v.IsOpenDinner == md.OpenDinner { + if v.IsOpenDinner == md.OpenDinner { isOpenDinner = md.OpenDinner } if v.IsOpenReplenish == md.OpenReplenish { @@ -89,14 +89,14 @@ func UpdateCentralKitchenForSchoolPackage(req md.SaveCentralKitchenForSchoolPack defer session.Close() session.Begin() now := time.Now() - //1、查询`central_kitchen_for_school_with_spec` - centralKitchenForSchoolWithSpec := db.CentralKitchenForSchoolWithSpec{} - centralKitchenForSchoolWithSpec.Set(req.EnterpriseId) - spec, err := centralKitchenForSchoolWithSpec.GetCentralKitchenForSchoolWithSpec() - if err != nil { - _ = session.Rollback() - return err - } + ////1、查询`central_kitchen_for_school_with_spec` + //centralKitchenForSchoolWithSpec := db.CentralKitchenForSchoolWithSpec{} + //centralKitchenForSchoolWithSpec.Set(req.EnterpriseId) + //spec, err := centralKitchenForSchoolWithSpec.GetCentralKitchenForSchoolWithSpec() + //if err != nil { + // _ = session.Rollback() + // return err + //} //2、修改`central_kitchen_for_school_package` centralKitchenForSchoolPackageDb := db.CentralKitchenForSchoolPackageDb{} centralKitchenForSchoolPackageDb.Set() @@ -138,13 +138,13 @@ func UpdateCentralKitchenForSchoolPackage(req md.SaveCentralKitchenForSchoolPack var centralKitchenForSchoolPackageWithDays []*model.CentralKitchenForSchoolPackageWithDay for _, v := range req.DateList { var isOpenBreakfast, isOpenLunch, isOpenDinner, isOpenReplenish = md.CloseBreakfast, md.CloseLunch, md.CloseDinner, md.CloseReplenish - if spec.IsOpenBreakfast == md.OpenBreakfast && v.IsOpenBreakfast == md.OpenBreakfast { + if v.IsOpenBreakfast == md.OpenBreakfast { isOpenBreakfast = md.OpenBreakfast } - if spec.IsOpenLunch == md.OpenLunch && v.IsOpenLunch == md.OpenLunch { + if v.IsOpenLunch == md.OpenLunch { isOpenLunch = md.OpenLunch } - if spec.IsOpenDinner == md.OpenDinner && v.IsOpenDinner == md.OpenDinner { + if v.IsOpenDinner == md.OpenDinner { isOpenDinner = md.OpenDinner } if v.IsOpenReplenish == md.OpenReplenish { diff --git a/app/admin/svc/svc_central_kitchen_for_school_package_for_system.go b/app/admin/svc/svc_central_kitchen_for_school_package_for_system.go index c065e4e..5839827 100644 --- a/app/admin/svc/svc_central_kitchen_for_school_package_for_system.go +++ b/app/admin/svc/svc_central_kitchen_for_school_package_for_system.go @@ -140,13 +140,13 @@ func SyncCentralKitchenForSchoolPackageForSystem(req md.SyncCentralKitchenForSch var centralKitchenForSchoolPackageWithDays []*model.CentralKitchenForSchoolPackageWithDay for _, v := range withDate { var isOpenBreakfast, isOpenLunch, isOpenDinner, isOpenReplenish = md.CloseBreakfast, md.CloseLunch, md.CloseDinner, md.CloseReplenish - if spec.IsOpenBreakfast == md.OpenBreakfast && v.IsOpenBreakfast == md.OpenBreakfast { + if v.IsOpenBreakfast == md.OpenBreakfast { isOpenBreakfast = md.OpenBreakfast } - if spec.IsOpenLunch == md.OpenLunch && v.IsOpenLunch == md.OpenLunch { + if v.IsOpenLunch == md.OpenLunch { isOpenLunch = md.OpenLunch } - if spec.IsOpenDinner == md.OpenDinner && v.IsOpenDinner == md.OpenDinner { + if v.IsOpenDinner == md.OpenDinner { isOpenDinner = md.OpenDinner } if v.IsOpenReplenish == md.OpenReplenish { diff --git a/app/svc/svc_wx_pay.go b/app/svc/svc_wx_pay.go index cc0e5d6..e762af0 100644 --- a/app/svc/svc_wx_pay.go +++ b/app/svc/svc_wx_pay.go @@ -12,10 +12,10 @@ import ( func NewWxPayClient(ctx *gin.Context) (client *core.Client, err error) { sysCfgDb := db.SysCfgDb{} sysCfgDb.Set() - sysCfg := sysCfgDb.SysCfgFindWithDb(enum.WxSpAppId, enum.WxSpMchApiV3Key, enum.WxSpMchCertificateSerialNumber) + sysCfg := sysCfgDb.SysCfgFindWithDb(enum.WxSpMchId, enum.WxSpMchApiV3Key, enum.WxSpMchCertificateSerialNumber) var ( - mchID string = sysCfg[enum.WxSpAppId] // 商户号 + mchID string = sysCfg[enum.WxSpMchId] // 商户号 mchCertificateSerialNumber string = sysCfg[enum.WxSpMchCertificateSerialNumber] // 商户证书序列号 mchAPIv3Key string = sysCfg[enum.WxSpMchApiV3Key] // 商户APIv3密钥 )