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
81474c84
Commit
81474c84
authored
Jul 25, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口修改
parent
5d5b70d5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
21 deletions
+52
-21
RB_Assess_Brand_Extend.cs
Mall.Model/Extend/Assess/RB_Assess_Brand_Extend.cs
+5
-0
RB_Assess_BrandRepository.cs
Mall.Repository/Assess/RB_Assess_BrandRepository.cs
+5
-2
AssessController.cs
Mall.WebApi/Controllers/Miai/AssessController.cs
+42
-19
No files found.
Mall.Model/Extend/Assess/RB_Assess_Brand_Extend.cs
View file @
81474c84
...
...
@@ -18,6 +18,11 @@ namespace Mall.Model.Extend.Assess
/// 组图列表
/// </summary>
public
List
<
AssessBrandImg
>
BrandImgList
{
get
;
set
;
}
/// <summary>
/// 分类名称
/// </summary>
public
string
CategoryName
{
get
;
set
;
}
}
...
...
Mall.Repository/Assess/RB_Assess_BrandRepository.cs
View file @
81474c84
...
...
@@ -47,8 +47,11 @@ namespace Mall.Repository.Assess
parameters
.
Add
(
"Name"
,
"%"
+
dmodel
.
Name
+
"%"
);
}
string
sql
=
$@"select * from RB_Assess_Brand e where
{
where
}
order by e.Id desc"
;
return
GetPage
<
RB_Assess_Brand_Extend
>(
pageIndex
,
pageSize
,
out
rowCount
,
sql
).
ToList
();
string
sql
=
$@"
select e.*,IFNULL(B.`Name`,'') AS CategoryName
from RB_Assess_Brand e LEFT JOIN rb_assess_category AS B ON e.CategoryId=B.Id
where
{
where
}
order by e.Id desc"
;
return
GetPage
<
RB_Assess_Brand_Extend
>(
pageIndex
,
pageSize
,
out
rowCount
,
sql
,
parameters
).
ToList
();
}
/// <summary>
...
...
Mall.WebApi/Controllers/Miai/AssessController.cs
View file @
81474c84
...
...
@@ -80,16 +80,19 @@ namespace Mall.WebApi.Controllers.MallBase
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetCategoryInfo
()
{
public
ApiResult
SetCategoryInfo
()
{
var
req
=
RequestParm
;
RB_Assess_Category_Extend
demodel
=
JsonHelper
.
DeserializeObject
<
RB_Assess_Category_Extend
>(
req
.
msg
.
ToString
());
if
(
string
.
IsNullOrEmpty
(
demodel
.
Name
))
{
if
(
string
.
IsNullOrEmpty
(
demodel
.
Name
))
{
return
ApiResult
.
ParamIsNull
(
"请传递分类名称"
);
}
if
(
string
.
IsNullOrEmpty
(
demodel
.
Image
))
{
return
ApiResult
.
ParamIsNull
(
"请上传分类背景图片"
);
if
(
string
.
IsNullOrEmpty
(
demodel
.
Image
))
{
return
ApiResult
.
ParamIsNull
(
"请上传分类背景图片"
);
}
demodel
.
Enable
=
demodel
.
Enable
==
0
?
1
:
demodel
.
Enable
;
demodel
.
Enable
=
demodel
.
Enable
==
0
?
1
:
demodel
.
Enable
;
demodel
.
TenantId
=
req
.
TenantId
;
demodel
.
MallBaseId
=
req
.
MallBaseId
;
...
...
@@ -102,7 +105,8 @@ namespace Mall.WebApi.Controllers.MallBase
{
return
ApiResult
.
Success
();
}
else
{
else
{
return
ApiResult
.
Failed
(
msg
);
}
}
...
...
@@ -112,10 +116,12 @@ namespace Mall.WebApi.Controllers.MallBase
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
DelCategoryInfo
()
{
public
ApiResult
DelCategoryInfo
()
{
JObject
parms
=
JObject
.
Parse
(
base
.
RequestParm
.
msg
.
ToString
());
int
CategoryId
=
parms
.
GetInt
(
"CategoryId"
,
0
);
if
(
CategoryId
<=
0
)
{
if
(
CategoryId
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
...
...
@@ -132,11 +138,16 @@ namespace Mall.WebApi.Controllers.MallBase
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetBrandPageList
()
{
public
ApiResult
GetBrandPageList
()
{
var
req
=
base
.
RequestParm
;
ResultPageModel
pagelist
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
req
.
msg
.
ToString
());
RB_Assess_Brand_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Assess_Brand_Extend
>(
req
.
msg
.
ToString
());
JObject
jobj
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
RB_Assess_Brand_Extend
demodel
=
new
RB_Assess_Brand_Extend
()
{
CategoryId
=
jobj
.
GetInt
(
"CategoryId"
),
Name
=
jobj
.
GetStringValue
(
"Name"
)
};
demodel
.
TenantId
=
req
.
TenantId
;
demodel
.
MallBaseId
=
req
.
MallBaseId
;
var
list
=
assessModule
.
GetBrandPageList
(
pagelist
.
pageIndex
,
pagelist
.
pageSize
,
out
long
count
,
demodel
);
...
...
@@ -150,7 +161,9 @@ namespace Mall.WebApi.Controllers.MallBase
x
.
BrandImgList
,
x
.
MoreDesc
,
x
.
RemarkDesc
,
CreateDate
=
x
.
CreateDate
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
CreateDate
=
x
.
CreateDate
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
x
.
CategoryName
,
x
.
CategoryId
,
});
return
ApiResult
.
Success
(
""
,
pagelist
);
}
...
...
@@ -190,7 +203,8 @@ namespace Mall.WebApi.Controllers.MallBase
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetBrandInfo
()
{
public
ApiResult
SetBrandInfo
()
{
var
req
=
RequestParm
;
RB_Assess_Brand_Extend
demodel
=
JsonHelper
.
DeserializeObject
<
RB_Assess_Brand_Extend
>(
req
.
msg
.
ToString
());
if
(
string
.
IsNullOrEmpty
(
demodel
.
Name
))
...
...
@@ -209,13 +223,19 @@ namespace Mall.WebApi.Controllers.MallBase
{
return
ApiResult
.
ParamIsNull
(
"请上传组图"
);
}
foreach
(
var
item
in
demodel
.
BrandImgList
)
{
if
(
string
.
IsNullOrEmpty
(
item
.
Name
))
{
int
Sort
=
1
;
foreach
(
var
item
in
demodel
.
BrandImgList
)
{
item
.
Sort
=
Sort
;
if
(
string
.
IsNullOrEmpty
(
item
.
Name
))
{
return
ApiResult
.
ParamIsNull
(
"请上传组图标题"
);
}
if
(
string
.
IsNullOrEmpty
(
item
.
Path
))
{
if
(
string
.
IsNullOrEmpty
(
item
.
Path
))
{
return
ApiResult
.
ParamIsNull
(
"请传递组图路径"
);
}
Sort
++;
}
demodel
.
BrandImg
=
JsonHelper
.
Serialize
(
demodel
.
BrandImgList
);
if
(
string
.
IsNullOrEmpty
(
demodel
.
MoreDesc
))
...
...
@@ -304,15 +324,18 @@ namespace Mall.WebApi.Controllers.MallBase
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetGoodsReply
()
{
public
ApiResult
SetGoodsReply
()
{
var
req
=
base
.
RequestParm
;
JObject
parms
=
JObject
.
Parse
(
base
.
RequestParm
.
msg
.
ToString
());
int
GoodsId
=
parms
.
GetInt
(
"GoodsId"
,
0
);
string
ReplyContent
=
parms
.
GetStringValue
(
"ReplyContent"
);
if
(
GoodsId
<=
0
)
{
if
(
GoodsId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递商品估价ID"
);
}
if
(
string
.
IsNullOrEmpty
(
ReplyContent
))
{
if
(
string
.
IsNullOrEmpty
(
ReplyContent
))
{
return
ApiResult
.
ParamIsNull
(
"请传递回复内容"
);
}
...
...
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