|
@@ -15,23 +15,16 @@ namespace Util
|
|
|
|
|
|
public static void sendPrize(string content)
|
|
|
{
|
|
|
- try
|
|
|
+ batchNo = DateTime.Now.ToString("yyyyMMddHHmmssfff") + Function.get_Random(3);
|
|
|
+ JsonData jsonObj = JsonMapper.ToObject(content);
|
|
|
+ string priObjString = prizeInSet(int.Parse(Function.CheckInt(jsonObj["prize_tag"].ToString())));
|
|
|
+ content = jsonObj["content"].ToString();
|
|
|
+ if(!string.IsNullOrEmpty(priObjString))
|
|
|
{
|
|
|
- batchNo = DateTime.Now.ToString("yyyyMMddHHmmssfff") + Function.get_Random(3);
|
|
|
- JsonData jsonObj = JsonMapper.ToObject(content);
|
|
|
- string priObjString = prizeInSet(int.Parse(Function.CheckInt(jsonObj["prize_tag"].ToString())));
|
|
|
- content = jsonObj["content"].ToString();
|
|
|
- if(!string.IsNullOrEmpty(priObjString))
|
|
|
- {
|
|
|
- string[] priObjData = priObjString.Split('|');
|
|
|
- string priListIds = priObjData[0];
|
|
|
- int projectId = int.Parse(priObjData[1]);
|
|
|
- prizeSend(projectId, priListIds, content);
|
|
|
- }
|
|
|
- }
|
|
|
- catch(Exception ex)
|
|
|
- {
|
|
|
- Function.WriteLog(DateTime.Now + "\n" + ex.ToString(), "发奖异常");
|
|
|
+ string[] priObjData = priObjString.Split('|');
|
|
|
+ string priListIds = priObjData[0];
|
|
|
+ int projectId = int.Parse(priObjData[1]);
|
|
|
+ prizeSend(projectId, priListIds, content);
|
|
|
}
|
|
|
}
|
|
|
|