Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
Education
Commits
b62cf733
Commit
b62cf733
authored
Aug 04, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
35b67d53
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
300 additions
and
132 deletions
+300
-132
WeChatReidsCache.cs
Edu.Cache/WeChat/WeChatReidsCache.cs
+75
-0
Config.cs
Edu.Common/Config.cs
+24
-0
HttpHelper.cs
Edu.Common/Plugin/HttpHelper.cs
+54
-116
WeChatHelper.cs
Edu.Common/Plugin/WeChatHelper.cs
+82
-0
OrderModule2.cs
Edu.Module.Course/OrderModule2.cs
+1
-1
EducationReceiptModule.cs
Edu.Module.EduTask/EducationReceiptModule.cs
+1
-0
RB_Student_BackClassRepository.cs
Edu.Repository/BackClass/RB_Student_BackClassRepository.cs
+24
-0
EducationReceiptController.cs
Edu.WebApi/Controllers/EduTask/EducationReceiptController.cs
+0
-1
LoginController.cs
Edu.WebApi/Controllers/User/LoginController.cs
+39
-14
No files found.
Edu.Cache/WeChat/WeChatReidsCache.cs
View file @
b62cf733
...
@@ -80,4 +80,79 @@ namespace Edu.Cache.WeChat
...
@@ -80,4 +80,79 @@ namespace Edu.Cache.WeChat
}
}
}
}
/// <summary>
/// redis缓存
/// </summary>
public
class
WeChatReidsCache2
{
/// <summary>
/// 使用redis第几号库
/// </summary>
public
static
readonly
int
REDIS_DB2
=
2
;
static
readonly
RedisHelper
redis
=
new
RedisHelper
(
REDIS_DB2
);
/// <summary>
/// 设置缓存
/// </summary>
/// <param name="cacheKey"></param>
/// <param name="token"></param>
/// <param name="JwtExpirTime"></param>
public
static
void
TokenSet
(
string
cacheKey
,
string
token
,
int
JwtExpirTime
)
{
try
{
TimeSpan
ts
=
GetExpirTime
(
JwtExpirTime
);
redis
.
StringSet
(
cacheKey
,
token
,
ts
);
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"TokenSet缓存设置失败"
);
}
}
/// <summary>
/// 获取缓存时长
/// </summary>
/// <param name="JwtExpirTime"></param>
/// <returns></returns>
private
static
TimeSpan
GetExpirTime
(
int
JwtExpirTime
)
{
DateTime
dt
=
DateTime
.
Now
;
DateTime
dt2
=
DateTime
.
Now
;
TimeSpan
ts
=
dt
.
AddSeconds
(
JwtExpirTime
)
-
dt2
;
return
ts
;
}
/// <summary>
/// 判断key是否存在
/// </summary>
/// <param name="cacheKey"></param>
/// <returns></returns>
public
static
bool
Exists
(
string
cacheKey
)
{
return
redis
.
KeyExists
(
cacheKey
);
}
/// <summary>
/// 获取缓存
/// </summary>
/// <param name="cacheKey"></param>
/// <param name="Data"></param>
/// <param name="JwtExpirTime"></param>
public
static
string
GetToken
(
string
cacheKey
)
{
try
{
return
redis
.
StringGet
(
cacheKey
);
}
catch
(
Exception
)
{
return
""
;
}
}
}
}
}
\ No newline at end of file
Edu.Common/Config.cs
View file @
b62cf733
...
@@ -738,5 +738,29 @@ namespace Edu.Common
...
@@ -738,5 +738,29 @@ namespace Edu.Common
return
IsOpenChangeClassVerify
;
return
IsOpenChangeClassVerify
;
}
}
}
}
/// <summary>
/// 甲鹤小程序AppId
/// </summary>
public
static
string
AppID
{
get
{
return
"wx38e054ee42b054f4"
;
}
}
/// <summary>
/// 甲鹤小程序AppSecret
/// </summary>
public
static
string
AppSecret
{
get
{
return
"d3ad4699265ba885ae2c8b65bf574ea5"
;
}
}
/// <summary>
/// 微信小程序Api地址
/// </summary>
public
static
string
WechatApi
{
get
{
return
"https://api.weixin.qq.com/"
;
}
}
}
}
}
}
\ No newline at end of file
Edu.Common/Plugin/HttpHelper.cs
View file @
b62cf733
using
System
;
using
Newtonsoft.Json
;
using
Newtonsoft.Json.Linq
;
using
System
;
using
System.Collections.Generic
;
using
System.Drawing
;
using
System.IO
;
using
System.IO
;
using
System.Linq
;
using
System.Net
;
using
System.Net
;
using
System.Net.Http
;
using
System.Text
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Web
;
namespace
Edu.Common.Plugin
namespace
Edu.Common.Plugin
{
{
...
@@ -49,63 +57,62 @@ namespace Edu.Common.Plugin
...
@@ -49,63 +57,62 @@ namespace Edu.Common.Plugin
}
}
/// <summary>
/// <summary>
///
Get获取数据
///
执行HTTP POST请求。
/// </summary>
/// </summary>
/// <param name="url">url地址</param>
/// <param name="url">请求地址</param>
/// <param name="encode">编码方式</param>
/// <param name="postDataStr">请求地址</param>
/// <param name="Source">来源</param>
/// <returns>HTTP响应</returns>
/// <returns></returns>
public
static
string
HttpPost_V2
(
string
url
,
string
postDataStr
,
string
path
)
public
static
string
HttpGet
(
string
url
,
Encoding
encode
,
string
Source
,
string
cookie
=
""
)
{
{
HttpWebRequest
myRequest
=
(
HttpWebRequest
)
WebRequest
.
Create
(
url
);
HttpWebRequest
req
=
(
HttpWebRequest
)
WebRequest
.
Create
(
url
);
if
(!
string
.
IsNullOrEmpty
(
Source
))
req
.
Method
=
"POST"
;
req
.
ContentType
=
"application/octet-stream"
;
req
.
ContentLength
=
Encoding
.
UTF8
.
GetByteCount
(
postDataStr
);
Stream
myRequestStream
=
req
.
GetRequestStream
();
StreamWriter
myStreamWriter
=
new
StreamWriter
(
myRequestStream
);
myStreamWriter
.
Write
(
postDataStr
);
myStreamWriter
.
Close
();
HttpWebResponse
rsp
=
(
HttpWebResponse
)
req
.
GetResponse
();
Encoding
encoding
=
Encoding
.
UTF8
;
if
(!
string
.
IsNullOrWhiteSpace
(
rsp
.
CharacterSet
))
{
{
myRequest
.
Referer
=
Source
;
encoding
=
Encoding
.
GetEncoding
(
rsp
.
CharacterSet
)
;
}
}
if
(!
string
.
IsNullOrEmpty
(
cookie
))
System
.
IO
.
Stream
stream
=
null
;
try
{
{
myRequest
.
Headers
.
Add
(
"cookie"
,
cookie
);
// 以字符流的方式读取HTTP响应
stream
=
rsp
.
GetResponseStream
();
return
ReadImageForStream_V2
(
stream
,
path
);
}
}
myRequest
.
Method
=
"GET"
;
catch
(
Exception
ex
)
HttpWebResponse
myResponse
;
try
{
{
myResponse
=
(
HttpWebResponse
)
myRequest
.
GetResponse
();
LogHelper
.
Write
(
ex
,
"HttpPost_V2"
);
StreamReader
reader
=
new
StreamReader
(
myResponse
.
GetResponseStream
(),
encode
);
return
""
;
string
content
=
reader
.
ReadToEnd
();
return
content
;
}
}
//异常请求
finally
catch
(
WebException
e
)
{
{
myResponse
=
(
HttpWebResponse
)
e
.
Response
;
// 释放资源
using
Stream
errData
=
myResponse
.
GetResponseStream
();
if
(
stream
!=
null
)
stream
.
Close
();
using
StreamReader
reader
=
new
StreamReader
(
errData
);
if
(
rsp
!=
null
)
rsp
.
Close
();
string
text
=
reader
.
ReadToEnd
();
return
text
;
}
}
}
}
/// <summary>
/// <summary>
///
执行HTTP GET请求。
///
获取
/// </summary>
/// </summary>
/// <param name="
url">请求地址
</param>
/// <param name="
imgstream">
</param>
/// <returns>
HTTP响应
</returns>
/// <returns></returns>
public
static
string
HttpGet
(
string
url
)
public
static
string
ReadImageForStream_V2
(
Stream
imgstream
,
string
path
)
{
{
HttpWebRequest
req
=
(
HttpWebRequest
)
WebRequest
.
Create
(
url
);
System
.
Drawing
.
Image
result
=
System
.
Drawing
.
Image
.
FromStream
(
imgstream
);
req
.
Method
=
"GET"
;
System
.
Drawing
.
Bitmap
bit
=
new
System
.
Drawing
.
Bitmap
(
result
);
req
.
ContentType
=
"application/json"
;
bit
.
Save
(
path
,
System
.
Drawing
.
Imaging
.
ImageFormat
.
Jpeg
);
HttpWebResponse
rsp
=
(
HttpWebResponse
)
req
.
GetResponse
();
return
path
;
if
(
string
.
IsNullOrWhiteSpace
(
rsp
.
CharacterSet
))
{
return
GetResponseAsString
(
rsp
,
Encoding
.
UTF8
);
}
else
{
Encoding
encoding
=
Encoding
.
GetEncoding
(
rsp
.
CharacterSet
);
return
GetResponseAsString
(
rsp
,
encoding
);
}
}
}
...
@@ -114,18 +121,11 @@ namespace Edu.Common.Plugin
...
@@ -114,18 +121,11 @@ namespace Edu.Common.Plugin
/// </summary>
/// </summary>
/// <param name="url">请求地址</param>
/// <param name="url">请求地址</param>
/// <returns>HTTP响应</returns>
/// <returns>HTTP响应</returns>
public
static
string
Http
PostStr
(
string
url
,
string
postDataStr
)
public
static
string
Http
Get
(
string
url
)
{
{
HttpWebRequest
req
=
(
HttpWebRequest
)
WebRequest
.
Create
(
url
);
HttpWebRequest
req
=
(
HttpWebRequest
)
WebRequest
.
Create
(
url
);
req
.
Method
=
"POST"
;
req
.
Method
=
"GET"
;
req
.
ContentType
=
"application/x-www-form-urlencoded"
;
req
.
ContentType
=
"application/json"
;
byte
[]
data
=
Encoding
.
UTF8
.
GetBytes
(
postDataStr
);
req
.
ContentLength
=
data
.
Length
;
using
(
Stream
reqStream
=
req
.
GetRequestStream
())
{
reqStream
.
Write
(
data
,
0
,
data
.
Length
);
reqStream
.
Close
();
}
HttpWebResponse
rsp
=
(
HttpWebResponse
)
req
.
GetResponse
();
HttpWebResponse
rsp
=
(
HttpWebResponse
)
req
.
GetResponse
();
if
(
string
.
IsNullOrWhiteSpace
(
rsp
.
CharacterSet
))
if
(
string
.
IsNullOrWhiteSpace
(
rsp
.
CharacterSet
))
{
{
...
@@ -138,33 +138,6 @@ namespace Edu.Common.Plugin
...
@@ -138,33 +138,6 @@ namespace Edu.Common.Plugin
}
}
}
}
/// <summary>
/// 执行HTTP POST请求。
/// </summary>
/// <param name="url">请求地址</param>
/// <param name="postDataStr">请求地址</param>
/// <returns>HTTP响应</returns>
public
static
string
HttpPost
(
string
url
,
string
postDataStr
)
{
HttpWebRequest
req
=
(
HttpWebRequest
)
WebRequest
.
Create
(
url
);
req
.
Method
=
"POST"
;
req
.
ContentType
=
"application/octet-stream"
;
req
.
ContentLength
=
Encoding
.
UTF8
.
GetByteCount
(
postDataStr
);
Stream
myRequestStream
=
req
.
GetRequestStream
();
StreamWriter
myStreamWriter
=
new
StreamWriter
(
myRequestStream
,
Encoding
.
GetEncoding
(
"gb2312"
));
myStreamWriter
.
Write
(
postDataStr
);
myStreamWriter
.
Close
();
HttpWebResponse
rsp
=
(
HttpWebResponse
)
req
.
GetResponse
();
if
(
string
.
IsNullOrWhiteSpace
(
rsp
.
CharacterSet
))
{
return
GetResponseAsStringBase64
(
rsp
);
}
else
{
return
GetResponseAsStringBase64
(
rsp
);
}
}
/// <summary>
/// <summary>
/// 把响应流转换为文本。
/// 把响应流转换为文本。
...
@@ -192,43 +165,8 @@ namespace Edu.Common.Plugin
...
@@ -192,43 +165,8 @@ namespace Edu.Common.Plugin
}
}
}
}
/// <summary>
/// 把响应流转换为文本
/// </summary>
/// <param name="rsp"></param>
/// <returns></returns>
private
static
string
GetResponseAsStringBase64
(
HttpWebResponse
rsp
)
{
System
.
IO
.
Stream
stream
=
null
;
try
{
// 以字符流的方式读取HTTP响应
stream
=
rsp
.
GetResponseStream
();
return
ReadImageForStream
(
stream
);
//转成base 64返回
}
catch
{
return
""
;
}
finally
{
// 释放资源
if
(
stream
!=
null
)
stream
.
Close
();
if
(
rsp
!=
null
)
rsp
.
Close
();
}
}
/// <summary>
/// 获取
/// </summary>
/// <param name="imgstream"></param>
/// <returns></returns>
public
static
string
ReadImageForStream
(
Stream
imgstream
)
{
System
.
Drawing
.
Image
result
=
System
.
Drawing
.
Image
.
FromStream
(
imgstream
);
System
.
Drawing
.
Bitmap
bit
=
new
System
.
Drawing
.
Bitmap
(
result
);
return
BitmapToBase64
(
bit
,
System
.
Drawing
.
Imaging
.
ImageFormat
.
Png
);
}
/// <summary>
/// <summary>
/// bitmap转 base64
/// bitmap转 base64
...
...
Edu.Common/Plugin/WeChatHelper.cs
0 → 100644
View file @
b62cf733
using
Newtonsoft.Json
;
using
Newtonsoft.Json.Linq
;
using
System
;
using
System.Collections.Generic
;
using
System.IO
;
using
System.Net
;
using
System.Text
;
namespace
Edu.Common.Plugin
{
/// <summary>
/// 微信帮助类
/// </summary>
public
class
WeChatHelper
{
/// <summary>
/// 获取access_token
/// </summary>
/// <returns></returns>
public
static
string
GetAccessToken
()
{
string
token
=
string
.
Empty
;
try
{
string
wechatapi
=
Config
.
WechatApi
;
string
appID
=
Config
.
AppID
;
string
appSecret
=
Config
.
AppSecret
;
//获取微信token
string
token_url
=
wechatapi
+
"cgi-bin/token?grant_type=client_credential&appid="
+
appID
+
"&secret="
+
appSecret
;
HttpWebRequest
myRequest
=
(
HttpWebRequest
)
WebRequest
.
Create
(
token_url
);
//请求方式
myRequest
.
Method
=
"GET"
;
HttpWebResponse
myResponse
=
(
HttpWebResponse
)
myRequest
.
GetResponse
();
StreamReader
reader
=
new
StreamReader
(
myResponse
.
GetResponseStream
(),
Encoding
.
UTF8
);
string
content
=
reader
.
ReadToEnd
();
myResponse
.
Close
();
reader
.
Dispose
();
JObject
jo
=
(
JObject
)
JsonConvert
.
DeserializeObject
(
content
);
token
=
jo
[
"access_token"
].
ToString
();
}
catch
(
Exception
ex
)
{
token
=
""
;
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"GetAccessToken"
);
}
return
token
;
}
/// <summary>
/// 生成小程序码
/// </summary>
/// <param name="path"></param>
/// <param name="width"></param>
/// <param name="mallBaseId"></param>
/// <returns></returns>
public
static
string
GetWeiXinQRCode
(
string
token
,
string
path
,
int
width
)
{
if
(!
string
.
IsNullOrEmpty
(
token
))
{
string
GetImageUrl
=
"https://api.weixin.qq.com/wxa/getwxacode?access_token="
+
token
;
//获取小程序码
var
postData
=
new
{
path
,
width
};
string
pathName
=
DateTime
.
Now
.
Ticks
+
".jpg"
;
string
basepath
=
AppContext
.
BaseDirectory
;
string
tempPath
=
basepath
+
"\\upfile\\temporary\\"
;
if
(!
Directory
.
Exists
(
tempPath
))
{
Directory
.
CreateDirectory
(
tempPath
);
}
var
Robj
=
HttpHelper
.
HttpPost_V2
(
GetImageUrl
,
JsonHelper
.
Serialize
(
postData
),
tempPath
+
pathName
);
return
"/upfile/temporary/"
+
pathName
;
}
return
""
;
}
}
}
Edu.Module.Course/OrderModule2.cs
View file @
b62cf733
...
@@ -203,7 +203,7 @@ namespace Edu.Module.Course
...
@@ -203,7 +203,7 @@ namespace Edu.Module.Course
ProtocolNum
=
Common
.
ConvertHelper
.
FormatDate
(
DateTime
.
Now
),
ProtocolNum
=
Common
.
ConvertHelper
.
FormatDate
(
DateTime
.
Now
),
PartyAName
=
guestModel
.
GuestName
,
PartyAName
=
guestModel
.
GuestName
,
PartyAGuardian
=
""
,
PartyAGuardian
=
""
,
PartyBName
=
"
"
,
PartyBName
=
"成都市锦江区甲鹤外语培训学校有限公司
"
,
PartyBLegal
=
""
,
PartyBLegal
=
""
,
SignDate
=
null
,
SignDate
=
null
,
OldSaleMan
=
saleMan
?.
AccountName
??
""
,
OldSaleMan
=
saleMan
?.
AccountName
??
""
,
...
...
Edu.Module.EduTask/EducationReceiptModule.cs
View file @
b62cf733
...
@@ -1108,6 +1108,7 @@ namespace Edu.Module.EduTask
...
@@ -1108,6 +1108,7 @@ namespace Edu.Module.EduTask
//退课
//退课
if
(
receiptModel
.
ReceiptType
==
Common
.
Enum
.
Finance
.
ReceiptTypeEnum
.
BackClass
)
if
(
receiptModel
.
ReceiptType
==
Common
.
Enum
.
Finance
.
ReceiptTypeEnum
.
BackClass
)
{
{
if
(
auditModel
.
AuditStatus
==
2
)
if
(
auditModel
.
AuditStatus
==
2
)
{
{
flag
=
student_BackClassRepository
.
UpdateStudentBackClassRepository
(
receiptModel
,
auditModel
);
flag
=
student_BackClassRepository
.
UpdateStudentBackClassRepository
(
receiptModel
,
auditModel
);
...
...
Edu.Repository/BackClass/RB_Student_BackClassRepository.cs
View file @
b62cf733
...
@@ -4,9 +4,11 @@ using Edu.Model.Entity.Course;
...
@@ -4,9 +4,11 @@ using Edu.Model.Entity.Course;
using
Edu.Model.Entity.EduTask
;
using
Edu.Model.Entity.EduTask
;
using
Edu.Model.Entity.Sell
;
using
Edu.Model.Entity.Sell
;
using
Edu.Model.ViewModel.BackClass
;
using
Edu.Model.ViewModel.BackClass
;
using
Edu.Model.ViewModel.Contract
;
using
Edu.Model.ViewModel.Course
;
using
Edu.Model.ViewModel.Course
;
using
Edu.Model.ViewModel.EduTask
;
using
Edu.Model.ViewModel.EduTask
;
using
Edu.Model.ViewModel.Sell
;
using
Edu.Model.ViewModel.Sell
;
using
Edu.Repository.Contract
;
using
Edu.Repository.Course
;
using
Edu.Repository.Course
;
using
Edu.Repository.EduTask
;
using
Edu.Repository.EduTask
;
using
Edu.Repository.Sell
;
using
Edu.Repository.Sell
;
...
@@ -39,6 +41,11 @@ namespace Edu.Repository.BackClass
...
@@ -39,6 +41,11 @@ namespace Edu.Repository.BackClass
/// </summary>
/// </summary>
private
readonly
RB_Order_ChangeRepository
order_ChangeRepository
=
new
RB_Order_ChangeRepository
();
private
readonly
RB_Order_ChangeRepository
order_ChangeRepository
=
new
RB_Order_ChangeRepository
();
/// <summary>
/// 退课协议仓储层对象
/// </summary>
private
readonly
RB_BackClass_ProtocolRepository
backClass_ProtocolRepository
=
new
RB_BackClass_ProtocolRepository
();
/// <summary>
/// <summary>
/// 获取学员退课单据列表
/// 获取学员退课单据列表
/// </summary>
/// </summary>
...
@@ -103,6 +110,11 @@ WHERE 1=1 ");
...
@@ -103,6 +110,11 @@ WHERE 1=1 ");
{
{
{
nameof
(
RB_Student_BackClass_ViewModel
.
AuditStatus
),
auditModel
.
AuditStatus
}
{
nameof
(
RB_Student_BackClass_ViewModel
.
AuditStatus
),
auditModel
.
AuditStatus
}
};
};
//退课协议审核状态
Dictionary
<
string
,
object
>
backprotocolFileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_BackClass_Protocol_ViewModel
.
AuditStatus
),
auditModel
.
AuditStatus
}
};
if
(!
string
.
IsNullOrEmpty
(
auditModel
.
RecipientIds
))
if
(!
string
.
IsNullOrEmpty
(
auditModel
.
RecipientIds
))
{
{
backFileds
.
Add
(
nameof
(
RB_Student_BackClass_ViewModel
.
RecipientIds
),
auditModel
.
RecipientIds
);
backFileds
.
Add
(
nameof
(
RB_Student_BackClass_ViewModel
.
RecipientIds
),
auditModel
.
RecipientIds
);
...
@@ -113,6 +125,17 @@ WHERE 1=1 ");
...
@@ -113,6 +125,17 @@ WHERE 1=1 ");
backFileds
.
Add
(
nameof
(
RB_Student_BackClass_ViewModel
.
RealityBackMoney
),
auditModel
.
BackMoney
);
backFileds
.
Add
(
nameof
(
RB_Student_BackClass_ViewModel
.
RealityBackMoney
),
auditModel
.
BackMoney
);
}
}
bool
flag
=
base
.
Update
(
backFileds
,
new
WhereHelper
(
nameof
(
RB_Student_BackClass_ViewModel
.
BackId
),
backModel
.
BackId
));
bool
flag
=
base
.
Update
(
backFileds
,
new
WhereHelper
(
nameof
(
RB_Student_BackClass_ViewModel
.
BackId
),
backModel
.
BackId
));
if
(
flag
)
{
if
(
auditModel
.
AuditStatus
==
2
)
{
//审核通过自动盖章
backprotocolFileds
.
Add
(
nameof
(
RB_BackClass_Protocol_ViewModel
.
IsCompanySeal
),
1
);
}
//更新退课协议审核状态
flag
=
backClass_ProtocolRepository
.
Update
(
backprotocolFileds
,
new
WhereHelper
(
nameof
(
RB_BackClass_Protocol_ViewModel
.
BackId
),
backModel
.
BackId
));
}
if
(
flag
)
if
(
flag
)
{
{
var
guestList
=
order_GuestRepository
.
GetOrderGuestListRepository
(
new
RB_Order_Guest_ViewModel
()
{
OrderId
=
backModel
.
OrderId
});
var
guestList
=
order_GuestRepository
.
GetOrderGuestListRepository
(
new
RB_Order_Guest_ViewModel
()
{
OrderId
=
backModel
.
OrderId
});
...
@@ -125,6 +148,7 @@ WHERE 1=1 ");
...
@@ -125,6 +148,7 @@ WHERE 1=1 ");
};
};
flag
=
orderRepository
.
Update
(
orderFileds
,
new
WhereHelper
(
nameof
(
RB_Order
.
OrderId
),
backModel
.
OrderId
));
flag
=
orderRepository
.
Update
(
orderFileds
,
new
WhereHelper
(
nameof
(
RB_Order
.
OrderId
),
backModel
.
OrderId
));
}
}
}
}
if
(
flag
)
if
(
flag
)
{
{
...
...
Edu.WebApi/Controllers/EduTask/EducationReceiptController.cs
View file @
b62cf733
...
@@ -45,7 +45,6 @@ namespace Edu.WebApi.Controllers.EduTask
...
@@ -45,7 +45,6 @@ namespace Edu.WebApi.Controllers.EduTask
Conditon
=
(
EduReceiptConditionEnum
)
base
.
ParmJObj
.
GetInt
(
"Conditon"
),
Conditon
=
(
EduReceiptConditionEnum
)
base
.
ParmJObj
.
GetInt
(
"Conditon"
),
ReceiptType
=
base
.
ParmJObj
.
GetInt
(
"ReceiptType"
),
ReceiptType
=
base
.
ParmJObj
.
GetInt
(
"ReceiptType"
),
Title
=
base
.
ParmJObj
.
GetStringValue
(
"Title"
),
Title
=
base
.
ParmJObj
.
GetStringValue
(
"Title"
),
};
};
if
(!
string
.
IsNullOrEmpty
(
base
.
ParmJObj
.
GetStringValue
(
"VerifyStatus"
)))
if
(!
string
.
IsNullOrEmpty
(
base
.
ParmJObj
.
GetStringValue
(
"VerifyStatus"
)))
{
{
...
...
Edu.WebApi/Controllers/User/LoginController.cs
View file @
b62cf733
...
@@ -53,21 +53,46 @@ namespace Edu.WebApi.Controllers.User
...
@@ -53,21 +53,46 @@ namespace Edu.WebApi.Controllers.User
[
AllowAnonymous
]
[
AllowAnonymous
]
public
ApiResult
Test
()
public
ApiResult
Test
()
{
{
Common
.
Message
.
MessageHelper
.
SendMessage
(
new
Common
.
Message
.
PushMessageModel
()
//Common.Message.MessageHelper.SendMessage(new Common.Message.PushMessageModel()
//{
// CategoryId = 0,
// Content = "1111",
// CoverImg = "",
// CreateByName = "HK",
// JumpUrl = "",
// MsgSign = "1",
// MsgTemplateCode = "",
// Platform = 2,
// ReceiveId = "1",
// SendTime = DateTime.Now,
// SendType = 0,
// Title = "HKHK"
//});
string
tokenKey
=
"DATA_WeiXinToken_"
+
Common
.
Config
.
AppID
;
string
cacheToken
=
Cache
.
WeChat
.
WeChatReidsCache2
.
GetToken
(
tokenKey
);
string
token
=
"47_9obW5f9I6EO6kguMoFDQs8xl4R3GInLj1zjCVXejcGrRuOQAirkTi8almOQhbImZEdXiZM5EZmuQXXzDrvWgy8kvz5VJCqVG82TsdOXBWda6fkPerionkQwJj1aG6rsSKhrza-7KLuKudkbXMMJdAIASSP"
;
//token = Common.Plugin.WeChatHelper.GetAccessToken();
//if (!string.IsNullOrEmpty(cacheToken))
//{
// token = cacheToken;
//}
//else
//{
//}
Console
.
WriteLine
(
string
.
Format
(
"Token::: {0}"
,
token
));
if
(!
string
.
IsNullOrEmpty
(
token
))
{
{
CategoryId
=
0
,
// Cache.WeChat.WeChatReidsCache2.TokenSet(tokenKey, token, 100000);
Content
=
"1111"
,
string
filePath
=
Common
.
Plugin
.
WeChatHelper
.
GetWeiXinQRCode
(
token
,
"/pages/index/index"
,
430
);
CoverImg
=
""
,
Console
.
WriteLine
(
filePath
);
CreateByName
=
"HK"
,
Console
.
WriteLine
(
string
.
Format
(
"filePath::: {0}"
,
filePath
));
JumpUrl
=
""
,
}
MsgSign
=
"1"
,
Console
.
ReadKey
();
MsgTemplateCode
=
""
,
Platform
=
2
,
ReceiveId
=
"1"
,
SendTime
=
DateTime
.
Now
,
SendType
=
0
,
Title
=
"HKHK"
});
return
ApiResult
.
Success
();
return
ApiResult
.
Success
();
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment