增加配置模块/评论模块
This commit is contained in:
parent
11e7082e32
commit
326aa2c5bc
@ -0,0 +1,47 @@
|
||||
package cn.com.tenlion.buildingpictures.util;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
|
||||
/**
|
||||
* SHA1加密
|
||||
*/
|
||||
public class SHA1Utils {
|
||||
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
String shaEncode = shaEncode("jsapi_ticket=sM4AOVdWfPE4DxkXGEs8VPaIYw0hBLm4ZNa4qYC4JTh-FISZ6Y7pfYAsxqKWCHxuELRUyHnzyzsjeY-L1qLOcg&noncestr=aea013299bb54f6ca×tamp=1629451241&url=https://cbc.wgink.ink/systemcard/app/cardconfigarticle/listrelease");
|
||||
System.out.println(shaEncode);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Comment SHA1实现
|
||||
* @Author 崔宝铖
|
||||
* @Date 2021年8月20日14:43:25
|
||||
* @return
|
||||
*/
|
||||
public static String shaEncode(String str) throws Exception {
|
||||
try {
|
||||
MessageDigest digest = java.security.MessageDigest
|
||||
.getInstance("SHA-1"); //如果是SHA加密只需要将"SHA-1"改成"SHA"即可
|
||||
digest.update(str.getBytes());
|
||||
byte messageDigest[] = digest.digest();
|
||||
// Create Hex String
|
||||
StringBuffer hexStr = new StringBuffer();
|
||||
// 字节数组转换为 十六进制 数
|
||||
for (int i = 0; i < messageDigest.length; i++) {
|
||||
String shaHex = Integer.toHexString(messageDigest[i] & 0xFF);
|
||||
if (shaHex.length() < 2) {
|
||||
hexStr.append(0);
|
||||
}
|
||||
hexStr.append(shaHex);
|
||||
}
|
||||
return hexStr.toString();
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,235 @@
|
||||
<!doctype html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<base th:href="${#request.getContextPath() + '/'}">
|
||||
<meta charset="utf-8">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
|
||||
<style>
|
||||
.mustField {
|
||||
color: red;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein" id="viewer">
|
||||
<div class="layui-card" >
|
||||
<div class="layui-card-header">
|
||||
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
|
||||
<a class="close" href="javascript:void(0);">上级列表</a><span lay-separator="">/</span>
|
||||
<a href="javascript:void(0);"><cite>查看审核内容</cite></a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="layui-card-body" style="padding: 15px;">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<div id="fieldTemplateDiv"></div>
|
||||
<script id="fieldTemplate" type="text/html">
|
||||
{{# for(var i = 0 ; i < d.length; i++) { }}
|
||||
{{# var map = d[i]; }}
|
||||
{{# if(map.dataType == 1) { }}
|
||||
<div class=" layui-form-item " >
|
||||
<div >
|
||||
<label class="layui-form-label" >{{ map.comment }}{{ map.must == 1 ? '<span class="mustField">*</span>' : '' }}</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" class="layui-input" value="{{ map.value }}" placeholder="{{ map.placeholder }}" maxlength="500">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
{{# if(map.dataType == 2) { }}
|
||||
{{# var mapValue = map.value }}
|
||||
{{# var imageArray = mapValue.split("@")[0].split(","); }}
|
||||
<div class=" layui-form-item layui-form-text " >
|
||||
<div>
|
||||
<label class="layui-form-label" >{{ map.comment }}{{ map.must == 1 ? '<span class="mustField">*</span>' : '' }}</label>
|
||||
<div class="layui-input-block">
|
||||
<div class="upload-image-box">
|
||||
{{# for(var j = 0 ; j < imageArray.length; j++) { }}
|
||||
<span class="upload-image-span">
|
||||
<img src="route/file/download/false/{{ imageArray[j] }}" align="加载失败">
|
||||
</span>
|
||||
{{# } }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
{{# if(map.dataType == 3) { }}
|
||||
{{# var mapValue = map.value; }}
|
||||
{{# var audioArray = mapValue.split(","); }}
|
||||
<div class=" layui-form-item layui-form-text " >
|
||||
<div>
|
||||
<label class="layui-form-label" >{{ map.comment }}{{ map.must == 1 ? '<span class="mustField">*</span>' : '' }}</label>
|
||||
<div class="layui-input-block">
|
||||
<div class="upload-audio-box" style="width: auto; height: auto; padding-left: 35px; padding-top: 35px;">
|
||||
{{# for(var j = 0 ; j < audioArray.length; j++) { }}
|
||||
{{# var audio = audioArray[j].split("&")[0]; }}
|
||||
<audio src="route/file/download/false/{{audio }}" controls="controls">您的浏览器不支持 audio 标签。</audio>
|
||||
{{# } }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
{{# if(map.dataType == 4) { }}
|
||||
{{# var mapValue = map.value }}
|
||||
{{# var videoArray = mapValue.split(","); }}
|
||||
<div class=" layui-form-item layui-form-text " >
|
||||
<div>
|
||||
<label class="layui-form-label" >{{ map.comment }}{{ map.must == 1 ? '<span class="mustField">*</span>' : '' }}</label>
|
||||
<div class="layui-input-block">
|
||||
<div class="upload-video-box" style="width: auto; height: auto; padding-left: 25px; padding-top: 25px;">
|
||||
{{# for(var j = 0 ; j < audioArray.length; j++) { }}
|
||||
{{# var video = videoArray[j].split("&")[0]; }}
|
||||
<div id="{{map.name}}{{j}}" style="width:300px; height:180px;"></div>
|
||||
{{# } }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
{{# if(map.dataType == 7) { }}
|
||||
<div class=" layui-form-item layui-form-text ">
|
||||
<div >
|
||||
<label class="layui-form-label" >{{ map.comment }}{{ map.must == 1 ? '<span class="mustField">*</span>' : '' }}</label>
|
||||
<div class="layui-input-block layui-text">
|
||||
<textarea class="layui-textarea" placeholder="{{ map.placeholder }}">{{ map.value }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
</script>
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-footer" style="left: 0;">
|
||||
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">提交审核</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="assets/js/vendor/wangEditor/wangEditor.min.js"></script>
|
||||
<script src="assets/js/vendor/ckplayer/ckplayer/ckplayer.js"></script>
|
||||
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/' //静态资源所在路径
|
||||
}).extend({
|
||||
index: 'lib/index' //主入口模块
|
||||
}).use(['index', 'form', 'laydate', 'laytpl'], function(){
|
||||
var $ = layui.$;
|
||||
var form = layui.form;
|
||||
var laytpl = layui.laytpl;
|
||||
var laydate = layui.laydate;
|
||||
var uid = top.restAjax.params(window.location.href).uid;
|
||||
var configTableId = top.restAjax.params(window.location.href).configTableId;
|
||||
|
||||
function closeBox() {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
}
|
||||
|
||||
var dataList;
|
||||
// 初始化内容
|
||||
function initData() {
|
||||
var loadLayerIndex;
|
||||
top.restAjax.get(top.restAjax.path('api/configtableoperation/get/{configTableId}/{uid}', [configTableId,uid]), {}, null, function(code, data) {
|
||||
var dataFormData = {};
|
||||
for(var i in data) {
|
||||
dataFormData[i] = data[i] +'';
|
||||
}
|
||||
dataList = data.list;
|
||||
laytpl(document.getElementById('fieldTemplate').innerHTML).render(data.list, function(html) {
|
||||
document.getElementById('fieldTemplateDiv').innerHTML = html;
|
||||
form.val('dataForm', {});
|
||||
form.render(null, 'dataForm');
|
||||
for (var i = 0 ; i < dataList.length; i++) {
|
||||
if(dataList[i].dataType == "2") {
|
||||
setTimeout(function() {
|
||||
new Viewer(document.getElementById("viewer"),{
|
||||
loop:true
|
||||
});
|
||||
}, 150);
|
||||
}
|
||||
if(dataList[i].dataType == "4") {
|
||||
var videoArray = dataList[i].value.split(",");
|
||||
for (var j = 0 ; j < videoArray.length; j++) {
|
||||
var video = videoArray[j].split("&")[0];
|
||||
var image = videoArray[j].split("&")[1];
|
||||
var player = new ckplayer({
|
||||
container: '#'+ dataList[i].name + j,
|
||||
variable: 'player',
|
||||
flashplayer: false,
|
||||
poster:'route/file/download/true/'+ image,
|
||||
video: {
|
||||
file: 'route/file/download/true/'+ video,
|
||||
type: 'video/mp4'
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
form.render(null, 'dataForm');
|
||||
});
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
}
|
||||
initData();
|
||||
|
||||
// 提交表单
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
//询问框
|
||||
top.layer.confirm('', {
|
||||
title:'保存审核',
|
||||
btn: ['审核通过','审核不通过','取消'] //按钮
|
||||
}, function(la){
|
||||
subMit("2", "审核通过");
|
||||
}, function(la){
|
||||
top.layer.prompt({title: '输入不通过的原因', formType: 2}, function(text, index){
|
||||
top.layer.close(index);
|
||||
subMit("0", text);
|
||||
});
|
||||
}, function(la){
|
||||
top.layer.close(la);
|
||||
});
|
||||
});
|
||||
|
||||
function subMit(checkStatus, checkRemark) {
|
||||
var loadLayerIndex;
|
||||
var updateData = {checkStatus:checkStatus, checkRemark:checkRemark, configTableId:configTableId, uid: uid};
|
||||
top.restAjax.put(top.restAjax.path('api/configtableoperation/check', []), updateData, null, function(code, data) {
|
||||
closeBox();
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
}
|
||||
|
||||
$('.close').on('click', function() {
|
||||
closeBox();
|
||||
});
|
||||
|
||||
// 校验
|
||||
form.verify({
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,97 @@
|
||||
package cn.com.tenlion.configcontent.pojo.dtos.contentcomment;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: ContentCountStatusDTO
|
||||
* @Description: CBC内容管理数量状态
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2021-08-02 09:31:18
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@ApiModel
|
||||
public class ContentCountStatusDTO {
|
||||
|
||||
@ApiModelProperty(name = "businessId", value = "业务表ID")
|
||||
private String businessId;
|
||||
@ApiModelProperty(name = "commentCount", value = "评论数量")
|
||||
private Integer commentCount;
|
||||
@ApiModelProperty(name = "likeCount", value = "点赞数量")
|
||||
private Integer likeCount;
|
||||
@ApiModelProperty(name = "scansCount", value = "查看数量")
|
||||
private Integer scansCount;
|
||||
@ApiModelProperty(name = "scansCount", value = "转发数量")
|
||||
private Integer dispatchCount;
|
||||
@ApiModelProperty(name = "collectCount", value = "收藏数量")
|
||||
private Integer collectCount;
|
||||
@ApiModelProperty(name = "collectCount", value = "是否已点赞")
|
||||
private Boolean likeStatus;
|
||||
@ApiModelProperty(name = "collectStatus", value = "是否已收藏")
|
||||
private Boolean collectStatus;
|
||||
|
||||
public String getBusinessId() {
|
||||
return businessId == null ? "" : businessId;
|
||||
}
|
||||
|
||||
public void setBusinessId(String businessId) {
|
||||
this.businessId = businessId;
|
||||
}
|
||||
|
||||
public Integer getCommentCount() {
|
||||
return commentCount;
|
||||
}
|
||||
|
||||
public void setCommentCount(Integer commentCount) {
|
||||
this.commentCount = commentCount;
|
||||
}
|
||||
|
||||
public Integer getLikeCount() {
|
||||
return likeCount;
|
||||
}
|
||||
|
||||
public void setLikeCount(Integer likeCount) {
|
||||
this.likeCount = likeCount;
|
||||
}
|
||||
|
||||
public Integer getScansCount() {
|
||||
return scansCount;
|
||||
}
|
||||
|
||||
public void setScansCount(Integer scansCount) {
|
||||
this.scansCount = scansCount;
|
||||
}
|
||||
|
||||
public Integer getDispatchCount() {
|
||||
return dispatchCount;
|
||||
}
|
||||
|
||||
public void setDispatchCount(Integer dispatchCount) {
|
||||
this.dispatchCount = dispatchCount;
|
||||
}
|
||||
|
||||
public Integer getCollectCount() {
|
||||
return collectCount;
|
||||
}
|
||||
|
||||
public void setCollectCount(Integer collectCount) {
|
||||
this.collectCount = collectCount;
|
||||
}
|
||||
|
||||
public Boolean getLikeStatus() {
|
||||
return likeStatus;
|
||||
}
|
||||
|
||||
public void setLikeStatus(Boolean likeStatus) {
|
||||
this.likeStatus = likeStatus;
|
||||
}
|
||||
|
||||
public Boolean getCollectStatus() {
|
||||
return collectStatus;
|
||||
}
|
||||
|
||||
public void setCollectStatus(Boolean collectStatus) {
|
||||
this.collectStatus = collectStatus;
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package cn.com.tenlion.configtable.pojo.dtos.configtableoperation;
|
||||
|
||||
import ink.wgink.module.dictionary.pojo.dtos.DataDTO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: ConfigTableOperationCheckDTO
|
||||
* @Description: 崔宝铖
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2021-06-24 10:59:30
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@ApiModel
|
||||
public class ConfigTableOperationCheckDTO {
|
||||
|
||||
@ApiModelProperty(name = "checkStatus", value = "审核状态")
|
||||
private String checkStatus;
|
||||
@ApiModelProperty(name = "checkRemark", value = "审核记录")
|
||||
private String checkRemark;
|
||||
@ApiModelProperty(name = "uid", value = "数据ID")
|
||||
private String uid;
|
||||
@ApiModelProperty(name = "configTableId", value = "表单ID")
|
||||
private String configTableId;
|
||||
|
||||
public String getCheckStatus() {
|
||||
return checkStatus == null ? "" : checkStatus;
|
||||
}
|
||||
|
||||
public void setCheckStatus(String checkStatus) {
|
||||
this.checkStatus = checkStatus;
|
||||
}
|
||||
|
||||
public String getCheckRemark() {
|
||||
return checkRemark == null ? "" : checkRemark;
|
||||
}
|
||||
|
||||
public void setCheckRemark(String checkRemark) {
|
||||
this.checkRemark = checkRemark;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid == null ? "" : uid;
|
||||
}
|
||||
|
||||
public void setUid(String uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public String getConfigTableId() {
|
||||
return configTableId == null ? "" : configTableId;
|
||||
}
|
||||
|
||||
public void setConfigTableId(String configTableId) {
|
||||
this.configTableId = configTableId;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user