Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
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
黄奎
mall.oytour.com
Commits
71e4b417
Commit
71e4b417
authored
Apr 01, 2022
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
into sdzq-ld
parents
4e1e1440
771e5b59
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
212 additions
and
73 deletions
+212
-73
ConvertHelper.cs
Mall.Common/Plugin/ConvertHelper.cs
+30
-0
HttpHelper.cs
Mall.Common/Plugin/HttpHelper.cs
+14
-16
RB_Education_Activity.cs
Mall.Model/Entity/Education/RB_Education_Activity.cs
+5
-0
RB_Education_Activity_Extend.cs
Mall.Model/Extend/Education/RB_Education_Activity_Extend.cs
+5
-0
ActivityModule.cs
Mall.Module.Education/ActivityModule.cs
+4
-0
RB_Goods_OrderRepository.cs
Mall.Repository/Product/RB_Goods_OrderRepository.cs
+5
-5
AppletEducationController.cs
...WebApi/Controllers/Education/AppletEducationController.cs
+58
-43
EducationController.cs
Mall.WebApi/Controllers/Education/EducationController.cs
+1
-0
TradeController.cs
Mall.WebApi/Controllers/TradePavilion/TradeController.cs
+89
-8
run_5000.cmd
Mall.WebApi/run_5000.cmd
+1
-1
No files found.
Mall.Common/Plugin/ConvertHelper.cs
View file @
71e4b417
...
...
@@ -263,6 +263,36 @@ namespace Mall.Common
return
timeStr
;
}
/// <summary>
/// 格式化时间【yyyy-MM-dd】
/// </summary>
/// <param name="time"></param>
/// <returns></returns>
public
static
string
FormatDate2
(
this
object
time
)
{
string
timeStr
=
""
;
if
(
time
!=
null
)
{
try
{
timeStr
=
Convert
.
ToDateTime
(
time
.
ToString
()).
ToString
(
"yyyy-MM-dd"
);
if
(
timeStr
==
"0001-01-01"
)
{
timeStr
=
""
;
}
else
{
timeStr
=
Convert
.
ToDateTime
(
time
.
ToString
()).
ToString
(
"yyyy-MM-dd HH:mm"
);
}
}
catch
{
}
}
return
timeStr
;
}
/// <summary>
/// 字符串转List
/// </summary>
...
...
Mall.Common/Plugin/HttpHelper.cs
View file @
71e4b417
...
...
@@ -18,8 +18,6 @@ namespace Mall.Common.Plugin
/// </summary>
public
class
HttpHelper
{
/// <summary>
/// Post提交数据
/// </summary>
...
...
@@ -29,7 +27,6 @@ namespace Mall.Common.Plugin
/// <returns></returns>
public
static
string
HttpPost
(
string
url
,
string
body
,
string
contenttype
=
""
)
{
LogHelper
.
Write
(
"测试超时S:"
+
DateTime
.
Now
);
try
{
Encoding
encoding
=
Encoding
.
UTF8
;
...
...
@@ -45,10 +42,9 @@ namespace Mall.Common.Plugin
byte
[]
buffer
=
encoding
.
GetBytes
(
body
);
request
.
ContentLength
=
buffer
.
Length
;
request
.
GetRequestStream
().
Write
(
buffer
,
0
,
buffer
.
Length
);
HttpWebResponse
response
=
(
HttpWebResponse
)
request
.
GetResponse
();
HttpWebResponse
response
=
(
HttpWebResponse
)
request
.
GetResponse
();
using
(
StreamReader
reader
=
new
StreamReader
(
response
.
GetResponseStream
(),
encoding
))
{
LogHelper
.
Write
(
"测试超时E:"
+
DateTime
.
Now
);
return
reader
.
ReadToEnd
();
}
}
...
...
@@ -70,7 +66,7 @@ namespace Mall.Common.Plugin
/// <param name="encode">编码方式</param>
/// <param name="Source">来源</param>
/// <returns></returns>
public
static
string
HttpGet
(
string
url
,
Encoding
encode
,
string
Source
,
string
cookie
=
""
)
public
static
string
HttpGet
(
string
url
,
Encoding
encode
,
string
Source
,
string
cookie
=
""
)
{
HttpWebRequest
myRequest
=
(
HttpWebRequest
)
WebRequest
.
Create
(
url
);
if
(!
string
.
IsNullOrEmpty
(
Source
))
...
...
@@ -138,7 +134,7 @@ namespace Mall.Common.Plugin
HttpWebRequest
req
=
(
HttpWebRequest
)
WebRequest
.
Create
(
url
);
req
.
Method
=
"POST"
;
req
.
ContentType
=
"application/x-www-form-urlencoded"
;
//req.Headers.Add("Accept", "application/json");
//req.Headers.Add("Content-Type", "application/json");
byte
[]
data
=
Encoding
.
UTF8
.
GetBytes
(
postDataStr
);
...
...
@@ -151,7 +147,7 @@ namespace Mall.Common.Plugin
reqStream
.
Close
();
}
HttpWebResponse
rsp
=
(
HttpWebResponse
)
req
.
GetResponse
();
if
(
string
.
IsNullOrWhiteSpace
(
rsp
.
CharacterSet
))
...
...
@@ -255,8 +251,9 @@ namespace Mall.Common.Plugin
/// </summary>
/// <param name="latlng"></param>
/// <returns></returns>
public
static
string
GetGeocoderAddress
(
string
latlng
)
{
string
apiKey
=
"7d9fbeb43e975cd1e9477a7e5d5e192a"
;
public
static
string
GetGeocoderAddress
(
string
latlng
)
{
string
apiKey
=
"7d9fbeb43e975cd1e9477a7e5d5e192a"
;
HttpClient
client
=
new
HttpClient
();
string
url
=
"http://api.map.baidu.com/geocoder?location="
+
latlng
+
"&output=json&key="
+
apiKey
;
try
...
...
@@ -311,7 +308,7 @@ namespace Mall.Common.Plugin
/// <param name="url">请求地址</param>
/// <param name="postDataStr">请求地址</param>
/// <returns>HTTP响应</returns>
public
static
string
HttpPostForGetWXQRCodePath
(
string
url
,
string
postDataStr
,
string
path
)
public
static
string
HttpPostForGetWXQRCodePath
(
string
url
,
string
postDataStr
,
string
path
)
{
HttpWebRequest
req
=
(
HttpWebRequest
)
WebRequest
.
Create
(
url
);
req
.
Method
=
"POST"
;
...
...
@@ -341,7 +338,7 @@ namespace Mall.Common.Plugin
/// <param name="postDataStr"></param>
/// <param name="path"></param>
/// <returns></returns>
public
static
string
HttpPostForGetWXQRCodePathSmallShops
(
string
url
,
string
postDataStr
,
string
path
,
string
ssPhoto
)
public
static
string
HttpPostForGetWXQRCodePathSmallShops
(
string
url
,
string
postDataStr
,
string
path
,
string
ssPhoto
)
{
HttpWebRequest
req
=
(
HttpWebRequest
)
WebRequest
.
Create
(
url
);
req
.
Method
=
"POST"
;
...
...
@@ -407,7 +404,7 @@ namespace Mall.Common.Plugin
stream
=
rsp
.
GetResponseStream
();
return
ReadImageForStream_V2
(
stream
,
path
);
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
LogHelper
.
Write
(
ex
,
"GetResponseAsStringBase64_V2"
);
return
""
;
...
...
@@ -426,7 +423,7 @@ namespace Mall.Common.Plugin
/// <param name="rsp"></param>
/// <param name="encoding"></param>
/// <returns></returns>
private
static
string
GetResponseAsStringBase64_V3
(
HttpWebResponse
rsp
,
Encoding
encoding
,
string
path
,
string
ssPhoto
)
private
static
string
GetResponseAsStringBase64_V3
(
HttpWebResponse
rsp
,
Encoding
encoding
,
string
path
,
string
ssPhoto
)
{
System
.
IO
.
Stream
stream
=
null
;
try
...
...
@@ -453,7 +450,7 @@ namespace Mall.Common.Plugin
/// </summary>
/// <param name="imgstream"></param>
/// <returns></returns>
public
static
string
ReadImageForStream_V2
(
Stream
imgstream
,
string
path
)
public
static
string
ReadImageForStream_V2
(
Stream
imgstream
,
string
path
)
{
System
.
Drawing
.
Image
result
=
System
.
Drawing
.
Image
.
FromStream
(
imgstream
);
System
.
Drawing
.
Bitmap
bit
=
new
System
.
Drawing
.
Bitmap
(
result
);
...
...
@@ -507,7 +504,8 @@ namespace Mall.Common.Plugin
public
static
string
ReadImageForStream_V3
(
Stream
imgstream
,
string
path
,
string
ssPhoto
)
{
System
.
Drawing
.
Image
result
=
System
.
Drawing
.
Image
.
FromStream
(
imgstream
);
if
(!
string
.
IsNullOrEmpty
(
ssPhoto
))
{
if
(!
string
.
IsNullOrEmpty
(
ssPhoto
))
{
WebRequest
wreq
=
WebRequest
.
Create
(
ssPhoto
);
HttpWebResponse
wresp
=
(
HttpWebResponse
)
wreq
.
GetResponse
();
Stream
s
=
wresp
.
GetResponseStream
();
...
...
Mall.Model/Entity/Education/RB_Education_Activity.cs
View file @
71e4b417
...
...
@@ -170,5 +170,10 @@ namespace Mall.Model.Entity.Education
/// 活动总结
/// </summary>
public
string
Summary
{
get
;
set
;
}
/// <summary>
/// 教师编号
/// </summary>
public
int
TeacherId
{
get
;
set
;
}
}
}
Mall.Model/Extend/Education/RB_Education_Activity_Extend.cs
View file @
71e4b417
...
...
@@ -201,5 +201,10 @@ namespace Mall.Model.Extend.Education
/// 是否查询有封面图的活动
/// </summary>
public
string
IsQueryCoverImage
{
get
;
set
;
}
/// <summary>
/// 关联老师名称
/// </summary>
public
string
TeacherName
{
get
;
set
;
}
}
}
Mall.Module.Education/ActivityModule.cs
View file @
71e4b417
...
...
@@ -283,6 +283,8 @@ namespace Mall.Module.Education
if
(
list
!=
null
&&
isQuerySignup
)
{
string
ids
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
Id
));
string
tids
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
TeacherId
));
var
employeeList
=
RB_AccountRepository
.
GetEmployeeListRepository
(
new
Employee_ViewModel
{
School_Id
=
-
1
,
AccountTypeStr
=
"2"
,
}).
ToList
();
List
<
RB_Education_Consult_Extend
>
joinList
=
new
List
<
RB_Education_Consult_Extend
>();
if
(!
string
.
IsNullOrEmpty
(
ids
))
{
...
...
@@ -291,6 +293,7 @@ namespace Mall.Module.Education
foreach
(
var
item
in
list
)
{
item
.
EducationConsultList
=
joinList
?.
Where
(
qitem
=>
qitem
.
ActivityId
==
item
.
Id
)?.
ToList
()
??
new
List
<
RB_Education_Consult_Extend
>();
item
.
TeacherName
=
employeeList
?.
FirstOrDefault
(
qitem
=>
qitem
.
AccountId
==
item
.
TeacherId
)?.
EmployeeName
??
""
;
}
}
return
list
;
...
...
@@ -367,6 +370,7 @@ namespace Mall.Module.Education
{
nameof
(
RB_Education_Activity_Extend
.
LonLat
),
model
.
LonLat
},
{
nameof
(
RB_Education_Activity_Extend
.
LocationName
),
model
.
LocationName
},
{
nameof
(
RB_Education_Activity_Extend
.
LnsideLimit
),
model
.
LnsideLimit
},
{
nameof
(
RB_Education_Activity_Extend
.
TeacherId
),
model
.
TeacherId
},
};
flag
=
education_ActivityRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Education_Activity_Extend
.
Id
),
model
.
Id
),
trans
);
if
(
flag
)
...
...
Mall.Repository/Product/RB_Goods_OrderRepository.cs
View file @
71e4b417
...
...
@@ -84,17 +84,17 @@ namespace Mall.Repository.Product
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
OrderNo
))
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
OrderNo
)}
like @OrderNo "
;
parameters
.
Add
(
"OrderNo"
,
"%"
+
dmodel
.
OrderNo
.
Trim
()
+
"%"
);
parameters
.
Add
(
"OrderNo"
,
"%"
+
Common
.
Plugin
.
StringHelper
.
ReplaceEmoji
(
dmodel
.
OrderNo
.
Trim
())
+
"%"
);
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
MerchantsNo
))
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
MerchantsNo
)}
like @MerchantsNo "
;
parameters
.
Add
(
"MerchantsNo"
,
"%"
+
dmodel
.
MerchantsNo
.
Trim
(
)
+
"%"
);
parameters
.
Add
(
"MerchantsNo"
,
"%"
+
Common
.
Plugin
.
StringHelper
.
ReplaceEmoji
(
dmodel
.
MerchantsNo
.
Trim
()
)
+
"%"
);
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
UserName
))
{
where
+=
$@" and u.
{
nameof
(
RB_Member_User
.
Name
)}
like @UserName "
;
parameters
.
Add
(
"UserName"
,
"%"
+
dmodel
.
UserName
.
Trim
(
)
+
"%"
);
parameters
.
Add
(
"UserName"
,
"%"
+
Common
.
Plugin
.
StringHelper
.
ReplaceEmoji
(
dmodel
.
UserName
.
Trim
()
)
+
"%"
);
}
if
(
dmodel
.
UserId
>
0
)
{
...
...
@@ -103,12 +103,12 @@ namespace Mall.Repository.Product
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
GoodsName
))
{
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
GoodsName
)}
like @GoodsName "
;
parameters
.
Add
(
"GoodsName"
,
"%"
+
dmodel
.
GoodsName
.
Trim
(
)
+
"%"
);
parameters
.
Add
(
"GoodsName"
,
"%"
+
Common
.
Plugin
.
StringHelper
.
ReplaceEmoji
(
dmodel
.
GoodsName
.
Trim
()
)
+
"%"
);
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
Consignee
))
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
Consignee
)}
like @Consignee "
;
parameters
.
Add
(
"Consignee"
,
"%"
+
dmodel
.
Consignee
.
Trim
(
)
+
"%"
);
parameters
.
Add
(
"Consignee"
,
"%"
+
Common
.
Plugin
.
StringHelper
.
ReplaceEmoji
(
dmodel
.
Consignee
.
Trim
()
)
+
"%"
);
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
Mobile
))
{
...
...
Mall.WebApi/Controllers/Education/AppletEducationController.cs
View file @
71e4b417
...
...
@@ -1708,7 +1708,8 @@ namespace Mall.WebApi.Controllers.Education
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetActivityTypeList
(
object
requestMsg
)
{
var
parms
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
...
...
@@ -1730,7 +1731,8 @@ namespace Mall.WebApi.Controllers.Education
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetActivityPage
()
{
var
req
=
RequestParm
;
...
...
@@ -1857,7 +1859,8 @@ namespace Mall.WebApi.Controllers.Education
/// <param name="request"></param>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetActivityDetial
()
{
var
req
=
RequestParm
;
...
...
@@ -2379,7 +2382,8 @@ namespace Mall.WebApi.Controllers.Education
return
ApiResult
.
Failed
(
"未查询到您正在学习的课程,无法绑定信息"
);
}
}
else
{
else
{
return
ApiResult
.
Failed
(
"类型错误"
);
}
...
...
@@ -2473,15 +2477,12 @@ namespace Mall.WebApi.Controllers.Education
#
region
甲小鹤活动
/// <summary>
/// 获取商会活动分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetActivityPageJXH
()
{
...
...
@@ -2497,19 +2498,27 @@ namespace Mall.WebApi.Controllers.Education
EduStudentId
=
RequestParm
.
EduStudentId
};
}
JObject
jObj
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
ResultPageModel
pageModel
=
new
ResultPageModel
()
ResultPageModel
pageModel
=
new
ResultPageModel
();
var
query
=
new
RB_Education_Activity_Extend
();
try
{
pageSize
=
jObj
.
GetInt
(
"pageSize"
),
pageIndex
=
jObj
.
GetInt
(
"pageIndex"
),
};
var
query
=
new
RB_Education_Activity_Extend
()
JObject
jObj
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
pageModel
=
new
ResultPageModel
()
{
pageSize
=
jObj
.
GetInt
(
"pageSize"
),
pageIndex
=
jObj
.
GetInt
(
"pageIndex"
),
};
query
=
new
RB_Education_Activity_Extend
()
{
SelectIsEnd
=
jObj
.
GetInt
(
"SelectIsEnd"
,
0
),
ActivityName
=
jObj
.
GetStringValue
(
"ActivityName"
),
ActivityType
=
jObj
.
GetInt
(
"ActivityType"
,
0
),
};
}
catch
{
SelectIsEnd
=
jObj
.
GetInt
(
"SelectIsEnd"
,
0
),
ActivityName
=
jObj
.
GetStringValue
(
"ActivityName"
),
ActivityType
=
jObj
.
GetInt
(
"ActivityType"
,
0
),
};
}
query
.
IsQueryCoverImage
=
"1"
;
query
.
SelectStartTimeStr
=
System
.
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
);
query
.
SelectEndTimeStr
=
System
.
DateTime
.
Now
.
AddDays
(
60
).
ToString
(
"yyyy-MM-dd"
);
...
...
@@ -2528,7 +2537,6 @@ namespace Mall.WebApi.Controllers.Education
}
}
}
pageModel
.
count
=
Convert
.
ToInt32
(
rowsCount
);
var
result
=
list
.
Select
(
x
=>
new
{
...
...
@@ -2556,18 +2564,15 @@ namespace Mall.WebApi.Controllers.Education
return
ApiResult
.
Success
(
data
:
pageModel
);
}
/// <summary>
/// 获取商会活动分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetUserActivityListJXH
()
{
// var parms = JsonConvert.DeserializeObject<RequestParm>(requestMsg.ToString());
var
req
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
if
(
userInfo
==
null
)
...
...
@@ -2587,9 +2592,6 @@ namespace Mall.WebApi.Controllers.Education
ActivityName
=
jObj
.
GetStringValue
(
"ActivityName"
),
ActivityType
=
jObj
.
GetInt
(
"ActivityType"
,
0
),
};
// query.SelectStartTimeStr = System.DateTime.Now.ToString("yyyy-MM-dd");
// query.SelectEndTimeStr = System.DateTime.Now.AddDays(60).ToString("yyyy-MM-dd");
// query.OrderByStr = "StartTime";
query
.
TenantId
=
userInfo
.
TenantId
;
query
.
MallBaseId
=
userInfo
.
MallBaseId
;
query
.
EduStudentId
=
userInfo
.
EduStudentId
;
...
...
@@ -2626,7 +2628,8 @@ namespace Mall.WebApi.Controllers.Education
/// <param name="request"></param>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetActivityDetialJXH
()
{
var
req
=
RequestParm
;
...
...
@@ -2641,8 +2644,16 @@ namespace Mall.WebApi.Controllers.Education
EduStudentId
=
RequestParm
.
EduStudentId
};
}
JObject
parm
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
int
Id
=
parm
.
GetInt
(
"Id"
);
int
Id
=
0
;
try
{
JObject
parm
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
Id
=
parm
.
GetInt
(
"Id"
);
}
catch
{
}
if
(
Id
==
0
)
{
return
ApiResult
.
Failed
(
"活动id不为空"
);
...
...
@@ -2679,7 +2690,6 @@ namespace Mall.WebApi.Controllers.Education
fileGroup
.
Add
(
new
{
Key
=
i
,
// groupList = group.Where(x => x.Type == item.Key).ToList(),
groupList
=
fileObjectList
});
}
...
...
@@ -2741,14 +2751,13 @@ namespace Mall.WebApi.Controllers.Education
}
}
/// <summary>
/// 取消报名
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
CancelCommerceConsultJXH
()
{
bool
flag
=
false
;
...
...
@@ -2816,19 +2825,20 @@ namespace Mall.WebApi.Controllers.Education
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetUserJoinActivityPageListJXH
()
{
JObject
jObj
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
ResultPageModel
pageModel
=
new
ResultPageModel
()
{
pageSize
=
jObj
.
GetInt
(
"pageSize"
),
pageSize
=
jObj
.
GetInt
(
"pageSize"
),
pageIndex
=
jObj
.
GetInt
(
"pageIndex"
),
};
RB_Education_Consult_Extend
dmodel
=
new
RB_Education_Consult_Extend
()
{
EnrollState
=
jObj
.
GetInt
(
"EnrollState"
),
LinkMan
=
jObj
.
GetStringValue
(
"LinkMan"
),
LinkMan
=
jObj
.
GetStringValue
(
"LinkMan"
),
};
var
userInfo
=
AppletUserInfo
;
if
(
userInfo
==
null
)
...
...
@@ -2912,7 +2922,8 @@ namespace Mall.WebApi.Controllers.Education
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetEduReceiptInfo
()
{
public
ApiResult
GetEduReceiptInfo
()
{
var
userInfo
=
base
.
AppletUserInfo
;
JObject
parms
=
JObject
.
Parse
(
base
.
RequestParm
.
msg
.
ToString
());
int
FinanceId
=
parms
.
GetInt
(
"FinanceId"
,
0
);
...
...
@@ -2943,15 +2954,18 @@ namespace Mall.WebApi.Controllers.Education
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetEduReceiptClaim
()
{
public
ApiResult
SetEduReceiptClaim
()
{
var
userInfo
=
base
.
AppletUserInfo
;
JObject
parms
=
JObject
.
Parse
(
base
.
RequestParm
.
msg
.
ToString
());
int
ReceiptId
=
parms
.
GetInt
(
"ReceiptId"
,
0
);
//收据ID
int
ClaimCode
=
parms
.
GetInt
(
"ClaimCode"
,
0
);
//认领码
if
(
ReceiptId
<=
0
)
{
if
(
ReceiptId
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
if
(
ClaimCode
<=
0
)
{
if
(
ClaimCode
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
...
...
@@ -2960,7 +2974,8 @@ namespace Mall.WebApi.Controllers.Education
{
return
ApiResult
.
Success
();
}
else
{
else
{
return
ApiResult
.
Failed
(
msg
);
}
}
...
...
Mall.WebApi/Controllers/Education/EducationController.cs
View file @
71e4b417
...
...
@@ -2147,6 +2147,7 @@ namespace Mall.WebApi.Controllers.Education
LonLat
=
jObj
.
GetStringValue
(
"LonLat"
),
LocationName
=
jObj
.
GetStringValue
(
"LocationName"
),
LnsideLimit
=
jObj
.
GetInt
(
"LnsideLimit"
,
0
),
TeacherId
=
jObj
.
GetInt
(
"TeacherId"
)
};
try
{
...
...
Mall.WebApi/Controllers/TradePavilion/TradeController.cs
View file @
71e4b417
...
...
@@ -6,6 +6,8 @@ using System.Text;
using
Dnc.Api.Throttle
;
using
Mall.CacheManager.User
;
using
Mall.Common.API
;
using
Mall.Common.Enum
;
using
Mall.Common.Enum.TradePavilion
;
using
Mall.Common.Plugin
;
using
Mall.Model.Extend.TradePavilion
;
using
Mall.Module.TradePavilion
;
...
...
@@ -1459,7 +1461,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
x
.
Address
,
x
.
LatAndLon
,
x
.
Developers
,
OpenTime
=
x
.
OpenTime
.
HasValue
?
x
.
OpenTime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm"
)
:
""
,
OpenTime
=
Common
.
ConvertHelper
.
FormatDate2
(
x
.
OpenTime
)
,
x
.
ProjectType
,
ProjectTypeName
=
x
.
ProjectType
.
GetEnumName
(),
x
.
CarrierSize
,
...
...
@@ -1474,7 +1476,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
x
.
UserName
,
x
.
UserIcon
,
x
.
CarrierMetroList
});
});
return
ApiResult
.
Success
(
data
:
pageModel
);
}
...
...
@@ -1506,8 +1508,87 @@ namespace Mall.WebApi.Controllers.TradePavilion
[
HttpPost
]
public
ApiResult
GetSetCarrier
()
{
RB_Carrier_Extend
query
=
JsonConvert
.
DeserializeObject
<
RB_Carrier_Extend
>(
RequestParm
.
msg
.
ToString
());
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
RB_Carrier_Extend
query
=
new
RB_Carrier_Extend
()
{
ID
=
parms
.
GetInt
(
"ID"
),
CarrierName
=
parms
.
GetStringValue
(
"CarrierName"
),
Logo
=
parms
.
GetStringValue
(
"Logo"
),
VideoUrl
=
parms
.
GetStringValue
(
"VideoUrl"
),
Address
=
parms
.
GetStringValue
(
"Address"
),
LatAndLon
=
parms
.
GetStringValue
(
"LatAndLon"
),
Developers
=
parms
.
GetStringValue
(
"Developers"
),
OpenTime
=
parms
.
GetDateTime
(
"OpenTime"
),
ProjectType
=
(
ProjectTypeEnum
)
parms
.
GetInt
(
"ProjectType"
),
CarrierSize
=
parms
.
GetDecimal
(
"CarrierSize"
),
LayersNum
=
parms
.
GetStringValue
(
"LayersNum"
),
CarNum
=
parms
.
GetInt
(
"CarNum"
),
CarrierPlan
=
parms
.
GetStringValue
(
"CarrierPlan"
),
CarrierTarget
=
parms
.
GetStringValue
(
"CarrierTarget"
),
Location
=
parms
.
GetStringValue
(
"Location"
),
Crowd
=
parms
.
GetStringValue
(
"Crowd"
),
Discount
=
parms
.
GetStringValue
(
"Discount"
),
StartingInfo
=
parms
.
GetStringValue
(
"StartingInfo"
),
ShopNum
=
parms
.
GetInt
(
"ShopNum"
),
BuiltUpArea
=
parms
.
GetDecimal
(
"BuiltUpArea"
),
AreaRequirement
=
parms
.
GetDecimal
(
"AreaRequirement"
),
YeJi
=
parms
.
GetDecimal
(
"YeJi"
),
OpeningStatus
=
parms
.
GetInt
(
"OpeningStatus"
),
};
string
BannerList
=
parms
.
GetStringValue
(
"BannerList"
);
if
(!
string
.
IsNullOrEmpty
(
BannerList
))
{
query
.
BannerList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
string
>>(
BannerList
);
}
string
CarrierMetroList
=
parms
.
GetStringValue
(
"CarrierMetroList"
);
query
.
CarrierMetroList
=
new
List
<
RB_CarrierMetro_Extend
>();
if
(!
string
.
IsNullOrEmpty
(
CarrierMetroList
))
{
JArray
jarray
=
JArray
.
Parse
(
CarrierMetroList
);
if
(
jarray
!=
null
&&
jarray
.
Count
>
0
)
{
foreach
(
var
jItem
in
jarray
)
{
var
sObj
=
JObject
.
Parse
(
jItem
.
ToString
());
query
.
CarrierMetroList
.
Add
(
new
RB_CarrierMetro_Extend
()
{
ID
=
sObj
.
GetInt
(
"ID"
),
MetroNum
=
sObj
.
GetStringValue
(
"MetroNum"
),
MetroName
=
sObj
.
GetStringValue
(
"MetroName"
),
Distance
=
sObj
.
GetStringValue
(
"Distance"
),
CarrierId
=
sObj
.
GetInt
(
"CarrierId"
),
TenantId
=
sObj
.
GetInt
(
"TenantId"
),
MallBaseId
=
sObj
.
GetInt
(
"MallBaseId"
),
Status
=
(
DateStateEnum
)
sObj
.
GetInt
(
"Status"
),
CarrierIds
=
sObj
.
GetStringValue
(
"CarrierIds"
),
});
}
}
}
string
FirstShopNumList
=
parms
.
GetStringValue
(
"FirstShopNumList"
);
query
.
FirstShopNumList
=
new
List
<
FirstShopNumModel
>();
if
(!
string
.
IsNullOrEmpty
(
FirstShopNumList
))
{
JArray
jarray
=
JArray
.
Parse
(
FirstShopNumList
);
if
(
jarray
!=
null
&&
jarray
.
Count
>
0
)
{
foreach
(
var
jItem
in
jarray
)
{
var
sObj
=
JObject
.
Parse
(
jItem
.
ToString
());
query
.
FirstShopNumList
.
Add
(
new
FirstShopNumModel
()
{
Id
=
sObj
.
GetInt
(
"Id"
),
Name
=
sObj
.
GetStringValue
(
"Name"
),
Num
=
sObj
.
GetInt
(
"Num"
)
});
}
}
}
string
HonorList
=
parms
.
GetStringValue
(
"HonorList"
);
if
(!
string
.
IsNullOrEmpty
(
HonorList
))
{
query
.
HonorList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
string
>>(
HonorList
);
}
if
(
string
.
IsNullOrWhiteSpace
(
query
.
CarrierName
))
{
return
ApiResult
.
Failed
(
"请输入载体名称"
);
...
...
@@ -1541,10 +1622,10 @@ namespace Mall.WebApi.Controllers.TradePavilion
{
return
ApiResult
.
Failed
(
"请上传介绍图"
);
}
if
(!
query
.
OpenTime
.
HasValue
)
{
return
ApiResult
.
Failed
(
"请输入开业时间"
);
}
//
if (!query.OpenTime.HasValue)
//
{
//
return ApiResult.Failed("请输入开业时间");
//
}
if
(!
query
.
ProjectType
.
HasValue
)
{
return
ApiResult
.
Failed
(
"请选择项目类型"
);
...
...
Mall.WebApi/run.cmd
→
Mall.WebApi/run
_5000
.cmd
View file @
71e4b417
@echo off
echo ASPNETCORE_ENVIRONMENT=Development
dotnet build
start "Mall.WebApi" dotnet bin\Debug\netcoreapp3.0\Mall.WebApi.dll
start "Mall.WebApi" dotnet bin\Debug\netcoreapp3.0\Mall.WebApi.dll
--urls http://0.0.0.0:5000 --ip="127.0.0.1" --port=5000
exit
\ No newline at end of file
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