@@ -281,8 +281,7 @@ type GetWechatAuditConfigurationResV1 struct {
281281}
282282
283283type WechatConfigurationV1 struct {
284- CorpID string `json:"corp_id"`
285- TemplateId string `json:"template_id"`
284+ CorpID string `json:"corp_id"`
286285
287286 IsWechatNotificationEnabled bool `json:"is_wechat_notification_enabled"`
288287}
@@ -296,16 +295,12 @@ type WechatConfigurationV1 struct {
296295// @Success 200 {object} v1.GetWechatAuditConfigurationResV1
297296// @router /v1/configurations/wechat_audit [get]
298297func GetWechatAuditConfigurationV1 (c echo.Context ) error {
299- return c .JSON (http .StatusOK , & GetWechatAuditConfigurationResV1 {
300- BaseRes : controller .NewBaseReq (nil ),
301- Data : WechatConfigurationV1 {},
302- })
298+ return getWechatAuditConfigurationV1 (c )
303299}
304300
305301type UpdateWechatConfigurationReqV1 struct {
306302 CorpID * string `json:"corp_id" from:"corp_id" description:"微信企业号ID"`
307303 CorpSecret * string `json:"corp_secret" from:"corp_secret" description:"企业微信ID对应密码"`
308- TemplateId * string `json:"template_id" from:"template_id" description:"企业微信审批模板ID"`
309304 IsWechatNotificationEnabled * bool `json:"is_wechat_notification_enabled" from:"is_wechat_notification_enabled" validate:"required" description:"是否启用微信对接流程"`
310305}
311306
@@ -320,7 +315,7 @@ type UpdateWechatConfigurationReqV1 struct {
320315// @Success 200 {object} controller.BaseRes
321316// @router /v1/configurations/wechat_audit [patch]
322317func UpdateWechatAuditConfigurationV1 (c echo.Context ) error {
323- return controller . JSONBaseErrorReq ( c , nil )
318+ return updateWechatAuditConfigurationV1 ( c )
324319}
325320
326321type TestWechatConfigResDataV1 struct {
@@ -333,20 +328,20 @@ type TestWechatConfigResV1 struct {
333328 Data TestWechatConfigResDataV1 `json:"data"`
334329}
335330
331+ type TestWechatConfigurationReqV1 struct {
332+ WechatId string `json:"wechat_id" form:"wechat_id" valid:"required" description:"用户个人企业微信ID"`
333+ }
334+
336335// TestWechatAuditConfigV1
337336// @Summary 测试微信审批配置
338337// @Description test wechat audit configuration
339338// @Accept json
340339// @Id testWechatAuditConfigV1
341340// @Tags configuration
342341// @Security ApiKeyAuth
342+ // @Param req body v1.TestWechatConfigurationReqV1 true "test wechat configuration req"
343343// @Success 200 {object} v1.TestWechatConfigResV1
344344// @router /v1/configurations/wechat_audit/test [post]
345345func TestWechatAuditConfigV1 (c echo.Context ) error {
346- return c .JSON (http .StatusOK , & TestWechatConfigResV1 {
347- BaseRes : controller .NewBaseReq (nil ),
348- Data : TestWechatConfigResDataV1 {
349- IsMessageSentNormally : true ,
350- },
351- })
346+ return testWechatAuditConfigV1 (c )
352347}
0 commit comments