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
5351d705
Commit
5351d705
authored
Dec 31, 2021
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
留学 价格设置
parent
7c72ee25
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
316 additions
and
3 deletions
+316
-3
RB_StudyAbroad.cs
Edu.Model/Entity/StudyAbroad/RB_StudyAbroad.cs
+166
-0
StudyAbroadModule.cs
Edu.Module.StudyAbroad/StudyAbroadModule.cs
+57
-0
StudyAbroadController.cs
Edu.WebApi/Controllers/StudyAbroad/StudyAbroadController.cs
+93
-3
No files found.
Edu.Model/Entity/StudyAbroad/RB_StudyAbroad.cs
View file @
5351d705
using
Edu.Common.Enum
;
using
Edu.Common.Enum.Course
;
using
Edu.Common.Enum.Sale
;
using
Edu.Common.Enum.StudyAbroad
;
using
System
;
...
...
@@ -152,5 +153,170 @@ namespace Edu.Model.Entity.StudyAbroad
/// 留学国家编号
/// </summary>
public
int
StudyCountryId
{
get
;
set
;
}
/// <summary>
/// 直客首次报名优惠比例
/// </summary>
public
decimal
B2CRatio
{
get
;
set
;
}
/// <summary>
/// 直客续费优惠比例
/// </summary>
public
decimal
B2CReNewRatio
{
get
;
set
;
}
/// <summary>
/// 一般同行首次报名返佣比例
/// </summary>
public
decimal
B2BRebateRatio
{
get
;
set
;
}
/// <summary>
/// 一般同行首次报名返佣类型
/// </summary>
public
CourseRebateSetEnum
B2BRebateRatioType
{
get
;
set
;
}
/// <summary>
/// 一般同行首次报名返佣课程比例值
/// </summary>
public
decimal
B2BRebateRatioValue
{
get
;
set
;
}
/// <summary>
/// 一般同行续费返佣比例
/// </summary>
public
decimal
B2BReNewRatio
{
get
;
set
;
}
/// <summary>
/// 一般同行续费返佣类型
/// </summary>
public
CourseRebateSetEnum
B2BReNewRatioType
{
get
;
set
;
}
/// <summary>
/// 一般同行续费返佣课程比例值
/// </summary>
public
decimal
B2BReNewRatioValue
{
get
;
set
;
}
/// <summary>
/// 校代同行首次报名返佣比例
/// </summary>
public
decimal
SchoolRebateRatio
{
get
;
set
;
}
/// <summary>
/// 校代同行首次返佣类型
/// </summary>
public
CourseRebateSetEnum
SchoolRebateRatioType
{
get
;
set
;
}
/// <summary>
/// 校代同行首次返佣课程比例值
/// </summary>
public
decimal
SchoolRebateRatioValue
{
get
;
set
;
}
/// <summary>
/// 校代同行续费返佣比例
/// </summary>
public
decimal
SchoolReNewRatio
{
get
;
set
;
}
/// <summary>
/// 校代同行续费返佣类型
/// </summary>
public
CourseRebateSetEnum
SchoolReNewRatioType
{
get
;
set
;
}
/// <summary>
/// 校代同行续费返佣课程比例值
/// </summary>
public
decimal
SchoolReNewRatioValue
{
get
;
set
;
}
/// <summary>
/// 转介首次报名返佣比例
/// </summary>
public
decimal
TransIntroductceRatio
{
get
;
set
;
}
/// <summary>
/// 转介首次报名返佣类型
/// </summary>
public
CourseRebateSetEnum
TransIntroductceRatioType
{
get
;
set
;
}
/// <summary>
/// 转介首次报名返佣课程比例值
/// </summary>
public
decimal
TransIntroductceRatioValue
{
get
;
set
;
}
/// <summary>
/// 转介续费返佣比例
/// </summary>
public
decimal
TransIntroductceReNewRatio
{
get
;
set
;
}
/// <summary>
/// 转介续费返佣类型
/// </summary>
public
CourseRebateSetEnum
TransIntroductceReNewRatioType
{
get
;
set
;
}
/// <summary>
/// 转介续费返佣课程比例值
/// </summary>
public
decimal
TransIntroductceReNewRatioValue
{
get
;
set
;
}
/// <summary>
/// 內推首次报名返佣比例
/// </summary>
public
decimal
InnerRecommendRatio
{
get
;
set
;
}
/// <summary>
/// 內推首次报名返佣类型
/// </summary>
public
CourseRebateSetEnum
InnerRecommendRatioType
{
get
;
set
;
}
/// <summary>
/// 內推首次报名返佣课程比例值
/// </summary>
public
decimal
InnerRecommendRatioValue
{
get
;
set
;
}
/// <summary>
/// 內推续费返佣比例
/// </summary>
public
decimal
InnerRecommendReNewRatio
{
get
;
set
;
}
/// <summary>
/// 內推续费返佣类型
/// </summary>
public
CourseRebateSetEnum
InnerRecommendReNewRatioType
{
get
;
set
;
}
/// <summary>
/// 內推续费返佣课程比例值
/// </summary>
public
decimal
?
InnerRecommendReNewRatioValue
{
get
;
set
;
}
/// <summary>
/// 返佣类型(1比例返佣,2-固定金额返佣)
/// </summary>
public
int
CommissionReType
{
get
;
set
;
}
/// <summary>
/// 直客首次报名返佣比例
/// </summary>
public
decimal
B2CRbRatio
{
get
;
set
;
}
/// <summary>
/// 直客首次报名返佣类型
/// </summary>
public
CourseRebateSetEnum
B2CRbRatioType
{
get
;
set
;
}
/// <summary>
/// 直客首次报名返佣类型值
/// </summary>
public
decimal
B2CRbRatioValue
{
get
;
set
;
}
/// <summary>
/// 直客续费返佣比例
/// </summary>
public
decimal
B2CRNRatio
{
get
;
set
;
}
/// <summary>
/// 直客续费返佣类型
/// </summary>
public
CourseRebateSetEnum
B2CRNRatioType
{
get
;
set
;
}
/// <summary>
/// 直客续费返佣类型值
/// </summary>
public
decimal
B2CRNRatioValue
{
get
;
set
;
}
}
}
Edu.Module.StudyAbroad/StudyAbroadModule.cs
View file @
5351d705
...
...
@@ -379,5 +379,62 @@ namespace Edu.Module.StudyAbroad
bool
flag
=
studyAbroadRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_StudyAbroad_ViewModel
.
Id
),
model
.
Id
));
return
flag
;
}
/// <summary>
/// 设置留学就业产品价格及返佣
/// </summary>
/// <param name="demodel"></param>
/// <returns></returns>
public
string
SetStudyAbroadPrice
(
RB_StudyAbroad_ViewModel
demodel
)
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_StudyAbroad_ViewModel
.
SuggestPrice
),
demodel
.
SuggestPrice
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
SellPrice
),
demodel
.
SellPrice
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
B2CRatio
),
demodel
.
B2CRatio
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
B2CReNewRatio
),
demodel
.
B2CReNewRatio
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
B2BRebateRatio
),
demodel
.
B2BRebateRatio
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
B2BRebateRatioType
),
demodel
.
B2BRebateRatioType
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
B2BRebateRatioValue
),
demodel
.
B2BRebateRatioValue
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
B2BReNewRatio
),
demodel
.
B2BReNewRatio
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
B2BReNewRatioType
),
demodel
.
B2BReNewRatioType
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
B2BReNewRatioValue
),
demodel
.
B2BReNewRatioValue
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
SchoolRebateRatio
),
demodel
.
SchoolRebateRatio
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
SchoolRebateRatioType
),
demodel
.
SchoolRebateRatioType
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
SchoolRebateRatioValue
),
demodel
.
SchoolRebateRatioValue
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
SchoolReNewRatio
),
demodel
.
SchoolReNewRatio
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
SchoolReNewRatioType
),
demodel
.
SchoolReNewRatioType
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
SchoolReNewRatioValue
),
demodel
.
SchoolReNewRatioValue
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
TransIntroductceRatio
),
demodel
.
TransIntroductceRatio
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
TransIntroductceRatioType
),
demodel
.
TransIntroductceRatioType
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
TransIntroductceRatioValue
),
demodel
.
TransIntroductceRatioValue
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
TransIntroductceReNewRatio
),
demodel
.
TransIntroductceReNewRatio
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
TransIntroductceReNewRatioType
),
demodel
.
TransIntroductceReNewRatioType
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
TransIntroductceReNewRatioValue
),
demodel
.
TransIntroductceReNewRatioValue
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
InnerRecommendRatio
),
demodel
.
InnerRecommendRatio
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
InnerRecommendRatioType
),
demodel
.
InnerRecommendRatioType
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
InnerRecommendRatioValue
),
demodel
.
InnerRecommendRatioValue
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
InnerRecommendReNewRatio
),
demodel
.
InnerRecommendReNewRatio
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
InnerRecommendReNewRatioType
),
demodel
.
InnerRecommendReNewRatioType
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
InnerRecommendReNewRatioValue
),
demodel
.
InnerRecommendReNewRatioValue
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
CommissionReType
),
demodel
.
CommissionReType
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
B2CRbRatio
),
demodel
.
B2CRbRatio
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
B2CRbRatioType
),
demodel
.
B2CRbRatioType
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
B2CRbRatioValue
),
demodel
.
B2CRbRatioValue
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
B2CRNRatio
),
demodel
.
B2CRNRatio
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
B2CRNRatioType
),
demodel
.
B2CRNRatioType
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
B2CRNRatioValue
),
demodel
.
B2CRNRatioValue
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
UpdateBy
),
demodel
.
UpdateBy
},
{
nameof
(
RB_StudyAbroad_ViewModel
.
UpdateTime
),
demodel
.
UpdateTime
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_StudyAbroad_ViewModel
.
Id
),
FiledValue
=
demodel
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
bool
flag
=
studyAbroadRepository
.
Update
(
keyValues
,
wheres
);
return
flag
?
""
:
"出错了,请联系管理员"
;
}
}
}
Edu.WebApi/Controllers/StudyAbroad/StudyAbroadController.cs
View file @
5351d705
...
...
@@ -254,12 +254,12 @@ namespace Edu.WebApi.Controllers.StudyAbroad
item
.
SupplierName
,
item
.
School_Id
,
item
.
SchoolName
,
SupplierContract
=
item
.
ContractUrl
,
SupplierContract
=
item
.
ContractUrl
,
item
.
SuggestPrice
,
item
.
SellPrice
,
item
.
Remark
,
item
.
SaleState
,
SaleStateName
=
Common
.
Plugin
.
EnumHelper
.
ToName
(
item
.
SaleState
),
SaleStateName
=
Common
.
Plugin
.
EnumHelper
.
ToName
(
item
.
SaleState
),
item
.
CreateByName
,
CreateTimeStr
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
CreateTime
),
item
.
UpdateByName
,
...
...
@@ -278,10 +278,43 @@ namespace Edu.WebApi.Controllers.StudyAbroad
item
.
ImgCover
,
item
.
Status
,
item
.
ProductType
,
ProductTypeName
=
item
.
ProductType
.
ToName
(),
ProductTypeName
=
item
.
ProductType
.
ToName
(),
item
.
StudyFeature
,
item
.
StudyCountryId
,
item
.
StudyCountryName
,
item
.
B2CRatio
,
item
.
B2CReNewRatio
,
item
.
B2BRebateRatio
,
item
.
B2BRebateRatioType
,
item
.
B2BRebateRatioValue
,
item
.
B2BReNewRatio
,
item
.
B2BReNewRatioType
,
item
.
B2BReNewRatioValue
,
item
.
SchoolRebateRatio
,
item
.
SchoolRebateRatioType
,
item
.
SchoolRebateRatioValue
,
item
.
SchoolReNewRatio
,
item
.
SchoolReNewRatioType
,
item
.
SchoolReNewRatioValue
,
item
.
TransIntroductceRatio
,
item
.
TransIntroductceRatioType
,
item
.
TransIntroductceRatioValue
,
item
.
TransIntroductceReNewRatio
,
item
.
TransIntroductceReNewRatioType
,
item
.
TransIntroductceReNewRatioValue
,
item
.
InnerRecommendRatio
,
item
.
InnerRecommendRatioType
,
item
.
InnerRecommendRatioValue
,
item
.
InnerRecommendReNewRatio
,
item
.
InnerRecommendReNewRatioType
,
item
.
InnerRecommendReNewRatioValue
,
item
.
CommissionReType
,
item
.
B2CRbRatio
,
item
.
B2CRbRatioType
,
item
.
B2CRbRatioValue
,
item
.
B2CRNRatio
,
item
.
B2CRNRatioType
,
item
.
B2CRNRatioValue
});
}
pageModel
.
Count
=
rowsCount
;
...
...
@@ -430,6 +463,30 @@ namespace Edu.WebApi.Controllers.StudyAbroad
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 设置留学就业价格及返佣
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetStudyAbroadPrice
()
{
var
userInfo
=
base
.
UserInfo
;
RB_StudyAbroad_ViewModel
demodel
=
JsonHelper
.
DeserializeObject
<
RB_StudyAbroad_ViewModel
>(
base
.
RequestParm
.
Msg
.
ToString
());
if
(
demodel
.
Id
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递留学就业产品Id"
);
}
demodel
.
UpdateBy
=
userInfo
.
Id
;
demodel
.
UpdateTime
=
DateTime
.
Now
;
string
msg
=
studyAbroadModule
.
SetStudyAbroadPrice
(
demodel
);
if
(
msg
==
""
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
(
msg
);
}
}
/// <summary>
/// 批量设置留学就业价格和优惠
/// </summary>
...
...
@@ -516,6 +573,39 @@ namespace Edu.WebApi.Controllers.StudyAbroad
extModel
.
ImgCover
,
extModel
.
ProductType
,
extModel
.
StudyFeature
,
extModel
.
B2CRatio
,
extModel
.
B2CReNewRatio
,
extModel
.
B2BRebateRatio
,
extModel
.
B2BRebateRatioType
,
extModel
.
B2BRebateRatioValue
,
extModel
.
B2BReNewRatio
,
extModel
.
B2BReNewRatioType
,
extModel
.
B2BReNewRatioValue
,
extModel
.
SchoolRebateRatio
,
extModel
.
SchoolRebateRatioType
,
extModel
.
SchoolRebateRatioValue
,
extModel
.
SchoolReNewRatio
,
extModel
.
SchoolReNewRatioType
,
extModel
.
SchoolReNewRatioValue
,
extModel
.
TransIntroductceRatio
,
extModel
.
TransIntroductceRatioType
,
extModel
.
TransIntroductceRatioValue
,
extModel
.
TransIntroductceReNewRatio
,
extModel
.
TransIntroductceReNewRatioType
,
extModel
.
TransIntroductceReNewRatioValue
,
extModel
.
InnerRecommendRatio
,
extModel
.
InnerRecommendRatioType
,
extModel
.
InnerRecommendRatioValue
,
extModel
.
InnerRecommendReNewRatio
,
extModel
.
InnerRecommendReNewRatioType
,
extModel
.
InnerRecommendReNewRatioValue
,
extModel
.
CommissionReType
,
extModel
.
B2CRbRatio
,
extModel
.
B2CRbRatioType
,
extModel
.
B2CRbRatioValue
,
extModel
.
B2CRNRatio
,
extModel
.
B2CRNRatioType
,
extModel
.
B2CRNRatioValue
};
return
ApiResult
.
Success
(
data
:
obj
);
}
...
...
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