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
88b50c3f
Commit
88b50c3f
authored
Aug 11, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
6c8cfcc3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
110 additions
and
10 deletions
+110
-10
RB_MicroShop_Basics.cs
Mall.Model/Entity/BaseSetUp/RB_MicroShop_Basics.cs
+6
-1
StatisticsModule.cs
Mall.Module.MarketingCenter/StatisticsModule.cs
+1
-1
UserModule.cs
Mall.Module.User/UserModule.cs
+20
-6
RB_Goods_OrderCommissionRepository.cs
....Repository/Product/RB_Goods_OrderCommissionRepository.cs
+42
-0
AppletUserController.cs
Mall.WebApi/Controllers/User/AppletUserController.cs
+41
-2
No files found.
Mall.Model/Entity/BaseSetUp/RB_MicroShop_Basics.cs
View file @
88b50c3f
...
@@ -70,7 +70,12 @@ namespace Mall.Model.Entity.BaseSetUp
...
@@ -70,7 +70,12 @@ namespace Mall.Model.Entity.BaseSetUp
/// <summary>
/// <summary>
/// 固定价格
/// 固定价格
/// </summary>
/// </summary>
public
decimal
?
FixedPrice
{
get
;
set
;
}
public
decimal
?
CustomMinFixedPrice
{
get
;
set
;
}
/// <summary>
/// 固定价格
/// </summary>
public
decimal
?
CustomMaxFixedPrice
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 结算方式 1-用户自提,2-系统自动现结(微信),3-转入余额
/// 结算方式 1-用户自提,2-系统自动现结(微信),3-转入余额
...
...
Mall.Module.MarketingCenter/StatisticsModule.cs
View file @
88b50c3f
...
@@ -90,7 +90,7 @@ namespace Mall.Module.MarketingCenter
...
@@ -90,7 +90,7 @@ namespace Mall.Module.MarketingCenter
if
(
list
!=
null
&&
list
.
Any
())
if
(
list
!=
null
&&
list
.
Any
())
{
{
//分销情况
//分销情况
var
oclist
=
goods_OrderCommissionRepository
.
GetListGroupBy
User
(
new
RB_Goods_OrderCommission_Extend
()
{
TenantId
=
dmodel
.
TenantId
,
MallBaseId
=
dmodel
.
MallBaseId
,
OrderIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
OrderId
))
});
var
oclist
=
goods_OrderCommissionRepository
.
GetListGroupBy
OrderDetailIds
(
new
RB_Goods_OrderCommission_Extend
()
{
TenantId
=
dmodel
.
TenantId
,
MallBaseId
=
dmodel
.
MallBaseId
,
OrderIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
OrderId
))
});
if
(
oclist
.
Any
())
if
(
oclist
.
Any
())
{
{
//获取用户
//获取用户
...
...
Mall.Module.User/UserModule.cs
View file @
88b50c3f
...
@@ -175,7 +175,7 @@ namespace Mall.Module.User
...
@@ -175,7 +175,7 @@ namespace Mall.Module.User
/// </summary>
/// </summary>
private
readonly
RB_SupplierRepository
supplierRepository
=
new
RB_SupplierRepository
();
private
readonly
RB_SupplierRepository
supplierRepository
=
new
RB_SupplierRepository
();
private
readonly
RB_SmallShops_InfoRepository
smallShopsInfoRepository
=
new
RB_SmallShops_InfoRepository
();
#
region
基础配置
#
region
基础配置
...
@@ -2101,7 +2101,7 @@ namespace Mall.Module.User
...
@@ -2101,7 +2101,7 @@ namespace Mall.Module.User
/// <param name="mallBaseId"></param>
/// <param name="mallBaseId"></param>
/// <param name="erpEmpId"></param>
/// <param name="erpEmpId"></param>
/// <returns></returns>
/// <returns></returns>
public
string
SetDistributorRemitAudit
(
int
remitId
,
int
type
,
string
remark
,
string
uid
,
int
mallBaseId
,
int
erpEmpId
)
public
string
SetDistributorRemitAudit
(
int
remitId
,
int
type
,
string
remark
,
string
uid
,
int
mallBaseId
,
int
erpEmpId
)
{
{
if
(
type
==
1
)
if
(
type
==
1
)
{
{
...
@@ -2315,7 +2315,7 @@ namespace Mall.Module.User
...
@@ -2315,7 +2315,7 @@ namespace Mall.Module.User
/// 生成提现单据
/// 生成提现单据
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
public
bool
OrderIncomeFinanceModule
(
int
remitId
,
int
TenantId
,
int
MallBaseId
,
string
remark
,
int
erpEmpId
)
public
bool
OrderIncomeFinanceModule
(
int
remitId
,
int
TenantId
,
int
MallBaseId
,
string
remark
,
int
erpEmpId
)
{
{
var
flag
=
false
;
var
flag
=
false
;
try
try
...
@@ -5877,7 +5877,7 @@ namespace Mall.Module.User
...
@@ -5877,7 +5877,7 @@ namespace Mall.Module.User
/// <param name="mallBaseId"></param>
/// <param name="mallBaseId"></param>
/// <param name="empId"></param>
/// <param name="empId"></param>
/// <returns></returns>
/// <returns></returns>
public
string
SetRecommendOrdersBillRemit
(
int
billId
,
int
tenantId
,
int
mallBaseId
,
int
empId
,
string
Remark
=
""
)
public
string
SetRecommendOrdersBillRemit
(
int
billId
,
int
tenantId
,
int
mallBaseId
,
int
empId
,
string
Remark
=
""
)
{
{
var
model
=
distributor_BillRepository
.
GetEntity
(
billId
);
var
model
=
distributor_BillRepository
.
GetEntity
(
billId
);
if
(
model
==
null
)
{
return
"账单不存在"
;
}
if
(
model
==
null
)
{
return
"账单不存在"
;
}
...
@@ -5886,10 +5886,12 @@ namespace Mall.Module.User
...
@@ -5886,10 +5886,12 @@ namespace Mall.Module.User
{
nameof
(
RB_Distributor_Bill
.
BillState
),
2
},
{
nameof
(
RB_Distributor_Bill
.
BillState
),
2
},
{
nameof
(
RB_Distributor_Bill
.
UpdateDate
),
DateTime
.
Now
}
{
nameof
(
RB_Distributor_Bill
.
UpdateDate
),
DateTime
.
Now
}
};
};
if
(
empId
>
0
)
{
if
(
empId
>
0
)
{
keyValues
.
Add
(
nameof
(
RB_Distributor_Bill
.
EmpId
),
empId
);
keyValues
.
Add
(
nameof
(
RB_Distributor_Bill
.
EmpId
),
empId
);
}
}
if
(!
string
.
IsNullOrEmpty
(
Remark
))
{
if
(!
string
.
IsNullOrEmpty
(
Remark
))
{
keyValues
.
Add
(
nameof
(
RB_Distributor_Bill
.
Remark
),
(
model
.
Remark
??
""
)
+
" "
+
Remark
);
keyValues
.
Add
(
nameof
(
RB_Distributor_Bill
.
Remark
),
(
model
.
Remark
??
""
)
+
" "
+
Remark
);
}
}
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
...
@@ -6064,5 +6066,17 @@ namespace Mall.Module.User
...
@@ -6064,5 +6066,17 @@ namespace Mall.Module.User
#
endregion
#
endregion
#
region
申请微店
public
bool
ApplySmallShopsInfo
(
RB_SmallShops_Info_Extend
model
)
{
if
(
model
.
Id
==
0
)
{
return
smallShopsInfoRepository
.
Insert
(
model
)
>
0
;
}
return
false
;
}
#
endregion
}
}
}
}
Mall.Repository/Product/RB_Goods_OrderCommissionRepository.cs
View file @
88b50c3f
...
@@ -88,6 +88,48 @@ left join rb_goods_orderaftersale oa on oc.OrderDetailId= oa.OrderDetialId and o
...
@@ -88,6 +88,48 @@ left join rb_goods_orderaftersale oa on oc.OrderDetailId= oa.OrderDetialId and o
where
{
where
}
group by oc.OrderId,oc.UserId,oc.Grade,oc.Type order by oc.Grade asc"
;
where
{
where
}
group by oc.OrderId,oc.UserId,oc.Grade,oc.Type order by oc.Grade asc"
;
return
Get
<
RB_Goods_OrderCommission_Extend
>(
sql
).
ToList
();
return
Get
<
RB_Goods_OrderCommission_Extend
>(
sql
).
ToList
();
}
}
/// <summary>
/// 获取用户返佣
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Goods_OrderCommission_Extend
>
GetListGroupByOrderDetailIds
(
RB_Goods_OrderCommission_Extend
dmodel
)
{
string
where
=
$" 1=1 and oa.ReOrderId is null"
;
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and oc.
{
nameof
(
RB_Goods_OrderCommission
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
}
if
(
dmodel
.
MallBaseId
>
0
)
{
where
+=
$@" and oc.
{
nameof
(
RB_Goods_OrderCommission
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
}
if
(
dmodel
.
OrderId
>
0
)
{
where
+=
$@" and oc.
{
nameof
(
RB_Goods_OrderCommission
.
OrderId
)}
=
{
dmodel
.
OrderId
}
"
;
}
if
(
dmodel
.
UserId
>
0
)
{
where
+=
$@" and oc.
{
nameof
(
RB_Goods_OrderCommission
.
UserId
)}
=
{
dmodel
.
UserId
}
"
;
}
//if (dmodel.Type > 0)
//{
// where += $@" and oc.{nameof(RB_Goods_OrderCommission.Type)}={dmodel.Type}";
//}
if
(
dmodel
.
OrderDetailId
>
0
)
{
where
+=
$@" and oc.
{
nameof
(
RB_Goods_OrderCommission
.
OrderDetailId
)}
=
{
dmodel
.
OrderDetailId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
OrderIds
))
{
where
+=
$@" and oc.
{
nameof
(
RB_Goods_OrderCommission
.
OrderId
)}
in(
{
dmodel
.
OrderIds
}
)"
;
}
string
sql
=
$@"SELECT oc.OrderDetailId,oc.UserId,oc.Grade,oc.Type,oc.CommissionState,SUM(oc.Commission) as Commission FROM RB_Goods_OrderCommission oc
left join rb_goods_orderaftersale oa on oc.OrderDetailId= oa.OrderDetialId and oa.Type=1 and oa.Status=0 and oa.ReOrderStatus in (2,3,4,5)
where
{
where
}
group by oc.OrderDetailId,oc.UserId,oc.Grade,oc.Type order by oc.Grade asc"
;
return
Get
<
RB_Goods_OrderCommission_Extend
>(
sql
).
ToList
();
}
/// <summary>
/// <summary>
/// 获取用户返佣
/// 获取用户返佣
...
...
Mall.WebApi/Controllers/User/AppletUserController.cs
View file @
88b50c3f
...
@@ -1120,11 +1120,11 @@ namespace Mall.WebApi.Controllers.User
...
@@ -1120,11 +1120,11 @@ namespace Mall.WebApi.Controllers.User
RB_DiscountCoupon_Extend
resultModel
=
couponModule
.
AutoCoupon
(
query
);
RB_DiscountCoupon_Extend
resultModel
=
couponModule
.
AutoCoupon
(
query
);
if
(
resultModel
!=
null
&&
resultModel
.
ID
>
0
)
if
(
resultModel
!=
null
&&
resultModel
.
ID
>
0
)
{
{
return
ApiResult
.
CouponSuccess
(
ResultCode
.
Success
,
""
,
resultModel
.
Name
);
return
ApiResult
.
CouponSuccess
(
ResultCode
.
Success
,
""
,
resultModel
.
Name
);
}
}
else
else
{
{
return
ApiResult
.
CouponFailed
(
ResultCode
.
Fail
,
""
,
""
);
return
ApiResult
.
CouponFailed
(
ResultCode
.
Fail
,
""
,
""
);
}
}
}
}
...
@@ -1698,6 +1698,45 @@ namespace Mall.WebApi.Controllers.User
...
@@ -1698,6 +1698,45 @@ namespace Mall.WebApi.Controllers.User
#
region
开店申请
#
region
开店申请
/// <summary>
/// 新增修改地址
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
ApplySmallShopsInfo
()
{
var
req
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
RB_SmallShops_Info_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_SmallShops_Info_Extend
>(
req
.
msg
.
ToString
());
//判断是否满足当前申请条件
if
(
string
.
IsNullOrEmpty
(
demodel
.
Name
))
{
demodel
.
Name
=
userInfo
.
Name
;
}
if
(
string
.
IsNullOrEmpty
(
demodel
.
Logo
))
{
demodel
.
Name
=
userInfo
.
Photo
;
}
demodel
.
UserId
=
userInfo
.
UserId
;
demodel
.
TenantId
=
userInfo
.
TenantId
;
demodel
.
MallBaseId
=
userInfo
.
MallBaseId
;
demodel
.
CreateDate
=
DateTime
.
Now
;
demodel
.
UpdateDate
=
DateTime
.
Now
;
demodel
.
Status
=
0
;
demodel
.
AuditStatus
=
DistributorAuditStatusEnum
.
Auditing
;
bool
flag
=
userModule
.
ApplySmallShopsInfo
(
demodel
);
if
(
flag
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
();
}
}
#
endregion
#
endregion
}
}
}
}
\ 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