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
37c39d24
Commit
37c39d24
authored
Mar 08, 2021
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
活动调整
parent
b7a590e9
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
289 additions
and
13 deletions
+289
-13
RB_Commerce_Activity.cs
Mall.Model/Entity/TradePavilion/RB_Commerce_Activity.cs
+12
-1
RB_Commerce_Consult.cs
Mall.Model/Entity/TradePavilion/RB_Commerce_Consult.cs
+41
-1
RB_Commerce_Consult_Extend.cs
....Model/Extend/TradePavilion/RB_Commerce_Consult_Extend.cs
+5
-0
CommerceActivityModule.cs
Mall.Module.TradePavilion/CommerceActivityModule.cs
+2
-0
CommerceConsultModule.cs
Mall.Module.TradePavilion/CommerceConsultModule.cs
+180
-5
RB_Commerce_ConsultRepository.cs
...Repository/TradePavilion/RB_Commerce_ConsultRepository.cs
+14
-1
AppletTradeController.cs
...WebApi/Controllers/TradePavilion/AppletTradeController.cs
+8
-3
TradeController.cs
Mall.WebApi/Controllers/TradePavilion/TradeController.cs
+27
-2
No files found.
Mall.Model/Entity/TradePavilion/RB_Commerce_Activity.cs
View file @
37c39d24
...
@@ -92,5 +92,16 @@ namespace Mall.Model.Entity.TradePavilion
...
@@ -92,5 +92,16 @@ namespace Mall.Model.Entity.TradePavilion
/// 报名截止时间
/// 报名截止时间
/// </summary>
/// </summary>
public
DateTime
?
SignEndTime
{
get
;
set
;
}
public
DateTime
?
SignEndTime
{
get
;
set
;
}
/// <summary>
/// 是否免费 1是 2否
/// </summary>
public
int
IsFree
{
get
;
set
;
}
/// <summary>
/// 报名点数
/// </summary>
public
int
Price
{
get
;
set
;
}
}
}
}
}
Mall.Model/Entity/TradePavilion/RB_Commerce_Consult.cs
View file @
37c39d24
...
@@ -55,5 +55,45 @@ namespace Mall.Model.Entity.TradePavilion
...
@@ -55,5 +55,45 @@ namespace Mall.Model.Entity.TradePavilion
/// 删除状态
/// 删除状态
/// </summary>
/// </summary>
public
DateStateEnum
Status
{
get
;
set
;
}
public
DateStateEnum
Status
{
get
;
set
;
}
/// <summary>
/// 报名人数
/// </summary>
public
int
PeopleNum
{
get
;
set
;
}
/// <summary>
/// 单价(点数)
/// </summary>
public
int
UnitPrice
{
get
;
set
;
}
/// <summary>
/// 支付点数
/// </summary>
public
int
Money
{
get
;
set
;
}
/// <summary>
/// 备注
/// </summary>
public
string
Remark
{
get
;
set
;
}
/// <summary>
/// 是否申请取消 1是 2否
/// </summary>
public
int
IsApplyForCancel
{
get
;
set
;
}
/// <summary>
/// 取消备注
/// </summary>
public
string
CancelRemark
{
get
;
set
;
}
/// <summary>
/// 申请取消审核状态 1同意 2拒绝
/// </summary>
public
int
ApplyForCancelStatus
{
get
;
set
;
}
/// <summary>
/// 拒绝备注
/// </summary>
public
string
RejectRemark
{
get
;
set
;
}
}
}
}
}
Mall.Model/Extend/TradePavilion/RB_Commerce_Consult_Extend.cs
View file @
37c39d24
...
@@ -19,5 +19,10 @@ namespace Mall.Model.Extend.TradePavilion
...
@@ -19,5 +19,10 @@ namespace Mall.Model.Extend.TradePavilion
/// 用户编号【查询使用】
/// 用户编号【查询使用】
/// </summary>
/// </summary>
public
string
QUserIds
{
get
;
set
;
}
public
string
QUserIds
{
get
;
set
;
}
/// <summary>
/// 报名状态 1正常 2取消 3查询所有
/// </summary>
public
int
EnrollState
{
get
;
set
;
}
}
}
}
}
Mall.Module.TradePavilion/CommerceActivityModule.cs
View file @
37c39d24
...
@@ -98,6 +98,8 @@ namespace Mall.Module.TradePavilion
...
@@ -98,6 +98,8 @@ namespace Mall.Module.TradePavilion
{
nameof
(
RB_Commerce_Activity_Extend
.
UpdateDate
),
model
.
UpdateDate
},
{
nameof
(
RB_Commerce_Activity_Extend
.
UpdateDate
),
model
.
UpdateDate
},
{
nameof
(
RB_Commerce_Activity_Extend
.
SignStartTime
),
model
.
SignStartTime
},
{
nameof
(
RB_Commerce_Activity_Extend
.
SignStartTime
),
model
.
SignStartTime
},
{
nameof
(
RB_Commerce_Activity_Extend
.
SignEndTime
),
model
.
SignEndTime
},
{
nameof
(
RB_Commerce_Activity_Extend
.
SignEndTime
),
model
.
SignEndTime
},
{
nameof
(
RB_Commerce_Activity_Extend
.
IsFree
),
model
.
IsFree
},
{
nameof
(
RB_Commerce_Activity_Extend
.
Price
),
model
.
Price
},
};
};
flag
=
commerce_ActivityRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Commerce_Activity_Extend
.
Id
),
model
.
Id
));
flag
=
commerce_ActivityRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Commerce_Activity_Extend
.
Id
),
model
.
Id
));
}
}
...
...
Mall.Module.TradePavilion/CommerceConsultModule.cs
View file @
37c39d24
using
Mall.Model.Extend.TradePavilion
;
using
Mall.Model.Extend.TradePavilion
;
using
Mall.Model.Extend.User
;
using
Mall.Repository.Point
;
using
Mall.Repository.TradePavilion
;
using
Mall.Repository.TradePavilion
;
using
Mall.Repository.User
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Text
;
using
System.Text
;
using
System.Linq
;
using
VT.FW.DB
;
using
VT.FW.DB
;
namespace
Mall.Module.TradePavilion
namespace
Mall.Module.TradePavilion
...
@@ -16,6 +20,14 @@ namespace Mall.Module.TradePavilion
...
@@ -16,6 +20,14 @@ namespace Mall.Module.TradePavilion
/// 商会活动报名仓储层对象
/// 商会活动报名仓储层对象
/// </summary>
/// </summary>
private
readonly
RB_Commerce_ConsultRepository
consultRepository
=
new
RB_Commerce_ConsultRepository
();
private
readonly
RB_Commerce_ConsultRepository
consultRepository
=
new
RB_Commerce_ConsultRepository
();
/// <summary>
/// 点数记录表
/// </summary>
private
readonly
RB_Member_PointBalanceRepository
member_PointBalanceRepository
=
new
RB_Member_PointBalanceRepository
();
/// <summary>
/// 用户
/// </summary>
private
readonly
RB_Member_UserRepository
member_UserRepository
=
new
RB_Member_UserRepository
();
/// <summary>
/// <summary>
/// 获取商会活动报名分页列表
/// 获取商会活动报名分页列表
...
@@ -35,27 +47,111 @@ namespace Mall.Module.TradePavilion
...
@@ -35,27 +47,111 @@ namespace Mall.Module.TradePavilion
/// </summary>
/// </summary>
/// <param name="model"></param>
/// <param name="model"></param>
/// <returns></returns>
/// <returns></returns>
public
bool
SetCommerceConsultModule
(
RB_Commerce_Consult_Extend
model
)
public
string
SetCommerceConsultModule
(
RB_Commerce_Consult_Extend
model
)
{
{
var
umodel
=
member_UserRepository
.
GetEntity
(
model
.
UserId
);
bool
flag
;
bool
flag
;
if
(
model
.
Id
>
0
)
if
(
model
.
Id
>
0
)
{
{
var
oldModel
=
consultRepository
.
GetEntity
(
model
.
Id
);
if
(
oldModel
.
Money
!=
model
.
Money
)
{
if
(
umodel
.
PointNum
+
oldModel
.
Money
<
model
.
Money
)
{
return
"您的星星值不足,请充值后再试"
;
}
}
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
{
nameof
(
RB_Commerce_Consult_Extend
.
ActivityId
),
model
.
ActivityId
},
{
nameof
(
RB_Commerce_Consult_Extend
.
ActivityId
),
model
.
ActivityId
},
{
nameof
(
RB_Commerce_Consult_Extend
.
UserId
),
model
.
UserId
},
{
nameof
(
RB_Commerce_Consult_Extend
.
UserId
),
model
.
UserId
},
{
nameof
(
RB_Commerce_Consult_Extend
.
LinkMan
),
model
.
LinkMan
},
{
nameof
(
RB_Commerce_Consult_Extend
.
LinkMan
),
model
.
LinkMan
},
{
nameof
(
RB_Commerce_Consult_Extend
.
LinkTel
),
model
.
LinkTel
},
{
nameof
(
RB_Commerce_Consult_Extend
.
LinkTel
),
model
.
LinkTel
},
{
nameof
(
RB_Commerce_Consult_Extend
.
PeopleNum
),
model
.
PeopleNum
},
{
nameof
(
RB_Commerce_Consult_Extend
.
Money
),
model
.
Money
},
{
nameof
(
RB_Commerce_Consult_Extend
.
Remark
),
model
.
Remark
}
};
};
flag
=
consultRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Commerce_Consult_Extend
.
Id
),
model
.
Id
));
flag
=
consultRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Commerce_Consult_Extend
.
Id
),
model
.
Id
));
if
(
flag
)
{
if
(
oldModel
.
Money
!=
model
.
Money
)
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Member_User_Extend
.
PointNum
),
umodel
.
PointNum
+
oldModel
.
Money
-
model
.
Money
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Member_User_Extend
.
Id
),
FiledValue
=
umodel
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
member_UserRepository
.
Update
(
keyValues
,
wheres
);
int
diff
=
model
.
Money
-
oldModel
.
Money
;
string
Remarks
;
if
(
diff
>
0
)
{
Remarks
=
"修改活动报名人数,增加使用点数:"
+
diff
;
}
else
{
Remarks
=
"修改活动报名人数,退回使用点数:"
+
(
0
-
diff
);
}
member_PointBalanceRepository
.
Insert
(
new
Model
.
Entity
.
User
.
RB_Member_PointBalance
()
{
Id
=
0
,
UserId
=
umodel
.
Id
,
Type
=
Common
.
Enum
.
MarketingCenter
.
RecordTypeEnum
.
Expend
,
TenantId
=
umodel
.
TenantId
,
OrderId
=
0
,
PlatformType
=
Common
.
Enum
.
User
.
UserSourceEnum
.
WeiXin
,
MallBaseId
=
umodel
.
MallBaseId
,
PonitNum
=
diff
,
CreateDate
=
DateTime
.
Now
,
Description
=
Remarks
,
Remarks
=
Remarks
});
}
}
}
}
else
else
{
{
if
(
model
.
Money
>
0
)
{
if
(
umodel
.
PointNum
<
model
.
Money
)
{
return
"您的星星值不足,请充值后再试"
;
}
}
var
newId
=
consultRepository
.
Insert
(
model
);
var
newId
=
consultRepository
.
Insert
(
model
);
model
.
Id
=
newId
;
model
.
Id
=
newId
;
flag
=
newId
>
0
;
flag
=
newId
>
0
;
if
(
flag
)
{
if
(
model
.
Money
>
0
)
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Member_User_Extend
.
PointNum
),
umodel
.
PointNum
-
model
.
Money
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Member_User_Extend
.
Id
),
FiledValue
=
umodel
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
}
return
flag
;
};
member_UserRepository
.
Update
(
keyValues
,
wheres
);
member_PointBalanceRepository
.
Insert
(
new
Model
.
Entity
.
User
.
RB_Member_PointBalance
()
{
Id
=
0
,
UserId
=
umodel
.
Id
,
Type
=
Common
.
Enum
.
MarketingCenter
.
RecordTypeEnum
.
Expend
,
TenantId
=
umodel
.
TenantId
,
OrderId
=
0
,
PlatformType
=
Common
.
Enum
.
User
.
UserSourceEnum
.
WeiXin
,
MallBaseId
=
umodel
.
MallBaseId
,
PonitNum
=
model
.
Money
,
CreateDate
=
DateTime
.
Now
,
Description
=
"活动报名,使用点数:"
+
model
.
Money
,
Remarks
=
"活动报名,使用点数:"
+
model
.
Money
,
});
}
}
}
return
flag
?
""
:
"出错了,请联系管理员"
;
}
}
/// <summary>
/// <summary>
...
@@ -90,7 +186,25 @@ namespace Mall.Module.TradePavilion
...
@@ -90,7 +186,25 @@ namespace Mall.Module.TradePavilion
/// <param name="Id"></param>
/// <param name="Id"></param>
/// <param name="Status"></param>
/// <param name="Status"></param>
/// <returns></returns>
/// <returns></returns>
public
bool
CancelCommerceConsultModule
(
int
activityId
,
int
userId
)
public
bool
CancelCommerceConsultModule
(
int
activityId
,
string
cancelRemark
,
int
userId
)
{
bool
flag
;
var
cmodel
=
consultRepository
.
GetCommerceConsultListRepository
(
new
RB_Commerce_Consult_Extend
()
{
ActivityId
=
activityId
,
UserId
=
userId
}).
FirstOrDefault
();
if
(
cmodel
==
null
||
cmodel
.
Status
==
Common
.
Enum
.
DateStateEnum
.
Delete
)
{
return
true
;
}
if
(
cmodel
.
Money
>
0
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Commerce_Consult_Extend
.
IsApplyForCancel
),
1
},
{
nameof
(
RB_Commerce_Consult_Extend
.
CancelRemark
),
cancelRemark
},
};
List
<
WhereHelper
>
list
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(
nameof
(
RB_Commerce_Consult_Extend
.
Id
),
cmodel
)
};
flag
=
consultRepository
.
Update
(
fileds
,
list
);
}
else
{
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
...
@@ -100,8 +214,69 @@ namespace Mall.Module.TradePavilion
...
@@ -100,8 +214,69 @@ namespace Mall.Module.TradePavilion
{
{
new
WhereHelper
(
nameof
(
RB_Commerce_Consult_Extend
.
ActivityId
),
activityId
),
new
WhereHelper
(
nameof
(
RB_Commerce_Consult_Extend
.
ActivityId
),
activityId
),
new
WhereHelper
(
nameof
(
RB_Commerce_Consult_Extend
.
UserId
),
userId
),
new
WhereHelper
(
nameof
(
RB_Commerce_Consult_Extend
.
UserId
),
userId
),
};
flag
=
consultRepository
.
Update
(
fileds
,
list
);
}
return
flag
;
}
/// <summary>
/// 客人申请取消
/// </summary>
/// <param name="id"></param>
/// <param name="applyForCancelStatus"></param>
/// <param name="rejectRemark"></param>
/// <returns></returns>
public
bool
SetCommerceConsultApplyCancel
(
int
id
,
int
applyForCancelStatus
,
string
rejectRemark
)
{
var
model
=
consultRepository
.
GetEntity
(
id
);
if
(
model
==
null
||
model
.
Status
==
Common
.
Enum
.
DateStateEnum
.
Delete
)
{
return
false
;
}
int
Status
=
0
;
if
(
applyForCancelStatus
==
1
)
{
Status
=
1
;
}
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Commerce_Consult_Extend
.
Status
),
Status
},
{
nameof
(
RB_Commerce_Consult_Extend
.
ApplyForCancelStatus
),
applyForCancelStatus
},
{
nameof
(
RB_Commerce_Consult_Extend
.
RejectRemark
),
rejectRemark
},
};
List
<
WhereHelper
>
list
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(
nameof
(
RB_Commerce_Consult_Extend
.
Id
),
id
),
};
};
bool
flag
=
consultRepository
.
Update
(
fileds
,
list
);
bool
flag
=
consultRepository
.
Update
(
fileds
,
list
);
if
(
flag
)
{
if
(
model
.
Money
>
0
)
{
var
umodel
=
member_UserRepository
.
GetEntity
(
model
.
UserId
);
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Member_User_Extend
.
PointNum
),
umodel
.
PointNum
+
model
.
Money
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Member_User_Extend
.
Id
),
FiledValue
=
umodel
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
member_UserRepository
.
Update
(
keyValues
,
wheres
);
member_PointBalanceRepository
.
Insert
(
new
Model
.
Entity
.
User
.
RB_Member_PointBalance
()
{
Id
=
0
,
UserId
=
umodel
.
Id
,
Type
=
Common
.
Enum
.
MarketingCenter
.
RecordTypeEnum
.
Expend
,
TenantId
=
umodel
.
TenantId
,
OrderId
=
0
,
PlatformType
=
Common
.
Enum
.
User
.
UserSourceEnum
.
WeiXin
,
MallBaseId
=
umodel
.
MallBaseId
,
PonitNum
=
model
.
Money
,
CreateDate
=
DateTime
.
Now
,
Description
=
"取消活动报名,退回使用点数:"
+
model
.
Money
,
Remarks
=
"取消活动报名,退回使用点数:"
+
model
.
Money
,
});
}
}
return
flag
;
return
flag
;
}
}
}
}
...
...
Mall.Repository/TradePavilion/RB_Commerce_ConsultRepository.cs
View file @
37c39d24
...
@@ -28,13 +28,26 @@ SELECT *
...
@@ -28,13 +28,26 @@ SELECT *
FROM RB_Commerce_Consult
FROM RB_Commerce_Consult
WHERE 1=1
WHERE 1=1
"
);
"
);
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Commerce_Consult_Extend
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
if
(
query
==
null
)
if
(
query
==
null
)
{
{
return
new
List
<
RB_Commerce_Consult_Extend
>();
return
new
List
<
RB_Commerce_Consult_Extend
>();
}
}
else
else
{
{
if
(
query
.
EnrollState
>
0
)
{
if
(
query
.
EnrollState
==
1
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Commerce_Consult_Extend
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
}
else
if
(
query
.
EnrollState
==
2
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Commerce_Consult_Extend
.
Status
),
(
int
)
DateStateEnum
.
Delete
);
}
}
else
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Commerce_Consult_Extend
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
}
if
(
query
.
TenantId
>
0
)
if
(
query
.
TenantId
>
0
)
{
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Commerce_Consult_Extend
.
TenantId
),
query
.
TenantId
);
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Commerce_Consult_Extend
.
TenantId
),
query
.
TenantId
);
...
...
Mall.WebApi/Controllers/TradePavilion/AppletTradeController.cs
View file @
37c39d24
...
@@ -418,6 +418,10 @@ namespace Mall.WebApi.Controllers.TradePavilion
...
@@ -418,6 +418,10 @@ namespace Mall.WebApi.Controllers.TradePavilion
UserId
=
jObj
.
GetInt
(
"UserId"
),
UserId
=
jObj
.
GetInt
(
"UserId"
),
LinkMan
=
jObj
.
GetStringValue
(
"LinkMan"
),
LinkMan
=
jObj
.
GetStringValue
(
"LinkMan"
),
LinkTel
=
jObj
.
GetStringValue
(
"LinkTel"
),
LinkTel
=
jObj
.
GetStringValue
(
"LinkTel"
),
PeopleNum
=
jObj
.
GetInt
(
"PeopleNum"
),
UnitPrice
=
jObj
.
GetInt
(
"UnitPrice"
),
Money
=
jObj
.
GetInt
(
"Money"
),
Remark
=
jObj
.
GetStringValue
(
"Remark"
),
};
};
var
userInfo
=
AppletUserInfo
;
var
userInfo
=
AppletUserInfo
;
extModel
.
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
;
extModel
.
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
;
...
@@ -425,8 +429,8 @@ namespace Mall.WebApi.Controllers.TradePavilion
...
@@ -425,8 +429,8 @@ namespace Mall.WebApi.Controllers.TradePavilion
extModel
.
TenantId
=
userInfo
?.
TenantId
??
0
;
extModel
.
TenantId
=
userInfo
?.
TenantId
??
0
;
extModel
.
UserId
=
userInfo
?.
UserId
??
0
;
extModel
.
UserId
=
userInfo
?.
UserId
??
0
;
extModel
.
CreateTime
=
DateTime
.
Now
;
extModel
.
CreateTime
=
DateTime
.
Now
;
var
fla
g
=
consultModule
.
SetCommerceConsultModule
(
extModel
);
string
ms
g
=
consultModule
.
SetCommerceConsultModule
(
extModel
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
(
);
return
msg
==
""
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
(
msg
);
}
}
/// <summary>
/// <summary>
...
@@ -437,8 +441,9 @@ namespace Mall.WebApi.Controllers.TradePavilion
...
@@ -437,8 +441,9 @@ namespace Mall.WebApi.Controllers.TradePavilion
{
{
JObject
jObj
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
JObject
jObj
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
ActivityId
=
jObj
.
GetInt
(
"ActivityId"
);
var
ActivityId
=
jObj
.
GetInt
(
"ActivityId"
);
string
CancelRemark
=
jObj
.
GetStringValue
(
"CancelRemark"
);
var
userInfo
=
AppletUserInfo
;
var
userInfo
=
AppletUserInfo
;
var
flag
=
consultModule
.
CancelCommerceConsultModule
(
ActivityId
,
userInfo
.
UserId
);
var
flag
=
consultModule
.
CancelCommerceConsultModule
(
ActivityId
,
CancelRemark
,
userInfo
.
UserId
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
}
...
...
Mall.WebApi/Controllers/TradePavilion/TradeController.cs
View file @
37c39d24
...
@@ -336,8 +336,10 @@ namespace Mall.WebApi.Controllers.TradePavilion
...
@@ -336,8 +336,10 @@ namespace Mall.WebApi.Controllers.TradePavilion
CoverImg
=
jObj
.
GetStringValue
(
"CoverImg"
),
CoverImg
=
jObj
.
GetStringValue
(
"CoverImg"
),
ActivityType
=
jObj
.
GetInt
(
"ActivityType"
),
ActivityType
=
jObj
.
GetInt
(
"ActivityType"
),
ActivityInfo
=
jObj
.
GetStringValue
(
"ActivityInfo"
),
ActivityInfo
=
jObj
.
GetStringValue
(
"ActivityInfo"
),
SignStartTime
=
jObj
.
GetDateTime
(
"SignStartTime"
),
SignStartTime
=
jObj
.
GetDateTime
(
"SignStartTime"
),
SignEndTime
=
jObj
.
GetDateTime
(
"SignEndTime"
),
SignEndTime
=
jObj
.
GetDateTime
(
"SignEndTime"
),
IsFree
=
jObj
.
GetInt
(
"IsFree"
,
2
),
Price
=
jObj
.
GetInt
(
"Price"
,
0
)
};
};
try
try
{
{
...
@@ -484,7 +486,8 @@ namespace Mall.WebApi.Controllers.TradePavilion
...
@@ -484,7 +486,8 @@ namespace Mall.WebApi.Controllers.TradePavilion
JObject
jObj
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
JObject
jObj
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
query
=
new
RB_Commerce_Consult_Extend
()
var
query
=
new
RB_Commerce_Consult_Extend
()
{
{
LinkMan
=
jObj
.
GetStringValue
(
"LinkMan"
)
LinkMan
=
jObj
.
GetStringValue
(
"LinkMan"
),
EnrollState
=
jObj
.
GetInt
(
"EnrollState"
,
0
)
};
};
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
...
@@ -518,6 +521,28 @@ namespace Mall.WebApi.Controllers.TradePavilion
...
@@ -518,6 +521,28 @@ namespace Mall.WebApi.Controllers.TradePavilion
var
flag
=
consultModule
.
RemoveCommerceConsultModule
(
Id
,
Status
);
var
flag
=
consultModule
.
RemoveCommerceConsultModule
(
Id
,
Status
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
}
/// <summary>
/// 操作商会活动报名申请取消
/// </summary>
/// <returns></returns>
public
ApiResult
SetCommerceConsultApplyCancel
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
Id
=
parms
.
GetInt
(
"Id"
,
0
);
var
ApplyForCancelStatus
=
parms
.
GetInt
(
"ApplyForCancelStatus"
,
0
);
//申请取消审核状态 1同意 2拒绝
var
RejectRemark
=
parms
.
GetStringValue
(
"RejectRemark"
);
//拒绝备注
if
(
Id
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递"
);
}
if
(
ApplyForCancelStatus
==
2
)
{
if
(
string
.
IsNullOrEmpty
(
RejectRemark
))
{
return
ApiResult
.
ParamIsNull
(
"请输入拒绝的原因"
);
}
}
var
flag
=
consultModule
.
SetCommerceConsultApplyCancel
(
Id
,
ApplyForCancelStatus
,
RejectRemark
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
#
endregion
#
endregion
#
region
新闻信息管理
#
region
新闻信息管理
...
...
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