zhaojs
2023-09-27 74098f1401afe40f961d1d167bb18dd0a71c4d59
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using CommonUtil;
using Operater.DAL;
using Operater.DbModel;
using Operater.DTO.TopMessage;
using System;
using System.Collections.Generic;
using System.Text;
 
namespace TradeInterflow.Handle
{
    public class YzMemberHandle
    {
        public static void AuthMobileExecute(string message)
        {
            Console.WriteLine("有赞手机号授权");
            YouZanMsgModel yzMsgModel = JSONUtil.JsonToObject<YouZanMsgModel>(message);
            string id = yzMsgModel.yz_open_id + yzMsgModel.mobile;
            var mobRecord = new YzAuthMobileDAL().GetById(id);
            if (mobRecord.IsNull() || mobRecord.Id.IsNullOrEmpty())
            {
                YzAuthMobile yzAuthMobile = new YzAuthMobile()
                {
                    Id = id,
                    YzOpenId = yzMsgModel.yz_open_id,
                    Mobile = yzMsgModel.mobile,
                    CreateTime = DateTime.Now
                };
                new YzAuthMobileDAL().Insert(yzAuthMobile);
            }
          
            //授权送积分
            AuthPointTaskRequest request = new AuthPointTaskRequest()
            {
                YzOpenId = yzMsgModel.yz_open_id,
                Mobile = yzMsgModel.mobile
            };
            PointTaskHandle.AuthPointTask(request);
        }
    }
}