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
e9577e63
Commit
e9577e63
authored
Apr 27, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码修改
parent
4b47c7ce
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
15 deletions
+21
-15
RB_Miai_DatingRepository.cs
Mall.Repository/Miai/RB_Miai_DatingRepository.cs
+6
-3
RB_GoodsRepository.cs
Mall.Repository/Product/RB_GoodsRepository.cs
+1
-1
MiaiController.cs
Mall.WebApi/Controllers/Miai/MiaiController.cs
+14
-11
No files found.
Mall.Repository/Miai/RB_Miai_DatingRepository.cs
View file @
e9577e63
...
@@ -4,6 +4,7 @@ using System.Text;
...
@@ -4,6 +4,7 @@ using System.Text;
using
Mall.Model.Entity.Miai
;
using
Mall.Model.Entity.Miai
;
using
Mall.Model.Extend.Miai
;
using
Mall.Model.Extend.Miai
;
using
System.Linq
;
using
System.Linq
;
using
VT.FW.DB.Dapper
;
namespace
Mall.Repository.Miai
namespace
Mall.Repository.Miai
{
{
...
@@ -23,6 +24,7 @@ namespace Mall.Repository.Miai
...
@@ -23,6 +24,7 @@ namespace Mall.Repository.Miai
/// <returns></returns>
/// <returns></returns>
public
List
<
RB_Miai_Dating_Extend
>
GetPageList
(
int
pageIndex
,
int
pageSize
,
out
long
rowCount
,
RB_Miai_Dating_Extend
dmodel
)
public
List
<
RB_Miai_Dating_Extend
>
GetPageList
(
int
pageIndex
,
int
pageSize
,
out
long
rowCount
,
RB_Miai_Dating_Extend
dmodel
)
{
{
var
parameters
=
new
DynamicParameters
();
string
where
=
$" 1=1 and d.
{
nameof
(
RB_Miai_Dating_Extend
.
Status
)}
=0"
;
string
where
=
$" 1=1 and d.
{
nameof
(
RB_Miai_Dating_Extend
.
Status
)}
=0"
;
if
(
dmodel
.
TenantId
>
0
)
{
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and d.
{
nameof
(
RB_Miai_Dating_Extend
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
where
+=
$@" and d.
{
nameof
(
RB_Miai_Dating_Extend
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
...
@@ -35,16 +37,17 @@ namespace Mall.Repository.Miai
...
@@ -35,16 +37,17 @@ namespace Mall.Repository.Miai
{
{
where
+=
$@" and (d.
{
nameof
(
RB_Miai_Dating_Extend
.
ManId
)}
=
{
dmodel
.
UserId
}
or d.
{
nameof
(
RB_Miai_Dating_Extend
.
WoManId
)}
=
{
dmodel
.
UserId
}
)"
;
where
+=
$@" and (d.
{
nameof
(
RB_Miai_Dating_Extend
.
ManId
)}
=
{
dmodel
.
UserId
}
or d.
{
nameof
(
RB_Miai_Dating_Extend
.
WoManId
)}
=
{
dmodel
.
UserId
}
)"
;
}
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
UserName
))
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
UserName
)
&&
dmodel
.
UserName
.
Trim
()!=
""
)
{
{
where
+=
$@" and (u1.`Name` like '%
{
dmodel
.
UserName
}
%' or u2..`Name` like '%
{
dmodel
.
UserName
}
%')"
;
where
+=
$@" and (u1.`Name` like @UserName or u2..`Name` like @UserName )"
;
parameters
.
Add
(
"UserName"
,
"%"
+
dmodel
.
UserName
.
Trim
()
+
"%"
);
}
}
string
sql
=
$@"select d.*,u1.`Name` as ManName,u1.Photo as ManPhoto,u2.`Name` as WoManName,u2.Photo as WoManPhoto from RB_Miai_Dating d
string
sql
=
$@"select d.*,u1.`Name` as ManName,u1.Photo as ManPhoto,u2.`Name` as WoManName,u2.Photo as WoManPhoto from RB_Miai_Dating d
left join rb_member_user u1 on d.ManId = u1.Id
left join rb_member_user u1 on d.ManId = u1.Id
left join rb_member_user u2 on d.WoManId = u2.Id
left join rb_member_user u2 on d.WoManId = u2.Id
where
{
where
}
order by d.Id desc"
;
where
{
where
}
order by d.Id desc"
;
return
GetPage
<
RB_Miai_Dating_Extend
>(
pageIndex
,
pageSize
,
out
rowCount
,
sql
).
ToList
();
return
GetPage
<
RB_Miai_Dating_Extend
>(
pageIndex
,
pageSize
,
out
rowCount
,
sql
,
parameters
).
ToList
();
}
}
}
}
}
}
Mall.Repository/Product/RB_GoodsRepository.cs
View file @
e9577e63
...
@@ -838,7 +838,7 @@ WHERE {where} group by g.Id order by g.CreateDate desc";
...
@@ -838,7 +838,7 @@ WHERE {where} group by g.Id order by g.CreateDate desc";
{
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
SupplierId
)}
in(
{
dmodel
.
SupplierIds
}
)"
;
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
SupplierId
)}
in(
{
dmodel
.
SupplierIds
}
)"
;
}
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
Name
))
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
Name
)
&&
dmodel
.
Name
.
Trim
()
!=
""
)
{
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
Name
)}
like @Name "
;
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
Name
)}
like @Name "
;
parameters
.
Add
(
"Name"
,
"%"
+
dmodel
.
Name
.
Trim
()
+
"%"
);
parameters
.
Add
(
"Name"
,
"%"
+
dmodel
.
Name
.
Trim
()
+
"%"
);
...
...
Mall.WebApi/Controllers/Miai/MiaiController.cs
View file @
e9577e63
...
@@ -970,7 +970,10 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -970,7 +970,10 @@ namespace Mall.WebApi.Controllers.MallBase
{
{
oldBaseInfo
.
AlbumList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
oldBaseInfo
.
Album
);
oldBaseInfo
.
AlbumList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
oldBaseInfo
.
Album
);
}
}
}
else
{
oldBaseInfo
=
new
RB_MiAi_BaseInfo_Extend
();
}
}
return
ApiResult
.
Success
(
""
,
new
return
ApiResult
.
Success
(
""
,
new
{
{
...
@@ -989,19 +992,19 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -989,19 +992,19 @@ namespace Mall.WebApi.Controllers.MallBase
CreateDate
=
model
.
CreateDate
.
HasValue
?
model
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
CreateDate
=
model
.
CreateDate
.
HasValue
?
model
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
SexStr
=
(
oldBaseInfo
!=
null
&&
oldBaseInfo
.
Id
>
0
)
?
(
oldBaseInfo
.
Sex
==
1
?
"男"
:
"女"
)
:
""
,
SexStr
=
(
oldBaseInfo
!=
null
&&
oldBaseInfo
.
Id
>
0
)
?
(
oldBaseInfo
.
Sex
==
1
?
"男"
:
"女"
)
:
""
,
Birthday
=
oldBaseInfo
.
Birthday
??
""
,
Birthday
=
oldBaseInfo
?
.
Birthday
??
""
,
Sex
=
oldBaseInfo
?.
Sex
??
0
,
Sex
=
oldBaseInfo
?.
Sex
??
0
,
oldBaseInfo
?.
Height
,
oldBaseInfo
?.
Height
,
oldBaseInfo
?.
Weight
,
oldBaseInfo
?.
Weight
,
EducationType
=
oldBaseInfo
.
EducationType
??
0
,
EducationType
=
oldBaseInfo
?
.
EducationType
??
0
,
EducationTypeStr
=
(
oldBaseInfo
.
EducationType
.
HasValue
&&
oldBaseInfo
.
EducationType
.
Value
>
0
)
?
EnumHelper
.
GetEnumName
(
oldBaseInfo
.
EducationType
)
:
""
,
EducationTypeStr
=
(
oldBaseInfo
!=
null
&&
oldBaseInfo
.
EducationType
.
HasValue
&&
oldBaseInfo
.
EducationType
.
Value
>
0
)
?
EnumHelper
.
GetEnumName
(
oldBaseInfo
.
EducationType
)
:
""
,
SchoolInfo
=
oldBaseInfo
.
SchoolInfo
??
""
,
SchoolInfo
=
oldBaseInfo
?
.
SchoolInfo
??
""
,
Age
=
string
.
IsNullOrWhiteSpace
(
oldBaseInfo
.
Birthday
)
?
""
:
StringHelper
.
GetAge
(
oldBaseInfo
.
Birthday
),
//年纪
Age
=
string
.
IsNullOrWhiteSpace
(
oldBaseInfo
?
.
Birthday
)
?
""
:
StringHelper
.
GetAge
(
oldBaseInfo
.
Birthday
),
//年纪
ShenXiao
=
string
.
IsNullOrWhiteSpace
(
oldBaseInfo
.
Birthday
)
?
""
:
StringHelper
.
GetShengXiao
(
Convert
.
ToDateTime
((
oldBaseInfo
.
Birthday
))),
//生肖
ShenXiao
=
string
.
IsNullOrWhiteSpace
(
oldBaseInfo
?
.
Birthday
)
?
""
:
StringHelper
.
GetShengXiao
(
Convert
.
ToDateTime
((
oldBaseInfo
.
Birthday
))),
//生肖
ConoldBaseInfostellation
=
string
.
IsNullOrWhiteSpace
(
oldBaseInfo
.
Birthday
)
?
""
:
StringHelper
.
GetAtomFromBirthday
(
Convert
.
ToDateTime
((
oldBaseInfo
.
Birthday
))),
//星座
ConoldBaseInfostellation
=
string
.
IsNullOrWhiteSpace
(
oldBaseInfo
?
.
Birthday
)
?
""
:
StringHelper
.
GetAtomFromBirthday
(
Convert
.
ToDateTime
((
oldBaseInfo
.
Birthday
))),
//星座
MarriageStr
=
(
oldBaseInfo
.
Marriage
.
HasValue
&&
oldBaseInfo
.
Marriage
.
Value
>
0
)
?
EnumHelper
.
GetEnumName
(
oldBaseInfo
.
Marriage
)
:
""
,
MarriageStr
=
(
oldBaseInfo
!=
null
&&
oldBaseInfo
.
Marriage
.
HasValue
&&
oldBaseInfo
?
.
Marriage
.
Value
>
0
)
?
EnumHelper
.
GetEnumName
(
oldBaseInfo
.
Marriage
)
:
""
,
Marriage
=
oldBaseInfo
.
Marriage
??
0
,
Marriage
=
oldBaseInfo
?
.
Marriage
??
0
,
Job
=
oldBaseInfo
.
Job
??
""
,
Job
=
oldBaseInfo
?
.
Job
??
""
,
WorkUnit
=
oldBaseInfo
?.
WorkUnit
??
""
,
WorkUnit
=
oldBaseInfo
?.
WorkUnit
??
""
,
YearMoney
=
oldBaseInfo
?.
YearMoney
??
0
,
YearMoney
=
oldBaseInfo
?.
YearMoney
??
0
,
CName
=
oldBaseInfo
.
CName
??
""
,
CName
=
oldBaseInfo
.
CName
??
""
,
...
...
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