Compare commits
No commits in common. "56d9fa35f73909efa5c371f73419ce83768e2cd1" and "082c722321c5e665ea3e69bdd320b23134f1d3f9" have entirely different histories.
56d9fa35f7
...
082c722321
|
|
@ -2,9 +2,7 @@ package com.playlet.web.controller.system;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.playlet.common.core.domain.entity.SysUser;
|
||||
import com.playlet.system.domain.PlayletPublicDetail;
|
||||
import com.playlet.system.service.ISysUserService;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
|
@ -34,9 +32,6 @@ public class PlayletPublicAccountController extends BaseController
|
|||
@Autowired
|
||||
private IPlayletPublicAccountService playletPublicAccountService;
|
||||
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
|
||||
|
||||
@GetMapping("/wxQrcode/{id}")
|
||||
public String wxQrcode(@PathVariable("id") String id, ModelMap mmap) {
|
||||
|
|
@ -73,11 +68,6 @@ public class PlayletPublicAccountController extends BaseController
|
|||
{
|
||||
startPage();
|
||||
List<PlayletPublicAccount> list = playletPublicAccountService.selectPlayletPublicAccountList(playletPublicAccount);
|
||||
list.forEach(model->{
|
||||
if(model.getManagerId() != null){
|
||||
model.setManagerName(sysUserService.selectUserById(model.getManagerId()).getUserName());
|
||||
}
|
||||
});
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
|
@ -99,9 +89,8 @@ public class PlayletPublicAccountController extends BaseController
|
|||
* 新增公众号列
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add(ModelMap modelMap)
|
||||
public String add()
|
||||
{
|
||||
modelMap.put("users",sysUserService.selectUserList(new SysUser()));
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
|
|
@ -126,7 +115,6 @@ public class PlayletPublicAccountController extends BaseController
|
|||
{
|
||||
PlayletPublicAccount playletPublicAccount = playletPublicAccountService.selectPlayletPublicAccountById(id);
|
||||
mmap.put("playletPublicAccount", playletPublicAccount);
|
||||
mmap.put("users",sysUserService.selectUserList(new SysUser()));
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -52,13 +52,7 @@ public class PlayletPublicDetailController extends BaseController
|
|||
public AjaxResult checkExist(@RequestBody Long id) {
|
||||
PlayletPublicDetail detail = playletPublicDetailService.getById(id);
|
||||
if(detail!=null){
|
||||
String url;
|
||||
if("01".equals(detail.getType())){
|
||||
url = "https://www.mungerfans.com/article/info/" + id;
|
||||
}else {
|
||||
url = "https://www.mungerfans.com/article/file/" + id;
|
||||
}
|
||||
return AjaxResult.success("操作成功", url);
|
||||
return AjaxResult.success();
|
||||
}else {
|
||||
return AjaxResult.error();
|
||||
}
|
||||
|
|
@ -118,9 +112,6 @@ public class PlayletPublicDetailController extends BaseController
|
|||
@ResponseBody
|
||||
public AjaxResult addSave(PlayletPublicDetail playletPublicDetail)
|
||||
{
|
||||
if("02".equals(playletPublicDetail.getType())){
|
||||
playletPublicDetail.setContent(playletPublicDetail.getPdfUrl());
|
||||
}
|
||||
return toAjax(playletPublicDetailService.insertPlayletPublicDetail(playletPublicDetail));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,8 +9,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>微信服务端接口</p>
|
||||
* @author clunt
|
||||
|
|
@ -48,11 +46,6 @@ public class WxController {
|
|||
return Result.success(wxService.getWxInfo(openId, accessToken));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取jsapi_ticket", httpMethod = "GET")
|
||||
@GetMapping("/getWxTicket")
|
||||
@ResponseBody
|
||||
public Result<Map<String, String>> getWxTicket(@RequestParam(value = "url") String url){
|
||||
return Result.success(wxService.getWxTicket(url));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
package com.playlet.web.service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>微信service类</p>
|
||||
* @author clunt
|
||||
|
|
@ -16,6 +14,4 @@ public interface WxService {
|
|||
|
||||
String getWxInfo(String openId, String accessToken);
|
||||
|
||||
Map<String, String> getWxTicket(String requestUrl);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ public class PlayletPublicDetailAppServiceImpl implements PlayletPublicDetailApp
|
|||
PlayletPublicDetail model = iPlayletPublicDetailService.getById(id);
|
||||
model.setPlayletPublicAccount(iPlayletPublicAccountService.selectPlayletPublicAccountById(model.getPublicId()));
|
||||
// 调用接口查询二维码信息 -- 富文本格式
|
||||
if("01".equals(model.getType()) && model.getItemId() != null){
|
||||
if("01".equals(model.getType())){
|
||||
PlayletItem item = iPlayletItemService.getById(model.getItemId());
|
||||
fillQrcode(item.getItemId(), model);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,12 +10,6 @@ import lombok.extern.slf4j.Slf4j;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.security.MessageDigest;
|
||||
import java.util.Formatter;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
|
|
@ -66,68 +60,4 @@ public class WxServiceImpl implements WxService {
|
|||
log.info("调用微信获取用户信息,响应内容:{}", result);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> getWxTicket(String requestUrl) {
|
||||
String accessTokenResult = HttpUtils.sendGet("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=wx2b7d9259c1188067&secret=919165aae35838480986555f6c03ae6f");
|
||||
log.info("accessTokenResult : {} ", accessTokenResult);
|
||||
String accessToken = JSONObject.parseObject(accessTokenResult).getString("access_token");
|
||||
String url = "https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=" + accessToken + "&type=jsapi";
|
||||
log.info("调用微信获取Ticket,入参url:{}", url);
|
||||
String result = HttpUtils.sendGet(url);
|
||||
log.info("调用微信获取Ticket,响应内容:{}", result);
|
||||
String ticket = JSONObject.parseObject(result).getString("ticket");
|
||||
//生成11位时间戳
|
||||
long time11 = System.currentTimeMillis() / 1000;
|
||||
String timestamp = String.valueOf(time11);
|
||||
//生成16位随机字符串
|
||||
String nonce = create16String();
|
||||
String string1 = "jsapi_ticket=" + ticket + "&noncestr=" + nonce + "×tamp=" + timestamp + "&url=" + requestUrl;
|
||||
// 2.1这里利用了hutool的加密工具类
|
||||
log.info("使用sha1加密前的细信息:===>【{}】", string1);
|
||||
String signature = "";
|
||||
try {
|
||||
MessageDigest crypt = MessageDigest.getInstance("SHA-1");
|
||||
crypt.reset();
|
||||
crypt.update(string1.getBytes("UTF-8"));
|
||||
signature = encryptSha1(crypt.digest());
|
||||
} catch (Exception e) {
|
||||
log.info(e.getMessage());
|
||||
}
|
||||
Map<String,String> resultMap = new HashMap();
|
||||
resultMap.put("signature", signature);
|
||||
resultMap.put("timestamp", timestamp);
|
||||
resultMap.put("nonce", nonce);
|
||||
resultMap.put("url", url);
|
||||
resultMap.put("ticket", ticket);
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
* 生成微信sha1方法签名
|
||||
**/
|
||||
public static String encryptSha1(final byte[] hash) {
|
||||
Formatter formatter = new Formatter();
|
||||
for (byte b : hash) {
|
||||
formatter.format("%02x", b);
|
||||
}
|
||||
String result = formatter.toString();
|
||||
formatter.close();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
* 生成16位随机大小写加数字的字符串
|
||||
**/
|
||||
public static String create16String(){
|
||||
String a = "ZXCVBNMASDFGHJKLQWERTYUIOPzxcvbnmasdfghjklqwertyuiop0123456789";
|
||||
StringBuilder con = new StringBuilder();
|
||||
Random random = new Random();
|
||||
for (int i = 0; i < 16; i++) {
|
||||
con.append(a.charAt(random.nextInt(62)));
|
||||
}
|
||||
return con.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ spring:
|
|||
servlet:
|
||||
multipart:
|
||||
# 单个文件大小
|
||||
max-file-size: 50MB
|
||||
max-file-size: 10MB
|
||||
# 设置总上传的文件大小
|
||||
max-request-size: 100MB
|
||||
max-request-size: 20MB
|
||||
# 服务模块
|
||||
devtools:
|
||||
restart:
|
||||
|
|
|
|||
|
|
@ -100,20 +100,15 @@
|
|||
},
|
||||
{
|
||||
field: 'originalContentCount',
|
||||
title: '原创篇数'
|
||||
title: '原创片数'
|
||||
},
|
||||
{
|
||||
field: 'followersCount',
|
||||
title: '关注人数'
|
||||
},
|
||||
{
|
||||
field: 'managerName',
|
||||
title: '运营人员'
|
||||
},
|
||||
{
|
||||
field: 'remark',
|
||||
title: '备注',
|
||||
visible: false
|
||||
title: '备注'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增公众号列')" />
|
||||
<th:block th:include="include :: summernote-css" />
|
||||
<th:block th:include="include :: bootstrap-fileinput-css"/>
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
|
|
@ -25,15 +24,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">简介:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="introduction" class="form-control" th:rows="4"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">运营人员:</label>
|
||||
<div class="col-sm-8">
|
||||
<select id="managerId" name="managerId" class="form-control m-b" required>
|
||||
<option th:each="user:${users}" th:value="${user.userId}" th:text="${user.userName}"></option>
|
||||
</select>
|
||||
<input name="introduction" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
|
@ -58,16 +49,14 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">用户协议:</label>
|
||||
<label class="col-sm-3 control-label">备注:</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="hidden" class="form-control" name="remark">
|
||||
<div class="summernote" id="remark"></div>
|
||||
<input name="remark" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: summernote-js" />
|
||||
<th:block th:include="include :: bootstrap-fileinput-js"/>
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "system/playlet/account"
|
||||
|
|
@ -99,43 +88,6 @@
|
|||
$.operate.save(prefix + "/add", $('#form-account-add').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('.summernote').summernote({
|
||||
lang: 'zh-CN',
|
||||
height: 300,
|
||||
dialogsInBody: true,
|
||||
callbacks: {
|
||||
onChange: function(contents, $edittable) {
|
||||
$("input[name='" + this.id + "']").val(contents);
|
||||
},
|
||||
onImageUpload: function(files) {
|
||||
var obj = this;
|
||||
var data = new FormData();
|
||||
data.append("file", files[0]);
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: ctx + "common/upload",
|
||||
data: data,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
dataType: 'json',
|
||||
success: function(result) {
|
||||
if (result.code == web_status.SUCCESS) {
|
||||
$('#' + obj.id).summernote('insertImage', result.url);
|
||||
} else {
|
||||
$.modal.alertError(result.msg);
|
||||
}
|
||||
},
|
||||
error: function(error) {
|
||||
$.modal.alertWarning("图片上传失败。");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -2,8 +2,6 @@
|
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改公众号列')" />
|
||||
<th:block th:include="include :: summernote-css" />
|
||||
<th:block th:include="include :: bootstrap-fileinput-css"/>
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
|
|
@ -26,7 +24,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">简介:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="introduction" th:field="*{introduction}" th:rows="4" class="form-control"></textarea>
|
||||
<input name="introduction" th:field="*{introduction}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
|
@ -35,21 +33,10 @@
|
|||
<input name="authorAlias" th:field="*{authorAlias}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">运营人员:</label>
|
||||
<div class="col-sm-8">
|
||||
<select id="managerId" name="managerId" class="form-control m-b" required>
|
||||
<option th:each="user:${users}" th:value="${user.userId}" th:text="${user.userName}" th:field="*{managerId}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">头像:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="logoUrl" th:field="*{logoUrl}" type="text" hidden="hidden">
|
||||
<div class="file-loading">
|
||||
<input id="logoUrlFile" name="file" type="file">
|
||||
</div>
|
||||
<input name="logoUrl" th:field="*{logoUrl}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
|
@ -71,17 +58,14 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">用户协议:</label>
|
||||
<label class="col-sm-3 control-label">备注:</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="hidden" class="form-control" th:field="*{remark}">
|
||||
<div class="summernote" id="remark"></div>
|
||||
<input name="remark" th:field="*{remark}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: summernote-js" />
|
||||
<th:block th:include="include :: bootstrap-fileinput-js"/>
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "system/playlet/account";
|
||||
$("#form-account-edit").validate({
|
||||
|
|
@ -93,67 +77,6 @@
|
|||
$.operate.save(prefix + "/edit", $('#form-account-edit').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
// 详情页
|
||||
$("#logoUrlFile").fileinput({
|
||||
uploadUrl: ctx + 'tool/oss/uploadFromPlaylet',
|
||||
maxFileCount: 1,
|
||||
dropZoneEnabled: false, //是否显示拖拽区域
|
||||
showPreview: false,
|
||||
autoReplace: true
|
||||
}).on('fileuploaded', function (event, data, previewId, index) {
|
||||
console.log(data);
|
||||
if(data.response.success){
|
||||
$("input[name='logoUrl']").val(data.response.msg)
|
||||
}else {
|
||||
alert("上传失败!");
|
||||
}
|
||||
}).on('fileremoved', function (event, id, index) {
|
||||
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||
$("input[name='logoUrl']").val('')
|
||||
})
|
||||
|
||||
$(function() {
|
||||
$('.summernote').each(function(i) {
|
||||
$('#' + this.id).summernote({
|
||||
lang: 'zh-CN',
|
||||
dialogsInBody: true,
|
||||
height: 300,
|
||||
callbacks: {
|
||||
onChange: function(contents, $edittable) {
|
||||
$("input[name='" + this.id + "']").val(contents);
|
||||
},
|
||||
onImageUpload: function(files) {
|
||||
var obj = this;
|
||||
var data = new FormData();
|
||||
data.append("file", files[0]);
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: ctx + "common/upload",
|
||||
data: data,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
dataType: 'json',
|
||||
success: function(result) {
|
||||
if (result.code == web_status.SUCCESS) {
|
||||
$('#' + obj.id).summernote('insertImage', result.url);
|
||||
} else {
|
||||
$.modal.alertError(result.msg);
|
||||
}
|
||||
},
|
||||
error: function(error) {
|
||||
$.modal.alertWarning("图片上传失败。");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
var content = $("input[name='" + this.id + "']").val();
|
||||
$('#' + this.id).summernote('code', content);
|
||||
})
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -36,12 +36,6 @@
|
|||
<input name="title" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">作者花名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="authorAlias" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">图片附件:</label>
|
||||
<div class="col-sm-8">
|
||||
|
|
@ -51,24 +45,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">文章类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<label class="radio-box">
|
||||
<input type="radio" checked="" value="01" name="type">富文本</label>
|
||||
<label class="radio-box">
|
||||
<input type="radio" value="02" name="type">PDF</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">PDF附件:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="pdfUrl" type="text" hidden>
|
||||
<div class="file-loading">
|
||||
<input id="pdfUrlFile" name="file" type="file">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">详情(富文本):</label>
|
||||
<div class="col-sm-8">
|
||||
|
|
@ -172,26 +148,6 @@
|
|||
$("input[name='imgUrl']").val('')
|
||||
})
|
||||
|
||||
|
||||
// 详情页
|
||||
$("#pdfUrlFile").fileinput({
|
||||
uploadUrl: ctx + 'tool/oss/uploadFromPlaylet',
|
||||
maxFileCount: 1,
|
||||
dropZoneEnabled: false, //是否显示拖拽区域
|
||||
showPreview: false,
|
||||
autoReplace: true
|
||||
}).on('fileuploaded', function (event, data, previewId, index) {
|
||||
console.log(data);
|
||||
if(data.response.success){
|
||||
$("input[name='pdfUrl']").val(data.response.msg)
|
||||
}else {
|
||||
alert("上传失败!");
|
||||
}
|
||||
}).on('fileremoved', function (event, id, index) {
|
||||
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||
$("input[name='pdfUrl']").val('')
|
||||
})
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-detail-add').serialize());
|
||||
|
|
|
|||
|
|
@ -85,10 +85,6 @@
|
|||
field: 'title',
|
||||
title: '标题'
|
||||
},
|
||||
{
|
||||
field: 'authorAlias',
|
||||
title: '作者花名'
|
||||
},
|
||||
{
|
||||
field: 'starCount',
|
||||
title: '点赞数'
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
<head>
|
||||
<th:block th:include="include :: header('修改公众号文章详情')" />
|
||||
<th:block th:include="include :: summernote-css" />
|
||||
<th:block th:include="include :: bootstrap-fileinput-css"/>
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
|
|
@ -24,43 +23,16 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">作者花名:</label>
|
||||
<label class="col-sm-3 control-label">详情(富文本):</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="authorAlias" th:field="*{authorAlias}" class="form-control" type="text">
|
||||
<input type="hidden" class="form-control" th:field="*{content}">
|
||||
<div class="summernote" id="content"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">图片:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="imgUrl" th:field="*{imgUrl}" type="text" hidden="hidden">
|
||||
<div class="file-loading">
|
||||
<input id="imgUrlFile" name="file" type="file">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">文章类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<label class="radio-box">
|
||||
<input type="radio" th:checked="${playletPublicDetail.type == '01' ? true : false}" value="01" name="type">富文本</label>
|
||||
<label class="radio-box">
|
||||
<input type="radio" th:checked="${playletPublicDetail.type == '02' ? true : false}" value="02" name="type">PDF</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">PDF附件:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="pdfUrl" type="text" hidden="hidden">
|
||||
<div class="file-loading">
|
||||
<input id="pdfUrlFile" name="file" type="file">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">详情(富文本):</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="hidden" class="form-control" th:field="*{content}">
|
||||
<div class="summernote" id="content"></div>
|
||||
<input name="imgUrl" th:field="*{imgUrl}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
|
@ -73,7 +45,6 @@
|
|||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: summernote-js" />
|
||||
<th:block th:include="include :: bootstrap-fileinput-js"/>
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "system/playlet/detail";
|
||||
$("#form-detail-edit").validate({
|
||||
|
|
@ -86,44 +57,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
// 详情页
|
||||
$("#imgUrlFile").fileinput({
|
||||
uploadUrl: ctx + 'tool/oss/uploadFromPlaylet',
|
||||
maxFileCount: 1,
|
||||
dropZoneEnabled: false, //是否显示拖拽区域
|
||||
showPreview: false,
|
||||
autoReplace: true
|
||||
}).on('fileuploaded', function (event, data, previewId, index) {
|
||||
console.log(data);
|
||||
if(data.response.success){
|
||||
$("input[name='imgUrl']").val(data.response.msg)
|
||||
}else {
|
||||
alert("上传失败!");
|
||||
}
|
||||
}).on('fileremoved', function (event, id, index) {
|
||||
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||
$("input[name='imgUrl']").val('')
|
||||
})
|
||||
|
||||
// 详情页
|
||||
$("#pdfUrlFile").fileinput({
|
||||
uploadUrl: ctx + 'tool/oss/uploadFromPlaylet',
|
||||
maxFileCount: 1,
|
||||
dropZoneEnabled: false, //是否显示拖拽区域
|
||||
showPreview: false,
|
||||
autoReplace: true
|
||||
}).on('fileuploaded', function (event, data, previewId, index) {
|
||||
console.log(data);
|
||||
if(data.response.success){
|
||||
$("input[name='pdfUrl']").val(data.response.msg)
|
||||
}else {
|
||||
alert("上传失败!");
|
||||
}
|
||||
}).on('fileremoved', function (event, id, index) {
|
||||
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||
$("input[name='pdfUrl']").val('')
|
||||
})
|
||||
|
||||
$(function() {
|
||||
$('.summernote').each(function(i) {
|
||||
$('#' + this.id).summernote({
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
contentType: "application/json",
|
||||
success: function (result) {
|
||||
if (result.code == web_status.SUCCESS) {
|
||||
$('#wxQrcode').qrcode(result.data);
|
||||
$('#wxQrcode').qrcode("https://www.mungerfans.com/article/info/"+id);
|
||||
} else {
|
||||
$.modal.msgError("文章不存在!")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package com.playlet.system.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.playlet.common.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
|
@ -49,12 +48,6 @@ public class PlayletPublicAccount extends BaseEntity
|
|||
@ApiModelProperty(value = "作者花名")
|
||||
private String authorAlias;
|
||||
|
||||
@ApiModelProperty(value = "运营人员id")
|
||||
private Long managerId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String managerName;
|
||||
|
||||
/** 头像 */
|
||||
@Excel(name = "头像")
|
||||
@ApiModelProperty(value = "头像")
|
||||
|
|
|
|||
|
|
@ -56,15 +56,9 @@ public class PlayletPublicDetail extends BaseEntity
|
|||
@ApiModelProperty(value = "标题")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty(value = "作者花名")
|
||||
private String authorAlias;
|
||||
|
||||
@ApiModelProperty(value = "图片")
|
||||
private String imgUrl;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String pdfUrl;
|
||||
|
||||
@ApiModelProperty(value = "点赞数")
|
||||
private String starCount;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
<result property="publicType" column="public_type" />
|
||||
<result property="introduction" column="introduction" />
|
||||
<result property="authorAlias" column="author_alias" />
|
||||
<result property="managerId" column="manager_id" />
|
||||
<result property="logoUrl" column="logo_url" />
|
||||
<result property="address" column="address" />
|
||||
<result property="originalContentCount" column="original_content_count" />
|
||||
|
|
@ -23,7 +22,7 @@
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectPlayletPublicAccountVo">
|
||||
select id, name, public_type, introduction, author_alias, manager_id, logo_url, address, original_content_count, followers_count, create_by, create_time, update_by, update_time, remark from playlet_public_account
|
||||
select id, name, public_type, introduction, author_alias, logo_url, address, original_content_count, followers_count, create_by, create_time, update_by, update_time, remark from playlet_public_account
|
||||
</sql>
|
||||
|
||||
<select id="selectPlayletPublicAccountList" parameterType="PlayletPublicAccount" resultMap="PlayletPublicAccountResult">
|
||||
|
|
@ -52,7 +51,6 @@
|
|||
<if test="publicType != null">public_type,</if>
|
||||
<if test="introduction != null">introduction,</if>
|
||||
<if test="authorAlias != null">author_alias,</if>
|
||||
<if test="managerId != null">manager_id,</if>
|
||||
<if test="logoUrl != null">logo_url,</if>
|
||||
<if test="address != null">address,</if>
|
||||
<if test="originalContentCount != null">original_content_count,</if>
|
||||
|
|
@ -68,7 +66,6 @@
|
|||
<if test="publicType != null">#{publicType},</if>
|
||||
<if test="introduction != null">#{introduction},</if>
|
||||
<if test="authorAlias != null">#{authorAlias},</if>
|
||||
<if test="managerId != null">#{managerId},</if>
|
||||
<if test="logoUrl != null">#{logoUrl},</if>
|
||||
<if test="address != null">#{address},</if>
|
||||
<if test="originalContentCount != null">#{originalContentCount},</if>
|
||||
|
|
@ -88,7 +85,6 @@
|
|||
<if test="publicType != null">public_type = #{publicType},</if>
|
||||
<if test="introduction != null">introduction = #{introduction},</if>
|
||||
<if test="authorAlias != null">author_alias = #{authorAlias},</if>
|
||||
<if test="managerId != null">manager_id = #{managerId},</if>
|
||||
<if test="logoUrl != null">logo_url = #{logoUrl},</if>
|
||||
<if test="address != null">address = #{address},</if>
|
||||
<if test="originalContentCount != null">original_content_count = #{originalContentCount},</if>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
<result property="readCount" column="read_count" />
|
||||
<result property="content" column="content" />
|
||||
<result property="starCount" column="star_count" />
|
||||
<result property="type" column="type" />
|
||||
<result property="itemOne" column="item_one" />
|
||||
<result property="itemTwo" column="item_two" />
|
||||
<result property="itemThree" column="item_three" />
|
||||
|
|
@ -23,7 +22,6 @@
|
|||
<result property="itemNine" column="item_nine" />
|
||||
<result property="itemTen" column="item_ten" />
|
||||
<result property="title" column="title" />
|
||||
<result property="authorAlias" column="author_alias"/>
|
||||
<result property="imgUrl" column="img_url" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
|
|
@ -36,7 +34,7 @@
|
|||
select id, public_id, item_id, read_count,star_count,
|
||||
item_one,item_two,item_three,item_four,item_five,
|
||||
item_six,item_seven,item_eight,item_nine,item_ten,
|
||||
title,type,author_alias,img_url, content, create_by, create_time,
|
||||
title,img_url, content, create_by, create_time,
|
||||
update_by, update_time, remark from playlet_public_detail
|
||||
</sql>
|
||||
|
||||
|
|
@ -62,8 +60,6 @@
|
|||
<if test="readCount != null">read_count,</if>
|
||||
<if test="content != null">content,</if>
|
||||
<if test="title != null">title,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="authorAlias != null">author_alias,</if>
|
||||
<if test="starCount != null">star_count,</if>
|
||||
<if test="itemOne != null">item_one,</if>
|
||||
<if test="itemTwo != null">item_two,</if>
|
||||
|
|
@ -88,8 +84,6 @@
|
|||
<if test="readCount != null">#{readCount},</if>
|
||||
<if test="content != null">#{content},</if>
|
||||
<if test="title != null">#{title},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="authorAlias != null">#{authorAlias},</if>
|
||||
<if test="starCount != null">#{starCount},</if>
|
||||
<if test="itemOne != null">#{itemOne},</if>
|
||||
<if test="itemTwo != null">#{itemTwo},</if>
|
||||
|
|
@ -118,8 +112,6 @@
|
|||
<if test="readCount != null">read_count = #{readCount},</if>
|
||||
<if test="content != null">content = #{content},</if>
|
||||
<if test="title != null">title = #{title},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="authorAlias != null">author_alias = #{authorAlias},</if>
|
||||
<if test="starCount != null">star_count = #{starCount},</if>
|
||||
<if test="itemOne != null">item_one = #{itemOne},</if>
|
||||
<if test="itemTwo != null">item_two = #{itemTwo},</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue