Skip to content

Commit

Permalink
feat(gofmt)
Browse files Browse the repository at this point in the history
  • Loading branch information
Matrix-X committed Dec 24, 2024
1 parent e492d97 commit fa69b2d
Show file tree
Hide file tree
Showing 45 changed files with 196 additions and 240 deletions.
1 change: 0 additions & 1 deletion src/basicService/qrCode/request/requestCreate.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package request


type ActionInfo struct {
Scene interface{} `json:"scene"`
}
Expand Down
2 changes: 1 addition & 1 deletion src/basicService/url/request/requestShortGenKey.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ package request
type RequestShortGenKey struct {
LongData string `json:"long_data"`
ExpireSeconds int `json:"expire_seconds"`
}
}
4 changes: 2 additions & 2 deletions src/kernel/support/rsa_oaep_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func TestRSA_EncryptOAEP(t *testing.T) {

// 因为每次加密的随机数和hash都是不一样的,所以每次同一个明文加密出来的密文都会不一样
// 验证方法就是从加密出来的密文再解密,看下明文是否一致
plainMsg, _ := rsaOaep.DecryptOAEP(sha1.New(),encryptedData)
plainMsg, _ := rsaOaep.DecryptOAEP(sha1.New(), encryptedData)

assert.Equal(t, testPlainMsg, plainMsg)
}
Expand All @@ -106,7 +106,7 @@ func TestRSAOaep_DecryptOAEP(t *testing.T) {
}

testEncryptedMSG, _ := base64.URLEncoding.DecodeString(testEncryptedMSGBase64)
decryptedData, err := rsaOaep.DecryptOAEP(sha1.New(),[]byte(testEncryptedMSG))
decryptedData, err := rsaOaep.DecryptOAEP(sha1.New(), []byte(testEncryptedMSG))
if err != nil {
panic(err)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package request

type RequestBroadcastGetLiveReplay struct {
Action string `json:"action"`
RoomID int `json:"room_id"`
Start int `json:"start"`
Limit int `json:"limit"`
RoomID int `json:"room_id"`
Start int `json:"start"`
Limit int `json:"limit"`
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package request

type RequestBroadcastGetSharedCode struct {
RoomID int `json:"roomId"`
RoomID int `json:"roomId"`
Params string `json:"params"`
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package request

type RequestBroadcastModifyAssistant struct {
RoomID int `json:"roomId"`
RoomID int `json:"roomId"`
UserName string `json:"username"`
NickName string `json:"nickname"`
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package request

type RequestBroadcastRemoveAssistant struct {
RoomID int `json:"roomId"`
RoomID int `json:"roomId"`
UserName string `json:"username"`
}
25 changes: 12 additions & 13 deletions src/officialAccount/card/request/requestCard.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,19 +134,18 @@ func (m *MemberCard) GetCardType() string {
}

type BonusRule struct {
CostMoneyUnit int `json:"cost_money_unit,omitempty"`
IncreaseBonus int `json:"increase_bonus,omitempty"`
MaxIncreaseBonus int `json:"max_increase_bonus,omitempty"`
InitIncreaseBonus int `json:"init_increase_bonus,omitempty"`
CostBonusUnit int `json:"cost_bonus_unit,omitempty"`
ReduceMoney int `json:"reduce_money,omitempty"`
LeastMoneyToUseBonus int `json:"least_money_to_use_bonus,omitempty"`
MaxReduceBonus int `json:"max_reduce_bonus,omitempty"`
BaseInfo *BaseInfo `json:"base_info"`
BonusCleared string `json:"bonus_cleared"`
BonusRules string `json:"bonus_rules"`
Prerogative string `json:"prerogative"`

CostMoneyUnit int `json:"cost_money_unit,omitempty"`
IncreaseBonus int `json:"increase_bonus,omitempty"`
MaxIncreaseBonus int `json:"max_increase_bonus,omitempty"`
InitIncreaseBonus int `json:"init_increase_bonus,omitempty"`
CostBonusUnit int `json:"cost_bonus_unit,omitempty"`
ReduceMoney int `json:"reduce_money,omitempty"`
LeastMoneyToUseBonus int `json:"least_money_to_use_bonus,omitempty"`
MaxReduceBonus int `json:"max_reduce_bonus,omitempty"`
BaseInfo *BaseInfo `json:"base_info"`
BonusCleared string `json:"bonus_cleared"`
BonusRules string `json:"bonus_rules"`
Prerogative string `json:"prerogative"`
}
type ScenicTicket struct {
BaseInfo *BaseInfo `json:"base_info"`
Expand Down
6 changes: 0 additions & 6 deletions src/officialAccount/dataCube/response/responseDataCubeCard.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ type ResponseDataCubeMemberCardSummary struct {
List []*MemberCardSummary `json:"list"`
}



// ----------------------------------------------------------------------

type MemberCardSummaryByID struct {
Expand Down Expand Up @@ -68,8 +66,4 @@ type ResponseDataCubeMemberCardSummaryByID struct {

// ----------------------------------------------------------------------




// ----------------------------------------------------------------------

2 changes: 0 additions & 2 deletions src/officialAccount/device/response/responseDeviceBind.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,3 @@ type BaseResp struct {
type ResponseDeviceBind struct {
BaseResp *BaseResp `json:"base_resp"`
}


9 changes: 2 additions & 7 deletions src/officialAccount/guide/request/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,15 @@ type FastReplyList struct {
GuideFastReplyList []*FastReply `json:"guide_fast_reply_list"`
}


type AutoReply struct {
Content string `json:"content"`
MsgType string `json:"msgtype"`
}




type BlackKeyword struct {
Values []string `json:"values"`
}


// ------------------------------------------------------------

type Buyer struct {
Expand All @@ -30,6 +25,6 @@ type Buyer struct {
}

type BuyerList struct {
GuideAccount string `json:"guide_account"`
GuideAccount string `json:"guide_account"`
BuyerList []Buyer `json:"buyer_list"`
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ package request

type RequestMaterialBatchGetMaterial struct {
Type string `json:"type"`
Offset int64 `json:"offset"`
Count int64 `json:"count"`
Offset int64 `json:"offset"`
Count int64 `json:"count"`
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
type ResponseMaterialGetMaterialCount struct {
response.ResponseOfficialAccount

VoiceCount int `json:"voice_count"`
VideoCount int `json:"video_count"`
ImageCount int `json:"image_count"`
NewsCount int `json:"news_count"`
VoiceCount int `json:"voice_count"`
VideoCount int `json:"video_count"`
ImageCount int `json:"image_count"`
NewsCount int `json:"news_count"`
MediaID string `json:"media_id"`
}
1 change: 0 additions & 1 deletion src/officialAccount/menu/request/requestMenuConditional.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package request


type RequestMatchRule struct {
TagID string `json:"tag_id"`
Sex string `json:"sex"`
Expand Down
3 changes: 1 addition & 2 deletions src/officialAccount/poi/request/requestPOI.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package request


type Photo struct {
PhotoUrl string `json:"photo_url"`
}
Expand All @@ -26,4 +25,4 @@ type BusinessInfo struct {
AvgPrice int `json:"avg_price"`
AvailableState int `json:"available_state"`
UpdateStatus int `json:"update_status"`
}
}
11 changes: 5 additions & 6 deletions src/officialAccount/shakeAround/request/requestDevice.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ type RequestDeviceApply struct {
PoiID int `json:"poi_id"`
}


// ---------------------------------------------------

type RequestDeviceApplyStatus struct {
Expand All @@ -24,9 +23,9 @@ type RequestDeviceIdentifier struct {
}

type RequestDeviceSearch struct {
Type int `json:"type"`
Type int `json:"type"`
DeviceIdentifiers []*RequestDeviceIdentifier `json:"device_identifiers"`
ApplyID int `json:"apply_id"`
LastSeen int `json:"last_seen"`
Count int `json:"count"`
}
ApplyID int `json:"apply_id"`
LastSeen int `json:"last_seen"`
Count int `json:"count"`
}
6 changes: 2 additions & 4 deletions src/officialAccount/shakeAround/request/requestPage.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ type RequestPageInfo struct {
}

type RequestPageUpdate struct {

*RequestPageInfo

PageID int `json:"page_id"`

}
PageID int `json:"page_id"`
}
2 changes: 0 additions & 2 deletions src/officialAccount/shakeAround/request/requestShakeAround.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ type RequestShakeAroundAccountRegister struct {
ApplyReason string `json:"apply_reason"`
}


// ---------------------------------------------------------


type RequestShakeAroundUser struct {
Ticket string `json:"ticket"`
NeedPoi int `json:"need_poi"`
Expand Down
12 changes: 6 additions & 6 deletions src/officialAccount/shakeAround/shakeAround.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package shakeAround
type ShakeAround struct {
*Client

Device *DeviceClient
Page *PageClient
Material *MaterialClient
Group *GroupClient
Relation *RelationClient
Stats *StatsClient
Device *DeviceClient
Page *PageClient
Material *MaterialClient
Group *GroupClient
Relation *RelationClient
Stats *StatsClient
}
1 change: 0 additions & 1 deletion src/officialAccount/store/request/requestStore.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@ type RequestStoreUpdate struct {
ContractPhone string `json:"contract_phone"`
PicList string `json:"pic_list"`
}

2 changes: 1 addition & 1 deletion src/openPlatform/authorizer/miniProgram/code/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"github.com/ArtisanCloud/PowerLibs/v3/object"
"github.com/ArtisanCloud/PowerWeChat/v3/src/kernel"
response2 "github.com/ArtisanCloud/PowerWeChat/v3/src/kernel/response"
response4 "github.com/ArtisanCloud/PowerWeChat/v3/src/work/media/response"
"github.com/ArtisanCloud/PowerWeChat/v3/src/openPlatform/authorizer/miniProgram/code/request"
"github.com/ArtisanCloud/PowerWeChat/v3/src/openPlatform/authorizer/miniProgram/code/response"
response4 "github.com/ArtisanCloud/PowerWeChat/v3/src/work/media/response"
"net/http"
)

Expand Down
2 changes: 1 addition & 1 deletion src/payment/apply4Sub/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,6 @@ func (comp *Client) GetApplyByApplymentId(ctx context.Context, applymentId strin
result := &response.ResponseGetApplyForBusiness{}

endpoint := "/v3/applyment4sub/applyment/applyment_id/" + applymentId
_, err := comp.Request(ctx, endpoint, nil, http.MethodGet,&object.HashMap{}, false, nil, result)
_, err := comp.Request(ctx, endpoint, nil, http.MethodGet, &object.HashMap{}, false, nil, result)
return result, err
}
3 changes: 0 additions & 3 deletions src/payment/notify/request/requestNotify.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,3 @@ type EncryptedResource struct {

Plaintext string // Ciphertext 解密后内容
}



32 changes: 16 additions & 16 deletions src/payment/order/request/h5.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ type H5GoodsDetail struct {
}

type H5Detail struct {
CostPrice int `json:"cost_price"` // 订单原价
InvoiceID string `json:"invoice_id"` // 商品小票ID
CostPrice int `json:"cost_price"` // 订单原价
InvoiceID string `json:"invoice_id"` // 商品小票ID
GoodsDetail []*H5GoodsDetail `json:"goods_detail,omitempty"` // + 单品列表
}

Expand All @@ -35,10 +35,10 @@ type H5H5Info struct {
}

type H5SceneInfo struct {
PayerClientIP string `json:"payer_client_ip"` // 用户终端IP
DeviceID string `json:"device_id"` // 商户端设备号
StoreInfo *H5StoreInfo `json:"store_info,omitempty"` // + 商户门店信息
H5Info *H5H5Info `json:"h5_info,omitempty"` // + H5场景信息
PayerClientIP string `json:"payer_client_ip"` // 用户终端IP
DeviceID string `json:"device_id"` // 商户端设备号
StoreInfo *H5StoreInfo `json:"store_info,omitempty"` // + 商户门店信息
H5Info *H5H5Info `json:"h5_info,omitempty"` // + H5场景信息
}

type H5SettleInfo struct {
Expand All @@ -47,13 +47,13 @@ type H5SettleInfo struct {

type RequestH5Prepay struct {
PrepayBase
Description string `json:"description"` // 商品描述
OutTradeNo string `json:"out_trade_no"` // 商户订单号
TimeExpire string `json:"time_expire"` // 交易结束时间
Attach string `json:"attach"` // 附加数据
GoodsTag string `json:"goods_tag"` // 订单优惠标记
Amount *H5Amount `json:"amount,omitempty"` // 订单金额
Detail *H5Detail `json:"detail,omitempty"` // 优惠功能
SceneInfo *H5SceneInfo `json:"scene_info,omitempty"` // 场景信息
SettleInfo *H5SettleInfo `json:"settle_info,omitempty"` // 结算信息
}
Description string `json:"description"` // 商品描述
OutTradeNo string `json:"out_trade_no"` // 商户订单号
TimeExpire string `json:"time_expire"` // 交易结束时间
Attach string `json:"attach"` // 附加数据
GoodsTag string `json:"goods_tag"` // 订单优惠标记
Amount *H5Amount `json:"amount,omitempty"` // 订单金额
Detail *H5Detail `json:"detail,omitempty"` // 优惠功能
SceneInfo *H5SceneInfo `json:"scene_info,omitempty"` // 场景信息
SettleInfo *H5SettleInfo `json:"settle_info,omitempty"` // 结算信息
}
18 changes: 9 additions & 9 deletions src/payment/partner/request/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ type AppSettleInfo struct {

type RequestAppPrepay struct {
PrepayBase
Description string `json:"description"` // 商品描述
OutTradeNo string `json:"out_trade_no"` // 商户订单号
TimeExpire string `json:"time_expire"` // 交易结束时间
Attach string `json:"attach"` // 附加数据
GoodsTag string `json:"goods_tag"` // 订单优惠标记
Amount *AppAmount `json:"amount"` // 订单金额
Detail *AppDetail `json:"detail,omitempty"` // 优惠功能
SceneInfo *AppSceneInfo `json:"scene_info,omitempty"` // 场景信息
SettleInfo *AppSettleInfo `json:"settle_info,omitempty"` // 结算信息
Description string `json:"description"` // 商品描述
OutTradeNo string `json:"out_trade_no"` // 商户订单号
TimeExpire string `json:"time_expire"` // 交易结束时间
Attach string `json:"attach"` // 附加数据
GoodsTag string `json:"goods_tag"` // 订单优惠标记
Amount *AppAmount `json:"amount"` // 订单金额
Detail *AppDetail `json:"detail,omitempty"` // 优惠功能
SceneInfo *AppSceneInfo `json:"scene_info,omitempty"` // 场景信息
SettleInfo *AppSettleInfo `json:"settle_info,omitempty"` // 结算信息
}
Loading

0 comments on commit fa69b2d

Please sign in to comment.