From 9de70d4e8d669eafc7b7903b836d768555c42fd3 Mon Sep 17 00:00:00 2001 From: howell <2827207845@qq.com> Date: Thu, 13 Jan 2022 10:47:05 +0800 Subject: [PATCH] refactor: fmt --- configs/config.go | 1 - internal/api/manage/diamond_register/query.go | 4 ++-- .../order_preview/shopping_trolley_create.go | 2 +- internal/api/mobile/pay/alipay/create.go | 3 +-- internal/api/mobile/pay/alipay/h5_create.go | 8 ++------ .../api/mobile/pay/alipay/pay_callback.go | 3 +-- internal/api/mobile/pay/alipay/refund.go | 2 +- .../api/mobile/pay/public/refund_success.go | 2 +- internal/api/mobile/pay/recookpay/refund.go | 1 - internal/api/mobile/pay/unionpay/unionpay.go | 2 +- .../api/mobile/pay/wxh5pay/refund_callback.go | 1 - internal/api/mobile/pay/wxminipay/create.go | 3 +-- .../api/mobile/pay/wxminipay/pay_callback.go | 2 +- internal/api/mobile/users/update.go | 1 - internal/libs/images/images.go | 4 ++-- internal/libs/weibo/weibo.go | 2 +- internal/model/user/diamond_register.go | 2 +- internal/mq/mq.go | 4 ++-- internal/service/app/shop/benefit.go | 2 +- .../v2/controller/app/kingkong/kingkong.go | 2 -- internal/v2/controller/app/user/operate.go | 2 +- internal/v2/controller/manage/gys/company.go | 1 - internal/v2/controller/manage/gys/list.go | 20 +++++++++---------- .../supplier/qualification/operate.go | 2 +- internal/v2/controller/task/goods.go | 3 +-- internal/v2/lib/common/time.go | 2 +- internal/v2/lib/excel/attr.go | 1 - internal/v2/logic/manage/after/after.go | 2 +- internal/v2/logic/pay/recook/refund.go | 1 - internal/v2/logic/pay/union/refund.go | 2 +- internal/v2/logic/supplier/after/addr.go | 2 +- .../gys/enterprise/gysCompanyCreditCode.go | 2 +- .../gys/enterprise/gysEnterpriseSector.go | 2 +- internal/v2/model/http/goods/receiver.go | 2 +- internal/v2/model/jst/jstExpressCompany.go | 2 +- .../v2/model/recook/coin/recookCoinHistory.go | 2 +- .../recook/goods/recookGoodsDetailPhoto.go | 6 +++--- .../order/recookOrderGoodsDetailLogs.go | 2 +- internal/v2/router/task.go | 8 ++++---- tools/hash.go | 2 +- 40 files changed, 50 insertions(+), 67 deletions(-) diff --git a/configs/config.go b/configs/config.go index 7d885bf..882c1fa 100644 --- a/configs/config.go +++ b/configs/config.go @@ -191,7 +191,6 @@ const ( ConfigJCookMqHost = "jcook.com.cn" ConfigJCookMqPort = "5672" - ConfigShaMaAppKey = "64f70e023a32e058a565650d74d44a7d" ConfigShaMaAppSecret = "ca5f6cc561672968fab36c825fc78385" ConfigShaMaAppChannelID = 1010273 diff --git a/internal/api/manage/diamond_register/query.go b/internal/api/manage/diamond_register/query.go index 053a00c..9ea1eb2 100644 --- a/internal/api/manage/diamond_register/query.go +++ b/internal/api/manage/diamond_register/query.go @@ -40,9 +40,9 @@ func QueryDiamondList(c *gin.Context) { var list []user.DiamondRegister dbc.DB.Where(where).Limit(limit).Offset((page.Page) * limit).Find(&list) dbc.DB.Table("recook_diamond_register").Where(where).Count(&count) - for key,_info := range list{ + for key, _info := range list { userInfo := user.Information{} - dbc.DB.Where("id = ?",_info.IntroUserId).First(&userInfo) + dbc.DB.Where("id = ?", _info.IntroUserId).First(&userInfo) list[key].IntroUserInfo = userInfo } back.Suc(c, "", &BaseResponse{ diff --git a/internal/api/mobile/order_preview/shopping_trolley_create.go b/internal/api/mobile/order_preview/shopping_trolley_create.go index 3f2c904..7f94645 100755 --- a/internal/api/mobile/order_preview/shopping_trolley_create.go +++ b/internal/api/mobile/order_preview/shopping_trolley_create.go @@ -244,7 +244,7 @@ func CreatePreviewShoppingTrolleyOrder(c *gin.Context) { } if IsAddrDelivery { // 如果是发货地区,计算每个商品的 for _, v := range preOrderGoodsList { // 如果该地区不发货,不用计算运费了 - if v.VendorID == 1800 || v.VendorID == 2000 || v.VendorID == 3000{ + if v.VendorID == 1800 || v.VendorID == 2000 || v.VendorID == 3000 { continue } _, expressFee, _ := computeExpressFeeWithPreviewGoods(v.Quantity, v, defaultAddr.Province, defaultAddr.City) diff --git a/internal/api/mobile/pay/alipay/create.go b/internal/api/mobile/pay/alipay/create.go index 539426e..40a9737 100755 --- a/internal/api/mobile/pay/alipay/create.go +++ b/internal/api/mobile/pay/alipay/create.go @@ -57,8 +57,7 @@ func createOrder(virtualID uint, ip string, userID uint) (error, string) { } var detail pay.AliPayDetail - if err := dbc.DB.First(&detail, "order_id = ?", virtualID).Error; - err != nil && err != gorm.ErrRecordNotFound { + if err := dbc.DB.First(&detail, "order_id = ?", virtualID).Error; err != nil && err != gorm.ErrRecordNotFound { return err, "" } diff --git a/internal/api/mobile/pay/alipay/h5_create.go b/internal/api/mobile/pay/alipay/h5_create.go index 74a3e38..84dbc2a 100644 --- a/internal/api/mobile/pay/alipay/h5_create.go +++ b/internal/api/mobile/pay/alipay/h5_create.go @@ -77,8 +77,7 @@ func createH5Order(orderID uint, ip string, userID uint) (error, string) { tx.Commit() return nil, detail.CreateOrderSign } else { - if url, tradeNo, err := genUrl(od[0].Title, userID, orderID, amount); - err != nil { + if url, tradeNo, err := genUrl(od[0].Title, userID, orderID, amount); err != nil { return errors.New("失败"), "" } else { tx := dbc.DB.Begin() @@ -133,13 +132,11 @@ func CreateH5Alipay(c *gin.Context) { } } - if err = public.UpdateNormalPay(p.OrderID); err != nil { back.Err(c, err.Error()) return } - now := time.Now().Unix() var orderInfo order.Information @@ -186,8 +183,7 @@ func CreateH5Alipay(c *gin.Context) { } } else { - if url, tradeNo, err := genUrl(orderInfo.Title, p.UserID, orderInfo.ID, orderInfo.ActualTotalAmount); - err != nil { + if url, tradeNo, err := genUrl(orderInfo.Title, p.UserID, orderInfo.ID, orderInfo.ActualTotalAmount); err != nil { back.Fail(c, "失败") } else { err = dbc.DB.Model(&orderInfo).Updates(order.Information{ diff --git a/internal/api/mobile/pay/alipay/pay_callback.go b/internal/api/mobile/pay/alipay/pay_callback.go index 2943497..1b2161a 100755 --- a/internal/api/mobile/pay/alipay/pay_callback.go +++ b/internal/api/mobile/pay/alipay/pay_callback.go @@ -184,7 +184,6 @@ func H5Callback(c *gin.Context) { return } - if result.IsPayNotify() { h5PaySuccess(c, result) } else { @@ -240,4 +239,4 @@ func h5PaySuccess(c *gin.Context, result PayCallbackNotification) { c.Set("status", "SyncOrder") c.Set("id", orderInfo.ID) c.String(200, "success") -} \ No newline at end of file +} diff --git a/internal/api/mobile/pay/alipay/refund.go b/internal/api/mobile/pay/alipay/refund.go index 17658d6..e9800b2 100755 --- a/internal/api/mobile/pay/alipay/refund.go +++ b/internal/api/mobile/pay/alipay/refund.go @@ -1 +1 @@ -package alipay \ No newline at end of file +package alipay diff --git a/internal/api/mobile/pay/public/refund_success.go b/internal/api/mobile/pay/public/refund_success.go index 768b911..9fd24e5 100755 --- a/internal/api/mobile/pay/public/refund_success.go +++ b/internal/api/mobile/pay/public/refund_success.go @@ -1 +1 @@ -package public \ No newline at end of file +package public diff --git a/internal/api/mobile/pay/recookpay/refund.go b/internal/api/mobile/pay/recookpay/refund.go index 6cb4fb6..ae16f50 100755 --- a/internal/api/mobile/pay/recookpay/refund.go +++ b/internal/api/mobile/pay/recookpay/refund.go @@ -1,2 +1 @@ package recookpay - diff --git a/internal/api/mobile/pay/unionpay/unionpay.go b/internal/api/mobile/pay/unionpay/unionpay.go index dc44781..e476b82 100644 --- a/internal/api/mobile/pay/unionpay/unionpay.go +++ b/internal/api/mobile/pay/unionpay/unionpay.go @@ -1 +1 @@ -package unionpay \ No newline at end of file +package unionpay diff --git a/internal/api/mobile/pay/wxh5pay/refund_callback.go b/internal/api/mobile/pay/wxh5pay/refund_callback.go index f9060b5..c4c5a6e 100755 --- a/internal/api/mobile/pay/wxh5pay/refund_callback.go +++ b/internal/api/mobile/pay/wxh5pay/refund_callback.go @@ -34,7 +34,6 @@ func (r *RefundReqInfo) IsOk() bool { return r.RefundStatus == "SUCCESS" } - func RefundCallback(c *gin.Context) { FAIL := gin.H{ "return_code": "FAIL", diff --git a/internal/api/mobile/pay/wxminipay/create.go b/internal/api/mobile/pay/wxminipay/create.go index 3454a82..0503d57 100755 --- a/internal/api/mobile/pay/wxminipay/create.go +++ b/internal/api/mobile/pay/wxminipay/create.go @@ -113,8 +113,7 @@ func createOrder(orderID uint, ip string, userID uint) (error, *AppCreateOrderRe } var u user.Information - if err := dbc.DB.Select("wx_mini_open_id").First(&u, "id = ?", userID).Error; - err != nil && err != gorm.ErrRecordNotFound { + if err := dbc.DB.Select("wx_mini_open_id").First(&u, "id = ?", userID).Error; err != nil && err != gorm.ErrRecordNotFound { return err, nil } diff --git a/internal/api/mobile/pay/wxminipay/pay_callback.go b/internal/api/mobile/pay/wxminipay/pay_callback.go index 872e506..cec2c4b 100755 --- a/internal/api/mobile/pay/wxminipay/pay_callback.go +++ b/internal/api/mobile/pay/wxminipay/pay_callback.go @@ -219,4 +219,4 @@ func (c *notificationMap) UnmarshalXML(d *xml.Decoder, start xml.StartElement) e } } } -} \ No newline at end of file +} diff --git a/internal/api/mobile/users/update.go b/internal/api/mobile/users/update.go index ae8dcea..7ece070 100755 --- a/internal/api/mobile/users/update.go +++ b/internal/api/mobile/users/update.go @@ -352,4 +352,3 @@ func UserDestroy(c *gin.Context) { back.Suc(c, "操作成功", nil) return } - diff --git a/internal/libs/images/images.go b/internal/libs/images/images.go index b56b7b4..f4c8988 100644 --- a/internal/libs/images/images.go +++ b/internal/libs/images/images.go @@ -151,7 +151,7 @@ func WaterMarkOut(imgPath string, ttf string, w io.Writer, contentList []Content defer open.Close() tmpImg, _, _ := image.Decode(open) - condition := tmpImg.Bounds().Max.X > tmpImg.Bounds().Max.Y * 3 + condition := tmpImg.Bounds().Max.X > tmpImg.Bounds().Max.Y*3 if condition { item.Width = 810 item.Height = 0 @@ -159,7 +159,7 @@ func WaterMarkOut(imgPath string, ttf string, w io.Writer, contentList []Content tmpImg = resize.Resize(item.Width, item.Height, tmpImg, resize.Lanczos3) offsetX := item.X - tmpImg.Bounds().Max.X - offsetY := item.Y - 270 + (270 - tmpImg.Bounds().Max.Y) / 2 + offsetY := item.Y - 270 + (270-tmpImg.Bounds().Max.Y)/2 offset := image.Pt(offsetX, offsetY) fmt.Println(offsetX, offsetY) diff --git a/internal/libs/weibo/weibo.go b/internal/libs/weibo/weibo.go index 455251c..5e4d9e4 100644 --- a/internal/libs/weibo/weibo.go +++ b/internal/libs/weibo/weibo.go @@ -90,7 +90,7 @@ func ParsePage(data []byte) (res []weibo.ReunionSystem, err error) { } } do.Wait() - if err = mysql.Db.Create(res).Error; err != nil{ + if err = mysql.Db.Create(res).Error; err != nil { fmt.Println(err.Error()) } diff --git a/internal/model/user/diamond_register.go b/internal/model/user/diamond_register.go index 4a13869..8af5cc7 100644 --- a/internal/model/user/diamond_register.go +++ b/internal/model/user/diamond_register.go @@ -20,7 +20,7 @@ type DiamondRegister struct { AuditManangerId uint `gorm:"column:audit_manager_id" json:"audit_manager_id"` AuditTime formatime.Second `gorm:"column:audit_time" json:"audit_time"` CreatedAt formatime.Second `gorm:"column:created_at" json:"createdAt"` - IntroUserInfo Information `gorm:"-"` + IntroUserInfo Information `gorm:"-"` } const ( diff --git a/internal/mq/mq.go b/internal/mq/mq.go index 46c72cb..7e97a59 100644 --- a/internal/mq/mq.go +++ b/internal/mq/mq.go @@ -14,7 +14,7 @@ type rabbitMq struct { } var ( - Conn *rabbitMq + Conn *rabbitMq Conn1 *rabbitMq ) @@ -32,7 +32,7 @@ func SetUpMq() { Conn = &rabbitMq{conn} } -func SetUpShaMa(){ +func SetUpShaMa() { uri1 := fmt.Sprintf("amqp://%s:%s@%s:%s", configs.ConfigShaMaMqUser, configs.ConfigShaMaMqPwd, diff --git a/internal/service/app/shop/benefit.go b/internal/service/app/shop/benefit.go index be80939..06a08e3 100644 --- a/internal/service/app/shop/benefit.go +++ b/internal/service/app/shop/benefit.go @@ -40,7 +40,7 @@ func OrderProfit(od order.Information, tx *gorm.DB) error { spID := od.SharerID if s1.Level == 1 { var sp1 user.Information - if err := tx.First(&sp1, "id = ?", s1.ParentID).Error; err != nil{ + if err := tx.First(&sp1, "id = ?", s1.ParentID).Error; err != nil { return err } spID = sp1.ID diff --git a/internal/v2/controller/app/kingkong/kingkong.go b/internal/v2/controller/app/kingkong/kingkong.go index 083305f..43c1b79 100644 --- a/internal/v2/controller/app/kingkong/kingkong.go +++ b/internal/v2/controller/app/kingkong/kingkong.go @@ -126,5 +126,3 @@ func (k *KingKongController) ViewIconKingName(c *gin.Context) { mysql2.Db.Model(&list).Find(&list) back.Suc(c, "", list) } - - diff --git a/internal/v2/controller/app/user/operate.go b/internal/v2/controller/app/user/operate.go index f33f412..1104a91 100644 --- a/internal/v2/controller/app/user/operate.go +++ b/internal/v2/controller/app/user/operate.go @@ -48,4 +48,4 @@ func (o *Operate) DestroyWithCode(c *gin.Context) { return } back.Suc(c, "操作成功", nil) -} \ No newline at end of file +} diff --git a/internal/v2/controller/manage/gys/company.go b/internal/v2/controller/manage/gys/company.go index f625bef..8e167ba 100644 --- a/internal/v2/controller/manage/gys/company.go +++ b/internal/v2/controller/manage/gys/company.go @@ -75,7 +75,6 @@ func (o *Company) ReNew(c *gin.Context) { return } - // ReSign 重签. func (o *Company) ReSign(c *gin.Context) { req := gys.UpdateReSignReq{} diff --git a/internal/v2/controller/manage/gys/list.go b/internal/v2/controller/manage/gys/list.go index 729df64..f5e08ed 100644 --- a/internal/v2/controller/manage/gys/list.go +++ b/internal/v2/controller/manage/gys/list.go @@ -3,16 +3,16 @@ package gys import "github.com/gin-gonic/gin" type ListReq struct { - Settled uint `json:"settled"` - Name string `json:"name"` - ContractNo string `json:"contractNo"` - Code string `json:"code"` - Operator string `json:"operator"` - ApplyStartTime string `json:"applyStartTime"` - ApplyEndTime string `json:"applyEndTime"` - ReviewStartTime string `json:"reviewStartTime"` - ReviewEndTime string `json:"reviewEndTime"` - ContractStartTime string `json:"contractTime"` + Settled uint `json:"settled"` + Name string `json:"name"` + ContractNo string `json:"contractNo"` + Code string `json:"code"` + Operator string `json:"operator"` + ApplyStartTime string `json:"applyStartTime"` + ApplyEndTime string `json:"applyEndTime"` + ReviewStartTime string `json:"reviewStartTime"` + ReviewEndTime string `json:"reviewEndTime"` + ContractStartTime string `json:"contractTime"` } func (e *Enterprise) List(c *gin.Context) { diff --git a/internal/v2/controller/supplier/qualification/operate.go b/internal/v2/controller/supplier/qualification/operate.go index 0fc0ed2..e74aa42 100644 --- a/internal/v2/controller/supplier/qualification/operate.go +++ b/internal/v2/controller/supplier/qualification/operate.go @@ -15,7 +15,7 @@ func (q *Qualification) Detail(c *gin.Context) { back.Unauthorized(c) return } - if r, e := qualification.QLogic.Detail(id); e != nil{ + if r, e := qualification.QLogic.Detail(id); e != nil { back.Fail(c, e.Error()) return } else { diff --git a/internal/v2/controller/task/goods.go b/internal/v2/controller/task/goods.go index f4c7442..10bd47f 100644 --- a/internal/v2/controller/task/goods.go +++ b/internal/v2/controller/task/goods.go @@ -335,7 +335,6 @@ func (g *Goods) OpenSearch(c *gin.Context) { } fmt.Println("request len:", len(requestBody)) - // 发送请求的方法调用. r1, rr := client.Request( tea.String("POST"), @@ -345,7 +344,7 @@ func (g *Goods) OpenSearch(c *gin.Context) { requestBody, runTime) page += 1 - if rr != nil{ + if rr != nil { fmt.Println(rr.Error()) continue } diff --git a/internal/v2/lib/common/time.go b/internal/v2/lib/common/time.go index 847eb8a..d5cbe9b 100644 --- a/internal/v2/lib/common/time.go +++ b/internal/v2/lib/common/time.go @@ -20,7 +20,7 @@ func (t MyTime) MarshalJSON() ([]byte, error) { } func (t *MyTime) UnmarshalJSON(data []byte) (err error) { - if len(data) < 3 || strings.ToLower(string(data)) == "null"{ + if len(data) < 3 || strings.ToLower(string(data)) == "null" { *t = MyTime(time.Time{}) return err } diff --git a/internal/v2/lib/excel/attr.go b/internal/v2/lib/excel/attr.go index ec0449a..36c8741 100644 --- a/internal/v2/lib/excel/attr.go +++ b/internal/v2/lib/excel/attr.go @@ -5,7 +5,6 @@ import ( "strings" ) - type TagAttr struct { Name string Style string diff --git a/internal/v2/logic/manage/after/after.go b/internal/v2/logic/manage/after/after.go index 9e38562..3eeff89 100644 --- a/internal/v2/logic/manage/after/after.go +++ b/internal/v2/logic/manage/after/after.go @@ -513,7 +513,7 @@ func Refund(tx *gorm.DB, asGoods after.RecookAfterSalesGoodsModel, orderInfo man }).Error; err != nil { return err } - + //这里插入日志 Log1 := after.RecookAfterSalesLogsModel{ AsID: asGoods.Id, diff --git a/internal/v2/logic/pay/recook/refund.go b/internal/v2/logic/pay/recook/refund.go index d36a746..fecad26 100644 --- a/internal/v2/logic/pay/recook/refund.go +++ b/internal/v2/logic/pay/recook/refund.go @@ -39,4 +39,3 @@ func Refund(tx *gorm.DB, asGoods *after.RecookAfterSalesGoodsModel) error { return pay.SyncRefundSuccessCallback(tx, asGoods) } - diff --git a/internal/v2/logic/pay/union/refund.go b/internal/v2/logic/pay/union/refund.go index 5c95a34..4434fe1 100644 --- a/internal/v2/logic/pay/union/refund.go +++ b/internal/v2/logic/pay/union/refund.go @@ -29,7 +29,7 @@ func Refund(asGoods *after.RecookAfterSalesGoodsModel) error { } tradeNo := asGoods.TradeNo + "T" + strconv.Itoa(int(asGoods.Id)) _, err = unionpay.UnionPay.Refund(tradeNo, query["queryId"], asGoods.RefundAmount) - if err != nil{ + if err != nil { log.Println(err) } return err diff --git a/internal/v2/logic/supplier/after/addr.go b/internal/v2/logic/supplier/after/addr.go index 096e30f..d051387 100644 --- a/internal/v2/logic/supplier/after/addr.go +++ b/internal/v2/logic/supplier/after/addr.go @@ -165,4 +165,4 @@ func (a AFTAddrLogic) All() (result []province, err error) { Where("parent_id = 0").Find(&result).Error return -} \ No newline at end of file +} diff --git a/internal/v2/model/gys/enterprise/gysCompanyCreditCode.go b/internal/v2/model/gys/enterprise/gysCompanyCreditCode.go index 7dcd948..14b2f55 100644 --- a/internal/v2/model/gys/enterprise/gysCompanyCreditCode.go +++ b/internal/v2/model/gys/enterprise/gysCompanyCreditCode.go @@ -24,4 +24,4 @@ func (*CompanyCreditCodeModel) TableName() string { func (m *CompanyCreditCodeModel) FindByCompanyID(by uint) (result CompanyCreditCodeModel) { m.GetDb().Table(m.TableName()).First(&result) return -} \ No newline at end of file +} diff --git a/internal/v2/model/gys/enterprise/gysEnterpriseSector.go b/internal/v2/model/gys/enterprise/gysEnterpriseSector.go index b65fdf5..686104f 100644 --- a/internal/v2/model/gys/enterprise/gysEnterpriseSector.go +++ b/internal/v2/model/gys/enterprise/gysEnterpriseSector.go @@ -25,4 +25,4 @@ func (r *GysEnterpriseSectorModel) TableName() string { func (r *GysEnterpriseSectorModel) FindByEnterpriseIDAndType(enterpriseID uint, sectorType int) (result GysEnterpriseSectorModel) { dbc.DB.First(&result, "enterprise_id = ? and `type` = ?", enterpriseID, sectorType) return -} \ No newline at end of file +} diff --git a/internal/v2/model/http/goods/receiver.go b/internal/v2/model/http/goods/receiver.go index 7d0a0d2..fb5e422 100644 --- a/internal/v2/model/http/goods/receiver.go +++ b/internal/v2/model/http/goods/receiver.go @@ -65,7 +65,7 @@ func NewGlTBase(query *gorm.DB, page bean.Page) (result []*ListTempBase, total i query.Group("source_id").Limit(page.GetLimit()).Offset(page.GetStart()).Find(&result) var cover goods2.GysGoodsMainPhotoTempModel - for index, v := range result{ + for index, v := range result { dbc.DB.Table(cover.TableName()).First(&result[index].MainPhoto, "goods_id = ? AND is_master = 1", v.SourceID) } diff --git a/internal/v2/model/jst/jstExpressCompany.go b/internal/v2/model/jst/jstExpressCompany.go index 0f33f47..fa8a171 100644 --- a/internal/v2/model/jst/jstExpressCompany.go +++ b/internal/v2/model/jst/jstExpressCompany.go @@ -38,4 +38,4 @@ func (o *ExpressModel) GetJSTExpressCode(name string) string { func (o *ExpressModel) FindByLcID(by string) (result ExpressModel) { o.GetDb().Table(o.TableName()).First(&result, "lc_id = ?", by) return -} \ No newline at end of file +} diff --git a/internal/v2/model/recook/coin/recookCoinHistory.go b/internal/v2/model/recook/coin/recookCoinHistory.go index 6578801..8d9d52a 100644 --- a/internal/v2/model/recook/coin/recookCoinHistory.go +++ b/internal/v2/model/recook/coin/recookCoinHistory.go @@ -14,7 +14,7 @@ const ( RecookCoinHistoryRecommendCoin = user.RecommendTypeForCoinHistory // 每月结算收益 RecookCoinHistoryRewardCoin = user.RewardTypeForCoinHistory // 每月结算收益 - RefundTypeForCoinHistory1 = 7 //瑞比退回 + RefundTypeForCoinHistory1 = 7 //瑞比退回 ) type RecookCoinHistoryModel struct { diff --git a/internal/v2/model/recook/goods/recookGoodsDetailPhoto.go b/internal/v2/model/recook/goods/recookGoodsDetailPhoto.go index b6386aa..41c4131 100644 --- a/internal/v2/model/recook/goods/recookGoodsDetailPhoto.go +++ b/internal/v2/model/recook/goods/recookGoodsDetailPhoto.go @@ -11,9 +11,9 @@ type RecookGoodsDetailPhotoModel struct { GoodsID uint `gorm:"column:goods_id" json:"goodsId"` Url string `gorm:"column:url" json:"url"` Name string `gorm:"column:name" json:"name"` - OrderNo int `gorm:"column:order_no" json:"orderNo"` - Width int `gorm:"column:width" json:"width"` - Height int `gorm:"column:height" json:"height"` + OrderNo int `gorm:"column:order_no" json:"orderNo"` + Width int `gorm:"column:width" json:"width"` + Height int `gorm:"column:height" json:"height"` } // TableName sets the insert table name for this struct type diff --git a/internal/v2/model/recook/order/recookOrderGoodsDetailLogs.go b/internal/v2/model/recook/order/recookOrderGoodsDetailLogs.go index f3dd847..4b1b2f1 100644 --- a/internal/v2/model/recook/order/recookOrderGoodsDetailLogs.go +++ b/internal/v2/model/recook/order/recookOrderGoodsDetailLogs.go @@ -53,4 +53,4 @@ func (r *RecookOrderGoodsDetailLogsModel) ListCount(query interface{}, args ...i return } -// \ No newline at end of file +// diff --git a/internal/v2/router/task.go b/internal/v2/router/task.go index 6855eb5..e047cb7 100644 --- a/internal/v2/router/task.go +++ b/internal/v2/router/task.go @@ -11,11 +11,11 @@ func routerTask(taskRouter *gin.RouterGroup) { goodsController := &task.Goods{} taskRouter.GET("goods/associate", goodsController.Update) // 关联更新 - taskRouter.GET("goods/sync", goodsController.Sync) // jcook商品更新 - taskRouter.GET("goods/fix", goodsController.Fix) // jcook图片修复 - taskRouter.GET("goods/publish", goodsController.Publish) // 更新商品上下级状态 + taskRouter.GET("goods/sync", goodsController.Sync) // jcook商品更新 + taskRouter.GET("goods/fix", goodsController.Fix) // jcook图片修复 + taskRouter.GET("goods/publish", goodsController.Publish) // 更新商品上下级状态 taskRouter.GET("goods/openSearch", goodsController.OpenSearch) // 更新openSearch - taskRouter.GET("goods/attr", goodsController.AttrSync) // jcook规格修复 + taskRouter.GET("goods/attr", goodsController.AttrSync) // jcook规格修复 taskRouter.GET("weibo/sync", goodsController.WeiboSync) // 微博数据同步 diff --git a/tools/hash.go b/tools/hash.go index db53693..a9bf3f6 100644 --- a/tools/hash.go +++ b/tools/hash.go @@ -29,4 +29,4 @@ func SHA256Str(src string) string { h := sha256.New() h.Write([]byte(src)) // 需要加密的字符串为 return hex.EncodeToString(h.Sum(nil)) -} \ No newline at end of file +}