Merge remote-tracking branch 'origin/dev/3.1_release_merge' into dev/3.1_release_merge
This commit is contained in:
@@ -149,14 +149,19 @@ public class PanToneServiceImpl extends ServiceImpl<PanToneMapper, PanTone> impl
|
||||
|
||||
// 5. 处理缺失的 Pantone 数据,创建默认的 PantoneVO
|
||||
for (Integer colorIndex : colorIndexes) {
|
||||
String rgbValue = colorIndexRgb.get(colorIndex);
|
||||
int[] rgb = Arrays.stream(rgbValue.split("\\s+")).mapToInt(Integer::parseInt).toArray();
|
||||
if (!pantoneVOMap.containsKey(colorIndex)) {
|
||||
String rgbValue = colorIndexRgb.get(colorIndex);
|
||||
int[] rgb = Arrays.stream(rgbValue.split("\\s+")).mapToInt(Integer::parseInt).toArray();
|
||||
PantoneVO defaultPantoneVO = new PantoneVO();
|
||||
defaultPantoneVO.setR(rgb[0]);
|
||||
defaultPantoneVO.setG(rgb[1]);
|
||||
defaultPantoneVO.setB(rgb[2]);
|
||||
pantoneVOMap.put(colorIndex, defaultPantoneVO);
|
||||
} else {
|
||||
PantoneVO pantoneVO = pantoneVOMap.get(colorIndex);
|
||||
pantoneVO.setR(rgb[0]);
|
||||
pantoneVO.setG(rgb[1]);
|
||||
pantoneVO.setB(rgb[2]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user