master:解析协议为转以后的json格式;
parent
0416b75455
commit
9682948168
|
|
@ -1,6 +1,7 @@
|
||||||
package com.ruoyi.web.controller.common;
|
package com.ruoyi.web.controller.common;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.io.FileUtil;
|
||||||
import cn.hutool.core.util.BooleanUtil;
|
import cn.hutool.core.util.BooleanUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.json.JSONUtil;
|
import cn.hutool.json.JSONUtil;
|
||||||
|
|
@ -32,6 +33,7 @@ import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.crypto.Mac;
|
import javax.crypto.Mac;
|
||||||
import javax.crypto.spec.SecretKeySpec;
|
import javax.crypto.spec.SecretKeySpec;
|
||||||
|
import java.nio.charset.Charset;
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
import java.time.ZoneId;
|
import java.time.ZoneId;
|
||||||
import java.time.ZoneOffset;
|
import java.time.ZoneOffset;
|
||||||
|
|
@ -232,6 +234,14 @@ public class CommonController {
|
||||||
return R.ok(BeanUtil.toBean(dto, BusinessLicenseVO.class));
|
return R.ok(BeanUtil.toBean(dto, BusinessLicenseVO.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
String str = FileUtil.readString("C:\\Users\\123\\Desktop\\privacyPolicy(1).html", Charset.forName("UTF-8"));
|
||||||
|
Map<String, String> json = new HashMap<>();
|
||||||
|
json.put("title", "aaa");
|
||||||
|
json.put("content", str);
|
||||||
|
System.out.println(JSONUtil.toJsonStr(json));
|
||||||
|
}
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasAnyRoles('admin,general_admin')")
|
@PreAuthorize("@ss.hasAnyRoles('admin,general_admin')")
|
||||||
@ApiOperation("保存html(需登录管理员用户)")
|
@ApiOperation("保存html(需登录管理员用户)")
|
||||||
@PostMapping("/html/save")
|
@PostMapping("/html/save")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue