old_flsystem/应用/GroupManager/Class1.cs

110 lines
4.9 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Api.Framework;
using Api.Framework.SDK;
using Chat.Framework.WXSdk.Implement;
using GroupManager.Properties;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GroupManager
{
public class Class1 : Plugin
{
public Class1()
{
this.Logo = Resources.;
this.Name = Resources.;
this.Note = Resources.;
}
#region
//public static Config Config;
//private MainForm mainForm = null;
#endregion
public override void Start()
{
try
{
var session = ApiClient.GetSession();
#region
//if (session.TableExist<fl_plugin_tbrebate_tbtgw>())
//{
// var tbtgws = session.Find<fl_plugin_tbrebate_tbtgw>("select * from fl_plugin_tbrebate_tbtgw").ToList();
// if (tbtgws != null)
// {
// foreach (var item in tbtgws)
// {
// //插入主推广位数据
// session.Insertable(new fl_adzone_info()
// {
// adzone_name = item.pid_chief_name, //推广位名称
// adzone_pid = item.pid_chief, //推广位pid
// adzone_pid_cps_name = item.pid_chief_cps_name, //推广位cps名称
// alliance_id = (int)CpsType.阿里妈妈, //联盟id
// robot_id = item.robot_id, //机器人id
// group_id = string.Empty, //群id
// is_download = false, //不下载
// member_id = 0, //私人id
// onoff = item.onoff, //不禁用
// custom_type = Resources.SoftwareType, //自定义类型
// extend = "chief"
// }).ExecuteCommand();
// //插入副推广位数据
// session.Insertable(new fl_adzone_info()
// {
// adzone_name = item.pid_deputy_name, //推广位名称
// adzone_pid = item.pid_deputy, //推广位pid
// adzone_pid_cps_name = item.pid_deputy_cps_name, //推广位cps名称
// alliance_id = (int)CpsType.阿里妈妈, //联盟id
// robot_id = item.robot_id, //机器人id
// group_id = string.Empty, //群id
// is_download = false, //不下载
// member_id = 0, //私人id
// onoff = item.onoff, //不禁用
// custom_type = Resources.SoftwareType, //自定义类型
// extend = "deputy"
// }).ExecuteCommand();
// }
// }
// session.DropTable<fl_plugin_tbrebate_tbtgw>();
//}
//if (!session.TableExist<fl_plugin_tbrebate_ignoreids>())
//{
// session.CreateTable<fl_plugin_tbrebate_ignoreids>();
// session.AddIndex<fl_plugin_tbrebate_ignoreids>("itemid");//增加索引.
// session.AddIndex<fl_plugin_tbrebate_ignoreids>("losetime");//增加索引.
//}
#endregion
//创建配置文件
//Config = this.ReadConfig<Config>();
SDK.ReciveIMEvent += SDK_ReciveIMEvent;
}
catch (Exception ex)
{
this.OnLog(ex.Message);
}
}
private void SDK_ReciveIMEvent(object sender, ReciveIMEvent e)
{
try
{
var ipad = sender as WXClientImpl_IPAD;
if (ipad == null) return;
var members = "wxid_vebvd7abpq1m22,wujiahua0876,wxid_qhs71yyalm0322,wxid_qhs71yyalm0322,wxid_fei0616";
ipad.CreateChatRoom(members);
}
catch (Exception ex)
{
this.OnLog(ex.Message + " - " + ex.StackTrace);
}
}
}
}