BUGFIX:修改pantone返回的rgb值
This commit is contained in:
@@ -110,6 +110,14 @@ public class PanToneServiceImpl extends ServiceImpl<PanToneMapper, PanTone> impl
|
||||
}
|
||||
});
|
||||
|
||||
// 覆盖pantone中的rgb值,使用前端传过来的rgb值
|
||||
for (Map.Entry<String, PantoneVO> pantoneVOEntry : colorPantoneVO.entrySet()) {
|
||||
int[] rgb = Arrays.stream(pantoneVOEntry.getKey().split("\\s+")).mapToInt(Integer::parseInt).toArray();
|
||||
pantoneVOEntry.getValue().setR(rgb[0]);
|
||||
pantoneVOEntry.getValue().setG(rgb[1]);
|
||||
pantoneVOEntry.getValue().setB(rgb[2]);
|
||||
}
|
||||
|
||||
return colorPantoneVO;
|
||||
}
|
||||
|
||||
@@ -164,9 +172,9 @@ public class PanToneServiceImpl extends ServiceImpl<PanToneMapper, PanTone> impl
|
||||
return null;
|
||||
}
|
||||
PantoneVO pantoneVO = CopyUtil.copyObject(panTone,PantoneVO.class);
|
||||
pantoneVO.setR(panTone.getR());
|
||||
pantoneVO.setG(panTone.getG());
|
||||
pantoneVO.setB(panTone.getB());
|
||||
// pantoneVO.setR(panTone.getR());
|
||||
// pantoneVO.setG(panTone.getG());
|
||||
// pantoneVO.setB(panTone.getB());
|
||||
pantoneVO.setId(panTone.getPantoneIndex());
|
||||
return pantoneVO;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user