|
@@ -25,6 +25,12 @@ public class PrivilegeOptionController extends BaseController {
|
|
|
//@PreAuthorize("hasRole('ADMIN')")
|
|
//@PreAuthorize("hasRole('ADMIN')")
|
|
|
@PostMapping("/save")
|
|
@PostMapping("/save")
|
|
|
public PrivilegeOption save(@RequestBody PrivilegeOption record) {
|
|
public PrivilegeOption save(@RequestBody PrivilegeOption record) {
|
|
|
|
|
+ List<String> icon = record.getIcon();
|
|
|
|
|
+ if (icon.size()>0){
|
|
|
|
|
+ for (String s : icon) {
|
|
|
|
|
+ s="https://"+s;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
if (record.getId() != null) {
|
|
if (record.getId() != null) {
|
|
|
PrivilegeOption orig = privilegeOptionRepo.findById(record.getId()).orElseThrow(new BusinessException("无记录"));
|
|
PrivilegeOption orig = privilegeOptionRepo.findById(record.getId()).orElseThrow(new BusinessException("无记录"));
|
|
|
ObjUtils.merge(orig, record);
|
|
ObjUtils.merge(orig, record);
|