Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
Bailun.PmsAPI
Overview
Overview
Details
Activity
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
pds
Bailun.PmsAPI
Commits
a03d6508
Commit
a03d6508
authored
Mar 02, 2021
by
魏天华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
处理图片带问号转义问题
parent
794f3375
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
14 deletions
+14
-14
OldImageUrlToNew.cs
API.Services/DataMigrationServices/OldImageUrlToNew.cs
+4
-4
ImageUploadServices.cs
API.Services/PmsApiServices/ImageUploadServices.cs
+2
-2
DockingSystemServices.cs
API.Services/ProductManageServices/DockingSystemServices.cs
+3
-3
ProductGroupServices.cs
API.Services/ProductManageServices/ProductGroupServices.cs
+3
-3
ProductServices.cs
API.Services/ProductManageServices/ProductServices.cs
+2
-2
No files found.
API.Services/DataMigrationServices/OldImageUrlToNew.cs
View file @
a03d6508
...
@@ -41,13 +41,13 @@ namespace API.Services.DataMigrationServices
...
@@ -41,13 +41,13 @@ namespace API.Services.DataMigrationServices
var
mainArr
=
objBase
.
s_main_image
.
Split
(
','
);
var
mainArr
=
objBase
.
s_main_image
.
Split
(
','
);
foreach
(
var
imgUrl
in
mainArr
)
foreach
(
var
imgUrl
in
mainArr
)
{
{
if
(!
string
.
IsNullOrWhiteSpace
(
imgUrl
))
if
(!
string
.
IsNullOrWhiteSpace
(
imgUrl
))
{
{
string
fileName
=
Path
.
GetFileName
(
objBase
.
s_main_image
);
string
fileName
=
Path
.
GetFileName
(
objBase
.
s_main_image
);
fileName
=
CommonBaseLib
.
UrlToDecode
(
fileName
);
fileName
=
CommonBaseLib
.
UrlToDecode
(
fileName
);
var
result
=
QiNiuCloudHelper
.
FetchFile
(
imgUrl
,
ref
fileName
);
var
result
=
QiNiuCloudHelper
.
FetchFile
(
imgUrl
,
ref
fileName
);
objBase
.
s_main_image
=
objBase
.
s_main_image
.
Replace
(
imgUrl
,
fileName
);
objBase
.
s_main_image
=
objBase
.
s_main_image
.
Replace
(
imgUrl
,
fileName
)
.
Replace
(
"%3F"
,
"?"
)
;
objBase
.
s_child_image
=
objBase
.
s_child_image
.
Replace
(
imgUrl
,
fileName
);
objBase
.
s_child_image
=
objBase
.
s_child_image
.
Replace
(
imgUrl
,
fileName
)
.
Replace
(
"%3F"
,
"?"
)
;
}
}
}
}
...
@@ -60,7 +60,7 @@ namespace API.Services.DataMigrationServices
...
@@ -60,7 +60,7 @@ namespace API.Services.DataMigrationServices
string
fileName
=
Path
.
GetFileName
(
objBase
.
s_child_image
);
string
fileName
=
Path
.
GetFileName
(
objBase
.
s_child_image
);
fileName
=
CommonBaseLib
.
UrlToDecode
(
fileName
);
fileName
=
CommonBaseLib
.
UrlToDecode
(
fileName
);
var
result
=
QiNiuCloudHelper
.
FetchFile
(
imgUrl
,
ref
fileName
);
var
result
=
QiNiuCloudHelper
.
FetchFile
(
imgUrl
,
ref
fileName
);
objBase
.
s_child_image
=
objBase
.
s_child_image
.
Replace
(
imgUrl
,
fileName
);
objBase
.
s_child_image
=
objBase
.
s_child_image
.
Replace
(
imgUrl
,
fileName
)
.
Replace
(
"%3F"
,
"?"
)
;
}
}
}
}
objBase
.
Update
(
new
string
[]
{
"s_main_image"
,
"s_child_image"
});
objBase
.
Update
(
new
string
[]
{
"s_main_image"
,
"s_child_image"
});
...
...
API.Services/PmsApiServices/ImageUploadServices.cs
View file @
a03d6508
...
@@ -79,8 +79,8 @@ namespace API.Services.PmsApiServices
...
@@ -79,8 +79,8 @@ namespace API.Services.PmsApiServices
}
}
}
}
item
.
s_main_image
=
mainImage
.
TrimEnd
(
','
).
Replace
(
"
?"
,
"%3F
"
);
item
.
s_main_image
=
mainImage
.
TrimEnd
(
','
).
Replace
(
"
%3F"
,
"?
"
);
item
.
s_child_image
=
childImage
.
TrimEnd
(
','
).
Replace
(
"
?"
,
"%3F
"
);
item
.
s_child_image
=
childImage
.
TrimEnd
(
','
).
Replace
(
"
%3F"
,
"?
"
);
return
item
;
return
item
;
}
}
...
...
API.Services/ProductManageServices/DockingSystemServices.cs
View file @
a03d6508
...
@@ -41,7 +41,7 @@ namespace API.Services.ProductManageServices
...
@@ -41,7 +41,7 @@ namespace API.Services.ProductManageServices
objMain
.
pd_sku
=
mainInfo
.
Code
;
objMain
.
pd_sku
=
mainInfo
.
Code
;
objMain
.
pd_chinaname
=
mainInfo
.
CName
;
objMain
.
pd_chinaname
=
mainInfo
.
CName
;
objMain
.
pd_name
=
mainInfo
.
EName
;
objMain
.
pd_name
=
mainInfo
.
EName
;
objMain
.
pd_mainimgurl
=
mainImage
;
objMain
.
pd_mainimgurl
=
mainImage
.
Replace
(
"%3F"
,
"?"
)
;
objMain
.
pd_colorname
=
mainInfo
.
ColorName
;
objMain
.
pd_colorname
=
mainInfo
.
ColorName
;
objMain
.
pd_sizename
=
mainInfo
.
SizeName
;
objMain
.
pd_sizename
=
mainInfo
.
SizeName
;
objMain
.
pd_sizename1
=
mainInfo
.
SizeName1
;
objMain
.
pd_sizename1
=
mainInfo
.
SizeName1
;
...
@@ -106,8 +106,8 @@ namespace API.Services.ProductManageServices
...
@@ -106,8 +106,8 @@ namespace API.Services.ProductManageServices
objPro
.
s_unit
=
""
;
objPro
.
s_unit
=
""
;
objPro
.
s_price
=
objSku
.
Price
;
objPro
.
s_price
=
objSku
.
Price
;
objPro
.
s_currency
=
""
;
objPro
.
s_currency
=
""
;
objPro
.
s_main_image
=
objSku
.
MainImage
;
objPro
.
s_main_image
=
objSku
.
MainImage
.
Replace
(
"%3F"
,
"?"
)
;
objPro
.
s_child_image
=
objSku
.
ChildImage
;
objPro
.
s_child_image
=
objSku
.
ChildImage
.
Replace
(
"%3F"
,
"?"
)
;
objPro
.
s_color
=
objSku
.
Color
;
objPro
.
s_color
=
objSku
.
Color
;
objPro
.
s_size
=
objSku
.
Size
;
objPro
.
s_size
=
objSku
.
Size
;
objPro
.
s_size1
=
objSku
.
Size1
;
objPro
.
s_size1
=
objSku
.
Size1
;
...
...
API.Services/ProductManageServices/ProductGroupServices.cs
View file @
a03d6508
...
@@ -116,7 +116,7 @@ namespace API.Services.ProductManageServices
...
@@ -116,7 +116,7 @@ namespace API.Services.ProductManageServices
//获取图片集合
//获取图片集合
if
(
string
.
IsNullOrWhiteSpace
(
mainUrl
)
&&
(
item
.
s_main_image
.
Contains
(
".png"
)
||
item
.
s_main_image
.
Contains
(
".jpg"
)))
if
(
string
.
IsNullOrWhiteSpace
(
mainUrl
)
&&
(
item
.
s_main_image
.
Contains
(
".png"
)
||
item
.
s_main_image
.
Contains
(
".jpg"
)))
{
{
mainUrl
=
item
.
s_main_image
;
mainUrl
=
item
.
s_main_image
.
Replace
(
"%3F"
,
"?"
)
;
}
}
if
(
urlList
.
Length
<
2000
)
if
(
urlList
.
Length
<
2000
)
...
@@ -219,8 +219,8 @@ namespace API.Services.ProductManageServices
...
@@ -219,8 +219,8 @@ namespace API.Services.ProductManageServices
objPro
.
s_unit
=
""
;
objPro
.
s_unit
=
""
;
objPro
.
s_price
=
totalPrice
;
objPro
.
s_price
=
totalPrice
;
objPro
.
s_currency
=
""
;
objPro
.
s_currency
=
""
;
objPro
.
s_main_image
=
mainUrl
;
objPro
.
s_main_image
=
mainUrl
.
Replace
(
"%3F"
,
"?"
)
;
objPro
.
s_child_image
=
urlList
;
objPro
.
s_child_image
=
urlList
.
Replace
(
"%3F"
,
"?"
)
;
objPro
.
s_color
=
"color"
;
objPro
.
s_color
=
"color"
;
objPro
.
s_size
=
""
;
objPro
.
s_size
=
""
;
objPro
.
s_size1
=
""
;
objPro
.
s_size1
=
""
;
...
...
API.Services/ProductManageServices/ProductServices.cs
View file @
a03d6508
...
@@ -560,8 +560,8 @@ namespace API.Services.ProductManageServices
...
@@ -560,8 +560,8 @@ namespace API.Services.ProductManageServices
Task
.
Factory
.
StartNew
(()
=>
Task
.
Factory
.
StartNew
(()
=>
{
{
var
tempBase
=
ImageUploadServices
.
ImageDataToSync
(
objModel
,
true
);
var
tempBase
=
ImageUploadServices
.
ImageDataToSync
(
objModel
,
true
);
item
.
s_main_image
=
tempBase
.
s_main_image
;
item
.
s_main_image
=
tempBase
.
s_main_image
.
Replace
(
"%3F"
,
"?"
)
;
item
.
s_child_image
=
tempBase
.
s_child_image
;
item
.
s_child_image
=
tempBase
.
s_child_image
.
Replace
(
"%3F"
,
"?"
)
;
item
.
Update
(
new
string
[]
{
"s_main_image"
,
"s_child_image"
});
item
.
Update
(
new
string
[]
{
"s_main_image"
,
"s_child_image"
});
});
});
...
...
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