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
15c748cb
Commit
15c748cb
authored
Feb 05, 2021
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
9a905338
17720bf1
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
415 additions
and
26 deletions
+415
-26
JsonHelper.cs
Mall.Common/Plugin/JsonHelper.cs
+12
-0
PointModule.cs
Mall.Module.Education/PointModule.cs
+14
-13
MiniProgramMsgModule.cs
Mall.Module.User/MiniProgramMsgModule.cs
+2
-2
WeChatPayController.cs
Mall.WebApi/Controllers/AppletWeChat/WeChatPayController.cs
+14
-0
AppletPointController.cs
Mall.WebApi/Controllers/Education/AppletPointController.cs
+2
-1
PointController.cs
Mall.WebApi/Controllers/Education/PointController.cs
+130
-1
TradeController.cs
Mall.WebApi/Controllers/TradePavilion/TradeController.cs
+241
-9
No files found.
Mall.Common/Plugin/JsonHelper.cs
View file @
15c748cb
...
...
@@ -37,6 +37,18 @@ namespace Mall.Common.Plugin
return
result
;
}
/// <summary>
/// 获取日期时间
/// </summary>
/// <param name="jObject"></param>
/// <param name="key"></param>
/// <returns></returns>
public
static
DateTime
GetDateTime
(
this
JObject
jObject
,
string
key
)
{
DateTime
.
TryParse
(
jObject
[
key
]
==
null
?
""
:
jObject
[
key
].
ToString
(),
out
DateTime
result
);
return
result
;
}
/// <summary>
/// 获取Int
/// </summary>
...
...
Mall.Module.Education/PointModule.cs
View file @
15c748cb
...
...
@@ -193,17 +193,18 @@ namespace Mall.Module.Education
/// <returns></returns>
public
bool
UpdatePointOrder
(
RB_Point_Order_Extend
newModel
)
{
var
umodel
=
member_UserRepository
.
GetEntity
(
newModel
.
UserId
);
if
(
umodel
==
null
)
{
return
false
;
}
//判断订单状态是否是待支付 2020-06-16 Add By:W
var
model
=
pointOrderRepository
.
GetEntity
(
newModel
.
ID
);
if
(
model
==
null
)
{
return
false
;
}
var
umodel
=
member_UserRepository
.
GetEntity
(
model
.
UserId
);
if
(
umodel
==
null
)
{
return
false
;
}
if
(
model
.
State
!=
0
)
{
return
false
;
...
...
@@ -220,9 +221,8 @@ namespace Mall.Module.Education
IDictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>
{
{
nameof
(
RB_Point_Order_Extend
.
PaymentTime
),
newModel
.
PaymentTime
},
{
nameof
(
RB_Point_Order_Extend
.
OrderStatus
),
newModel
.
OrderStatus
},
{
nameof
(
RB_Point_Order_Extend
.
MerchantsNo
),
newModel
.
MerchantsNo
},
{
nameof
(
RB_Point_Order_Extend
.
OldPonitNum
),
newModel
.
OldPonitNum
}
{
nameof
(
RB_Point_Order_Extend
.
OrderStatus
),
2
},
{
nameof
(
RB_Point_Order_Extend
.
MerchantsNo
),
newModel
.
MerchantsNo
}
};
IList
<
WhereHelper
>
auditrecordWhereHelpers
=
new
List
<
WhereHelper
>
{
...
...
@@ -250,12 +250,12 @@ namespace Mall.Module.Education
{
UserId
=
model
.
UserId
,
Type
=
Common
.
Enum
.
MarketingCenter
.
RecordTypeEnum
.
Income
,
PonitNum
=
newModel
.
PonitNum
+
newM
odel
.
GivePoint
,
Description
=
"在线购买"
+
model
.
PonitNum
+
"点"
+
(
model
.
GivePoint
>
0
?
(
"赠送"
+
model
.
GivePoint
)
:
""
),
PonitNum
=
model
.
PonitNum
+
m
odel
.
GivePoint
,
Description
=
"在线购买"
+
model
.
PonitNum
+
"点"
+
(
model
.
GivePoint
>
0
?
(
"赠送"
+
model
.
GivePoint
+
"点"
)
:
""
),
CreateDate
=
newModel
.
PaymentTime
,
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
Remarks
=
"订单号:"
+
model
.
OrderNo
+
"在线购买支付"
+
model
.
Income
+
"元"
+
model
.
PonitNum
+
"点"
+
(
model
.
GivePoint
>
0
?
(
"赠送"
+
model
.
GivePoint
)
:
""
),
Remarks
=
"订单号:"
+
model
.
OrderNo
+
"在线购买支付"
+
model
.
Income
+
"元"
+
model
.
PonitNum
+
"点"
+
(
model
.
GivePoint
>
0
?
(
"赠送"
+
model
.
GivePoint
+
"点"
)
:
""
),
PlatformType
=
model
.
OrderSource
};
memberPointBalanceRepository
.
Insert
(
memberBalanceModel
,
trans
);
...
...
@@ -602,6 +602,7 @@ namespace Mall.Module.Education
{
nameof
(
RB_Point_TeacherCourse_Extend
.
MinDuration
),
model
.
MinDuration
},
{
nameof
(
RB_Point_TeacherCourse_Extend
.
StudyDuration
),
model
.
StudyDuration
},
{
nameof
(
RB_Point_TeacherCourse_Extend
.
RoomId
),
model
.
RoomId
},
{
nameof
(
RB_Point_TeacherCourse_Extend
.
DurationUnit
),
model
.
DurationUnit
},
};
IList
<
WhereHelper
>
auditrecordWhereHelpers
=
new
List
<
WhereHelper
>
{
...
...
@@ -879,7 +880,7 @@ namespace Mall.Module.Education
};
flag
=
pointTeacherCourseOrderRepository
.
Update
(
fileds
,
auditrecordWhereHelpers
,
trans
);
pointTeacherCourseOrderRepository
.
DBSession
.
Commit
();
if
(
flag
)
//推送房间信息
{
List
<
string
>
openidList
=
new
List
<
string
>();
...
...
@@ -887,7 +888,7 @@ namespace Mall.Module.Education
new
MiniProgramMsgModule
().
SendCourseOrderTplMsg
(
model
.
TenantId
,
model
.
MallBaseId
,
openidList
,
model
.
CourseName
,
model
.
RoomInfo
,
model
.
StudyDate
.
ToString
(
"MM月dd日"
));
}
}
pointTeacherCourseOrderRepository
.
DBSession
.
Commit
();
return
flag
;
}
...
...
Mall.Module.User/MiniProgramMsgModule.cs
View file @
15c748cb
...
...
@@ -949,11 +949,11 @@ namespace Mall.Module.User
{
thing1
=
new
{
value
=
Title
.
Substring
(
0
,
15
)
value
=
Title
.
Length
>
20
?
Title
.
Substring
(
0
,
15
)
:
Title
},
thing2
=
new
{
value
=
UserName
.
Substring
(
0
,
18
)
value
=
UserName
.
Length
>
20
?
UserName
.
Substring
(
0
,
18
):
UserName
},
time4
=
new
{
...
...
Mall.WebApi/Controllers/AppletWeChat/WeChatPayController.cs
View file @
15c748cb
...
...
@@ -268,6 +268,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
demodel
.
UserId
=
userInfo
.
UserId
;
demodel
.
MallBaseId
=
userInfo
.
MallBaseId
;
demodel
.
TenantId
=
userInfo
.
TenantId
;
demodel
.
OrderSource
=
userModel
.
Source
;
//新增充值记录
int
rechargeId
=
pointModule
.
SetPointOrder
(
demodel
);
if
(
rechargeId
==
0
)
...
...
@@ -587,6 +588,19 @@ namespace Mall.WebApi.Controllers.AppletWeChat
userCommonModule
.
InsertOrderPayInfo
(
demodel
.
UserId
??
0
,
demodel
.
OrderId
,
demodel
.
OrderNo
,
"s1111111111111"
,
Common
.
Enum
.
Goods
.
OrderPayTypeEnum
.
WeChatPay
,
"test"
,
(
demodel
.
Income
??
0
),
System
.
DateTime
.
Now
,
0
);
return
ApiResult
.
Success
(
""
);
}
public
ApiResult
TestUpdatePointOrder
()
{
var
request
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
RB_Point_Order_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Point_Order_Extend
>(
request
.
msg
.
ToString
());
//ID = OrderId, OrderNo = sOrderNo, Income = dPaid, MerchantsNo = TransactionId, PaymentTime = PayDate
pointModule
.
UpdatePointOrder
(
demodel
);
return
ApiResult
.
Success
(
""
);
}
#
endregion
...
...
Mall.WebApi/Controllers/Education/AppletPointController.cs
View file @
15c748cb
...
...
@@ -874,7 +874,8 @@ namespace Mall.WebApi.Controllers.Education
model
.
StudyStartDate
,
model
.
StudyEndDate
,
orderList
,
StudentNumTypeName
=
EnumHelper
.
GetEnumName
(
model
.
StudentNumType
)
StudentNumTypeName
=
EnumHelper
.
GetEnumName
(
model
.
StudentNumType
),
WeekStr
=
StringHelper
.
GetWeek
(
model
.
StudyDate
),
};
return
ApiResult
.
Success
(
""
,
result
);
}
...
...
Mall.WebApi/Controllers/Education/PointController.cs
View file @
15c748cb
...
...
@@ -389,6 +389,134 @@ namespace Mall.WebApi.Controllers.Education
}
/// <summary>
/// 保存课程分类信息
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetConfirmTeacherCourseOrder
()
{
var
parms
=
RequestParm
;
var
userInfo
=
UserInfo
;
var
query
=
JsonConvert
.
DeserializeObject
<
RB_Point_TeacherCourseOrder_Extend
>(
RequestParm
.
msg
.
ToString
());
query
.
TenantId
=
userInfo
.
TenantId
;
query
.
MallBaseId
=
parms
.
MallBaseId
;
if
(
query
==
null
)
{
return
ApiResult
.
Failed
(
"请传入课程订单信息"
);
}
else
{
if
(
query
.
CourseId
==
0
)
{
return
ApiResult
.
Failed
(
"请选择课程信息"
);
}
if
(
query
.
TeacherId
==
0
)
{
return
ApiResult
.
Failed
(
"请传入老师id"
);
}
if
(
string
.
IsNullOrWhiteSpace
(
query
.
RoomInfo
))
{
return
ApiResult
.
Failed
(
"请传入房间信息"
);
}
var
oldcourseOrderList
=
pointModule
.
GetPointOrderList
(
new
RB_Point_TeacherCourseOrder_Extend
{
CourseId
=
query
.
CourseId
,
TeacherId
=
query
.
TeacherId
});
var
updateList
=
new
List
<
RB_Point_TeacherCourseOrder_Extend
>();
if
(
query
.
StudentNumType
==
Common
.
Enum
.
Point
.
StudentNumTypeEnum
.
OneOnOne
)
{
if
(
query
.
ID
==
0
)
{
return
ApiResult
.
Failed
(
"请传入订单号id"
);
}
else
{
updateList
=
oldcourseOrderList
.
Where
(
x
=>
x
.
ID
==
query
.
ID
&&
x
.
OrderStaus
==
Common
.
Enum
.
Point
.
OrderStausEnum
.
Paid
).
ToList
();
}
}
else
{
updateList
=
oldcourseOrderList
.
Where
(
x
=>
x
.
OrderStaus
==
Common
.
Enum
.
Point
.
OrderStausEnum
.
Paid
).
ToList
();
}
if
(
updateList
==
null
||
!
updateList
.
Any
())
{
return
ApiResult
.
Failed
(
"订单已确认"
);
}
updateList
.
ForEach
(
x
=>
x
.
OrderStaus
=
Common
.
Enum
.
Point
.
OrderStausEnum
.
NoClass
);
updateList
.
ForEach
(
x
=>
x
.
UpdateDate
=
System
.
DateTime
.
Now
);
updateList
.
ForEach
(
x
=>
x
.
RoomInfo
=
query
.
RoomInfo
);
bool
result
=
pointModule
.
ConfirmTeacherCourseOrder
(
updateList
);
if
(
result
)
{
return
ApiResult
.
Success
(
"订单确认成功"
);
}
else
{
return
ApiResult
.
Failed
(
"订单确认失败"
);
}
}
}
/// <summary>
/// 保存课程分类信息
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetCompleteTeacherCourseOrder
()
{
var
parms
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
var
query
=
JsonConvert
.
DeserializeObject
<
RB_Point_TeacherCourseOrder_Extend
>(
RequestParm
.
msg
.
ToString
());
query
.
TenantId
=
userInfo
.
TenantId
;
query
.
MallBaseId
=
parms
.
MallBaseId
;
query
.
TeacherId
=
userInfo
.
UserTeacher
;
if
(
query
==
null
)
{
return
ApiResult
.
Failed
(
"请传入课程订单信息"
);
}
else
{
if
(
query
.
ID
==
0
)
{
return
ApiResult
.
Failed
(
"请传入课程订单信息"
);
}
var
oldModel
=
pointModule
.
GetPointOrderList
(
query
).
FirstOrDefault
();
if
(
oldModel
==
null
||
oldModel
.
ID
==
0
)
{
return
ApiResult
.
Failed
(
"请传入课程订单信息"
);
}
oldModel
.
ActualPointNum
=
query
.
ActualPointNum
;
oldModel
.
UpdateDate
=
System
.
DateTime
.
Now
;
oldModel
.
OrderStaus
=
Common
.
Enum
.
Point
.
OrderStausEnum
.
Complete
;
DateTime
nowOrderDate
=
query
.
StudyDate
;
if
(
query
.
DurationUnit
==
Common
.
Enum
.
Point
.
DurationUnitEnum
.
Hour
)
{
nowOrderDate
=
query
.
StudyDate
.
AddMinutes
(
Convert
.
ToDouble
(
query
.
TotalStudyDuration
*
60
));
}
else
{
nowOrderDate
=
query
.
StudyDate
.
AddMinutes
(
Convert
.
ToDouble
(
query
.
TotalStudyDuration
));
}
bool
result
=
pointModule
.
CompleteTeacherCourseOrder
(
oldModel
);
if
(
result
)
{
return
ApiResult
.
Success
(
"订单完成操作成功"
);
}
else
{
return
ApiResult
.
Failed
(
"订单完成操作失败"
);
}
}
}
/// <summary>
/// 获取订单状态枚举
/// </summary>
...
...
@@ -435,7 +563,8 @@ namespace Mall.WebApi.Controllers.Education
StudentNumTypeStr
=
EnumHelper
.
GetEnumName
(
x
.
StudentNumType
),
DurationUnitStr
=
EnumHelper
.
GetEnumName
(
x
.
DurationUnit
),
x
.
PointNum
,
x
.
IsPublic
x
.
IsPublic
,
x
.
Title
});
return
ApiResult
.
Success
(
""
,
pagelist
);
}
...
...
Mall.WebApi/Controllers/TradePavilion/TradeController.cs
View file @
15c748cb
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
Mall.CacheManager.User
;
using
Mall.Common.API
;
using
Mall.Common.Plugin
;
...
...
@@ -9,7 +7,6 @@ using Mall.Model.Extend.TradePavilion;
using
Mall.Module.TradePavilion
;
using
Mall.WebApi.Filter
;
using
Microsoft.AspNetCore.Cors
;
using
Microsoft.AspNetCore.Http
;
using
Microsoft.AspNetCore.Mvc
;
using
Newtonsoft.Json
;
using
Newtonsoft.Json.Linq
;
...
...
@@ -37,6 +34,12 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// </summary>
private
readonly
CompanyModule
companyModule
=
new
CompanyModule
();
/// <summary>
/// 商会活动处理类对象
/// </summary>
private
readonly
CommerceActivityModule
activityModule
=
new
CommerceActivityModule
();
#
region
联系人管理
/// <summary>
...
...
@@ -46,7 +49,11 @@ namespace Mall.WebApi.Controllers.TradePavilion
public
ApiResult
GetContractPageList
()
{
ResultPageModel
pageModel
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
msg
.
ToString
());
var
query
=
JsonConvert
.
DeserializeObject
<
RB_Contract_Extend
>(
RequestParm
.
msg
.
ToString
());
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
query
=
new
RB_Contract_Extend
()
{
Name
=
parms
.
GetStringValue
(
"Name"
)
};
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
var
list
=
module
.
GetContractPageListModule
(
pageModel
.
pageIndex
,
pageModel
.
pageSize
,
out
long
rowsCount
,
query
);
...
...
@@ -71,7 +78,17 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// <returns></returns>
public
ApiResult
SetContract
()
{
var
extModel
=
JsonConvert
.
DeserializeObject
<
RB_Contract_Extend
>(
RequestParm
.
msg
.
ToString
());
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
extModel
=
new
RB_Contract_Extend
()
{
Id
=
parms
.
GetInt
(
"Id"
),
Name
=
parms
.
GetStringValue
(
"Name"
),
Tel
=
parms
.
GetStringValue
(
"Tel"
),
HeadIcon
=
parms
.
GetStringValue
(
"HeadIcon"
),
BgImg
=
parms
.
GetStringValue
(
"BgImg"
),
Position
=
parms
.
GetStringValue
(
"Position"
),
Intro
=
parms
.
GetStringValue
(
"Intro"
)
};
extModel
.
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
;
extModel
.
MallBaseId
=
RequestParm
.
MallBaseId
;
extModel
.
TenantId
=
RequestParm
.
TenantId
;
...
...
@@ -118,7 +135,11 @@ namespace Mall.WebApi.Controllers.TradePavilion
public
ApiResult
GetInvestmentProcurementPage
()
{
ResultPageModel
pageModel
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
msg
.
ToString
());
var
query
=
JsonConvert
.
DeserializeObject
<
RB_InvestmentProcurement_Extend
>(
RequestParm
.
msg
.
ToString
());
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
query
=
new
RB_InvestmentProcurement_Extend
()
{
CompanyName
=
parms
.
GetStringValue
(
"CompanyName"
)
};
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
var
list
=
procurementModule
.
GetInvestmentProcurementPageListModule
(
pageModel
.
pageIndex
,
pageModel
.
pageSize
,
out
long
rowsCount
,
query
);
...
...
@@ -133,7 +154,36 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// <returns></returns>
public
ApiResult
SetInvestmentProcurement
()
{
var
extModel
=
JsonConvert
.
DeserializeObject
<
RB_InvestmentProcurement_Extend
>(
RequestParm
.
msg
.
ToString
());
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
extModel
=
new
RB_InvestmentProcurement_Extend
()
{
Id
=
parms
.
GetInt
(
"Id"
),
Type
=
parms
.
GetInt
(
"Type"
),
GoodsCategory
=
parms
.
GetStringValue
(
"GoodsCategory"
),
Investment
=
parms
.
GetStringValue
(
"Investment"
),
ImportNum
=
parms
.
GetInt
(
"ImportNum"
),
Describe
=
parms
.
GetStringValue
(
"Describe"
),
CompanyName
=
parms
.
GetStringValue
(
"CompanyName"
),
CompanyEnName
=
parms
.
GetStringValue
(
"CompanyEnName"
),
Mobile
=
parms
.
GetStringValue
(
"Mobile"
),
EMail
=
parms
.
GetStringValue
(
"EMail"
),
LegalPerson
=
parms
.
GetStringValue
(
"LegalPerson"
),
Principal
=
parms
.
GetStringValue
(
"Principal"
),
WechatNo
=
parms
.
GetStringValue
(
"WechatNo"
),
DomainUrl
=
parms
.
GetStringValue
(
"DomainUrl"
),
Industry
=
parms
.
GetStringValue
(
"Industry"
),
FoundingTime
=
parms
.
GetDateTime
(
"FoundingTime"
),
EmployeeNum
=
parms
.
GetInt
(
"EmployeeNum"
),
AnnualSales
=
parms
.
GetDecimal
(
"AnnualSales"
),
Address
=
parms
.
GetStringValue
(
"Address"
),
EnAddress
=
parms
.
GetStringValue
(
"EnAddress"
),
AnnualImport
=
parms
.
GetDecimal
(
"AnnualImport"
),
ImportCategory
=
parms
.
GetStringValue
(
"ImportCategory"
),
ImportCountry
=
parms
.
GetStringValue
(
"ImportCountry"
),
ExportCountry
=
parms
.
GetStringValue
(
"ExportCountry"
),
CompanyIntro
=
parms
.
GetStringValue
(
"CompanyIntro"
),
OtherInfo
=
parms
.
GetStringValue
(
"OtherInfo"
),
};
extModel
.
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
;
extModel
.
MallBaseId
=
RequestParm
.
MallBaseId
;
extModel
.
TenantId
=
RequestParm
.
TenantId
;
...
...
@@ -181,7 +231,11 @@ namespace Mall.WebApi.Controllers.TradePavilion
public
ApiResult
GetCompanyPageList
()
{
ResultPageModel
pageModel
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
msg
.
ToString
());
var
query
=
JsonConvert
.
DeserializeObject
<
RB_Company_Extend
>(
RequestParm
.
msg
.
ToString
());
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
query
=
new
RB_Company_Extend
()
{
CompanyName
=
parms
.
GetStringValue
(
"CompanyName"
)
};
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
var
list
=
companyModule
.
GetCompanyPageListModule
(
pageModel
.
pageIndex
,
pageModel
.
pageSize
,
out
long
rowsCount
,
query
);
...
...
@@ -196,7 +250,31 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// <returns></returns>
public
ApiResult
SetCompany
()
{
var
extModel
=
JsonConvert
.
DeserializeObject
<
RB_Company_Extend
>(
RequestParm
.
msg
.
ToString
());
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
extModel
=
new
RB_Company_Extend
()
{
CompanyId
=
parms
.
GetInt
(
"CompanyId"
),
CompanyName
=
parms
.
GetStringValue
(
"CompanyName"
),
CompanyEnName
=
parms
.
GetStringValue
(
"CompanyEnName"
),
Principal
=
parms
.
GetStringValue
(
"Principal"
),
Mobile
=
parms
.
GetStringValue
(
"Mobile"
),
EMail
=
parms
.
GetStringValue
(
"EMail"
),
LegalPerson
=
parms
.
GetStringValue
(
"LegalPerson"
),
WechatNo
=
parms
.
GetStringValue
(
"WechatNo"
),
CompanyIntro
=
parms
.
GetStringValue
(
"CompanyIntro"
),
DomainUrl
=
parms
.
GetStringValue
(
"DomainUrl"
),
FoundingTime
=
parms
.
GetDateTime
(
"FoundingTime"
),
EmployeeNum
=
parms
.
GetInt
(
"EmployeeNum"
),
AnnualSales
=
parms
.
GetDecimal
(
"AnnualSales"
),
AnnualImport
=
parms
.
GetDecimal
(
"AnnualImport"
),
Address
=
parms
.
GetStringValue
(
"Address"
),
EnAddress
=
parms
.
GetStringValue
(
"EnAddress"
),
Industry
=
parms
.
GetStringValue
(
"Industry"
),
ExportCountry
=
parms
.
GetStringValue
(
"ExportCountry"
),
ImportCountry
=
parms
.
GetStringValue
(
"ImportCountry"
),
ImportCategory
=
parms
.
GetStringValue
(
"ImportCategory"
),
OtherInfo
=
parms
.
GetStringValue
(
"OtherInfo"
),
};
extModel
.
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
;
extModel
.
MallBaseId
=
RequestParm
.
MallBaseId
;
extModel
.
TenantId
=
RequestParm
.
TenantId
;
...
...
@@ -234,5 +312,159 @@ namespace Mall.WebApi.Controllers.TradePavilion
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
#
endregion
#
region
商会活动管理
/// <summary>
/// 获取商会活动分页列表
/// </summary>
/// <returns></returns>
public
ApiResult
GetCommerceActivityPage
()
{
ResultPageModel
pageModel
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
msg
.
ToString
());
JObject
jObj
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
query
=
new
RB_Commerce_Activity_Extend
()
{
ActivityName
=
jObj
.
GetStringValue
(
"ActivityName"
)
};
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
var
list
=
activityModule
.
GetCommerceActivityPageListModule
(
pageModel
.
pageIndex
,
pageModel
.
pageSize
,
out
long
rowsCount
,
query
);
pageModel
.
count
=
Convert
.
ToInt32
(
rowsCount
);
pageModel
.
pageData
=
list
;
return
ApiResult
.
Success
(
data
:
pageModel
);
}
/// <summary>
/// 新增修改商会活动
/// </summary>
/// <returns></returns>
public
ApiResult
SetCommerceActivity
()
{
JObject
jObj
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
extModel
=
new
RB_Commerce_Activity_Extend
()
{
Id
=
jObj
.
GetInt
(
"Id"
),
ActivityName
=
jObj
.
GetStringValue
(
"ActivityName"
),
StartTime
=
jObj
.
GetDateTime
(
"StartTime"
),
EndTime
=
jObj
.
GetDateTime
(
"EndTime"
),
CoverImg
=
jObj
.
GetStringValue
(
"CoverImg"
),
ActivityType
=
jObj
.
GetInt
(
"ActivityType"
),
ActivityInfo
=
jObj
.
GetStringValue
(
"ActivityInfo"
),
};
try
{
extModel
.
CommerceDetailsList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
RB_Commerce_Details_Extend
>>(
jObj
.
GetStringValue
(
"CommerceDetailsList"
));
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"SetCommerceActivity_CommerceDetailsList"
);
}
extModel
.
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
;
extModel
.
MallBaseId
=
RequestParm
.
MallBaseId
;
extModel
.
TenantId
=
RequestParm
.
TenantId
;
Int32
.
TryParse
(
RequestParm
.
uid
,
out
int
Uid
);
extModel
.
CreateBy
=
Uid
;
extModel
.
CreateDate
=
DateTime
.
Now
;
extModel
.
UpdateBy
=
Uid
;
extModel
.
UpdateDate
=
DateTime
.
Now
;
var
flag
=
activityModule
.
SetCommerceActivityModule
(
extModel
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 获取商会活动详情
/// </summary>
/// <returns></returns>
public
ApiResult
GetCommerceActivity
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
Id
=
parms
.
GetInt
(
"Id"
,
0
);
var
extModel
=
activityModule
.
GetCommerceActivityModule
(
Id
);
return
ApiResult
.
Success
(
data
:
extModel
);
}
/// <summary>
/// 更新商户活动状态
/// </summary>
/// <returns></returns>
public
ApiResult
RemoveCommerceActivity
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
Id
=
parms
.
GetInt
(
"Id"
,
0
);
var
Status
=
parms
.
GetInt
(
"Status"
,
0
);
var
flag
=
activityModule
.
RemoveCommerceActivityModule
(
Id
,
Status
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 获取商会活动类型分页列表
/// </summary>
/// <returns></returns>
public
ApiResult
GetCommerceActivityTypePage
()
{
ResultPageModel
pageModel
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
msg
.
ToString
());
JObject
jObj
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
query
=
new
RB_Commerce_ActivityType_Extend
()
{
TypeName
=
jObj
.
GetStringValue
(
"TypeName"
)
};
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
var
list
=
activityModule
.
GetCommerceActivityTypePageListModule
(
pageModel
.
pageIndex
,
pageModel
.
pageSize
,
out
long
rowsCount
,
query
);
pageModel
.
count
=
Convert
.
ToInt32
(
rowsCount
);
pageModel
.
pageData
=
list
;
return
ApiResult
.
Success
(
data
:
pageModel
);
}
/// <summary>
/// 新增修改商会活动类型
/// </summary>
/// <returns></returns>
public
ApiResult
SetCommerceActivityType
()
{
JObject
jObj
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
extModel
=
new
RB_Commerce_ActivityType_Extend
()
{
Id
=
jObj
.
GetInt
(
"Id"
),
TypeName
=
jObj
.
GetStringValue
(
"TypeName"
)
};
extModel
.
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
;
extModel
.
MallBaseId
=
RequestParm
.
MallBaseId
;
extModel
.
TenantId
=
RequestParm
.
TenantId
;
Int32
.
TryParse
(
RequestParm
.
uid
,
out
int
Uid
);
extModel
.
CreateBy
=
Uid
;
extModel
.
CreateDate
=
DateTime
.
Now
;
extModel
.
UpdateBy
=
Uid
;
extModel
.
UpdateDate
=
DateTime
.
Now
;
var
flag
=
activityModule
.
SetCommerceActivityTypeModule
(
extModel
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 获取商会活动类型详情
/// </summary>
/// <returns></returns>
public
ApiResult
GetCommerceActivityType
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
Id
=
parms
.
GetInt
(
"Id"
,
0
);
var
extModel
=
activityModule
.
GetCommerceActivityTypeModule
(
Id
);
return
ApiResult
.
Success
(
data
:
extModel
);
}
/// <summary>
/// 更新商户活动类型状态
/// </summary>
/// <returns></returns>
public
ApiResult
RemoveCommerceActivityType
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
Id
=
parms
.
GetInt
(
"Id"
,
0
);
var
Status
=
parms
.
GetInt
(
"Status"
,
0
);
var
flag
=
activityModule
.
RemoveCommerceActivityTypeModule
(
Id
,
Status
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
#
endregion
}
}
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