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
6c699096
Commit
6c699096
authored
Jun 04, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
94b2c445
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
337 additions
and
14 deletions
+337
-14
RB_Logistics.cs
Mall.Model/Entity/BaseSetUp/RB_Logistics.cs
+8
-0
MallController.cs
Mall.WebApi/Controllers/Mall/MallController.cs
+328
-14
MallBaseController.cs
Mall.WebApi/Controllers/MallBase/MallBaseController.cs
+1
-0
No files found.
Mall.Model/Entity/BaseSetUp/RB_Logistics.cs
View file @
6c699096
...
...
@@ -35,6 +35,14 @@ namespace Mall.Model.Entity.BaseSetUp
/// </summary>
public
string
ExpressBirdAPIKey
{
get
;
set
;
}
/// <summary>
/// 商户id
/// </summary>
public
int
TenantId
{
get
;
set
;
}
/// <summary>
/// 小程序id
/// </summary>
public
int
MallBaseId
{
get
;
set
;
}
}
}
Mall.WebApi/Controllers/Mall/MallController.cs
View file @
6c699096
...
...
@@ -80,6 +80,10 @@ namespace Mall.WebApi.Controllers.MallBase
/// </summary>
private
readonly
MallBaseModule
mallBaseModule
=
new
MallBaseModule
();
/// <summary>
/// 用户积分
/// </summary>
private
readonly
IntegralModule
integralModule
=
new
IntegralModule
();
/// <summary>
/// 小程序首页
...
...
@@ -104,6 +108,9 @@ namespace Mall.WebApi.Controllers.MallBase
var
homePage
=
new
object
();
//底部导航
var
navbar
=
new
object
();
var
setting
=
new
object
();
var
share_setting
=
new
object
();
var
cat_style
=
new
object
();
if
(
MiniAppId
!=
null
&&
!
string
.
IsNullOrEmpty
(
MiniAppId
))
{
//获取小程序信息
...
...
@@ -1171,27 +1178,330 @@ namespace Mall.WebApi.Controllers.MallBase
}
}
#
region
基本设置
//基础配置 Add By:W 2020年6月1号
var
mallBaseModel
=
mallBaseModule
.
GetListRepository
(
new
RB_MallBase_Extend
{
TenantId
=
miniProgram
.
TenantId
??
0
,
MallBaseId
=
miniProgram
.
MallBaseId
}).
FirstOrDefault
();
//获取物流配置
var
logisticsRules
=
mallBaseModule
.
GetLogisticsList
(
new
RB_Logistics
{
TenantId
=
miniProgram
.
TenantId
??
0
,
MallBaseId
=
miniProgram
.
MallBaseId
}).
FirstOrDefault
();
//用户积分
var
integralModel
=
integralModule
.
GetIntegralSettingsList
(
new
RB_Integral_Settings
{
TenantId
=
miniProgram
.
TenantId
??
0
,
MallBaseId
=
miniProgram
.
MallBaseId
}).
FirstOrDefault
();
List
<
string
>
payment_type
=
new
List
<
string
>();
if
(!
string
.
IsNullOrWhiteSpace
(
mallBaseModel
.
PayWay
))
{
foreach
(
var
item
in
mallBaseModel
.
PayWay
.
Split
(
","
))
{
switch
(
item
)
{
case
"1"
:
payment_type
.
Add
(
"online_pay"
);
break
;
case
"2"
:
payment_type
.
Add
(
"huodao"
);
break
;
case
"3"
:
payment_type
.
Add
(
"balance"
);
break
;
default
:
break
;
}
}
}
List
<
string
>
send_type
=
new
List
<
string
>();
if
(!
string
.
IsNullOrWhiteSpace
(
mallBaseModel
.
DeliverWay
))
{
foreach
(
var
item
in
mallBaseModel
.
DeliverWay
.
Split
(
","
))
{
switch
(
item
)
{
case
"1"
:
send_type
.
Add
(
"express"
);
break
;
case
"2"
:
send_type
.
Add
(
"offline"
);
break
;
case
"3"
:
send_type
.
Add
(
"city"
);
break
;
default
:
break
;
}
}
}
List
<
string
>
good_negotiable
=
new
List
<
string
>();
if
(!
string
.
IsNullOrWhiteSpace
(
mallBaseModel
.
ConsultWay
))
{
foreach
(
var
item
in
mallBaseModel
.
ConsultWay
.
Split
(
","
))
{
switch
(
item
)
{
case
"1"
:
good_negotiable
.
Add
(
"contact"
);
break
;
case
"2"
:
good_negotiable
.
Add
(
"contact_tel"
);
break
;
case
"3"
:
good_negotiable
.
Add
(
"contact_web"
);
break
;
default
:
break
;
}
}
}
setting
=
new
{
contact_tel
=
mallBaseModel
?.
ContactNumber
,
over_time
=
mallBaseModel
?.
CancelTime
,
delivery_time
=
mallBaseModel
?.
AutoReceiving
,
after_sale_time
=
mallBaseModel
?.
AfterTime
,
payment_type
=
payment_type
.
ToArray
(),
//支付方式
send_type
=
send_type
.
ToArray
(),
//发货方式
kdniao_mch_id
=
logisticsRules
?.
ExpressBirdID
,
//快递鸟配置
kdniao_api_key
=
logisticsRules
?.
ExpressBirdAPIKey
,
member_integral
=
integralModel
?.
IntegralNum
,
member_integral_rule
=
integralModel
?.
Explain
,
good_negotiable
=
good_negotiable
.
ToArray
(),
//商品面议联系方式
mobile_verify
=
""
,
is_small_app
=
mallBaseModel
?.
TurnMini
,
small_app_id
=
mallBaseModel
?.
MinAppId
,
small_app_url
=
mallBaseModel
?.
MinUrl
,
small_app_pic
=
mallBaseModel
?.
TurnMiniIco
,
is_customer_services
=
mallBaseModel
?.
OnlineService
,
customer_services_pic
=
mallBaseModel
?.
OnlineServiceIco
,
is_dial
=
mallBaseModel
?.
OneCall
,
dial_pic
=
mallBaseModel
?.
OneCallIco
,
is_web_service
=
mallBaseModel
?.
ServiceOutLink
,
web_service_url
=
mallBaseModel
?.
OuterServiceLink
,
web_service_pic
=
mallBaseModel
?.
ServiceOutLinkIco
,
is_quick_navigation
=
mallBaseModel
?.
SuspendBtn
,
quick_navigation_style
=
mallBaseModel
?.
SuspendStyle
,
quick_navigation_opened_pic
=
mallBaseModel
?.
UnfoldIco
,
quick_navigation_closed_pic
=
mallBaseModel
?.
PackUpIco
,
is_show_stock
=
""
,
is_use_stock
=
""
,
sell_out_pic
=
""
,
sell_out_other_pic
=
""
,
is_common_user_member_price
=
mallBaseModel
?.
DetailsMemberPrice
,
is_member_user_member_price
=
mallBaseModel
?.
DetailsVipMemberPrice
,
is_share_price
=
mallBaseModel
?.
DetailsSharePrice
,
is_purchase_frame
=
mallBaseModel
?.
BuySwitch
,
purchase_num
=
mallBaseModel
?.
CarouselOrder
,
is_comment
=
mallBaseModel
?.
DetailsComment
,
is_sales
=
mallBaseModel
?.
DetailsBuyNum
,
is_mobile_auth
=
mallBaseModel
?.
OtherIndexMoblie
,
is_official_account
=
mallBaseModel
?.
OtherTencent
,
is_manual_mobile_auth
=
mallBaseModel
?.
OtherManualMobile
,
is_icon_members_grade
=
mallBaseModel
?.
OtherMemerLevel
,
is_goods_video
=
mallBaseModel
?.
DetailsVideo
,
is_quick_map
=
mallBaseModel
?.
ShortcutNavigation
,
quick_map_pic
=
mallBaseModel
?.
ShortcutNavigationIco
,
quick_map_address
=
mallBaseModel
?.
Address
,
longitude
=
mallBaseModel
?.
LongAndLat
.
Split
(
","
)[
0
],
latitude
=
mallBaseModel
?.
LongAndLat
.
Split
(
","
)[
1
],
is_quick_home
=
mallBaseModel
?.
BackTopNavigation
,
quick_home_pic
=
mallBaseModel
?.
BackTopNavigationIco
,
logo
=
""
,
share_title
=
mallBaseModel
?.
MinShareTitle
,
share_pic
=
mallBaseModel
?.
MinShareIco
,
is_add_app
=
mallBaseModel
?.
MinSwitch
,
add_app_bg_color
=
mallBaseModel
?.
MinBackColor
,
add_app_bg_transparency
=
mallBaseModel
?.
MinBackClarity
,
add_app_bg_radius
=
mallBaseModel
?.
MinBackCircularBead
,
add_app_text
=
mallBaseModel
?.
MinTips
,
add_app_text_color
=
mallBaseModel
?.
MinTipsColor
,
add_app_icon_color_type
=
mallBaseModel
?.
MinIcoColor
,
is_close
=
""
,
business_time_type
=
""
,
business_time_custom_type
=
""
,
business_time_type_day
=
""
,
business_time_type_week
=
""
,
auto_business
=
""
,
auto_business_time
=
""
,
is_icon_super_vip
=
""
,
is_show_normal_vip
=
""
,
is_show_super_vip
=
""
,
is_required_position
=
mallBaseModel
?.
OtherMustAddress
,
is_share_tip
=
mallBaseModel
?.
OtherApplyShare
,
is_show_cart
=
mallBaseModel
?.
ListShopCar
,
is_show_sales_num
=
mallBaseModel
?.
ListBuyCount
,
is_show_goods_name
=
mallBaseModel
?.
ListName
,
is_underline_price
=
mallBaseModel
?.
DetailsLineationPrice
,
is_express
=
mallBaseModel
?.
DeatilsExpress
,
is_not_share_show
=
mallBaseModel
?.
OtherNoShare
,
is_show_cart_fly
=
mallBaseModel
?.
CarSuspendBtn
,
is_show_score_top
=
mallBaseModel
?.
BackTopBtn
,
express_select_type
=
logisticsRules
?.
LogisticsType
,
//待会儿处理
express_aliapy_code
=
logisticsRules
?.
AliyunAppCode
,
is_quick_customize
=
mallBaseModel
?.
Custom
,
quick_customize_pic
=
mallBaseModel
?.
TurnIco
,
quick_customize_open_type
=
""
,
quick_customize_params
=
""
,
quick_customize_link_url
=
mallBaseModel
?.
TurnLink
,
quick_customize_new_params
=
""
,
theme_color
=
""
,
latitude_longitude
=
mallBaseModel
?.
LongAndLat
};
#
endregion
var
setting
=
new
#
region
分销基础信息
var
distributorBasics
=
userModule
.
GetDistributorBasicsInfo
((
miniProgram
.
TenantId
??
0
).
ToString
(),
miniProgram
.
MallBaseId
);
if
(!
string
.
IsNullOrEmpty
(
distributorBasics
.
WithdrawWay
))
{
contact_tel
=
mallBaseModel
.
ContactNumber
,
over_time
=
mallBaseModel
.
CancelTime
,
delivery_time
=
mallBaseModel
.
AutoReceiving
,
after_sale_time
=
mallBaseModel
.
AfterTime
,
payment_type
=
""
,
send_type
=
""
,
kdniao_mch_id
=
""
,
//快递鸟配置
kdniao_api_key
=
""
,
distributorBasics
.
WithdrawWayList
=
JsonConvert
.
DeserializeObject
<
List
<
int
>>(
distributorBasics
.
WithdrawWay
);
}
List
<
string
>
pay_type
=
new
List
<
string
>();
if
(!
string
.
IsNullOrWhiteSpace
(
distributorBasics
.
WithdrawWay
))
{
foreach
(
var
item
in
distributorBasics
.
WithdrawWayList
)
{
switch
(
item
)
{
case
1
:
pay_type
.
Add
(
"auto"
);
break
;
case
2
:
pay_type
.
Add
(
"wechat"
);
break
;
case
3
:
pay_type
.
Add
(
"alipay"
);
break
;
case
4
:
pay_type
.
Add
(
"bank"
);
break
;
case
5
:
pay_type
.
Add
(
"balance"
);
break
;
default
:
break
;
}
}
}
share_setting
=
new
{
level
=
distributorBasics
?.
DistributorTier
,
is_rebate
=
distributorBasics
?.
InPurchasing
,
price_type
=
distributorBasics
?.
DistributorCommissionType
,
first
=
distributorBasics
?.
OneCommission
,
second
=
distributorBasics
?.
TwoCommission
,
third
=
distributorBasics
?.
ThreeCommission
,
share_condition
=
""
,
condition
=
distributorBasics
?.
ReferralsCondition
??
0
,
auto_share_val
=
""
,
share_goods_status
=
""
,
share_goods_warehouse_id
=
""
,
pay_type
=
pay_type
.
ToArray
(),
cash_max_day
=
distributorBasics
?.
DailyWithdrawalLimit
,
min_money
=
distributorBasics
?.
MinimumWithdrawalLimit
,
cash_service_charge
=
distributorBasics
?.
WithdrawFee
,
agree
=
distributorBasics
?.
ApplicationProtocol
,
content
=
distributorBasics
?.
UserNotes
,
pic_url_apply
=
""
,
pic_url_status
=
distributorBasics
?.
BackgroundImage
,
pic_url_home_head
=
distributorBasics
?.
IndexImage
,
become_condition
=
""
,
cat_list
=
""
,
is_show_share_level
=
""
,
};
#
endregion
#
region
share_setting_custom
var
distributorCustom
=
userModule
.
GetDistributorCustomInfo
((
miniProgram
.
TenantId
??
0
).
ToString
(),
miniProgram
.
MallBaseId
);
var
share_setting_custom
=
new
{
menus
=
new
{
money
=
new
{
name
=
distributorCustom
?.
DistributionCommissionName
,
icon
=
distributorCustom
?.
DistributionCommissionImage
,
open_type
=
""
,
url
=
""
,
tel
=
""
},
order
=
new
{
name
=
distributorCustom
?.
DistributionOrderName
,
icon
=
distributorCustom
?.
DistributionOrderImage
,
open_type
=
""
,
url
=
""
,
tel
=
""
},
cash
=
new
{
name
=
distributorCustom
?.
WithdrawDetialsName
,
icon
=
distributorCustom
?.
WithdrawDetialsImage
,
open_type
=
""
,
url
=
""
,
tel
=
""
},
team
=
new
{
name
=
distributorCustom
?.
MyTeamName
,
icon
=
distributorCustom
?.
MyTeamImage
,
open_type
=
""
,
url
=
""
,
tel
=
""
},
qrcode
=
new
{
name
=
distributorCustom
?.
PromoteQRCodeName
,
icon
=
distributorCustom
?.
PromoteQRCodeImage
,
open_type
=
""
,
url
=
""
,
tel
=
""
},
},
words
=
new
{
can_be_presented
=
new
{
name
=
distributorCustom
?.
CommissionForWithdrawalName
,
defaultStr
=
"可提现佣金"
},
already_presented
=
new
{
name
=
distributorCustom
?.
CommissionWithdrawnName
,
defaultStr
=
"已提现佣金"
},
parent_name
=
new
{
name
=
distributorCustom
?.
ReferrerName
,
defaultStr
=
"推荐人"
},
pending_money
=
new
{
name
=
distributorCustom
?.
CommissionTobePaidName
,
defaultStr
=
"待打款佣金"
},
cash
=
new
{
name
=
distributorCustom
?.
WithdrawDepositName
,
defaultStr
=
"提现"
},
user_instructions
=
new
{
name
=
distributorCustom
?.
UserNotesName
,
defaultStr
=
"用户须知"
},
apply_cash
=
new
{
name
=
distributorCustom
?.
IWantToWithdrawName
,
defaultStr
=
"我要提现"
},
cash_type
=
new
{
name
=
distributorCustom
?.
WithdrawalWayName
,
defaultStr
=
"提现方式"
},
cash_money
=
new
{
name
=
distributorCustom
?.
WithdrawalAmountName
,
defaultStr
=
"提现金额"
},
order_money_un
=
new
{
name
=
distributorCustom
?.
OutstandingCommissionName
,
defaultStr
=
"未结算佣金"
},
share_name
=
new
{
name
=
distributorCustom
?.
DistributorName
,
defaultStr
=
"分销商"
},
one_share
=
new
{
name
=
distributorCustom
?.
OneDistributionName
,
defaultStr
=
"一级分销名称"
},
second_share
=
new
{
name
=
distributorCustom
?.
TwoDistributionName
,
defaultStr
=
"二级分销名称"
},
three_share
=
new
{
name
=
distributorCustom
?.
ThreeDistributionName
,
defaultStr
=
"三级分销名称"
},
},
apply
=
new
{
share_apply
=
new
{
name
=
distributorCustom
?.
DistributionApplication
,
defaultStr
=
"分销申请"
},
share_apply_pact
=
new
{
name
=
distributorCustom
?.
ApplicationAgreement
,
defaultStr
=
"分销申请协议"
},
apply_btn_color
=
distributorCustom
?.
ButtonTextColor
,
apply_btn_background
=
distributorCustom
?.
ButtonColor
,
apply_btn_title
=
distributorCustom
?.
ButtonText
,
apply_btn_round
=
distributorCustom
?.
ButtonFilletPX
,
apply_head_pic
=
distributorCustom
?.
HeadImage
,
apply_end_pic
=
distributorCustom
?.
BottomImage
},
};
#
endregion
#
region
商品分类样式
var
productCategoryStyle
=
productModule
.
GetProductCategoryStyleInfo
(
miniProgram
.
TenantId
??
0
,
miniProgram
.
MallBaseId
);
cat_style
=
new
{
cat_style
=
productCategoryStyle
?.
Type
,
recommend_count
=
productCategoryStyle
?.
Style
,
cat_goods_count
=
productCategoryStyle
?.
CategoryNum
,
cat_goods_cols
=
productCategoryStyle
?.
RowNum
};
#
endregion
}
}
var
user_info
=
new
object
();
if
(
RequestParm
.
OpenId
!=
null
&&
!
string
.
IsNullOrWhiteSpace
(
RequestParm
.
OpenId
))
{
...
...
@@ -1203,7 +1513,11 @@ namespace Mall.WebApi.Controllers.MallBase
{
home_pages
=
homePage
,
navbar
,
user_info
user_info
,
setting
,
share_setting
,
cat_style
};
return
ApiResult
.
Success
(
data
:
objResult
);
}
...
...
@@ -1746,7 +2060,7 @@ namespace Mall.WebApi.Controllers.MallBase
}
}
};
data
=
new
{
mall
=
new
...
...
Mall.WebApi/Controllers/MallBase/MallBaseController.cs
View file @
6c699096
...
...
@@ -140,6 +140,7 @@ namespace Mall.WebApi.Controllers.MallBase
else
{
query
.
TenantId
=
UserInfo
.
TenantId
;
query
.
MallBaseId
=
UserInfo
.
MallBaseId
;
bool
result
=
mallBaseModule
.
AddOrUpdateLogistics
(
query
);
if
(
result
)
{
...
...
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