mirror of
https://github.com/201206030/novel-plus.git
synced 2025-06-24 04:46:37 +00:00
作家专区开发实现
This commit is contained in:
3
novel-admin/logs/debug.log
Normal file
3
novel-admin/logs/debug.log
Normal file
@ -0,0 +1,3 @@
|
||||
2020-05-07 04:15:36,250 INFO (StartupInfoLogger.java:50)- Starting TestDemo on USER-20180729KA with PID 9748 (started by Administrator in E:\baseprojectparent\novel-plus\novel-admin)
|
||||
2020-05-07 04:15:36,253 DEBUG (StartupInfoLogger.java:53)- Running with Spring Boot v2.0.1.RELEASE, Spring v5.0.5.RELEASE
|
||||
2020-05-07 04:15:36,260 INFO (SpringApplication.java:663)- The following profiles are active: dev
|
@ -0,0 +1,135 @@
|
||||
package com.java2nb.novel.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
|
||||
import com.java2nb.novel.domain.AuthorCodeDO;
|
||||
import com.java2nb.novel.service.AuthorCodeService;
|
||||
import com.java2nb.common.utils.PageBean;
|
||||
import com.java2nb.common.utils.Query;
|
||||
import com.java2nb.common.utils.R;
|
||||
|
||||
/**
|
||||
* 作家邀请码表
|
||||
*
|
||||
* @author xiongxy
|
||||
* @email 1179705413@qq.com
|
||||
* @date 2020-05-13 11:29:15
|
||||
*/
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/novel/authorCode")
|
||||
public class AuthorCodeController {
|
||||
@Autowired
|
||||
private AuthorCodeService authorCodeService;
|
||||
|
||||
@GetMapping()
|
||||
@RequiresPermissions("novel:authorCode:authorCode")
|
||||
String AuthorCode() {
|
||||
return "novel/authorCode/authorCode";
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取作家邀请码表列表", notes = "获取作家邀请码表列表")
|
||||
@ResponseBody
|
||||
@GetMapping("/list")
|
||||
@RequiresPermissions("novel:authorCode:authorCode")
|
||||
public R list(@RequestParam Map<String, Object> params) {
|
||||
//查询列表数据
|
||||
Query query = new Query(params);
|
||||
List<AuthorCodeDO> authorCodeList = authorCodeService.list(query);
|
||||
int total = authorCodeService.count(query);
|
||||
PageBean pageBean = new PageBean(authorCodeList, total);
|
||||
return R.ok().put("data", pageBean);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "新增作家邀请码表页面", notes = "新增作家邀请码表页面")
|
||||
@GetMapping("/add")
|
||||
@RequiresPermissions("novel:authorCode:add")
|
||||
String add() {
|
||||
return "novel/authorCode/add";
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改作家邀请码表页面", notes = "修改作家邀请码表页面")
|
||||
@GetMapping("/edit/{id}")
|
||||
@RequiresPermissions("novel:authorCode:edit")
|
||||
String edit(@PathVariable("id") Long id, Model model) {
|
||||
AuthorCodeDO authorCode = authorCodeService.get(id);
|
||||
model.addAttribute("authorCode", authorCode);
|
||||
return "novel/authorCode/edit";
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查看作家邀请码表页面", notes = "查看作家邀请码表页面")
|
||||
@GetMapping("/detail/{id}")
|
||||
@RequiresPermissions("novel:authorCode:detail")
|
||||
String detail(@PathVariable("id") Long id, Model model) {
|
||||
AuthorCodeDO authorCode = authorCodeService.get(id);
|
||||
model.addAttribute("authorCode", authorCode);
|
||||
return "novel/authorCode/detail";
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@ApiOperation(value = "新增作家邀请码表", notes = "新增作家邀请码表")
|
||||
@ResponseBody
|
||||
@PostMapping("/save")
|
||||
@RequiresPermissions("novel:authorCode:add")
|
||||
public R save( AuthorCodeDO authorCode) {
|
||||
if (authorCodeService.save(authorCode) > 0) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@ApiOperation(value = "修改作家邀请码表", notes = "修改作家邀请码表")
|
||||
@ResponseBody
|
||||
@RequestMapping("/update")
|
||||
@RequiresPermissions("novel:authorCode:edit")
|
||||
public R update( AuthorCodeDO authorCode) {
|
||||
authorCodeService.update(authorCode);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@ApiOperation(value = "删除作家邀请码表", notes = "删除作家邀请码表")
|
||||
@PostMapping("/remove")
|
||||
@ResponseBody
|
||||
@RequiresPermissions("novel:authorCode:remove")
|
||||
public R remove( Long id) {
|
||||
if (authorCodeService.remove(id) > 0) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@ApiOperation(value = "批量删除作家邀请码表", notes = "批量删除作家邀请码表")
|
||||
@PostMapping("/batchRemove")
|
||||
@ResponseBody
|
||||
@RequiresPermissions("novel:authorCode:batchRemove")
|
||||
public R remove(@RequestParam("ids[]") Long[] ids) {
|
||||
authorCodeService.batchRemove(ids);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,135 @@
|
||||
package com.java2nb.novel.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
|
||||
import com.java2nb.novel.domain.AuthorDO;
|
||||
import com.java2nb.novel.service.AuthorService;
|
||||
import com.java2nb.common.utils.PageBean;
|
||||
import com.java2nb.common.utils.Query;
|
||||
import com.java2nb.common.utils.R;
|
||||
|
||||
/**
|
||||
* 作者表
|
||||
*
|
||||
* @author xiongxy
|
||||
* @email 1179705413@qq.com
|
||||
* @date 2020-05-13 11:16:51
|
||||
*/
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/novel/author")
|
||||
public class AuthorController {
|
||||
@Autowired
|
||||
private AuthorService authorService;
|
||||
|
||||
@GetMapping()
|
||||
@RequiresPermissions("novel:author:author")
|
||||
String Author() {
|
||||
return "novel/author/author";
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取作者表列表", notes = "获取作者表列表")
|
||||
@ResponseBody
|
||||
@GetMapping("/list")
|
||||
@RequiresPermissions("novel:author:author")
|
||||
public R list(@RequestParam Map<String, Object> params) {
|
||||
//查询列表数据
|
||||
Query query = new Query(params);
|
||||
List<AuthorDO> authorList = authorService.list(query);
|
||||
int total = authorService.count(query);
|
||||
PageBean pageBean = new PageBean(authorList, total);
|
||||
return R.ok().put("data", pageBean);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "新增作者表页面", notes = "新增作者表页面")
|
||||
@GetMapping("/add")
|
||||
@RequiresPermissions("novel:author:add")
|
||||
String add() {
|
||||
return "novel/author/add";
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改作者表页面", notes = "修改作者表页面")
|
||||
@GetMapping("/edit/{id}")
|
||||
@RequiresPermissions("novel:author:edit")
|
||||
String edit(@PathVariable("id") Long id, Model model) {
|
||||
AuthorDO author = authorService.get(id);
|
||||
model.addAttribute("author", author);
|
||||
return "novel/author/edit";
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查看作者表页面", notes = "查看作者表页面")
|
||||
@GetMapping("/detail/{id}")
|
||||
@RequiresPermissions("novel:author:detail")
|
||||
String detail(@PathVariable("id") Long id, Model model) {
|
||||
AuthorDO author = authorService.get(id);
|
||||
model.addAttribute("author", author);
|
||||
return "novel/author/detail";
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@ApiOperation(value = "新增作者表", notes = "新增作者表")
|
||||
@ResponseBody
|
||||
@PostMapping("/save")
|
||||
@RequiresPermissions("novel:author:add")
|
||||
public R save( AuthorDO author) {
|
||||
if (authorService.save(author) > 0) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@ApiOperation(value = "修改作者表", notes = "修改作者表")
|
||||
@ResponseBody
|
||||
@RequestMapping("/update")
|
||||
@RequiresPermissions("novel:author:edit")
|
||||
public R update( AuthorDO author) {
|
||||
authorService.update(author);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@ApiOperation(value = "删除作者表", notes = "删除作者表")
|
||||
@PostMapping("/remove")
|
||||
@ResponseBody
|
||||
@RequiresPermissions("novel:author:remove")
|
||||
public R remove( Long id) {
|
||||
if (authorService.remove(id) > 0) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@ApiOperation(value = "批量删除作者表", notes = "批量删除作者表")
|
||||
@PostMapping("/batchRemove")
|
||||
@ResponseBody
|
||||
@RequiresPermissions("novel:author:batchRemove")
|
||||
public R remove(@RequestParam("ids[]") Long[] ids) {
|
||||
authorService.batchRemove(ids);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package com.java2nb.novel.dao;
|
||||
|
||||
import com.java2nb.novel.domain.AuthorCodeDO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 作家邀请码表
|
||||
* @author xiongxy
|
||||
* @email 1179705413@qq.com
|
||||
* @date 2020-05-13 11:29:15
|
||||
*/
|
||||
@Mapper
|
||||
public interface AuthorCodeDao {
|
||||
|
||||
AuthorCodeDO get(Long id);
|
||||
|
||||
List<AuthorCodeDO> list(Map<String,Object> map);
|
||||
|
||||
int count(Map<String,Object> map);
|
||||
|
||||
int save(AuthorCodeDO authorCode);
|
||||
|
||||
int update(AuthorCodeDO authorCode);
|
||||
|
||||
int remove(Long id);
|
||||
|
||||
int batchRemove(Long[] ids);
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package com.java2nb.novel.dao;
|
||||
|
||||
import com.java2nb.novel.domain.AuthorDO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 作者表
|
||||
* @author xiongxy
|
||||
* @email 1179705413@qq.com
|
||||
* @date 2020-05-13 11:16:51
|
||||
*/
|
||||
@Mapper
|
||||
public interface AuthorDao {
|
||||
|
||||
AuthorDO get(Long id);
|
||||
|
||||
List<AuthorDO> list(Map<String,Object> map);
|
||||
|
||||
int count(Map<String,Object> map);
|
||||
|
||||
int save(AuthorDO author);
|
||||
|
||||
int update(AuthorDO author);
|
||||
|
||||
int remove(Long id);
|
||||
|
||||
int batchRemove(Long[] ids);
|
||||
}
|
@ -0,0 +1,121 @@
|
||||
package com.java2nb.novel.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.java2nb.common.jsonserializer.LongToStringSerializer;
|
||||
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 作家邀请码表
|
||||
*
|
||||
* @author xiongxy
|
||||
* @email 1179705413@qq.com
|
||||
* @date 2020-05-13 11:29:15
|
||||
*/
|
||||
public class AuthorCodeDO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
//主键
|
||||
//java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值)
|
||||
//所以通过序列化成字符串来解决
|
||||
@JsonSerialize(using = LongToStringSerializer.class)
|
||||
private Long id;
|
||||
//邀请码
|
||||
private String inviteCode;
|
||||
//有效时间
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date validityTime;
|
||||
//是否使用过,0:未使用,1:使用过
|
||||
private Integer isUse;
|
||||
//创建时间
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
//创建人ID
|
||||
//java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值)
|
||||
//所以通过序列化成字符串来解决
|
||||
@JsonSerialize(using = LongToStringSerializer.class)
|
||||
private Long createUserId;
|
||||
|
||||
/**
|
||||
* 设置:主键
|
||||
*/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
/**
|
||||
* 获取:主键
|
||||
*/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
/**
|
||||
* 设置:邀请码
|
||||
*/
|
||||
public void setInviteCode(String inviteCode) {
|
||||
this.inviteCode = inviteCode;
|
||||
}
|
||||
/**
|
||||
* 获取:邀请码
|
||||
*/
|
||||
public String getInviteCode() {
|
||||
return inviteCode;
|
||||
}
|
||||
/**
|
||||
* 设置:有效时间
|
||||
*/
|
||||
public void setValidityTime(Date validityTime) {
|
||||
this.validityTime = validityTime;
|
||||
}
|
||||
/**
|
||||
* 获取:有效时间
|
||||
*/
|
||||
public Date getValidityTime() {
|
||||
return validityTime;
|
||||
}
|
||||
/**
|
||||
* 设置:是否使用过,0:未使用,1:使用过
|
||||
*/
|
||||
public void setIsUse(Integer isUse) {
|
||||
this.isUse = isUse;
|
||||
}
|
||||
/**
|
||||
* 获取:是否使用过,0:未使用,1:使用过
|
||||
*/
|
||||
public Integer getIsUse() {
|
||||
return isUse;
|
||||
}
|
||||
/**
|
||||
* 设置:创建时间
|
||||
*/
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
/**
|
||||
* 获取:创建时间
|
||||
*/
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
/**
|
||||
* 设置:创建人ID
|
||||
*/
|
||||
public void setCreateUserId(Long createUserId) {
|
||||
this.createUserId = createUserId;
|
||||
}
|
||||
/**
|
||||
* 获取:创建人ID
|
||||
*/
|
||||
public Long getCreateUserId() {
|
||||
return createUserId;
|
||||
}
|
||||
}
|
176
novel-admin/src/main/java/com/java2nb/novel/domain/AuthorDO.java
Normal file
176
novel-admin/src/main/java/com/java2nb/novel/domain/AuthorDO.java
Normal file
@ -0,0 +1,176 @@
|
||||
package com.java2nb.novel.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.java2nb.common.jsonserializer.LongToStringSerializer;
|
||||
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 作者表
|
||||
*
|
||||
* @author xiongxy
|
||||
* @email 1179705413@qq.com
|
||||
* @date 2020-05-13 11:16:51
|
||||
*/
|
||||
public class AuthorDO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
//主键
|
||||
//java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值)
|
||||
//所以通过序列化成字符串来解决
|
||||
@JsonSerialize(using = LongToStringSerializer.class)
|
||||
private Long id;
|
||||
//用户ID
|
||||
//java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值)
|
||||
//所以通过序列化成字符串来解决
|
||||
@JsonSerialize(using = LongToStringSerializer.class)
|
||||
private Long userId;
|
||||
//邀请码
|
||||
private String inviteCode;
|
||||
//笔名
|
||||
private String penName;
|
||||
//手机号码
|
||||
private String telPhone;
|
||||
//QQ或微信账号
|
||||
private String chatAccount;
|
||||
//电子邮箱
|
||||
private String email;
|
||||
//作品方向,0:男频,1:女频
|
||||
private Integer workDirection;
|
||||
//创建时间
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
//0:正常,1:封禁
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 设置:主键
|
||||
*/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
/**
|
||||
* 获取:主键
|
||||
*/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
/**
|
||||
* 设置:用户ID
|
||||
*/
|
||||
public void setUserId(Long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
/**
|
||||
* 获取:用户ID
|
||||
*/
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
/**
|
||||
* 设置:邀请码
|
||||
*/
|
||||
public void setInviteCode(String inviteCode) {
|
||||
this.inviteCode = inviteCode;
|
||||
}
|
||||
/**
|
||||
* 获取:邀请码
|
||||
*/
|
||||
public String getInviteCode() {
|
||||
return inviteCode;
|
||||
}
|
||||
/**
|
||||
* 设置:笔名
|
||||
*/
|
||||
public void setPenName(String penName) {
|
||||
this.penName = penName;
|
||||
}
|
||||
/**
|
||||
* 获取:笔名
|
||||
*/
|
||||
public String getPenName() {
|
||||
return penName;
|
||||
}
|
||||
/**
|
||||
* 设置:手机号码
|
||||
*/
|
||||
public void setTelPhone(String telPhone) {
|
||||
this.telPhone = telPhone;
|
||||
}
|
||||
/**
|
||||
* 获取:手机号码
|
||||
*/
|
||||
public String getTelPhone() {
|
||||
return telPhone;
|
||||
}
|
||||
/**
|
||||
* 设置:QQ或微信账号
|
||||
*/
|
||||
public void setChatAccount(String chatAccount) {
|
||||
this.chatAccount = chatAccount;
|
||||
}
|
||||
/**
|
||||
* 获取:QQ或微信账号
|
||||
*/
|
||||
public String getChatAccount() {
|
||||
return chatAccount;
|
||||
}
|
||||
/**
|
||||
* 设置:电子邮箱
|
||||
*/
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
/**
|
||||
* 获取:电子邮箱
|
||||
*/
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
/**
|
||||
* 设置:作品方向,0:男频,1:女频
|
||||
*/
|
||||
public void setWorkDirection(Integer workDirection) {
|
||||
this.workDirection = workDirection;
|
||||
}
|
||||
/**
|
||||
* 获取:作品方向,0:男频,1:女频
|
||||
*/
|
||||
public Integer getWorkDirection() {
|
||||
return workDirection;
|
||||
}
|
||||
/**
|
||||
* 设置:创建时间
|
||||
*/
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
/**
|
||||
* 获取:创建时间
|
||||
*/
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
/**
|
||||
* 设置:0:正常,1:封禁
|
||||
*/
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
/**
|
||||
* 获取:0:正常,1:封禁
|
||||
*/
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.java2nb.novel.service;
|
||||
|
||||
import com.java2nb.novel.domain.AuthorCodeDO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 作家邀请码表
|
||||
*
|
||||
* @author xiongxy
|
||||
* @email 1179705413@qq.com
|
||||
* @date 2020-05-13 11:29:15
|
||||
*/
|
||||
public interface AuthorCodeService {
|
||||
|
||||
AuthorCodeDO get(Long id);
|
||||
|
||||
List<AuthorCodeDO> list(Map<String, Object> map);
|
||||
|
||||
int count(Map<String, Object> map);
|
||||
|
||||
int save(AuthorCodeDO authorCode);
|
||||
|
||||
int update(AuthorCodeDO authorCode);
|
||||
|
||||
int remove(Long id);
|
||||
|
||||
int batchRemove(Long[] ids);
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.java2nb.novel.service;
|
||||
|
||||
import com.java2nb.novel.domain.AuthorDO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 作者表
|
||||
*
|
||||
* @author xiongxy
|
||||
* @email 1179705413@qq.com
|
||||
* @date 2020-05-13 11:16:51
|
||||
*/
|
||||
public interface AuthorService {
|
||||
|
||||
AuthorDO get(Long id);
|
||||
|
||||
List<AuthorDO> list(Map<String, Object> map);
|
||||
|
||||
int count(Map<String, Object> map);
|
||||
|
||||
int save(AuthorDO author);
|
||||
|
||||
int update(AuthorDO author);
|
||||
|
||||
int remove(Long id);
|
||||
|
||||
int batchRemove(Long[] ids);
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package com.java2nb.novel.service.impl;
|
||||
|
||||
import com.java2nb.common.utils.ShiroUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.java2nb.novel.dao.AuthorCodeDao;
|
||||
import com.java2nb.novel.domain.AuthorCodeDO;
|
||||
import com.java2nb.novel.service.AuthorCodeService;
|
||||
|
||||
|
||||
|
||||
@Service
|
||||
public class AuthorCodeServiceImpl implements AuthorCodeService {
|
||||
@Autowired
|
||||
private AuthorCodeDao authorCodeDao;
|
||||
|
||||
@Override
|
||||
public AuthorCodeDO get(Long id){
|
||||
return authorCodeDao.get(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AuthorCodeDO> list(Map<String, Object> map){
|
||||
return authorCodeDao.list(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int count(Map<String, Object> map){
|
||||
return authorCodeDao.count(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int save(AuthorCodeDO authorCode){
|
||||
authorCode.setIsUse(0);
|
||||
authorCode.setCreateTime(new Date());
|
||||
authorCode.setCreateUserId(ShiroUtils.getUserId());
|
||||
return authorCodeDao.save(authorCode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int update(AuthorCodeDO authorCode){
|
||||
return authorCodeDao.update(authorCode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int remove(Long id){
|
||||
return authorCodeDao.remove(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int batchRemove(Long[] ids){
|
||||
return authorCodeDao.batchRemove(ids);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
package com.java2nb.novel.service.impl;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.java2nb.novel.dao.AuthorDao;
|
||||
import com.java2nb.novel.domain.AuthorDO;
|
||||
import com.java2nb.novel.service.AuthorService;
|
||||
|
||||
|
||||
|
||||
@Service
|
||||
public class AuthorServiceImpl implements AuthorService {
|
||||
@Autowired
|
||||
private AuthorDao authorDao;
|
||||
|
||||
@Override
|
||||
public AuthorDO get(Long id){
|
||||
return authorDao.get(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AuthorDO> list(Map<String, Object> map){
|
||||
return authorDao.list(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int count(Map<String, Object> map){
|
||||
return authorDao.count(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int save(AuthorDO author){
|
||||
return authorDao.save(author);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int update(AuthorDO author){
|
||||
return authorDao.update(author);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int remove(Long id){
|
||||
return authorDao.remove(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int batchRemove(Long[] ids){
|
||||
return authorDao.batchRemove(ids);
|
||||
}
|
||||
|
||||
}
|
@ -10,9 +10,9 @@ spring:
|
||||
datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: com.mysql.jdbc.Driver
|
||||
url: jdbc:mysql://128.0.0.1:3306/novel_biz?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
|
||||
url: jdbc:mysql://127.0.0.1:3306/novel_plus?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: test123456
|
||||
password:
|
||||
#password:
|
||||
initialSize: 1
|
||||
minIdle: 3
|
||||
|
@ -3,7 +3,7 @@ server:
|
||||
# tomcat:
|
||||
# max-threads: 1000
|
||||
# min-spare-threads: 30
|
||||
port: 8082
|
||||
port: 80
|
||||
# uri-encoding: utf-8
|
||||
#security:
|
||||
# basic:
|
||||
|
@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.java2nb.novel.dao.AuthorCodeDao">
|
||||
|
||||
<select id="get" resultType="com.java2nb.novel.domain.AuthorCodeDO">
|
||||
select `id`,`invite_code`,`validity_time`,`is_use`,`create_time`,`create_user_id` from author_code where id = #{value}
|
||||
</select>
|
||||
|
||||
<select id="list" resultType="com.java2nb.novel.domain.AuthorCodeDO">
|
||||
select `id`,`invite_code`,`validity_time`,`is_use`,`create_time`,`create_user_id` from author_code
|
||||
<where>
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="inviteCode != null and inviteCode != ''"> and invite_code = #{inviteCode} </if>
|
||||
<if test="validityTime != null and validityTime != ''"> and validity_time = #{validityTime} </if>
|
||||
<if test="isUse != null and isUse != ''"> and is_use = #{isUse} </if>
|
||||
<if test="createTime != null and createTime != ''"> and create_time = #{createTime} </if>
|
||||
<if test="createUserId != null and createUserId != ''"> and create_user_id = #{createUserId} </if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="sort != null and sort.trim() != ''">
|
||||
order by ${sort} ${order}
|
||||
</when>
|
||||
<otherwise>
|
||||
order by create_time desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
<if test="offset != null and limit != null">
|
||||
limit #{offset}, #{limit}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="count" resultType="int">
|
||||
select count(*) from author_code
|
||||
<where>
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="inviteCode != null and inviteCode != ''"> and invite_code = #{inviteCode} </if>
|
||||
<if test="validityTime != null and validityTime != ''"> and validity_time = #{validityTime} </if>
|
||||
<if test="isUse != null and isUse != ''"> and is_use = #{isUse} </if>
|
||||
<if test="createTime != null and createTime != ''"> and create_time = #{createTime} </if>
|
||||
<if test="createUserId != null and createUserId != ''"> and create_user_id = #{createUserId} </if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="save" parameterType="com.java2nb.novel.domain.AuthorCodeDO" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into author_code
|
||||
(
|
||||
`invite_code`,
|
||||
`validity_time`,
|
||||
`is_use`,
|
||||
`create_time`,
|
||||
`create_user_id`
|
||||
)
|
||||
values
|
||||
(
|
||||
#{inviteCode},
|
||||
#{validityTime},
|
||||
#{isUse},
|
||||
#{createTime},
|
||||
#{createUserId}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<insert id="saveSelective" parameterType="com.java2nb.novel.domain.AuthorCodeDO" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into author_code
|
||||
(
|
||||
<if test="id != null"> `id`, </if>
|
||||
<if test="inviteCode != null"> `invite_code`, </if>
|
||||
<if test="validityTime != null"> `validity_time`, </if>
|
||||
<if test="isUse != null"> `is_use`, </if>
|
||||
<if test="createTime != null"> `create_time`, </if>
|
||||
<if test="createUserId != null"> `create_user_id` </if>
|
||||
)
|
||||
values
|
||||
(
|
||||
<if test="id != null"> #{id}, </if>
|
||||
<if test="inviteCode != null"> #{inviteCode}, </if>
|
||||
<if test="validityTime != null"> #{validityTime}, </if>
|
||||
<if test="isUse != null"> #{isUse}, </if>
|
||||
<if test="createTime != null"> #{createTime}, </if>
|
||||
<if test="createUserId != null"> #{createUserId} </if>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="com.java2nb.novel.domain.AuthorCodeDO">
|
||||
update author_code
|
||||
<set>
|
||||
<if test="inviteCode != null">`invite_code` = #{inviteCode}, </if>
|
||||
<if test="validityTime != null">`validity_time` = #{validityTime}, </if>
|
||||
<if test="isUse != null">`is_use` = #{isUse}, </if>
|
||||
<if test="createTime != null">`create_time` = #{createTime}, </if>
|
||||
<if test="createUserId != null">`create_user_id` = #{createUserId}</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="remove">
|
||||
delete from author_code where id = #{value}
|
||||
</delete>
|
||||
|
||||
<delete id="batchRemove">
|
||||
delete from author_code where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
136
novel-admin/src/main/resources/mybatis/novel/AuthorMapper.xml
Normal file
136
novel-admin/src/main/resources/mybatis/novel/AuthorMapper.xml
Normal file
@ -0,0 +1,136 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.java2nb.novel.dao.AuthorDao">
|
||||
|
||||
<select id="get" resultType="com.java2nb.novel.domain.AuthorDO">
|
||||
select `id`,`user_id`,`invite_code`,`pen_name`,`tel_phone`,`chat_account`,`email`,`work_direction`,`create_time`,`status` from author where id = #{value}
|
||||
</select>
|
||||
|
||||
<select id="list" resultType="com.java2nb.novel.domain.AuthorDO">
|
||||
select `id`,`user_id`,`invite_code`,`pen_name`,`tel_phone`,`chat_account`,`email`,`work_direction`,`create_time`,`status` from author
|
||||
<where>
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="userId != null and userId != ''"> and user_id = #{userId} </if>
|
||||
<if test="inviteCode != null and inviteCode != ''"> and invite_code = #{inviteCode} </if>
|
||||
<if test="penName != null and penName != ''"> and pen_name = #{penName} </if>
|
||||
<if test="telPhone != null and telPhone != ''"> and tel_phone = #{telPhone} </if>
|
||||
<if test="chatAccount != null and chatAccount != ''"> and chat_account = #{chatAccount} </if>
|
||||
<if test="email != null and email != ''"> and email = #{email} </if>
|
||||
<if test="workDirection != null and workDirection != ''"> and work_direction = #{workDirection} </if>
|
||||
<if test="createTime != null and createTime != ''"> and create_time = #{createTime} </if>
|
||||
<if test="status != null and status != ''"> and status = #{status} </if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="sort != null and sort.trim() != ''">
|
||||
order by ${sort} ${order}
|
||||
</when>
|
||||
<otherwise>
|
||||
order by id desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
<if test="offset != null and limit != null">
|
||||
limit #{offset}, #{limit}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="count" resultType="int">
|
||||
select count(*) from author
|
||||
<where>
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="userId != null and userId != ''"> and user_id = #{userId} </if>
|
||||
<if test="inviteCode != null and inviteCode != ''"> and invite_code = #{inviteCode} </if>
|
||||
<if test="penName != null and penName != ''"> and pen_name = #{penName} </if>
|
||||
<if test="telPhone != null and telPhone != ''"> and tel_phone = #{telPhone} </if>
|
||||
<if test="chatAccount != null and chatAccount != ''"> and chat_account = #{chatAccount} </if>
|
||||
<if test="email != null and email != ''"> and email = #{email} </if>
|
||||
<if test="workDirection != null and workDirection != ''"> and work_direction = #{workDirection} </if>
|
||||
<if test="createTime != null and createTime != ''"> and create_time = #{createTime} </if>
|
||||
<if test="status != null and status != ''"> and status = #{status} </if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="save" parameterType="com.java2nb.novel.domain.AuthorDO" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into author
|
||||
(
|
||||
`user_id`,
|
||||
`invite_code`,
|
||||
`pen_name`,
|
||||
`tel_phone`,
|
||||
`chat_account`,
|
||||
`email`,
|
||||
`work_direction`,
|
||||
`create_time`,
|
||||
`status`
|
||||
)
|
||||
values
|
||||
(
|
||||
#{userId},
|
||||
#{inviteCode},
|
||||
#{penName},
|
||||
#{telPhone},
|
||||
#{chatAccount},
|
||||
#{email},
|
||||
#{workDirection},
|
||||
#{createTime},
|
||||
#{status}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<insert id="saveSelective" parameterType="com.java2nb.novel.domain.AuthorDO" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into author
|
||||
(
|
||||
<if test="id != null"> `id`, </if>
|
||||
<if test="userId != null"> `user_id`, </if>
|
||||
<if test="inviteCode != null"> `invite_code`, </if>
|
||||
<if test="penName != null"> `pen_name`, </if>
|
||||
<if test="telPhone != null"> `tel_phone`, </if>
|
||||
<if test="chatAccount != null"> `chat_account`, </if>
|
||||
<if test="email != null"> `email`, </if>
|
||||
<if test="workDirection != null"> `work_direction`, </if>
|
||||
<if test="createTime != null"> `create_time`, </if>
|
||||
<if test="status != null"> `status` </if>
|
||||
)
|
||||
values
|
||||
(
|
||||
<if test="id != null"> #{id}, </if>
|
||||
<if test="userId != null"> #{userId}, </if>
|
||||
<if test="inviteCode != null"> #{inviteCode}, </if>
|
||||
<if test="penName != null"> #{penName}, </if>
|
||||
<if test="telPhone != null"> #{telPhone}, </if>
|
||||
<if test="chatAccount != null"> #{chatAccount}, </if>
|
||||
<if test="email != null"> #{email}, </if>
|
||||
<if test="workDirection != null"> #{workDirection}, </if>
|
||||
<if test="createTime != null"> #{createTime}, </if>
|
||||
<if test="status != null"> #{status} </if>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="com.java2nb.novel.domain.AuthorDO">
|
||||
update author
|
||||
<set>
|
||||
<if test="userId != null">`user_id` = #{userId}, </if>
|
||||
<if test="inviteCode != null">`invite_code` = #{inviteCode}, </if>
|
||||
<if test="penName != null">`pen_name` = #{penName}, </if>
|
||||
<if test="telPhone != null">`tel_phone` = #{telPhone}, </if>
|
||||
<if test="chatAccount != null">`chat_account` = #{chatAccount}, </if>
|
||||
<if test="email != null">`email` = #{email}, </if>
|
||||
<if test="workDirection != null">`work_direction` = #{workDirection}, </if>
|
||||
<if test="createTime != null">`create_time` = #{createTime}, </if>
|
||||
<if test="status != null">`status` = #{status}</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="remove">
|
||||
delete from author where id = #{value}
|
||||
</delete>
|
||||
|
||||
<delete id="batchRemove">
|
||||
delete from author where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,107 @@
|
||||
var E = window.wangEditor;
|
||||
$("[id^='contentEditor']").each(function (index, ele) {
|
||||
var relName = $(ele).attr("id").substring(13);
|
||||
var editor = new E('#contentEditor' + relName);
|
||||
// 自定义菜单配置
|
||||
editor.customConfig.menus = [
|
||||
'head', // 标题
|
||||
'bold', // 粗体
|
||||
'fontSize', // 字号
|
||||
'fontName', // 字体
|
||||
'italic', // 斜体
|
||||
'underline', // 下划线
|
||||
'strikeThrough', // 删除线
|
||||
'foreColor', // 文字颜色
|
||||
//'backColor', // 背景颜色
|
||||
//'link', // 插入链接
|
||||
'list', // 列表
|
||||
'justify', // 对齐方式
|
||||
'quote', // 引用
|
||||
'emoticon', // 表情
|
||||
'image', // 插入图片
|
||||
//'table', // 表格
|
||||
//'video', // 插入视频
|
||||
//'code', // 插入代码
|
||||
'undo', // 撤销
|
||||
'redo' // 重复
|
||||
];
|
||||
editor.customConfig.onchange = function (html) {
|
||||
// html 即变化之后的内容
|
||||
$("#" + relName).val(html);
|
||||
}
|
||||
editor.customConfig.uploadImgShowBase64 = true;
|
||||
editor.create();
|
||||
|
||||
})
|
||||
|
||||
$("[id^='picImage']").each(function (index, ele) {
|
||||
var relName = $(ele).attr("id").substring(8);
|
||||
layui.use('upload', function () {
|
||||
var upload = layui.upload;
|
||||
//执行实例
|
||||
var uploadInst = upload.render({
|
||||
elem: '#picImage' + relName, //绑定元素
|
||||
url: '/common/sysFile/upload', //上传接口
|
||||
size: 1000,
|
||||
accept: 'file',
|
||||
done: function (r) {
|
||||
$("#picImage" + relName).attr("src", r.fileName);
|
||||
$("#" + relName).val(r.fileName);
|
||||
},
|
||||
error: function (r) {
|
||||
layer.msg(r.msg);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$().ready(function () {
|
||||
validateRule();
|
||||
});
|
||||
|
||||
$.validator.setDefaults({
|
||||
submitHandler: function () {
|
||||
save();
|
||||
}
|
||||
});
|
||||
function save() {
|
||||
$.ajax({
|
||||
cache: true,
|
||||
type: "POST",
|
||||
url: "/novel/author/save",
|
||||
data: $('#signupForm').serialize(),// 你的formid
|
||||
async: false,
|
||||
error: function (request) {
|
||||
parent.layer.alert("Connection error");
|
||||
},
|
||||
success: function (data) {
|
||||
if (data.code == 0) {
|
||||
parent.layer.msg("操作成功");
|
||||
parent.reLoad();
|
||||
var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
|
||||
parent.layer.close(index);
|
||||
|
||||
} else {
|
||||
parent.layer.alert(data.msg)
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
function validateRule() {
|
||||
var icon = "<i class='fa fa-times-circle'></i> ";
|
||||
$("#signupForm").validate({
|
||||
ignore: "",
|
||||
rules: {
|
||||
},
|
||||
messages: {
|
||||
}
|
||||
})
|
||||
}
|
@ -0,0 +1,244 @@
|
||||
var prefix = "/novel/author"
|
||||
$(function () {
|
||||
load();
|
||||
});
|
||||
|
||||
function load() {
|
||||
$('#exampleTable')
|
||||
.bootstrapTable(
|
||||
{
|
||||
method: 'get', // 服务器数据的请求方式 get or post
|
||||
url: prefix + "/list", // 服务器数据的加载地址
|
||||
// showRefresh : true,
|
||||
// showToggle : true,
|
||||
// showColumns : true,
|
||||
iconSize: 'outline',
|
||||
toolbar: '#exampleToolbar',
|
||||
striped: true, // 设置为true会有隔行变色效果
|
||||
dataType: "json", // 服务器返回的数据类型
|
||||
pagination: true, // 设置为true会在底部显示分页条
|
||||
// queryParamsType : "limit",
|
||||
// //设置为limit则会发送符合RESTFull格式的参数
|
||||
singleSelect: false, // 设置为true将禁止多选
|
||||
// contentType : "application/x-www-form-urlencoded",
|
||||
// //发送到服务器的数据编码类型
|
||||
pageSize: 10, // 如果设置了分页,每页数据条数
|
||||
pageNumber: 1, // 如果设置了分布,首页页码
|
||||
//search : true, // 是否显示搜索框
|
||||
showColumns: false, // 是否显示内容下拉框(选择显示的列)
|
||||
sidePagination: "server", // 设置在哪里进行分页,可选值为"client" 或者 "server"
|
||||
queryParams: function (params) {
|
||||
//说明:传入后台的参数包括offset开始索引,limit步长,sort排序列,order:desc或者,以及所有列的键值对
|
||||
var queryParams = getFormJson("searchForm");
|
||||
queryParams.limit = params.limit;
|
||||
queryParams.offset = params.offset;
|
||||
return queryParams;
|
||||
},
|
||||
// //请求服务器数据时,你可以通过重写参数的方式添加一些额外的参数,例如 toolbar 中的参数 如果
|
||||
// queryParamsType = 'limit' ,返回参数必须包含
|
||||
// limit, offset, search, sort, order 否则, 需要包含:
|
||||
// pageSize, pageNumber, searchText, sortName,
|
||||
// sortOrder.
|
||||
// 返回false将会终止请求
|
||||
responseHandler: function (rs) {
|
||||
|
||||
if (rs.code == 0) {
|
||||
return rs.data;
|
||||
} else {
|
||||
parent.layer.alert(rs.msg)
|
||||
return {total: 0, rows: []};
|
||||
}
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
title: '序号',
|
||||
formatter: function () {
|
||||
return arguments[2] + 1;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'inviteCode',
|
||||
title: '邀请码'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'penName',
|
||||
title: '笔名'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'telPhone',
|
||||
title: '手机号码'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'chatAccount',
|
||||
title: 'QQ或微信账号'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'email',
|
||||
title: '电子邮箱'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'workDirection',
|
||||
title: '作品方向',
|
||||
formatter: function (value, row, index) {
|
||||
return formatDict("work_direction", value);
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '入驻时间'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'status',
|
||||
title: '状态',
|
||||
formatter: function (value, row, index) {
|
||||
return value == 1 ? '封禁' : '正常';
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
title: '操作',
|
||||
field: 'id',
|
||||
align: 'center',
|
||||
formatter: function (value, row, index) {
|
||||
if(row.status==1) {
|
||||
var e = '<a class="btn btn-primary btn-sm ' + s_edit_h + '" href="#" mce_href="#" title="恢复正常" onclick="edit(\''
|
||||
+ row.id
|
||||
+ '\',0)"><i >恢复正常</i></a> ';
|
||||
}else{
|
||||
var e = '<a class="btn btn-primary btn-sm ' + s_edit_h + '" href="#" mce_href="#" title="封禁" onclick="edit(\''
|
||||
+ row.id
|
||||
+ '\',1)"><i >封禁</i></a> ';
|
||||
}
|
||||
return e ;
|
||||
}
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
||||
function reLoad() {
|
||||
$('#exampleTable').bootstrapTable('refresh');
|
||||
}
|
||||
|
||||
function add() {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '增加',
|
||||
maxmin: true,
|
||||
shadeClose: false, // 点击遮罩关闭层
|
||||
area: ['800px', '520px'],
|
||||
content: prefix + '/add' // iframe的url
|
||||
});
|
||||
}
|
||||
|
||||
function detail(id) {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '详情',
|
||||
maxmin: true,
|
||||
shadeClose: false, // 点击遮罩关闭层
|
||||
area: ['800px', '520px'],
|
||||
content: prefix + '/detail/' + id // iframe的url
|
||||
});
|
||||
}
|
||||
|
||||
function edit(id,status) {
|
||||
$.ajax({
|
||||
cache: true,
|
||||
type: "POST",
|
||||
url: "/novel/author/update",
|
||||
data: {'id':id,'status':status},// 你的formid
|
||||
async: false,
|
||||
error: function (request) {
|
||||
parent.layer.alert("Connection error");
|
||||
},
|
||||
success: function (data) {
|
||||
if (data.code == 0) {
|
||||
parent.layer.msg("操作成功");
|
||||
reLoad();
|
||||
|
||||
} else {
|
||||
parent.layer.alert(data.msg)
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function remove(id) {
|
||||
layer.confirm('确定要删除选中的记录?', {
|
||||
btn: ['确定', '取消']
|
||||
}, function () {
|
||||
$.ajax({
|
||||
url: prefix + "/remove",
|
||||
type: "post",
|
||||
data: {
|
||||
'id': id
|
||||
},
|
||||
success: function (r) {
|
||||
if (r.code == 0) {
|
||||
layer.msg(r.msg);
|
||||
reLoad();
|
||||
} else {
|
||||
layer.msg(r.msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
function resetPwd(id) {
|
||||
}
|
||||
|
||||
function batchRemove() {
|
||||
var rows = $('#exampleTable').bootstrapTable('getSelections'); // 返回所有选择的行,当没有选择的记录时,返回一个空数组
|
||||
if (rows.length == 0) {
|
||||
layer.msg("请选择要删除的数据");
|
||||
return;
|
||||
}
|
||||
layer.confirm("确认要删除选中的'" + rows.length + "'条数据吗?", {
|
||||
btn: ['确定', '取消']
|
||||
// 按钮
|
||||
}, function () {
|
||||
var ids = new Array();
|
||||
// 遍历所有选择的行数据,取每条数据对应的ID
|
||||
$.each(rows, function (i, row) {
|
||||
ids[i] = row['id'];
|
||||
});
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
data: {
|
||||
"ids": ids
|
||||
},
|
||||
url: prefix + '/batchRemove',
|
||||
success: function (r) {
|
||||
if (r.code == 0) {
|
||||
layer.msg(r.msg);
|
||||
reLoad();
|
||||
} else {
|
||||
layer.msg(r.msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
}, function () {
|
||||
|
||||
});
|
||||
}
|
@ -0,0 +1,103 @@
|
||||
var E = window.wangEditor;
|
||||
$("[id^='contentEditor']").each(function (index, ele) {
|
||||
var relName = $(ele).attr("id").substring(13);
|
||||
var editor = new E('#contentEditor' + relName);
|
||||
// 自定义菜单配置
|
||||
editor.customConfig.menus = [
|
||||
'head', // 标题
|
||||
'bold', // 粗体
|
||||
'fontSize', // 字号
|
||||
'fontName', // 字体
|
||||
'italic', // 斜体
|
||||
'underline', // 下划线
|
||||
'strikeThrough', // 删除线
|
||||
'foreColor', // 文字颜色
|
||||
//'backColor', // 背景颜色
|
||||
//'link', // 插入链接
|
||||
'list', // 列表
|
||||
'justify', // 对齐方式
|
||||
'quote', // 引用
|
||||
'emoticon', // 表情
|
||||
'image', // 插入图片
|
||||
//'table', // 表格
|
||||
//'video', // 插入视频
|
||||
//'code', // 插入代码
|
||||
'undo', // 撤销
|
||||
'redo' // 重复
|
||||
];
|
||||
editor.customConfig.onchange = function (html) {
|
||||
// html 即变化之后的内容
|
||||
$("#" + relName).val(html);
|
||||
}
|
||||
editor.customConfig.uploadImgShowBase64 = true;
|
||||
editor.create();
|
||||
editor.txt.html($("#" + relName).val());
|
||||
|
||||
})
|
||||
|
||||
$("[id^='picImage']").each(function (index, ele) {
|
||||
var relName = $(ele).attr("id").substring(8);
|
||||
layui.use('upload', function () {
|
||||
var upload = layui.upload;
|
||||
//执行实例
|
||||
var uploadInst = upload.render({
|
||||
elem: '#picImage' + relName, //绑定元素
|
||||
url: '/common/sysFile/upload', //上传接口
|
||||
size: 1000,
|
||||
accept: 'file',
|
||||
done: function (r) {
|
||||
$("#picImage" + relName).attr("src", r.fileName);
|
||||
$("#" + relName).val(r.fileName);
|
||||
},
|
||||
error: function (r) {
|
||||
layer.msg(r.msg);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$().ready(function () {
|
||||
validateRule();
|
||||
});
|
||||
|
||||
$.validator.setDefaults({
|
||||
submitHandler: function () {
|
||||
update();
|
||||
}
|
||||
});
|
||||
function update() {
|
||||
$.ajax({
|
||||
cache: true,
|
||||
type: "POST",
|
||||
url: "/novel/author/update",
|
||||
data: $('#signupForm').serialize(),// 你的formid
|
||||
async: false,
|
||||
error: function (request) {
|
||||
parent.layer.alert("Connection error");
|
||||
},
|
||||
success: function (data) {
|
||||
if (data.code == 0) {
|
||||
parent.layer.msg("操作成功");
|
||||
parent.reLoad();
|
||||
var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
|
||||
parent.layer.close(index);
|
||||
|
||||
} else {
|
||||
parent.layer.alert(data.msg)
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
function validateRule() {
|
||||
var icon = "<i class='fa fa-times-circle'></i> ";
|
||||
$("#signupForm").validate({
|
||||
ignore: "",
|
||||
rules: {
|
||||
},
|
||||
messages: {
|
||||
}
|
||||
})
|
||||
}
|
@ -0,0 +1,115 @@
|
||||
var E = window.wangEditor;
|
||||
$("[id^='contentEditor']").each(function (index, ele) {
|
||||
var relName = $(ele).attr("id").substring(13);
|
||||
var editor = new E('#contentEditor' + relName);
|
||||
// 自定义菜单配置
|
||||
editor.customConfig.menus = [
|
||||
'head', // 标题
|
||||
'bold', // 粗体
|
||||
'fontSize', // 字号
|
||||
'fontName', // 字体
|
||||
'italic', // 斜体
|
||||
'underline', // 下划线
|
||||
'strikeThrough', // 删除线
|
||||
'foreColor', // 文字颜色
|
||||
//'backColor', // 背景颜色
|
||||
//'link', // 插入链接
|
||||
'list', // 列表
|
||||
'justify', // 对齐方式
|
||||
'quote', // 引用
|
||||
'emoticon', // 表情
|
||||
'image', // 插入图片
|
||||
//'table', // 表格
|
||||
//'video', // 插入视频
|
||||
//'code', // 插入代码
|
||||
'undo', // 撤销
|
||||
'redo' // 重复
|
||||
];
|
||||
editor.customConfig.onchange = function (html) {
|
||||
// html 即变化之后的内容
|
||||
$("#" + relName).val(html);
|
||||
}
|
||||
editor.customConfig.uploadImgShowBase64 = true;
|
||||
editor.create();
|
||||
|
||||
})
|
||||
|
||||
$("[id^='picImage']").each(function (index, ele) {
|
||||
var relName = $(ele).attr("id").substring(8);
|
||||
layui.use('upload', function () {
|
||||
var upload = layui.upload;
|
||||
//执行实例
|
||||
var uploadInst = upload.render({
|
||||
elem: '#picImage' + relName, //绑定元素
|
||||
url: '/common/sysFile/upload', //上传接口
|
||||
size: 1000,
|
||||
accept: 'file',
|
||||
done: function (r) {
|
||||
$("#picImage" + relName).attr("src", r.fileName);
|
||||
$("#" + relName).val(r.fileName);
|
||||
},
|
||||
error: function (r) {
|
||||
layer.msg(r.msg);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$().ready(function () {
|
||||
validateRule();
|
||||
});
|
||||
|
||||
$.validator.setDefaults({
|
||||
submitHandler: function () {
|
||||
save();
|
||||
}
|
||||
});
|
||||
function save() {
|
||||
$.ajax({
|
||||
cache: true,
|
||||
type: "POST",
|
||||
url: "/novel/authorCode/save",
|
||||
data: $('#signupForm').serialize(),// 你的formid
|
||||
async: false,
|
||||
error: function (request) {
|
||||
parent.layer.alert("Connection error");
|
||||
},
|
||||
success: function (data) {
|
||||
if (data.code == 0) {
|
||||
parent.layer.msg("操作成功");
|
||||
parent.reLoad();
|
||||
var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
|
||||
parent.layer.close(index);
|
||||
|
||||
} else {
|
||||
parent.layer.alert(data.msg)
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
function validateRule() {
|
||||
var icon = "<i class='fa fa-times-circle'></i> ";
|
||||
$("#signupForm").validate({
|
||||
ignore: "",
|
||||
rules: {
|
||||
inviteCode: {
|
||||
required: true
|
||||
}, validityTime: {
|
||||
required: true
|
||||
}, },
|
||||
messages: {
|
||||
inviteCode: {
|
||||
required: icon + "请选择邀请码"
|
||||
}, validityTime: {
|
||||
required: icon + "请选择有效时间"
|
||||
}, }
|
||||
})
|
||||
}
|
@ -0,0 +1,212 @@
|
||||
var prefix = "/novel/authorCode"
|
||||
$(function () {
|
||||
load();
|
||||
});
|
||||
|
||||
function load() {
|
||||
$('#exampleTable')
|
||||
.bootstrapTable(
|
||||
{
|
||||
method: 'get', // 服务器数据的请求方式 get or post
|
||||
url: prefix + "/list", // 服务器数据的加载地址
|
||||
// showRefresh : true,
|
||||
// showToggle : true,
|
||||
// showColumns : true,
|
||||
iconSize: 'outline',
|
||||
toolbar: '#exampleToolbar',
|
||||
striped: true, // 设置为true会有隔行变色效果
|
||||
dataType: "json", // 服务器返回的数据类型
|
||||
pagination: true, // 设置为true会在底部显示分页条
|
||||
// queryParamsType : "limit",
|
||||
// //设置为limit则会发送符合RESTFull格式的参数
|
||||
singleSelect: false, // 设置为true将禁止多选
|
||||
// contentType : "application/x-www-form-urlencoded",
|
||||
// //发送到服务器的数据编码类型
|
||||
pageSize: 10, // 如果设置了分页,每页数据条数
|
||||
pageNumber: 1, // 如果设置了分布,首页页码
|
||||
//search : true, // 是否显示搜索框
|
||||
showColumns: false, // 是否显示内容下拉框(选择显示的列)
|
||||
sidePagination: "server", // 设置在哪里进行分页,可选值为"client" 或者 "server"
|
||||
queryParams: function (params) {
|
||||
//说明:传入后台的参数包括offset开始索引,limit步长,sort排序列,order:desc或者,以及所有列的键值对
|
||||
var queryParams = getFormJson("searchForm");
|
||||
queryParams.limit = params.limit;
|
||||
queryParams.offset = params.offset;
|
||||
return queryParams;
|
||||
},
|
||||
// //请求服务器数据时,你可以通过重写参数的方式添加一些额外的参数,例如 toolbar 中的参数 如果
|
||||
// queryParamsType = 'limit' ,返回参数必须包含
|
||||
// limit, offset, search, sort, order 否则, 需要包含:
|
||||
// pageSize, pageNumber, searchText, sortName,
|
||||
// sortOrder.
|
||||
// 返回false将会终止请求
|
||||
responseHandler: function (rs) {
|
||||
|
||||
if (rs.code == 0) {
|
||||
return rs.data;
|
||||
} else {
|
||||
parent.layer.alert(rs.msg)
|
||||
return {total: 0, rows: []};
|
||||
}
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
title: '序号',
|
||||
formatter: function () {
|
||||
return arguments[2] + 1;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'inviteCode',
|
||||
title: '邀请码'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'validityTime',
|
||||
title: '有效时间'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'isUse',
|
||||
title: '是否使用过',
|
||||
formatter: function (value, row, index) {
|
||||
return value == 1 ? '使用过' : '未使用';
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '创建时间'
|
||||
},
|
||||
|
||||
|
||||
/* {
|
||||
field: 'createUserId',
|
||||
title: '创建人ID'
|
||||
},*/
|
||||
|
||||
|
||||
{
|
||||
title: '操作',
|
||||
field: 'id',
|
||||
align: 'center',
|
||||
formatter: function (value, row, index) {
|
||||
/* var d = '<a class="btn btn-primary btn-sm ' + s_detail_h + '" href="#" mce_href="#" title="详情" onclick="detail(\''
|
||||
+ row.id
|
||||
+ '\')"><i class="fa fa-file"></i></a> ';*/
|
||||
/* var e = '<a class="btn btn-primary btn-sm ' + s_edit_h + '" href="#" mce_href="#" title="编辑" onclick="edit(\''
|
||||
+ row.id
|
||||
+ '\')"><i class="fa fa-edit"></i></a> ';*/
|
||||
var r = '<a class="btn btn-warning btn-sm ' + s_remove_h + '" href="#" title="删除" mce_href="#" onclick="remove(\''
|
||||
+ row.id
|
||||
+ '\')"><i class="fa fa-remove"></i></a> ';
|
||||
return r;
|
||||
}
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
||||
function reLoad() {
|
||||
$('#exampleTable').bootstrapTable('refresh');
|
||||
}
|
||||
|
||||
function add() {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '增加',
|
||||
maxmin: true,
|
||||
shadeClose: false, // 点击遮罩关闭层
|
||||
area: ['800px', '520px'],
|
||||
content: prefix + '/add' // iframe的url
|
||||
});
|
||||
}
|
||||
|
||||
function detail(id) {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '详情',
|
||||
maxmin: true,
|
||||
shadeClose: false, // 点击遮罩关闭层
|
||||
area: ['800px', '520px'],
|
||||
content: prefix + '/detail/' + id // iframe的url
|
||||
});
|
||||
}
|
||||
|
||||
function edit(id) {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '编辑',
|
||||
maxmin: true,
|
||||
shadeClose: false, // 点击遮罩关闭层
|
||||
area: ['800px', '520px'],
|
||||
content: prefix + '/edit/' + id // iframe的url
|
||||
});
|
||||
}
|
||||
|
||||
function remove(id) {
|
||||
layer.confirm('确定要删除选中的记录?', {
|
||||
btn: ['确定', '取消']
|
||||
}, function () {
|
||||
$.ajax({
|
||||
url: prefix + "/remove",
|
||||
type: "post",
|
||||
data: {
|
||||
'id': id
|
||||
},
|
||||
success: function (r) {
|
||||
if (r.code == 0) {
|
||||
layer.msg(r.msg);
|
||||
reLoad();
|
||||
} else {
|
||||
layer.msg(r.msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
function resetPwd(id) {
|
||||
}
|
||||
|
||||
function batchRemove() {
|
||||
var rows = $('#exampleTable').bootstrapTable('getSelections'); // 返回所有选择的行,当没有选择的记录时,返回一个空数组
|
||||
if (rows.length == 0) {
|
||||
layer.msg("请选择要删除的数据");
|
||||
return;
|
||||
}
|
||||
layer.confirm("确认要删除选中的'" + rows.length + "'条数据吗?", {
|
||||
btn: ['确定', '取消']
|
||||
// 按钮
|
||||
}, function () {
|
||||
var ids = new Array();
|
||||
// 遍历所有选择的行数据,取每条数据对应的ID
|
||||
$.each(rows, function (i, row) {
|
||||
ids[i] = row['id'];
|
||||
});
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
data: {
|
||||
"ids": ids
|
||||
},
|
||||
url: prefix + '/batchRemove',
|
||||
success: function (r) {
|
||||
if (r.code == 0) {
|
||||
layer.msg(r.msg);
|
||||
reLoad();
|
||||
} else {
|
||||
layer.msg(r.msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
}, function () {
|
||||
|
||||
});
|
||||
}
|
@ -0,0 +1,115 @@
|
||||
var E = window.wangEditor;
|
||||
$("[id^='contentEditor']").each(function (index, ele) {
|
||||
var relName = $(ele).attr("id").substring(13);
|
||||
var editor = new E('#contentEditor' + relName);
|
||||
// 自定义菜单配置
|
||||
editor.customConfig.menus = [
|
||||
'head', // 标题
|
||||
'bold', // 粗体
|
||||
'fontSize', // 字号
|
||||
'fontName', // 字体
|
||||
'italic', // 斜体
|
||||
'underline', // 下划线
|
||||
'strikeThrough', // 删除线
|
||||
'foreColor', // 文字颜色
|
||||
//'backColor', // 背景颜色
|
||||
//'link', // 插入链接
|
||||
'list', // 列表
|
||||
'justify', // 对齐方式
|
||||
'quote', // 引用
|
||||
'emoticon', // 表情
|
||||
'image', // 插入图片
|
||||
//'table', // 表格
|
||||
//'video', // 插入视频
|
||||
//'code', // 插入代码
|
||||
'undo', // 撤销
|
||||
'redo' // 重复
|
||||
];
|
||||
editor.customConfig.onchange = function (html) {
|
||||
// html 即变化之后的内容
|
||||
$("#" + relName).val(html);
|
||||
}
|
||||
editor.customConfig.uploadImgShowBase64 = true;
|
||||
editor.create();
|
||||
editor.txt.html($("#" + relName).val());
|
||||
|
||||
})
|
||||
|
||||
$("[id^='picImage']").each(function (index, ele) {
|
||||
var relName = $(ele).attr("id").substring(8);
|
||||
layui.use('upload', function () {
|
||||
var upload = layui.upload;
|
||||
//执行实例
|
||||
var uploadInst = upload.render({
|
||||
elem: '#picImage' + relName, //绑定元素
|
||||
url: '/common/sysFile/upload', //上传接口
|
||||
size: 1000,
|
||||
accept: 'file',
|
||||
done: function (r) {
|
||||
$("#picImage" + relName).attr("src", r.fileName);
|
||||
$("#" + relName).val(r.fileName);
|
||||
},
|
||||
error: function (r) {
|
||||
layer.msg(r.msg);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$().ready(function () {
|
||||
validateRule();
|
||||
});
|
||||
|
||||
$.validator.setDefaults({
|
||||
submitHandler: function () {
|
||||
update();
|
||||
}
|
||||
});
|
||||
function update() {
|
||||
$.ajax({
|
||||
cache: true,
|
||||
type: "POST",
|
||||
url: "/novel/authorCode/update",
|
||||
data: $('#signupForm').serialize(),// 你的formid
|
||||
async: false,
|
||||
error: function (request) {
|
||||
parent.layer.alert("Connection error");
|
||||
},
|
||||
success: function (data) {
|
||||
if (data.code == 0) {
|
||||
parent.layer.msg("操作成功");
|
||||
parent.reLoad();
|
||||
var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
|
||||
parent.layer.close(index);
|
||||
|
||||
} else {
|
||||
parent.layer.alert(data.msg)
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
function validateRule() {
|
||||
var icon = "<i class='fa fa-times-circle'></i> ";
|
||||
$("#signupForm").validate({
|
||||
ignore: "",
|
||||
rules: {
|
||||
inviteCode:
|
||||
{
|
||||
required: true
|
||||
}, validityTime:
|
||||
{
|
||||
required: true
|
||||
}, },
|
||||
messages: {
|
||||
inviteCode:
|
||||
{
|
||||
required: icon + "请选择邀请码"
|
||||
}, validityTime:
|
||||
{
|
||||
required: icon + "请选择有效时间"
|
||||
}, }
|
||||
})
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
-- 菜单SQL
|
||||
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
|
||||
VALUES ('1', '作者表', 'novel/author', 'novel:author:author', '1', 'fa', '6');
|
||||
|
||||
-- 按钮父菜单ID
|
||||
set @parentId = @@identity;
|
||||
|
||||
-- 菜单对应按钮SQL
|
||||
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
|
||||
SELECT @parentId, '查看', null, 'novel:author:detail', '2', null, '6';
|
||||
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
|
||||
SELECT @parentId, '新增', null, 'novel:author:add', '2', null, '6';
|
||||
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
|
||||
SELECT @parentId, '修改', null, 'novel:author:edit', '2', null, '6';
|
||||
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
|
||||
SELECT @parentId, '删除', null, 'novel:author:remove', '2', null, '6';
|
||||
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
|
||||
SELECT @parentId, '批量删除', null, 'novel:author:batchRemove', '2', null, '6';
|
@ -0,0 +1,18 @@
|
||||
-- 菜单SQL
|
||||
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
|
||||
VALUES ('1', '作家邀请码表', 'novel/authorCode', 'novel:authorCode:authorCode', '1', 'fa', '6');
|
||||
|
||||
-- 按钮父菜单ID
|
||||
set @parentId = @@identity;
|
||||
|
||||
-- 菜单对应按钮SQL
|
||||
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
|
||||
SELECT @parentId, '查看', null, 'novel:authorCode:detail', '2', null, '6';
|
||||
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
|
||||
SELECT @parentId, '新增', null, 'novel:authorCode:add', '2', null, '6';
|
||||
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
|
||||
SELECT @parentId, '修改', null, 'novel:authorCode:edit', '2', null, '6';
|
||||
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
|
||||
SELECT @parentId, '删除', null, 'novel:authorCode:remove', '2', null, '6';
|
||||
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
|
||||
SELECT @parentId, '批量删除', null, 'novel:authorCode:batchRemove', '2', null, '6';
|
114
novel-admin/src/main/resources/templates/novel/author/add.html
Normal file
114
novel-admin/src/main/resources/templates/novel/author/add.html
Normal file
@ -0,0 +1,114 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<body class="gray-bg">
|
||||
<div class="wrapper wrapper-content ">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-content">
|
||||
<form class="form-horizontal m-t" id="signupForm">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">用户ID:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="userId" name="userId"
|
||||
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 id="inviteCode" name="inviteCode"
|
||||
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 id="penName" name="penName"
|
||||
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 id="telPhone" name="telPhone"
|
||||
class="form-control"
|
||||
type="text">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">QQ或微信账号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="chatAccount" name="chatAccount"
|
||||
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 id="email" name="email"
|
||||
class="form-control"
|
||||
type="text">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">作品方向,0:男频,1:女频:</label>
|
||||
<div class="col-sm-8">
|
||||
|
||||
<select data-placeholder="--选择--" id="workDirection"
|
||||
name="workDirection"
|
||||
class="form-control chosen-select" tabindex="2"
|
||||
dict-type="work_direction">
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">入驻时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="laydate-icon layer-date form-control"
|
||||
id="createTime"
|
||||
name="createTime"
|
||||
onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"
|
||||
style="background-color: #fff;" readonly="readonly"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">0:正常,1:封禁:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="status" name="status"
|
||||
class="form-control"
|
||||
type="text">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-8 col-sm-offset-3">
|
||||
<button type="submit" class="btn btn-primary">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div th:include="include::footer"></div>
|
||||
<script type="text/javascript" src="/wangEditor/release/wangEditor.js"></script>
|
||||
<script type="text/javascript" src="/js/appjs/novel/author/add.js">
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,57 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<body class="gray-bg">
|
||||
<div class="wrapper wrapper-content ">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-body">
|
||||
<div class="fixed-table-toolbar">
|
||||
<div class="columns pull-left">
|
||||
</div>
|
||||
<div class="columns pull-right">
|
||||
<button class="btn btn-success" onclick="reLoad()">查询</button>
|
||||
</div>
|
||||
|
||||
<form id="searchForm">
|
||||
<div class="columns pull-right col-md-2">
|
||||
<input id="penName" name="penName" type="text" class="form-control"
|
||||
placeholder="笔名">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<table id="exampleTable" data-mobile-responsive="true">
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--shiro控制bootstraptable行内按钮看见性 -->
|
||||
<div>
|
||||
<script type="text/javascript">
|
||||
var s_detail_h = 'hidden';
|
||||
var s_edit_h = 'hidden';
|
||||
var s_remove_h = 'hidden';
|
||||
</script>
|
||||
</div>
|
||||
<div shiro:hasPermission="test:order:detail">
|
||||
<script type="text/javascript">
|
||||
s_detail_h = '';
|
||||
</script>
|
||||
</div>
|
||||
<div shiro:hasPermission="novel:author:edit">
|
||||
<script type="text/javascript">
|
||||
s_edit_h = '';
|
||||
</script>
|
||||
</div>
|
||||
<div shiro:hasPermission="novel:author:remove">
|
||||
<script type="text/javascript">
|
||||
var s_remove_h = '';
|
||||
</script>
|
||||
</div>
|
||||
<div th:include="include :: footer"></div>
|
||||
<script type="text/javascript" src="/js/appjs/novel/author/author.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,111 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<body class="gray-bg">
|
||||
<div class="wrapper wrapper-content ">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-content">
|
||||
<form class="form-horizontal m-t" id="signupForm">
|
||||
<input id="id" name="id" th:value="${author.id}"
|
||||
type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">用户ID:</label>
|
||||
|
||||
<div style="padding-top:8px" class="col-sm-8"
|
||||
th:text="${author.userId}">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">邀请码:</label>
|
||||
|
||||
<div style="padding-top:8px" class="col-sm-8"
|
||||
th:text="${author.inviteCode}">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">笔名:</label>
|
||||
|
||||
<div style="padding-top:8px" class="col-sm-8"
|
||||
th:text="${author.penName}">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">手机号码:</label>
|
||||
|
||||
<div style="padding-top:8px" class="col-sm-8"
|
||||
th:text="${author.telPhone}">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">QQ或微信账号:</label>
|
||||
|
||||
<div style="padding-top:8px" class="col-sm-8"
|
||||
th:text="${author.chatAccount}">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">电子邮箱:</label>
|
||||
|
||||
<div style="padding-top:8px" class="col-sm-8"
|
||||
th:text="${author.email}">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">作品方向,0:男频,1:女频:</label>
|
||||
|
||||
<div style="padding-top:8px" class="col-sm-8 dict-type" dict-type="work_direction"
|
||||
th:attr="dict-value=${author.workDirection}">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">入驻时间:</label>
|
||||
|
||||
<div style="padding-top:8px" class="col-sm-8"
|
||||
th:text="${author.createTime}==null?null:${#dates.format(author.createTime,'yyyy-MM-dd HH:mm:ss')}">
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">0:正常,1:封禁:</label>
|
||||
|
||||
<div style="padding-top:8px" class="col-sm-8"
|
||||
th:text="${author.status}">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div th:include="include::footer"></div>
|
||||
</body>
|
||||
</html>
|
116
novel-admin/src/main/resources/templates/novel/author/edit.html
Normal file
116
novel-admin/src/main/resources/templates/novel/author/edit.html
Normal file
@ -0,0 +1,116 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<body class="gray-bg">
|
||||
<div class="wrapper wrapper-content ">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-content">
|
||||
<form class="form-horizontal m-t" id="signupForm">
|
||||
<input id="id" name="id" th:value="${author.id}"
|
||||
type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">用户ID:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="userId" name="userId"
|
||||
th:value="${author.userId}"
|
||||
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 id="inviteCode" name="inviteCode"
|
||||
th:value="${author.inviteCode}"
|
||||
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 id="penName" name="penName"
|
||||
th:value="${author.penName}"
|
||||
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 id="telPhone" name="telPhone"
|
||||
th:value="${author.telPhone}"
|
||||
class="form-control"
|
||||
type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">QQ或微信账号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="chatAccount" name="chatAccount"
|
||||
th:value="${author.chatAccount}"
|
||||
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 id="email" name="email"
|
||||
th:value="${author.email}"
|
||||
class="form-control"
|
||||
type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">作品方向,0:男频,1:女频:</label>
|
||||
<div class="col-sm-8">
|
||||
|
||||
<select data-placeholder="--选择--" id="workDirection"
|
||||
name="workDirection"
|
||||
class="form-control chosen-select" tabindex="2"
|
||||
dict-type="work_direction"
|
||||
th:attr="dict-value=${author.workDirection}" >
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">入驻时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="laydate-icon layer-date form-control"
|
||||
id="createTime"
|
||||
name="createTime"
|
||||
th:value="${author.createTime}==null?null:${#dates.format(author.createTime,'yyyy-MM-dd HH:mm:ss')}"
|
||||
onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"
|
||||
style="background-color: #fff;" readonly="readonly"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">0:正常,1:封禁:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="status" name="status"
|
||||
th:value="${author.status}"
|
||||
class="form-control"
|
||||
type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-8 col-sm-offset-3">
|
||||
<button type="submit" class="btn btn-primary">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div th:include="include::footer"></div>
|
||||
<script type="text/javascript" src="/wangEditor/release/wangEditor.js"></script>
|
||||
<script type="text/javascript" src="/js/appjs/novel/author/edit.js">
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,48 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<body class="gray-bg">
|
||||
<div class="wrapper wrapper-content ">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-content">
|
||||
<form class="form-horizontal m-t" id="signupForm">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">邀请码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="inviteCode" name="inviteCode"
|
||||
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 type="text" class="laydate-icon layer-date form-control"
|
||||
id="validityTime"
|
||||
name="validityTime"
|
||||
onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"
|
||||
style="background-color: #fff;" readonly="readonly"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-8 col-sm-offset-3">
|
||||
<button type="submit" class="btn btn-primary">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div th:include="include::footer"></div>
|
||||
<script type="text/javascript" src="/wangEditor/release/wangEditor.js"></script>
|
||||
<script type="text/javascript" src="/js/appjs/novel/authorCode/add.js">
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,66 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<body class="gray-bg">
|
||||
<div class="wrapper wrapper-content ">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-body">
|
||||
<div class="fixed-table-toolbar">
|
||||
<div class="columns pull-left">
|
||||
<button shiro:hasPermission="novel:authorCode:add" type="button"
|
||||
class="btn btn-primary" onclick="add()">
|
||||
<i class="fa fa-plus" aria-hidden="true"></i>添加
|
||||
</button>
|
||||
<button shiro:hasPermission="novel:authorCode:batchRemove" type="button"
|
||||
class="btn btn-danger"
|
||||
onclick="batchRemove()">
|
||||
<i class="fa fa-trash" aria-hidden="true"></i>删除
|
||||
</button>
|
||||
</div>
|
||||
<div class="columns pull-right">
|
||||
<button class="btn btn-success" onclick="reLoad()">查询</button>
|
||||
</div>
|
||||
|
||||
<form id="searchForm">
|
||||
<div class="columns pull-right col-md-2">
|
||||
<input id="inviteCode" name="inviteCode" type="text" class="form-control"
|
||||
placeholder="邀请码">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<table id="exampleTable" data-mobile-responsive="true">
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--shiro控制bootstraptable行内按钮看见性 -->
|
||||
<div>
|
||||
<script type="text/javascript">
|
||||
var s_detail_h = 'hidden';
|
||||
var s_edit_h = 'hidden';
|
||||
var s_remove_h = 'hidden';
|
||||
</script>
|
||||
</div>
|
||||
<div shiro:hasPermission="test:order:detail">
|
||||
<script type="text/javascript">
|
||||
s_detail_h = '';
|
||||
</script>
|
||||
</div>
|
||||
<div shiro:hasPermission="novel:authorCode:edit">
|
||||
<script type="text/javascript">
|
||||
s_edit_h = '';
|
||||
</script>
|
||||
</div>
|
||||
<div shiro:hasPermission="novel:authorCode:remove">
|
||||
<script type="text/javascript">
|
||||
var s_remove_h = '';
|
||||
</script>
|
||||
</div>
|
||||
<div th:include="include :: footer"></div>
|
||||
<script type="text/javascript" src="/js/appjs/novel/authorCode/authorCode.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,70 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<body class="gray-bg">
|
||||
<div class="wrapper wrapper-content ">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-content">
|
||||
<form class="form-horizontal m-t" id="signupForm">
|
||||
<input id="id" name="id" th:value="${authorCode.id}"
|
||||
type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">邀请码:</label>
|
||||
|
||||
<div style="padding-top:8px" class="col-sm-8"
|
||||
th:text="${authorCode.inviteCode}">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">有效时间:</label>
|
||||
|
||||
<div style="padding-top:8px" class="col-sm-8"
|
||||
th:text="${authorCode.validityTime}==null?null:${#dates.format(authorCode.validityTime,'yyyy-MM-dd HH:mm:ss')}">
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">是否使用过,0:未使用,1:使用过:</label>
|
||||
|
||||
<div style="padding-top:8px" class="col-sm-8"
|
||||
th:text="${authorCode.isUse}">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">创建时间:</label>
|
||||
|
||||
<div style="padding-top:8px" class="col-sm-8"
|
||||
th:text="${authorCode.createTime}==null?null:${#dates.format(authorCode.createTime,'yyyy-MM-dd HH:mm:ss')}">
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">创建人ID:</label>
|
||||
|
||||
<div style="padding-top:8px" class="col-sm-8"
|
||||
th:text="${authorCode.createUserId}">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div th:include="include::footer"></div>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,79 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<body class="gray-bg">
|
||||
<div class="wrapper wrapper-content ">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-content">
|
||||
<form class="form-horizontal m-t" id="signupForm">
|
||||
<input id="id" name="id" th:value="${authorCode.id}"
|
||||
type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">邀请码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="inviteCode" name="inviteCode"
|
||||
th:value="${authorCode.inviteCode}"
|
||||
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 type="text" class="laydate-icon layer-date form-control"
|
||||
id="validityTime"
|
||||
name="validityTime"
|
||||
th:value="${authorCode.validityTime}==null?null:${#dates.format(authorCode.validityTime,'yyyy-MM-dd HH:mm:ss')}"
|
||||
onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"
|
||||
style="background-color: #fff;" readonly="readonly"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">是否使用过,0:未使用,1:使用过:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="isUse" name="isUse"
|
||||
th:value="${authorCode.isUse}"
|
||||
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 type="text" class="laydate-icon layer-date form-control"
|
||||
id="createTime"
|
||||
name="createTime"
|
||||
th:value="${authorCode.createTime}==null?null:${#dates.format(authorCode.createTime,'yyyy-MM-dd HH:mm:ss')}"
|
||||
onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"
|
||||
style="background-color: #fff;" readonly="readonly"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">创建人ID:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createUserId" name="createUserId"
|
||||
th:value="${authorCode.createUserId}"
|
||||
class="form-control"
|
||||
type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-8 col-sm-offset-3">
|
||||
<button type="submit" class="btn btn-primary">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div th:include="include::footer"></div>
|
||||
<script type="text/javascript" src="/wangEditor/release/wangEditor.js"></script>
|
||||
<script type="text/javascript" src="/js/appjs/novel/authorCode/edit.js">
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user