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
cc1f915d
Commit
cc1f915d
authored
Aug 09, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日志报错修改
parent
82102543
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
30 deletions
+36
-30
ProductModule.cs
Mall.Module.Product/ProductModule.cs
+36
-30
No files found.
Mall.Module.Product/ProductModule.cs
View file @
cc1f915d
...
...
@@ -7267,9 +7267,9 @@ namespace Mall.Module.Product
var
supmodel
=
demodel
.
SpecificationList
.
Where
(
x
=>
x
.
Id
==
item
.
Id
).
FirstOrDefault
();
Dictionary
<
string
,
object
>
keyValues1
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Goods_Specification
.
EnabledImage
),
supmodel
.
EnabledImage
},
{
nameof
(
RB_Goods_Specification
.
Name
),
supmodel
.
Name
},
{
nameof
(
RB_Goods_Specification
.
Sort
),
supmodel
.
Sort
}
{
nameof
(
RB_Goods_Specification
.
EnabledImage
),
supmodel
?.
EnabledImage
??
1
},
{
nameof
(
RB_Goods_Specification
.
Name
),
supmodel
?.
Name
??
""
},
{
nameof
(
RB_Goods_Specification
.
Sort
),
supmodel
?.
Sort
??
0
}
};
List
<
WhereHelper
>
wheres1
=
new
List
<
WhereHelper
>()
{
...
...
@@ -7284,43 +7284,49 @@ namespace Mall.Module.Product
if
(
flag1
)
{
var
sv2list
=
svlist
.
Where
(
x
=>
x
.
SpecificationId
==
item
.
Id
).
ToList
();
if
(
sv2list
.
Count
()
!=
supmodel
.
SpecificationValueList
.
Count
()
||
sv2list
.
Count
()
!=
supmodel
.
SpecificationValueList
.
Where
(
x
=>
x
.
Id
>
0
)
.
Count
())
if
(
sv2list
.
Count
()
!=
supmodel
?.
SpecificationValueList
?.
Count
()
||
sv2list
.
Count
()
!=
supmodel
?.
SpecificationValueList
?.
Where
(
x
=>
x
.
Id
>
0
)?
.
Count
())
{
goods_SpecificationValueRepository
.
DeleteBatch
(
sv2list
);
foreach
(
var
qitem
in
supmodel
.
SpecificationValueList
)
if
(
supmodel
!=
null
&&
supmodel
.
SpecificationValueList
!=
null
&&
supmodel
.
SpecificationValueList
.
Count
>
0
)
{
goods_SpecificationValueRepository
.
Insert
(
new
RB_Goods_SpecificationValue
(
)
foreach
(
var
qitem
in
supmodel
?.
SpecificationValueList
)
{
CreateDate
=
demodel
.
CreateDate
,
GoodsId
=
demodel
.
Id
,
Id
=
0
,
Image
=
qitem
.
Image
,
MallBaseId
=
demodel
.
MallBaseId
,
Name
=
qitem
.
Name
,
Sort
=
qitem
.
Sort
,
Status
=
0
,
TenantId
=
demodel
.
TenantId
,
SpecificationId
=
item
.
Id
});
goods_SpecificationValueRepository
.
Insert
(
new
RB_Goods_SpecificationValue
()
{
CreateDate
=
demodel
.
CreateDate
,
GoodsId
=
demodel
.
Id
,
Id
=
0
,
Image
=
qitem
.
Image
,
MallBaseId
=
demodel
.
MallBaseId
,
Name
=
qitem
.
Name
,
Sort
=
qitem
.
Sort
,
Status
=
0
,
TenantId
=
demodel
.
TenantId
,
SpecificationId
=
item
.
Id
});
}
}
}
else
{
foreach
(
var
qitem
in
sv2list
)
{
var
supModel1
=
supmodel
.
SpecificationValueList
.
Where
(
x
=>
x
.
Id
==
qitem
.
Id
).
FirstOrDefault
();
Dictionary
<
string
,
object
>
keyValues2
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Goods_SpecificationValue
.
Image
),
supModel1
.
Image
},
{
nameof
(
RB_Goods_SpecificationValue
.
Name
),
supModel1
.
Name
},
{
nameof
(
RB_Goods_SpecificationValue
.
Sort
),
supModel1
.
Sort
}
};
List
<
WhereHelper
>
wheres2
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Goods_Specification
.
Id
),
FiledValue
=
qitem
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
var
supModel1
=
supmodel
?.
SpecificationValueList
?.
Where
(
x
=>
x
.
Id
==
qitem
.
Id
)?.
FirstOrDefault
();
Dictionary
<
string
,
object
>
keyValues2
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Goods_SpecificationValue
.
Image
),
supModel1
?.
Image
??
""
},
{
nameof
(
RB_Goods_SpecificationValue
.
Name
),
supModel1
?.
Name
??
""
},
{
nameof
(
RB_Goods_SpecificationValue
.
Sort
),
supModel1
?.
Sort
??
0
}
};
List
<
WhereHelper
>
wheres2
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Goods_Specification
.
Id
),
FiledValue
=
qitem
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
goods_SpecificationValueRepository
.
Update
(
keyValues2
,
wheres2
);
}
}
...
...
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