old_flsystem/应用/Weixin.PDDCirclePromotion/Tools.cs

61 lines
1.6 KiB
C#
Raw Normal View History

2022-09-20 03:10:29 +00:00
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.OleDb;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using static PDDCircleFriends.Enums;
namespace PDDCircleFriends
{
public class Tools
{
/// <summary>
/// 将枚举中的string转int
/// </summary>
/// <param name="data"></param>
/// <returns></returns>
public static int FindCategoryNum(string data)
{
return (int)((CategoryType)Enum.Parse(typeof(CategoryType), data));
}
/// <summary>
/// 获取中文店铺枚举对应的数值值
/// </summary>
/// <param name="shopScore"></param>
/// <returns></returns>
public static int FindShopScoreVlaue(ShopScoreType shopScore)
{
int value = -1;
switch (shopScore)
{
case ShopScoreType.:
case ShopScoreType.:
value = 460;
break;
case ShopScoreType.:
value = 500;
break;
case ShopScoreType.:
value = 490;
break;
case ShopScoreType.:
value = 480;
break;
case ShopScoreType.:
value = 470;
break;
}
return value;
}
}
}