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
323b8ef6
Commit
323b8ef6
authored
Sep 07, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
badaf34f
89afb863
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
94 additions
and
53 deletions
+94
-53
AreaDataHelper.cs
Mall.Common/Data/AreaDataHelper.cs
+2
-37
RB_Goods.cs
Mall.Model/Entity/Product/RB_Goods.cs
+5
-1
RB_Distributor_Info_Extend.cs
Mall.Model/Extend/User/RB_Distributor_Info_Extend.cs
+5
-0
RB_Member_User_Extend.cs
Mall.Model/Extend/User/RB_Member_User_Extend.cs
+5
-0
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+1
-1
ProductModule.cs
Mall.Module.Product/ProductModule.cs
+5
-2
UserModule.cs
Mall.Module.User/UserModule.cs
+17
-1
RB_Share_FriendRepository.cs
Mall.Repository/MarketingCenter/RB_Share_FriendRepository.cs
+1
-1
RB_GoodsRepository.cs
Mall.Repository/Product/RB_GoodsRepository.cs
+6
-2
RB_Member_UserRepository.cs
Mall.Repository/User/RB_Member_UserRepository.cs
+11
-2
ShareController.cs
Mall.WebApi/Controllers/MarketingCenter/ShareController.cs
+15
-1
AppletGoodsController.cs
Mall.WebApi/Controllers/Product/AppletGoodsController.cs
+2
-1
ProductController.cs
Mall.WebApi/Controllers/Product/ProductController.cs
+1
-0
AppletUserController.cs
Mall.WebApi/Controllers/User/AppletUserController.cs
+16
-2
appsettings.json
Mall.WebApi/appsettings.json
+1
-1
appsettings2.json
Mall.WebApi/appsettings2.json
+1
-1
No files found.
Mall.Common/Data/AreaDataHelper.cs
View file @
323b8ef6
...
...
@@ -18,44 +18,9 @@ namespace Mall.Common.Data
/// </summary>
public
static
List
<
Node
>
Nodes
{
get
;
set
;
}
/// <summary>
/// 将数据写入Json文件
/// </summary>
/// <param name="json"></param>
public
static
void
WriteJson
(
object
json
)
{
using
(
StreamWriter
sw
=
new
StreamWriter
(
path
))
{
try
{
JsonSerializer
serializer
=
new
JsonSerializer
();
serializer
.
Converters
.
Add
(
new
JavaScriptDateTimeConverter
());
serializer
.
NullValueHandling
=
NullValueHandling
.
Ignore
;
//构建Json.net的写入流
JsonWriter
writer
=
new
JsonTextWriter
(
sw
);
//把模型数据序列化并写入Json.net的JsonWriter流中
serializer
.
Serialize
(
writer
,
json
);
writer
.
Close
();
sw
.
Close
();
Nodes
=
null
;
}
catch
{
}
}
}
/// <summary>
/// 根据编号获取节点
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public
static
Node
GetNode
(
int
Id
)
{
List
<
Node
>
list
=
GetAreaList
();
return
list
.
Find
(
qitem
=>
qitem
.
I
==
Id
);
}
/// <summary>
/// 获取地区列表
...
...
Mall.Model/Entity/Product/RB_Goods.cs
View file @
323b8ef6
...
...
@@ -435,7 +435,6 @@ namespace Mall.Model.Entity.Product
/// </summary>
public
string
SubName
{
get
;
set
;
}
/// <summary>
/// 营销标识(文字+文字颜色+文字背景/ 图标)
/// </summary>
...
...
@@ -515,5 +514,10 @@ namespace Mall.Model.Entity.Product
/// 提前预定时间
/// </summary>
public
int
?
AdvanceDay
{
get
;
set
;
}
/// <summary>
/// 视频填充方式(0默认,1-填充)
/// </summary>
public
int
VideoType
{
get
;
set
;
}
}
}
Mall.Model/Extend/User/RB_Distributor_Info_Extend.cs
View file @
323b8ef6
...
...
@@ -105,5 +105,10 @@ namespace Mall.Model.Extend.User
/// 小程序排序
/// </summary>
public
int
SortNum
{
get
;
set
;
}
/// <summary>
/// 是否直接下级[1-是]
/// </summary>
public
int
IsDirect
{
get
;
set
;
}
}
}
Mall.Model/Extend/User/RB_Member_User_Extend.cs
View file @
323b8ef6
...
...
@@ -141,6 +141,11 @@ namespace Mall.Model.Extend.User
/// 是否赞羊使用0-否,1-是
/// </summary>
public
int
IsZanYangUse
{
get
;
set
;
}
/// <summary>
/// 是否直接下级[1-是]
/// </summary>
public
int
IsDirect
{
get
;
set
;
}
}
...
...
Mall.Module.Product/OrderModule.cs
View file @
323b8ef6
...
...
@@ -5986,7 +5986,7 @@ namespace Mall.Module.Product
{
Dictionary
<
string
,
object
>
keyValues1
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Goods_TargetDate
.
IsReserve
),
2
},
{
nameof
(
RB_Goods_TargetDate
.
ReserveNum
),
item
.
Number
??
0
},
{
nameof
(
RB_Goods_TargetDate
.
ReserveNum
),
qitem
.
ReserveNum
+
(
item
.
Number
??
0
)
},
};
List
<
WhereHelper
>
wheres1
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
...
...
Mall.Module.Product/ProductModule.cs
View file @
323b8ef6
...
...
@@ -2423,11 +2423,13 @@ namespace Mall.Module.Product
fullNumPinkage
=
model
.
FreeShippingModel
.
FullNumPinkage
??
0
,
freeShippingUrl
=
model
.
FreeShippingModel
.
FreeShippingUrl
,
marketingLogo
=
model
.
MarketingLogo
,
//分类
cats
=
model
.
CategoryList
.
Select
(
x
=>
new
{
x
.
CategoryId
,
x
.
CategoryName
})
//分类
}),
video_type
=
model
.
VideoType
,
},
delivery
=
""
};
...
...
@@ -4506,7 +4508,8 @@ namespace Mall.Module.Product
{
nameof
(
RB_Goods
.
IsLiveGoods
),
demodel
.
IsLiveGoods
},
{
nameof
(
RB_Goods
.
ShelvesDate
),
demodel
.
ShelvesDate
},
{
nameof
(
RB_Goods
.
DownDate
),
demodel
.
DownDate
},
{
nameof
(
RB_Goods
.
SendArea
),
demodel
.
SendArea
},
{
nameof
(
RB_Goods
.
SendArea
),
demodel
.
SendArea
},
{
nameof
(
RB_Goods
.
VideoType
),
demodel
.
VideoType
},
};
if
(
goodsModel
.
IsProcurement
==
1
)
...
...
Mall.Module.User/UserModule.cs
View file @
323b8ef6
...
...
@@ -4029,7 +4029,9 @@ namespace Mall.Module.User
Name
=
demodel
.
Name
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
SortNum
=
demodel
.
SortNum
SortNum
=
demodel
.
SortNum
,
IsDirect
=
demodel
.
IsDirect
,
Id
=(
demodel
.
UserId
??
0
)
});
List
<
object
>
RList
=
new
List
<
object
>();
if
(
list
.
Any
())
...
...
@@ -6554,5 +6556,19 @@ namespace Mall.Module.User
#
endregion
/// <summary>
/// 修改用户等级为VIP
/// </summary>
/// <param name="UserId">用户编号</param>
/// <returns></returns>
public
bool
SetUserToVipModule
(
int
UserId
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Distributor_Info_Extend
.
FXGradeId
),
2
}
};
return
distributor_InfoRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Distributor_Info_Extend
.
UserId
),
UserId
));
}
}
}
Mall.Repository/MarketingCenter/RB_Share_FriendRepository.cs
View file @
323b8ef6
...
...
@@ -35,7 +35,7 @@ WHERE 1=1 AND A.Status=0
if
(
IsUse
)
{
builder
.
AppendFormat
(
" AND A.{0}=1 "
,
nameof
(
RB_Share_Friend_Extend
.
IsUse
));
orderBy
=
" ORDER BY A.IsTop DESC,A.SortNum ASC
"
;
orderBy
=
" ORDER BY A.IsTop DESC,A.SortNum ASC
,A.CreateDate DESC
"
;
}
else
{
...
...
Mall.Repository/Product/RB_GoodsRepository.cs
View file @
323b8ef6
...
...
@@ -4,6 +4,7 @@ using System.Text;
using
Mall.Model.Entity.Product
;
using
Mall.Model.Extend.Product
;
using
System.Linq
;
using
VT.FW.DB.Dapper
;
namespace
Mall.Repository.Product
{
...
...
@@ -363,6 +364,8 @@ WHERE {where} group by g.Id order by g.CreateDate desc";
public
List
<
RB_Goods_Extend
>
GetAppletGoodsPageList
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_Goods_Extend
dmodel
)
{
string
where
=
$" 1=1 and g.
{
nameof
(
RB_Goods_Extend
.
Status
)}
=0 and g.GoodsClassify=0"
;
var
parameters
=
new
DynamicParameters
();
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
...
...
@@ -385,7 +388,8 @@ WHERE {where} group by g.Id order by g.CreateDate desc";
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
Name
))
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
Name
)}
like '%
{
dmodel
.
Name
}
%'"
;
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
Name
)}
like @Name "
;
parameters
.
Add
(
"Name"
,
"%"
+
dmodel
.
Name
.
Trim
()
+
"%"
);
}
if
(
dmodel
.
GoodsStatus
>
0
)
{
...
...
@@ -481,7 +485,7 @@ FROM RB_Goods g INNER JOIN rb_goods_category c on g.Id=c.GoodsId
WHERE 1=1 and o.`Status`=0 and o.OrderStatus <> 7 group by od.GoodsId
) AS tempOrder ON g.Id=tempOrder.GoodsId
WHERE
{
where
}
group by g.Id
{
orderBy
}
"
;
return
GetPage
<
RB_Goods_Extend
>(
pageIndex
,
pageSize
,
out
count
,
sql
).
ToList
();
return
GetPage
<
RB_Goods_Extend
>(
pageIndex
,
pageSize
,
out
count
,
sql
,
parameters
).
ToList
();
}
/// <summary>
...
...
Mall.Repository/User/RB_Member_UserRepository.cs
View file @
323b8ef6
...
...
@@ -278,10 +278,19 @@ select * from RB_Member_User where {where} order by CreateDate desc
{
where
+=
$@" and u.
{
nameof
(
RB_Member_User
.
SuperiorId
)}
=
{
dmodel
.
SuperiorId
}
"
;
}
if
(
!
string
.
IsNullOrEmpty
(
dmodel
.
UserIds
)
)
if
(
dmodel
.
IsDirect
==
1
)
{
where
+=
$@" and u.
{
nameof
(
RB_Member_User
.
Id
)}
in(
{
dmodel
.
UserIds
}
)"
;
//查找直属下级
where
+=
$@" and u.
{
nameof
(
RB_Member_User
.
SuperiorId
)}
=
{
dmodel
.
Id
}
"
;
}
else
{
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
UserIds
))
{
where
+=
$@" and u.
{
nameof
(
RB_Member_User
.
Id
)}
in(
{
dmodel
.
UserIds
}
)"
;
}
}
if
(
dmodel
.
FXGradeId
>
0
)
{
where
+=
$@" and d.
{
nameof
(
RB_Distributor_Info
.
FXGradeId
)}
=
{
dmodel
.
FXGradeId
}
"
;
...
...
Mall.WebApi/Controllers/MarketingCenter/ShareController.cs
View file @
323b8ef6
...
...
@@ -186,7 +186,21 @@ namespace Mall.WebApi.Controllers.MarketingCenter
public
ApiResult
SetShareFriend
()
{
JObject
parm
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
extModel
=
JsonConvert
.
DeserializeObject
<
RB_Share_Friend_Extend
>(
RequestParm
.
msg
.
ToString
());
RB_Share_Friend_Extend
extModel
=
new
RB_Share_Friend_Extend
()
{
Id
=
parm
.
GetInt
(
"Id"
),
CateId
=
parm
.
GetInt
(
"CateId"
),
GoodsId
=
parm
.
GetInt
(
"GoodsId"
),
CoverImg
=
parm
.
GetStringValue
(
"CoverImg"
),
MaterialImg
=
parm
.
GetStringValue
(
"MaterialImg"
),
MaterialInfo
=
parm
.
GetStringValue
(
"MaterialInfo"
),
LinkUrl
=
parm
.
GetStringValue
(
"LinkUrl"
),
IsTop
=
parm
.
GetInt
(
"IsTop"
),
SortNum
=
parm
.
GetInt
(
"SortNum"
),
IsUse
=
parm
.
GetInt
(
"IsUse"
),
ShareCount
=
parm
.
GetInt
(
"ShareCount"
),
};
extModel
.
TenantId
=
UserInfo
.
TenantId
;
extModel
.
MallBaseId
=
RequestParm
.
MallBaseId
;
extModel
.
CreateDate
=
DateTime
.
Now
;
...
...
Mall.WebApi/Controllers/Product/AppletGoodsController.cs
View file @
323b8ef6
...
...
@@ -348,7 +348,8 @@ namespace Mall.WebApi.Controllers.MallBase
attr
=
priceList
,
goods_stock
=
model
.
InventoryNum
,
goods_num
=
model
.
InventoryNum
,
marketingLogo
=
model
.
MarketingLogo
marketingLogo
=
model
.
MarketingLogo
,
video_type
=
model
.
VideoType
});
}
}
...
...
Mall.WebApi/Controllers/Product/ProductController.cs
View file @
323b8ef6
...
...
@@ -1597,6 +1597,7 @@ namespace Mall.WebApi.Controllers.MallBase
model
?.
MarketingLogo
,
model
?.
ShelvesDate
,
model
?.
DownDate
,
model
?.
VideoType
,
};
}
return
ApiResult
.
Success
(
""
,
obj
);
...
...
Mall.WebApi/Controllers/User/AppletUserController.cs
View file @
323b8ef6
...
...
@@ -690,8 +690,6 @@ namespace Mall.WebApi.Controllers.User
demodel
.
TenantId
=
userInfo
.
TenantId
;
demodel
.
MallBaseId
=
userInfo
.
MallBaseId
;
demodel
.
UserId
=
userInfo
.
UserId
;
//var list = userModule.GetUserMyTeamPageListForFX(pageModel.pageIndex, pageModel.pageSize, out long count, demodel);
int
NewUserId
=
0
;
//HK 2020-08-27新增
...
...
@@ -2171,5 +2169,21 @@ namespace Mall.WebApi.Controllers.User
#
endregion
/// <summary>
/// 修改会员等级为VIP
/// </summary>
/// <param name="requestMsg"></param>
/// <returns></returns>
[
HttpPost
]
[
Microsoft
.
AspNetCore
.
Authorization
.
AllowAnonymous
]
public
ApiResult
SetUserToVip
(
object
requestMsg
)
{
var
requestParm
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
JObject
parms
=
JObject
.
Parse
(
requestParm
.
msg
.
ToString
());
var
userId
=
parms
.
GetInt
(
"NewUserId"
);
bool
flag
=
userModule
.
SetUserToVipModule
(
userId
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
}
}
\ No newline at end of file
Mall.WebApi/appsettings.json
View file @
323b8ef6
...
...
@@ -21,7 +21,7 @@
"ApiExpirTime"
:
2592000
,
"AllowedHosts"
:
"*"
,
"OpenValidation"
:
"False"
,
"UploadSiteUrl"
:
"http://192.168.
2
.214:8120"
,
"UploadSiteUrl"
:
"http://192.168.
1
.214:8120"
,
"ViewFileSiteUrl"
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com"
,
"ImKey"
:
"b612b31e837c79c68f141aeb719d2b20"
,
"ImSecret"
:
"66000451fb72"
,
...
...
Mall.WebApi/appsettings2.json
View file @
323b8ef6
...
...
@@ -15,7 +15,7 @@
"ApiExpirTime"
:
2592000
,
"AllowedHosts"
:
"*"
,
"OpenValidation"
:
"False"
,
"UploadSiteUrl"
:
"http://192.168.
2
.214:8120"
,
"UploadSiteUrl"
:
"http://192.168.
1
.214:8120"
,
"ViewFileSiteUrl"
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com"
,
"ImKey"
:
"b612b31e837c79c68f141aeb719d2b20"
,
"ImSecret"
:
"66000451fb72"
,
...
...
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