|
@@ -6,6 +6,68 @@ import (
|
|
|
)
|
|
|
|
|
|
func (l *InitDatabaseLogic) insertApiData() (err error) {
|
|
|
+ // BatchMsg
|
|
|
+
|
|
|
+ _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
|
|
|
+ ServiceName: pointy.GetPointer("Wechat"),
|
|
|
+ Path: pointy.GetPointer("/batch_msg/create"),
|
|
|
+ Description: pointy.GetPointer("apiDesc.createBatchMsg"),
|
|
|
+ ApiGroup: pointy.GetPointer("batch_msg"),
|
|
|
+ Method: pointy.GetPointer("POST"),
|
|
|
+ })
|
|
|
+
|
|
|
+ if err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+
|
|
|
+ _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
|
|
|
+ ServiceName: pointy.GetPointer("Wechat"),
|
|
|
+ Path: pointy.GetPointer("/batch_msg/update"),
|
|
|
+ Description: pointy.GetPointer("apiDesc.updateBatchMsg"),
|
|
|
+ ApiGroup: pointy.GetPointer("batch_msg"),
|
|
|
+ Method: pointy.GetPointer("POST"),
|
|
|
+ })
|
|
|
+
|
|
|
+ if err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+
|
|
|
+ _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
|
|
|
+ ServiceName: pointy.GetPointer("Wechat"),
|
|
|
+ Path: pointy.GetPointer("/batch_msg/delete"),
|
|
|
+ Description: pointy.GetPointer("apiDesc.deleteBatchMsg"),
|
|
|
+ ApiGroup: pointy.GetPointer("batch_msg"),
|
|
|
+ Method: pointy.GetPointer("POST"),
|
|
|
+ })
|
|
|
+
|
|
|
+ if err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+
|
|
|
+ _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
|
|
|
+ ServiceName: pointy.GetPointer("Wechat"),
|
|
|
+ Path: pointy.GetPointer("/batch_msg/list"),
|
|
|
+ Description: pointy.GetPointer("apiDesc.getBatchMsgList"),
|
|
|
+ ApiGroup: pointy.GetPointer("batch_msg"),
|
|
|
+ Method: pointy.GetPointer("POST"),
|
|
|
+ })
|
|
|
+
|
|
|
+ if err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+
|
|
|
+ _, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
|
|
|
+ ServiceName: pointy.GetPointer("Wechat"),
|
|
|
+ Path: pointy.GetPointer("/batch_msg"),
|
|
|
+ Description: pointy.GetPointer("apiDesc.getBatchMsgById"),
|
|
|
+ ApiGroup: pointy.GetPointer("batch_msg"),
|
|
|
+ Method: pointy.GetPointer("POST"),
|
|
|
+ })
|
|
|
+
|
|
|
+ if err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+
|
|
|
// MessageRecords
|
|
|
|
|
|
_, err = l.svcCtx.CoreRpc.CreateApi(l.ctx, &core.ApiInfo{
|