新增开源手机端服务模块
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
* No deletion without permission, or be held responsible to law.
|
||||
*/
|
||||
package com.jeesite.modules.app.dao;
|
||||
|
||||
import com.jeesite.common.dao.CrudDao;
|
||||
import com.jeesite.common.mybatis.annotation.MyBatisDao;
|
||||
import com.jeesite.modules.app.entity.AppComment;
|
||||
|
||||
/**
|
||||
* APP意见反馈DAO接口
|
||||
* @author ThinkGem
|
||||
* @version 2021-04-09
|
||||
*/
|
||||
@MyBatisDao
|
||||
public interface AppCommentDao extends CrudDao<AppComment> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
* No deletion without permission, or be held responsible to law.
|
||||
*/
|
||||
package com.jeesite.modules.app.dao;
|
||||
|
||||
import com.jeesite.common.dao.CrudDao;
|
||||
import com.jeesite.common.mybatis.annotation.MyBatisDao;
|
||||
import com.jeesite.modules.app.entity.AppUpgrade;
|
||||
|
||||
/**
|
||||
* APP版本管理DAO接口
|
||||
* @author ThinkGem
|
||||
* @version 2021-04-09
|
||||
*/
|
||||
@MyBatisDao
|
||||
public interface AppUpgradeDao extends CrudDao<AppUpgrade> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
* No deletion without permission, or be held responsible to law.
|
||||
*/
|
||||
package com.jeesite.modules.app.db;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.jeesite.common.callback.MethodCallback;
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.tests.BaseInitDataTests;
|
||||
import com.jeesite.modules.app.entity.AppComment;
|
||||
import com.jeesite.modules.app.entity.AppUpgrade;
|
||||
import com.jeesite.modules.app.service.AppCommentService;
|
||||
import com.jeesite.modules.app.service.AppUpgradeService;
|
||||
import com.jeesite.modules.gen.utils.GenUtils;
|
||||
|
||||
/**
|
||||
* 初始化APP表及数据
|
||||
* @author ThinkGem
|
||||
* @version 2021-4-15
|
||||
*/
|
||||
@Component
|
||||
@ConditionalOnProperty(name="jeesite.initdata", havingValue="true", matchIfMissing=false)
|
||||
public class InitAppData extends BaseInitDataTests {
|
||||
|
||||
@Override
|
||||
public boolean initData() throws Exception {
|
||||
if (GenUtils.isTableExists(Global.getTablePrefix() + "app_upgrade")) {
|
||||
return true; // 如果表已存在,则无需初始化
|
||||
}
|
||||
this.runCreateScript("app.sql");
|
||||
this.initModuleInfo("app");
|
||||
this.initModuleMenu("/app/appUpgrade/list");
|
||||
this.initModuleDict("app_upgrade_type");
|
||||
this.initAppUpgrade();
|
||||
this.initAppComment();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private AppUpgradeService appUpgradeService;
|
||||
public void initAppUpgrade() throws Exception{
|
||||
// clearTable(AppUpgrade.class);
|
||||
initExcelData(AppUpgrade.class, params -> {
|
||||
String action = (String)params[0];
|
||||
if("save".equals(action)){
|
||||
AppUpgrade entity = (AppUpgrade)params[1];
|
||||
entity.setIsNewRecord(true);
|
||||
appUpgradeService.save(entity);
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
});
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private AppCommentService appCommentService;
|
||||
public void initAppComment() throws Exception{
|
||||
// clearTable(AppComment.class);
|
||||
initExcelData(AppComment.class, params -> {
|
||||
String action = (String)params[0];
|
||||
if("save".equals(action)){
|
||||
AppComment entity = (AppComment)params[1];
|
||||
entity.setIsNewRecord(true);
|
||||
entity.setReplyDate(new Date());
|
||||
appCommentService.save(entity);
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,132 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
* No deletion without permission, or be held responsible to law.
|
||||
*/
|
||||
package com.jeesite.modules.app.entity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.jeesite.common.entity.DataEntity;
|
||||
import com.jeesite.common.mybatis.annotation.Column;
|
||||
import com.jeesite.common.mybatis.annotation.Table;
|
||||
import com.jeesite.common.mybatis.mapper.query.QueryType;
|
||||
|
||||
/**
|
||||
* APP意见反馈Entity
|
||||
* @author ThinkGem
|
||||
* @version 2021-04-09
|
||||
*/
|
||||
@Table(name="${_prefix}app_comment", alias="a", label="意见信息", columns={
|
||||
@Column(name="id", attrName="id", label="编号", isPK=true),
|
||||
@Column(name="category", attrName="category", label="问题分类"),
|
||||
@Column(name="content", attrName="content", label="问题和意见"),
|
||||
@Column(name="contact", attrName="contact", label="联系方式"),
|
||||
@Column(includeEntity=DataEntity.class),
|
||||
@Column(name="create_by_name", attrName="createByName", label="提问人员姓名", queryType=QueryType.LIKE),
|
||||
@Column(name="device_info", attrName="deviceInfo", label="设备信息"),
|
||||
@Column(name="reply_date", attrName="replyDate", label="回复时间"),
|
||||
@Column(name="reply_content", attrName="replyContent", label="回复意见"),
|
||||
@Column(name="reply_user_code", attrName="replyUserCode", label="回复人员"),
|
||||
@Column(name="reply_user_name", attrName="replyUserName", label="回复人员姓名", queryType=QueryType.LIKE),
|
||||
}, orderBy="a.create_date DESC"
|
||||
)
|
||||
public class AppComment extends DataEntity<AppComment> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String category; // 问题分类
|
||||
private String content; // 问题和意见
|
||||
private String contact; // 联系方式
|
||||
private String deviceInfo; // 设备信息
|
||||
private Date replyDate; // 回复时间
|
||||
private String replyContent; // 回复意见
|
||||
private String replyUserCode; // 回复人员
|
||||
private String replyUserName; // 回复人员姓名
|
||||
|
||||
public AppComment() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
public AppComment(String id){
|
||||
super(id);
|
||||
}
|
||||
|
||||
@NotBlank(message="问题分类不能为空")
|
||||
@Size(min=0, max=10, message="问题分类长度不能超过 10 个字符")
|
||||
public String getCategory() {
|
||||
return category;
|
||||
}
|
||||
|
||||
public void setCategory(String category) {
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
@NotBlank(message="问题和意见不能为空")
|
||||
@Size(min=0, max=500, message="问题和意见长度不能超过 500 个字符")
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
@Size(min=0, max=200, message="联系方式长度不能超过 200 个字符")
|
||||
public String getContact() {
|
||||
return contact;
|
||||
}
|
||||
|
||||
public void setContact(String contact) {
|
||||
this.contact = contact;
|
||||
}
|
||||
|
||||
@Size(min=0, max=1000, message="设备信息长度不能超过 1000 个字符")
|
||||
public String getDeviceInfo() {
|
||||
return deviceInfo;
|
||||
}
|
||||
|
||||
public void setDeviceInfo(String deviceInfo) {
|
||||
this.deviceInfo = deviceInfo;
|
||||
}
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
public Date getReplyDate() {
|
||||
return replyDate;
|
||||
}
|
||||
|
||||
public void setReplyDate(Date replyDate) {
|
||||
this.replyDate = replyDate;
|
||||
}
|
||||
|
||||
@Size(min=0, max=500, message="回复意见长度不能超过 500 个字符")
|
||||
public String getReplyContent() {
|
||||
return replyContent;
|
||||
}
|
||||
|
||||
public void setReplyContent(String replyContent) {
|
||||
this.replyContent = replyContent;
|
||||
}
|
||||
|
||||
@Size(min=0, max=64, message="回复人员长度不能超过 64 个字符")
|
||||
public String getReplyUserCode() {
|
||||
return replyUserCode;
|
||||
}
|
||||
|
||||
public void setReplyUserCode(String replyUserCode) {
|
||||
this.replyUserCode = replyUserCode;
|
||||
}
|
||||
|
||||
@Size(min=0, max=200, message="回复人员姓名长度不能超过 200 个字符")
|
||||
public String getReplyUserName() {
|
||||
return replyUserName;
|
||||
}
|
||||
|
||||
public void setReplyUserName(String replyUserName) {
|
||||
this.replyUserName = replyUserName;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
* No deletion without permission, or be held responsible to law.
|
||||
*/
|
||||
package com.jeesite.modules.app.entity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.jeesite.common.entity.DataEntity;
|
||||
import com.jeesite.common.mybatis.annotation.Column;
|
||||
import com.jeesite.common.mybatis.annotation.Table;
|
||||
import com.jeesite.common.mybatis.mapper.query.QueryType;
|
||||
|
||||
/**
|
||||
* APP版本管理Entity
|
||||
* @author ThinkGem
|
||||
* @version 2021-04-09
|
||||
*/
|
||||
@Table(name="${_prefix}app_upgrade", alias="a", label="版本信息", columns={
|
||||
@Column(name="id", attrName="id", label="编号", isPK=true),
|
||||
@Column(name="app_code", attrName="appCode", label="应用编号"),
|
||||
@Column(name="up_title", attrName="upTitle", label="升级标题", queryType=QueryType.LIKE),
|
||||
@Column(name="up_content", attrName="upContent", label="升级内容"),
|
||||
@Column(name="up_version", attrName="upVersion", label="升级版本"),
|
||||
@Column(name="up_type", attrName="upType", label="升级类型"),
|
||||
@Column(name="up_date", attrName="upDate", label="发布时间"),
|
||||
@Column(name="apk_url", attrName="apkUrl", label="APK下载地址"),
|
||||
@Column(name="res_url", attrName="resUrl", label="资源下载地址"),
|
||||
@Column(includeEntity=DataEntity.class),
|
||||
}, orderBy="a.up_version DESC"
|
||||
)
|
||||
public class AppUpgrade extends DataEntity<AppUpgrade> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String appCode; // 应用编号
|
||||
private String upTitle; // 升级标题
|
||||
private String upContent; // 升级内容
|
||||
private Integer upVersion; // 升级版本
|
||||
private String upType; // 升级类型
|
||||
private Date upDate; // 发布时间
|
||||
private String apkUrl; // APK下载地址
|
||||
private String resUrl; // 资源下载地址
|
||||
|
||||
public AppUpgrade() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
public AppUpgrade(String id){
|
||||
super(id);
|
||||
}
|
||||
|
||||
@Size(min=0, max=64, message="应用编号长度不能超过 64 个字符")
|
||||
public String getAppCode() {
|
||||
return appCode;
|
||||
}
|
||||
|
||||
public void setAppCode(String appCode) {
|
||||
this.appCode = appCode;
|
||||
}
|
||||
|
||||
@Size(min=0, max=200, message="升级标题长度不能超过 200 个字符")
|
||||
public String getUpTitle() {
|
||||
return upTitle;
|
||||
}
|
||||
|
||||
public void setUpTitle(String upTitle) {
|
||||
this.upTitle = upTitle;
|
||||
}
|
||||
|
||||
@Size(min=0, max=1000, message="升级内容长度不能超过 1000 个字符")
|
||||
public String getUpContent() {
|
||||
return upContent;
|
||||
}
|
||||
|
||||
public void setUpContent(String upContent) {
|
||||
this.upContent = upContent;
|
||||
}
|
||||
|
||||
public Integer getUpVersion() {
|
||||
return upVersion;
|
||||
}
|
||||
|
||||
public void setUpVersion(Integer upVersion) {
|
||||
this.upVersion = upVersion;
|
||||
}
|
||||
|
||||
public Integer getUpVersion_gt() {
|
||||
return sqlMap.getWhere().getValue("up_version", QueryType.GT);
|
||||
}
|
||||
|
||||
public void setUpVersion_gt(Integer upVersion) {
|
||||
sqlMap.getWhere().and("up_version", QueryType.GT, upVersion);
|
||||
}
|
||||
|
||||
@Size(min=0, max=1, message="升级类型长度不能超过 1 个字符")
|
||||
public String getUpType() {
|
||||
return upType;
|
||||
}
|
||||
|
||||
public void setUpType(String upType) {
|
||||
this.upType = upType;
|
||||
}
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
public Date getUpDate() {
|
||||
return upDate;
|
||||
}
|
||||
|
||||
public void setUpDate(Date upDate) {
|
||||
this.upDate = upDate;
|
||||
}
|
||||
|
||||
@Size(min=0, max=500, message="APK下载地址长度不能超过 500 个字符")
|
||||
public String getApkUrl() {
|
||||
return apkUrl;
|
||||
}
|
||||
|
||||
public void setApkUrl(String apkUrl) {
|
||||
this.apkUrl = apkUrl;
|
||||
}
|
||||
|
||||
@Size(min=0, max=500, message="资源下载地址长度不能超过 500 个字符")
|
||||
public String getResUrl() {
|
||||
return resUrl;
|
||||
}
|
||||
|
||||
public void setResUrl(String resUrl) {
|
||||
this.resUrl = resUrl;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
* No deletion without permission, or be held responsible to law.
|
||||
*/
|
||||
package com.jeesite.modules.app.service;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.jeesite.common.entity.Page;
|
||||
import com.jeesite.common.service.CrudService;
|
||||
import com.jeesite.modules.app.entity.AppComment;
|
||||
import com.jeesite.modules.app.dao.AppCommentDao;
|
||||
import com.jeesite.modules.file.utils.FileUploadUtils;
|
||||
|
||||
/**
|
||||
* APP意见反馈Service
|
||||
* @author ThinkGem
|
||||
* @version 2021-04-09
|
||||
*/
|
||||
@Service
|
||||
public class AppCommentService extends CrudService<AppCommentDao, AppComment> {
|
||||
|
||||
/**
|
||||
* 获取单条数据
|
||||
* @param appComment
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AppComment get(AppComment appComment) {
|
||||
return super.get(appComment);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询分页数据
|
||||
* @param appComment 查询条件
|
||||
* @param appComment page 分页对象
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Page<AppComment> findPage(AppComment appComment) {
|
||||
return super.findPage(appComment);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存数据(插入或更新)
|
||||
* @param appComment
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void save(AppComment appComment) {
|
||||
super.save(appComment);
|
||||
// 保存上传图片
|
||||
FileUploadUtils.saveFileUpload(appComment, appComment.getId(), "appComment_image");
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新状态
|
||||
* @param appComment
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void updateStatus(AppComment appComment) {
|
||||
super.updateStatus(appComment);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
* @param appComment
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void delete(AppComment appComment) {
|
||||
super.delete(appComment);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
* No deletion without permission, or be held responsible to law.
|
||||
*/
|
||||
package com.jeesite.modules.app.service;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.jeesite.common.entity.Page;
|
||||
import com.jeesite.common.service.CrudService;
|
||||
import com.jeesite.modules.app.entity.AppUpgrade;
|
||||
import com.jeesite.modules.app.dao.AppUpgradeDao;
|
||||
|
||||
/**
|
||||
* APP版本管理Service
|
||||
* @author ThinkGem
|
||||
* @version 2021-04-09
|
||||
*/
|
||||
@Service
|
||||
public class AppUpgradeService extends CrudService<AppUpgradeDao, AppUpgrade> {
|
||||
|
||||
/**
|
||||
* 获取单条数据
|
||||
* @param appUpgrade
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AppUpgrade get(AppUpgrade appUpgrade) {
|
||||
return super.get(appUpgrade);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询分页数据
|
||||
* @param appUpgrade 查询条件
|
||||
* @param appUpgrade page 分页对象
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Page<AppUpgrade> findPage(AppUpgrade appUpgrade) {
|
||||
return super.findPage(appUpgrade);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存数据(插入或更新)
|
||||
* @param appUpgrade
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void save(AppUpgrade appUpgrade) {
|
||||
super.save(appUpgrade);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新状态
|
||||
* @param appUpgrade
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void updateStatus(AppUpgrade appUpgrade) {
|
||||
super.updateStatus(appUpgrade);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
* @param appUpgrade
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void delete(AppUpgrade appUpgrade) {
|
||||
super.delete(appUpgrade);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
* No deletion without permission, or be held responsible to law.
|
||||
*/
|
||||
package com.jeesite.modules.app.web;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
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.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.entity.Page;
|
||||
import com.jeesite.common.web.BaseController;
|
||||
import com.jeesite.modules.app.entity.AppComment;
|
||||
import com.jeesite.modules.app.service.AppCommentService;
|
||||
|
||||
/**
|
||||
* APP意见反馈Controller
|
||||
* @author ThinkGem
|
||||
* @version 2021-04-09
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping(value = "${adminPath}/app/appComment")
|
||||
public class AppCommentController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private AppCommentService appCommentService;
|
||||
|
||||
/**
|
||||
* 获取数据
|
||||
*/
|
||||
@ModelAttribute
|
||||
public AppComment get(String id, boolean isNewRecord) {
|
||||
return appCommentService.get(id, isNewRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
@RequiresPermissions("app:appComment:view")
|
||||
@RequestMapping(value = {"list", ""})
|
||||
public String list(AppComment appComment, Model model) {
|
||||
model.addAttribute("appComment", appComment);
|
||||
return "modules/app/appCommentList";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表数据
|
||||
*/
|
||||
@RequiresPermissions("app:appComment:view")
|
||||
@RequestMapping(value = "listData")
|
||||
@ResponseBody
|
||||
public Page<AppComment> listData(AppComment appComment, HttpServletRequest request, HttpServletResponse response) {
|
||||
appComment.setPage(new Page<>(request, response));
|
||||
Page<AppComment> page = appCommentService.findPage(appComment);
|
||||
return page;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看编辑表单
|
||||
*/
|
||||
@RequiresPermissions("app:appComment:view")
|
||||
@RequestMapping(value = "form")
|
||||
public String form(AppComment appComment, Model model) {
|
||||
model.addAttribute("appComment", appComment);
|
||||
return "modules/app/appCommentForm";
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存数据
|
||||
*/
|
||||
@RequiresPermissions("app:appComment:edit")
|
||||
@PostMapping(value = "save")
|
||||
@ResponseBody
|
||||
public String save(@Validated AppComment appComment) {
|
||||
if (StringUtils.isNotBlank(appComment.getReplyContent())) {
|
||||
if (StringUtils.isBlank(appComment.getReplyUserCode())) {
|
||||
appComment.setReplyUserCode(appComment.currentUser().getUserCode());
|
||||
}
|
||||
if (StringUtils.isBlank(appComment.getReplyUserName())) {
|
||||
appComment.setReplyUserName(appComment.currentUser().getUserName());
|
||||
}
|
||||
if (appComment.getReplyDate() == null) {
|
||||
appComment.setReplyDate(new Date());
|
||||
}
|
||||
}
|
||||
appCommentService.save(appComment);
|
||||
appCommentService.updateStatus(appComment);
|
||||
return renderResult(Global.TRUE, text("保存意见成功!"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 停用数据
|
||||
*/
|
||||
@RequiresPermissions("app:appComment:edit")
|
||||
@RequestMapping(value = "disable")
|
||||
@ResponseBody
|
||||
public String disable(AppComment appComment) {
|
||||
appComment.setStatus(AppComment.STATUS_DISABLE);
|
||||
appCommentService.updateStatus(appComment);
|
||||
return renderResult(Global.TRUE, text("停用意见成功"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 启用数据
|
||||
*/
|
||||
@RequiresPermissions("app:appComment:edit")
|
||||
@RequestMapping(value = "enable")
|
||||
@ResponseBody
|
||||
public String enable(AppComment appComment) {
|
||||
appComment.setStatus(AppComment.STATUS_NORMAL);
|
||||
appCommentService.updateStatus(appComment);
|
||||
return renderResult(Global.TRUE, text("启用意见成功"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*/
|
||||
@RequiresPermissions("app:appComment:edit")
|
||||
@RequestMapping(value = "delete")
|
||||
@ResponseBody
|
||||
public String delete(AppComment appComment) {
|
||||
appCommentService.delete(appComment);
|
||||
return renderResult(Global.TRUE, text("删除意见成功!"));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
* No deletion without permission, or be held responsible to law.
|
||||
*/
|
||||
package com.jeesite.modules.app.web;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.web.BaseController;
|
||||
import com.jeesite.modules.app.entity.AppComment;
|
||||
import com.jeesite.modules.app.entity.AppUpgrade;
|
||||
import com.jeesite.modules.app.service.AppCommentService;
|
||||
import com.jeesite.modules.app.service.AppUpgradeService;
|
||||
|
||||
/**
|
||||
* APP公共服务 Controller
|
||||
* @author ThinkGem
|
||||
* @version 2021-04-09
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping(value = "/app")
|
||||
public class AppPublicServiceController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private AppUpgradeService appUpgradeService;
|
||||
|
||||
@Autowired
|
||||
private AppCommentService appCommentService;
|
||||
|
||||
/**
|
||||
* 升级检测
|
||||
*/
|
||||
@RequestMapping(value = "/upgrade/check")
|
||||
@ResponseBody
|
||||
public String upgradeCheck(String appCode, Integer appVersion) {
|
||||
AppUpgrade appUpgrade = new AppUpgrade();
|
||||
appUpgrade.setAppCode(appCode);
|
||||
appUpgrade.setUpVersion_gt(appVersion); // 查询大于这个版本的记录
|
||||
List<AppUpgrade> list = appUpgradeService.findList(appUpgrade);
|
||||
if (list.size() > 0) {
|
||||
return renderResult(Global.TRUE, text("检测到新版本!"), list.get(0));
|
||||
}
|
||||
return renderResult(Global.FALSE, text("当前已是最新版!"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 意见反馈
|
||||
*/
|
||||
@PostMapping(value = "/comment/save")
|
||||
@ResponseBody
|
||||
public String commentSave(@Validated AppComment appComment) {
|
||||
appComment.setStatus(AppComment.STATUS_NORMAL);
|
||||
appCommentService.save(appComment);
|
||||
return renderResult(Global.TRUE, text("我们已收到您的宝贵意见,感谢您的反馈!"));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
* No deletion without permission, or be held responsible to law.
|
||||
*/
|
||||
package com.jeesite.modules.app.web;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
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.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.entity.Page;
|
||||
import com.jeesite.common.web.BaseController;
|
||||
import com.jeesite.modules.app.entity.AppUpgrade;
|
||||
import com.jeesite.modules.app.service.AppUpgradeService;
|
||||
|
||||
/**
|
||||
* APP版本管理Controller
|
||||
* @author ThinkGem
|
||||
* @version 2021-04-09
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping(value = "${adminPath}/app/appUpgrade")
|
||||
public class AppUpgradeController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private AppUpgradeService appUpgradeService;
|
||||
|
||||
/**
|
||||
* 获取数据
|
||||
*/
|
||||
@ModelAttribute
|
||||
public AppUpgrade get(String id, boolean isNewRecord) {
|
||||
return appUpgradeService.get(id, isNewRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
@RequiresPermissions("app:appUpgrade:view")
|
||||
@RequestMapping(value = {"list", ""})
|
||||
public String list(AppUpgrade appUpgrade, Model model) {
|
||||
model.addAttribute("appUpgrade", appUpgrade);
|
||||
return "modules/app/appUpgradeList";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表数据
|
||||
*/
|
||||
@RequiresPermissions("app:appUpgrade:view")
|
||||
@RequestMapping(value = "listData")
|
||||
@ResponseBody
|
||||
public Page<AppUpgrade> listData(AppUpgrade appUpgrade, HttpServletRequest request, HttpServletResponse response) {
|
||||
appUpgrade.setPage(new Page<>(request, response));
|
||||
Page<AppUpgrade> page = appUpgradeService.findPage(appUpgrade);
|
||||
return page;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看编辑表单
|
||||
*/
|
||||
@RequiresPermissions("app:appUpgrade:view")
|
||||
@RequestMapping(value = "form")
|
||||
public String form(AppUpgrade appUpgrade, Model model) {
|
||||
model.addAttribute("appUpgrade", appUpgrade);
|
||||
return "modules/app/appUpgradeForm";
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存数据
|
||||
*/
|
||||
@RequiresPermissions("app:appUpgrade:edit")
|
||||
@PostMapping(value = "save")
|
||||
@ResponseBody
|
||||
public String save(@Validated AppUpgrade appUpgrade) {
|
||||
appUpgradeService.save(appUpgrade);
|
||||
return renderResult(Global.TRUE, text("保存版本成功!"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 停用数据
|
||||
*/
|
||||
@RequiresPermissions("app:appUpgrade:edit")
|
||||
@RequestMapping(value = "disable")
|
||||
@ResponseBody
|
||||
public String disable(AppUpgrade appUpgrade) {
|
||||
appUpgrade.setStatus(AppUpgrade.STATUS_DISABLE);
|
||||
appUpgradeService.updateStatus(appUpgrade);
|
||||
return renderResult(Global.TRUE, text("停用版本成功"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 启用数据
|
||||
*/
|
||||
@RequiresPermissions("app:appUpgrade:edit")
|
||||
@RequestMapping(value = "enable")
|
||||
@ResponseBody
|
||||
public String enable(AppUpgrade appUpgrade) {
|
||||
appUpgrade.setStatus(AppUpgrade.STATUS_NORMAL);
|
||||
appUpgradeService.updateStatus(appUpgrade);
|
||||
return renderResult(Global.TRUE, text("启用版本成功"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*/
|
||||
@RequiresPermissions("app:appUpgrade:edit")
|
||||
@RequestMapping(value = "delete")
|
||||
@ResponseBody
|
||||
public String delete(AppUpgrade appUpgrade) {
|
||||
appUpgradeService.delete(appUpgrade);
|
||||
return renderResult(Global.TRUE, text("删除版本成功!"));
|
||||
}
|
||||
|
||||
}
|
||||
4
modules/app/src/main/resources/config/jeesite-app.yml
Normal file
4
modules/app/src/main/resources/config/jeesite-app.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
# 温馨提示:不建议直接修改此文件,为了平台升级方便,建议将需要修改的参数值,复制到application.yml里进行覆盖该参数值。
|
||||
|
||||
#app:
|
||||
# enabled: true
|
||||
50
modules/app/src/main/resources/db/create/db2/app.sql
Normal file
50
modules/app/src/main/resources/db/create/db2/app.sql
Normal file
@@ -0,0 +1,50 @@
|
||||
|
||||
|
||||
/* Create Tables */
|
||||
|
||||
-- APP意见反馈
|
||||
CREATE TABLE ${_prefix}app_comment
|
||||
(
|
||||
id varchar(64) NOT NULL,
|
||||
category varchar(10),
|
||||
content vargraphic(500),
|
||||
contact vargraphic(200),
|
||||
status char(1) DEFAULT '0' NOT NULL,
|
||||
create_by varchar(64) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
update_by varchar(64) NOT NULL,
|
||||
update_date timestamp NOT NULL,
|
||||
remarks vargraphic(500),
|
||||
create_by_name varchar(200),
|
||||
device_info varchar(1000),
|
||||
reply_date date,
|
||||
reply_content vargraphic(500),
|
||||
reply_user_code varchar(64),
|
||||
reply_user_name varchar(200),
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
|
||||
-- APP升级版本
|
||||
CREATE TABLE ${_prefix}app_upgrade
|
||||
(
|
||||
id varchar(64) NOT NULL,
|
||||
app_code varchar(64),
|
||||
up_title vargraphic(200),
|
||||
up_content vargraphic(1000),
|
||||
up_version numeric,
|
||||
up_type char(1),
|
||||
up_date date,
|
||||
apk_url varchar(500),
|
||||
res_url varchar(500),
|
||||
status char(1) DEFAULT '0' NOT NULL,
|
||||
create_by varchar(64) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
update_by varchar(64) NOT NULL,
|
||||
update_date timestamp NOT NULL,
|
||||
remarks vargraphic(500),
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
|
||||
|
||||
50
modules/app/src/main/resources/db/create/h2/app.sql
Normal file
50
modules/app/src/main/resources/db/create/h2/app.sql
Normal file
@@ -0,0 +1,50 @@
|
||||
|
||||
|
||||
/* Create Tables */
|
||||
|
||||
-- APP意见反馈
|
||||
CREATE TABLE ${_prefix}app_comment
|
||||
(
|
||||
id varchar(64) NOT NULL,
|
||||
category varchar(10),
|
||||
content varchar(500),
|
||||
contact varchar(200),
|
||||
status char(1) DEFAULT '0' NOT NULL,
|
||||
create_by varchar(64) NOT NULL,
|
||||
create_date datetime NOT NULL,
|
||||
update_by varchar(64) NOT NULL,
|
||||
update_date datetime NOT NULL,
|
||||
remarks varchar(500),
|
||||
create_by_name varchar(200),
|
||||
device_info varchar(1000),
|
||||
reply_date date,
|
||||
reply_content varchar(500),
|
||||
reply_user_code varchar(64),
|
||||
reply_user_name varchar(200),
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
|
||||
-- APP升级版本
|
||||
CREATE TABLE ${_prefix}app_upgrade
|
||||
(
|
||||
id varchar(64) NOT NULL,
|
||||
app_code varchar(64),
|
||||
up_title varchar(200),
|
||||
up_content varchar(1000),
|
||||
up_version numeric,
|
||||
up_type char(1),
|
||||
up_date date,
|
||||
apk_url varchar(500),
|
||||
res_url varchar(500),
|
||||
status char(1) DEFAULT '0' NOT NULL,
|
||||
create_by varchar(64) NOT NULL,
|
||||
create_date datetime NOT NULL,
|
||||
update_by varchar(64) NOT NULL,
|
||||
update_date datetime NOT NULL,
|
||||
remarks varchar(500),
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
|
||||
|
||||
50
modules/app/src/main/resources/db/create/mssql/app.sql
Normal file
50
modules/app/src/main/resources/db/create/mssql/app.sql
Normal file
@@ -0,0 +1,50 @@
|
||||
|
||||
|
||||
/* Create Tables */
|
||||
|
||||
-- APP意见反馈
|
||||
CREATE TABLE [${_prefix}app_comment]
|
||||
(
|
||||
[id] varchar(64) NOT NULL,
|
||||
[category] varchar(10),
|
||||
[content] nvarchar(500),
|
||||
[contact] nvarchar(200),
|
||||
[status] char(1) DEFAULT '0' NOT NULL,
|
||||
[create_by] varchar(64) NOT NULL,
|
||||
[create_date] datetime NOT NULL,
|
||||
[update_by] varchar(64) NOT NULL,
|
||||
[update_date] datetime NOT NULL,
|
||||
[remarks] nvarchar(500),
|
||||
[create_by_name] varchar(200),
|
||||
[device_info] varchar(1000),
|
||||
[reply_date] date,
|
||||
[reply_content] nvarchar(500),
|
||||
[reply_user_code] varchar(64),
|
||||
[reply_user_name] varchar(200),
|
||||
PRIMARY KEY ([id])
|
||||
);
|
||||
|
||||
|
||||
-- APP升级版本
|
||||
CREATE TABLE [${_prefix}app_upgrade]
|
||||
(
|
||||
[id] varchar(64) NOT NULL,
|
||||
[app_code] varchar(64),
|
||||
[up_title] nvarchar(200),
|
||||
[up_content] nvarchar(1000),
|
||||
[up_version] numeric,
|
||||
[up_type] char(1),
|
||||
[up_date] date,
|
||||
[apk_url] varchar(500),
|
||||
[res_url] varchar(500),
|
||||
[status] char(1) DEFAULT '0' NOT NULL,
|
||||
[create_by] varchar(64) NOT NULL,
|
||||
[create_date] datetime NOT NULL,
|
||||
[update_by] varchar(64) NOT NULL,
|
||||
[update_date] datetime NOT NULL,
|
||||
[remarks] nvarchar(500),
|
||||
PRIMARY KEY ([id])
|
||||
);
|
||||
|
||||
|
||||
|
||||
51
modules/app/src/main/resources/db/create/mysql/app.sql
Normal file
51
modules/app/src/main/resources/db/create/mysql/app.sql
Normal file
@@ -0,0 +1,51 @@
|
||||
SET SESSION FOREIGN_KEY_CHECKS=0;
|
||||
|
||||
|
||||
/* Create Tables */
|
||||
|
||||
-- APP意见反馈
|
||||
CREATE TABLE ${_prefix}app_comment
|
||||
(
|
||||
id varchar(64) NOT NULL COMMENT '编号',
|
||||
category varchar(10) COMMENT '问题分类',
|
||||
content varchar(500) COMMENT '问题和意见',
|
||||
contact varchar(200) COMMENT '联系方式',
|
||||
status char(1) DEFAULT '0' NOT NULL COMMENT '状态(0正常 1删除 2停用)',
|
||||
create_by varchar(64) NOT NULL COMMENT '创建者',
|
||||
create_date datetime NOT NULL COMMENT '创建时间',
|
||||
update_by varchar(64) NOT NULL COMMENT '更新者',
|
||||
update_date datetime NOT NULL COMMENT '更新时间',
|
||||
remarks varchar(500) COMMENT '备注信息',
|
||||
create_by_name varchar(200) COMMENT '提问人员姓名',
|
||||
device_info varchar(1000) COMMENT '设备信息',
|
||||
reply_date date COMMENT '回复时间',
|
||||
reply_content varchar(500) COMMENT '回复意见',
|
||||
reply_user_code varchar(64) COMMENT '回复人员',
|
||||
reply_user_name varchar(200) COMMENT '回复人员姓名',
|
||||
PRIMARY KEY (id)
|
||||
) COMMENT = 'APP意见反馈';
|
||||
|
||||
|
||||
-- APP升级版本
|
||||
CREATE TABLE ${_prefix}app_upgrade
|
||||
(
|
||||
id varchar(64) NOT NULL COMMENT '编号',
|
||||
app_code varchar(64) COMMENT '应用编号',
|
||||
up_title varchar(200) COMMENT '升级标题',
|
||||
up_content varchar(1000) COMMENT '升级内容',
|
||||
up_version numeric COMMENT '升级版本',
|
||||
up_type char(1) COMMENT '升级类型',
|
||||
up_date date COMMENT '发布时间',
|
||||
apk_url varchar(500) COMMENT 'APK下载地址',
|
||||
res_url varchar(500) COMMENT '资源下载地址',
|
||||
status char(1) DEFAULT '0' NOT NULL COMMENT '状态(0正常 1删除 2停用)',
|
||||
create_by varchar(64) NOT NULL COMMENT '创建者',
|
||||
create_date datetime NOT NULL COMMENT '创建时间',
|
||||
update_by varchar(64) NOT NULL COMMENT '更新者',
|
||||
update_date datetime NOT NULL COMMENT '更新时间',
|
||||
remarks varchar(500) COMMENT '备注信息',
|
||||
PRIMARY KEY (id)
|
||||
) COMMENT = 'APP升级版本';
|
||||
|
||||
|
||||
|
||||
88
modules/app/src/main/resources/db/create/oracle/app.sql
Normal file
88
modules/app/src/main/resources/db/create/oracle/app.sql
Normal file
@@ -0,0 +1,88 @@
|
||||
|
||||
|
||||
/* Create Tables */
|
||||
|
||||
-- APP意见反馈
|
||||
CREATE TABLE ${_prefix}app_comment
|
||||
(
|
||||
id varchar2(64) NOT NULL,
|
||||
category varchar2(10),
|
||||
content nvarchar2(500),
|
||||
contact nvarchar2(200),
|
||||
status char(1) DEFAULT '0' NOT NULL,
|
||||
create_by varchar2(64) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
update_by varchar2(64) NOT NULL,
|
||||
update_date timestamp NOT NULL,
|
||||
remarks nvarchar2(500),
|
||||
create_by_name varchar2(200),
|
||||
device_info varchar2(1000),
|
||||
reply_date date,
|
||||
reply_content nvarchar2(500),
|
||||
reply_user_code varchar2(64),
|
||||
reply_user_name varchar2(200),
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
|
||||
-- APP升级版本
|
||||
CREATE TABLE ${_prefix}app_upgrade
|
||||
(
|
||||
id varchar2(64) NOT NULL,
|
||||
app_code varchar2(64),
|
||||
up_title nvarchar2(200),
|
||||
up_content nvarchar2(1000),
|
||||
up_version number,
|
||||
up_type char(1),
|
||||
up_date date,
|
||||
apk_url varchar2(500),
|
||||
res_url varchar2(500),
|
||||
status char(1) DEFAULT '0' NOT NULL,
|
||||
create_by varchar2(64) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
update_by varchar2(64) NOT NULL,
|
||||
update_date timestamp NOT NULL,
|
||||
remarks nvarchar2(500),
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
|
||||
|
||||
/* Comments */
|
||||
|
||||
COMMENT ON TABLE ${_prefix}app_comment IS 'APP意见反馈';
|
||||
COMMENT ON COLUMN ${_prefix}app_comment.id IS '编号';
|
||||
COMMENT ON COLUMN ${_prefix}app_comment.category IS '问题分类';
|
||||
COMMENT ON COLUMN ${_prefix}app_comment.content IS '问题和意见';
|
||||
COMMENT ON COLUMN ${_prefix}app_comment.contact IS '联系方式';
|
||||
COMMENT ON COLUMN ${_prefix}app_comment.status IS '状态(0正常 1删除 2停用)';
|
||||
COMMENT ON COLUMN ${_prefix}app_comment.create_by IS '创建者';
|
||||
COMMENT ON COLUMN ${_prefix}app_comment.create_date IS '创建时间';
|
||||
COMMENT ON COLUMN ${_prefix}app_comment.update_by IS '更新者';
|
||||
COMMENT ON COLUMN ${_prefix}app_comment.update_date IS '更新时间';
|
||||
COMMENT ON COLUMN ${_prefix}app_comment.remarks IS '备注信息';
|
||||
COMMENT ON COLUMN ${_prefix}app_comment.create_by_name IS '提问人员姓名';
|
||||
COMMENT ON COLUMN ${_prefix}app_comment.device_info IS '设备信息';
|
||||
COMMENT ON COLUMN ${_prefix}app_comment.reply_date IS '回复时间';
|
||||
COMMENT ON COLUMN ${_prefix}app_comment.reply_content IS '回复意见';
|
||||
COMMENT ON COLUMN ${_prefix}app_comment.reply_user_code IS '回复人员';
|
||||
COMMENT ON COLUMN ${_prefix}app_comment.reply_user_name IS '回复人员姓名';
|
||||
COMMENT ON TABLE ${_prefix}app_upgrade IS 'APP升级版本';
|
||||
COMMENT ON COLUMN ${_prefix}app_upgrade.id IS '编号';
|
||||
COMMENT ON COLUMN ${_prefix}app_upgrade.app_code IS '应用编号';
|
||||
COMMENT ON COLUMN ${_prefix}app_upgrade.up_title IS '升级标题';
|
||||
COMMENT ON COLUMN ${_prefix}app_upgrade.up_content IS '升级内容';
|
||||
COMMENT ON COLUMN ${_prefix}app_upgrade.up_version IS '升级版本';
|
||||
COMMENT ON COLUMN ${_prefix}app_upgrade.up_type IS '升级类型';
|
||||
COMMENT ON COLUMN ${_prefix}app_upgrade.up_date IS '发布时间';
|
||||
COMMENT ON COLUMN ${_prefix}app_upgrade.apk_url IS 'APK下载地址';
|
||||
COMMENT ON COLUMN ${_prefix}app_upgrade.res_url IS '资源下载地址';
|
||||
COMMENT ON COLUMN ${_prefix}app_upgrade.status IS '状态(0正常 1删除 2停用)';
|
||||
COMMENT ON COLUMN ${_prefix}app_upgrade.create_by IS '创建者';
|
||||
COMMENT ON COLUMN ${_prefix}app_upgrade.create_date IS '创建时间';
|
||||
COMMENT ON COLUMN ${_prefix}app_upgrade.update_by IS '更新者';
|
||||
COMMENT ON COLUMN ${_prefix}app_upgrade.update_date IS '更新时间';
|
||||
COMMENT ON COLUMN ${_prefix}app_upgrade.remarks IS '备注信息';
|
||||
|
||||
|
||||
|
||||
88
modules/app/src/main/resources/db/create/postgresql/app.sql
Normal file
88
modules/app/src/main/resources/db/create/postgresql/app.sql
Normal file
@@ -0,0 +1,88 @@
|
||||
|
||||
|
||||
/* Create Tables */
|
||||
|
||||
-- APP意见反馈
|
||||
CREATE TABLE ${_prefix}app_comment
|
||||
(
|
||||
id varchar(64) NOT NULL,
|
||||
category varchar(10),
|
||||
content varchar(500),
|
||||
contact varchar(200),
|
||||
status char(1) DEFAULT '0' NOT NULL,
|
||||
create_by varchar(64) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
update_by varchar(64) NOT NULL,
|
||||
update_date timestamp NOT NULL,
|
||||
remarks varchar(500),
|
||||
create_by_name varchar(200),
|
||||
device_info varchar(1000),
|
||||
reply_date date,
|
||||
reply_content varchar(500),
|
||||
reply_user_code varchar(64),
|
||||
reply_user_name varchar(200),
|
||||
PRIMARY KEY (id)
|
||||
) WITHOUT OIDS;
|
||||
|
||||
|
||||
-- APP升级版本
|
||||
CREATE TABLE ${_prefix}app_upgrade
|
||||
(
|
||||
id varchar(64) NOT NULL,
|
||||
app_code varchar(64),
|
||||
up_title varchar(200),
|
||||
up_content varchar(1000),
|
||||
up_version numeric,
|
||||
up_type char(1),
|
||||
up_date date,
|
||||
apk_url varchar(500),
|
||||
res_url varchar(500),
|
||||
status char(1) DEFAULT '0' NOT NULL,
|
||||
create_by varchar(64) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
update_by varchar(64) NOT NULL,
|
||||
update_date timestamp NOT NULL,
|
||||
remarks varchar(500),
|
||||
PRIMARY KEY (id)
|
||||
) WITHOUT OIDS;
|
||||
|
||||
|
||||
|
||||
/* Comments */
|
||||
|
||||
COMMENT ON TABLE ${_prefix}app_comment IS 'APP意见反馈';
|
||||
COMMENT ON COLUMN ${_prefix}app_comment.id IS '编号';
|
||||
COMMENT ON COLUMN ${_prefix}app_comment.category IS '问题分类';
|
||||
COMMENT ON COLUMN ${_prefix}app_comment.content IS '问题和意见';
|
||||
COMMENT ON COLUMN ${_prefix}app_comment.contact IS '联系方式';
|
||||
COMMENT ON COLUMN ${_prefix}app_comment.status IS '状态(0正常 1删除 2停用)';
|
||||
COMMENT ON COLUMN ${_prefix}app_comment.create_by IS '创建者';
|
||||
COMMENT ON COLUMN ${_prefix}app_comment.create_date IS '创建时间';
|
||||
COMMENT ON COLUMN ${_prefix}app_comment.update_by IS '更新者';
|
||||
COMMENT ON COLUMN ${_prefix}app_comment.update_date IS '更新时间';
|
||||
COMMENT ON COLUMN ${_prefix}app_comment.remarks IS '备注信息';
|
||||
COMMENT ON COLUMN ${_prefix}app_comment.create_by_name IS '提问人员姓名';
|
||||
COMMENT ON COLUMN ${_prefix}app_comment.device_info IS '设备信息';
|
||||
COMMENT ON COLUMN ${_prefix}app_comment.reply_date IS '回复时间';
|
||||
COMMENT ON COLUMN ${_prefix}app_comment.reply_content IS '回复意见';
|
||||
COMMENT ON COLUMN ${_prefix}app_comment.reply_user_code IS '回复人员';
|
||||
COMMENT ON COLUMN ${_prefix}app_comment.reply_user_name IS '回复人员姓名';
|
||||
COMMENT ON TABLE ${_prefix}app_upgrade IS 'APP升级版本';
|
||||
COMMENT ON COLUMN ${_prefix}app_upgrade.id IS '编号';
|
||||
COMMENT ON COLUMN ${_prefix}app_upgrade.app_code IS '应用编号';
|
||||
COMMENT ON COLUMN ${_prefix}app_upgrade.up_title IS '升级标题';
|
||||
COMMENT ON COLUMN ${_prefix}app_upgrade.up_content IS '升级内容';
|
||||
COMMENT ON COLUMN ${_prefix}app_upgrade.up_version IS '升级版本';
|
||||
COMMENT ON COLUMN ${_prefix}app_upgrade.up_type IS '升级类型';
|
||||
COMMENT ON COLUMN ${_prefix}app_upgrade.up_date IS '发布时间';
|
||||
COMMENT ON COLUMN ${_prefix}app_upgrade.apk_url IS 'APK下载地址';
|
||||
COMMENT ON COLUMN ${_prefix}app_upgrade.res_url IS '资源下载地址';
|
||||
COMMENT ON COLUMN ${_prefix}app_upgrade.status IS '状态(0正常 1删除 2停用)';
|
||||
COMMENT ON COLUMN ${_prefix}app_upgrade.create_by IS '创建者';
|
||||
COMMENT ON COLUMN ${_prefix}app_upgrade.create_date IS '创建时间';
|
||||
COMMENT ON COLUMN ${_prefix}app_upgrade.update_by IS '更新者';
|
||||
COMMENT ON COLUMN ${_prefix}app_upgrade.update_date IS '更新时间';
|
||||
COMMENT ON COLUMN ${_prefix}app_upgrade.remarks IS '备注信息';
|
||||
|
||||
|
||||
|
||||
10
modules/app/src/main/resources/db/upgrade/app/versions
Normal file
10
modules/app/src/main/resources/db/upgrade/app/versions
Normal file
@@ -0,0 +1,10 @@
|
||||
4.2.3
|
||||
4.3.0
|
||||
5.0.0
|
||||
5.0.1
|
||||
5.0.2
|
||||
5.1.0
|
||||
5.2.0
|
||||
5.2.1
|
||||
5.3.0
|
||||
5.3.1
|
||||
@@ -0,0 +1,15 @@
|
||||
<?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.jeesite.modules.app.dao.AppCommentDao">
|
||||
|
||||
<!-- 查询数据
|
||||
<select id="findList" resultType="AppComment">
|
||||
SELECT ${sqlMap.column.toSql()}
|
||||
FROM ${sqlMap.table.toSql()}
|
||||
<where>
|
||||
${sqlMap.where.toSql()}
|
||||
</where>
|
||||
ORDER BY ${sqlMap.order.toSql()}
|
||||
</select> -->
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?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.jeesite.modules.app.dao.AppUpgradeDao">
|
||||
|
||||
<!-- 查询数据
|
||||
<select id="findList" resultType="AppUpgrade">
|
||||
SELECT ${sqlMap.column.toSql()}
|
||||
FROM ${sqlMap.table.toSql()}
|
||||
<where>
|
||||
${sqlMap.where.toSql()}
|
||||
</where>
|
||||
ORDER BY ${sqlMap.order.toSql()}
|
||||
</select> -->
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,175 @@
|
||||
<% layout('/layouts/default.html', {title: '意见管理', libs: ['validate','fileupload']}){ %>
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
<div class="box-header with-border">
|
||||
<div class="box-title">
|
||||
<i class="fa icon-note"></i> ${text(appComment.isNewRecord ? '新增意见' : '编辑意见')}
|
||||
</div>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<#form:form id="inputForm" model="${appComment}" action="${ctx}/app/appComment/save" method="post" class="form-horizontal nofocus">
|
||||
<div class="box-body">
|
||||
<div class="form-unit">${text('基本信息')}</div>
|
||||
<#form:hidden path="id"/>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required ">*</span> ${text('问题分类')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:select path="category" dictType="app_comment_category" class="form-control required" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required ">*</span> ${text('问题和意见')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:textarea path="content" rows="4" minlength="10" maxlength="500" class="form-control required"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required hide">*</span> ${text('联系方式')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="contact" maxlength="200" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2">
|
||||
<span class="required hide">*</span> ${text('图片上传')}:</label>
|
||||
<div class="col-sm-8">
|
||||
<#form:fileupload id="uploadImage" bizKey="${appComment.id}" bizType="appComment_image"
|
||||
uploadType="image" class="" readonly="false" preview="true"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required hide">*</span> ${text('设备信息')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:textarea path="deviceInfo" rows="4" minlength="10" maxlength="500" class="form-control " readonly="true"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row ${isBlank(appComment.createDate)?'hide':''}">
|
||||
<div class="col-xs-4">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-6" title="">
|
||||
<span class="required hide">*</span> ${text('回复时间')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-6 control-text">
|
||||
${appComment.createDate, 'yyyy-MM-dd'}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-3" title="">
|
||||
<span class="required hide">*</span> ${text('回复人员')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-6 control-text">
|
||||
${appComment.createByName}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-unit">${text('回复信息')}</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required hide">*</span> ${text('回复意见')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:textarea path="replyContent" maxlength="500" rows="5" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row ${isBlank(appComment.replyDate)?'hide':''}">
|
||||
<div class="col-xs-4">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-6" title="">
|
||||
<span class="required hide">*</span> ${text('回复时间')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-6 control-text">
|
||||
${appComment.replyDate, 'yyyy-MM-dd'}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-3" title="">
|
||||
<span class="required hide">*</span> ${text('回复人员')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-6 control-text">
|
||||
${appComment.replyUserName}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-unit">${text('其它信息')}</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required hide">*</span> ${text('备注信息')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:textarea path="remarks" rows="4" maxlength="500" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required ">*</span> ${text('修改状态')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:radio path="status" dictType="app_comment_status" class="form-control required" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<div class="row">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<% if (hasPermi('app:appComment:edit')){ %>
|
||||
<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> ${text('保 存')}</button>
|
||||
<% } %>
|
||||
<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> ${text('关 闭')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</#form:form>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
<script>
|
||||
$("#inputForm").validate({
|
||||
submitHandler: function(form){
|
||||
js.ajaxSubmitForm($(form), function(data){
|
||||
js.showMessage(data.message);
|
||||
if(data.result == Global.TRUE){
|
||||
js.closeCurrentTabPage(function(contentWindow){
|
||||
contentWindow.page();
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,101 @@
|
||||
<% layout('/layouts/default.html', {title: '意见管理', libs: ['dataGrid']}){ %>
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
<div class="box-header">
|
||||
<div class="box-title">
|
||||
<i class="fa icon-notebook"></i> ${text('意见管理')}
|
||||
</div>
|
||||
<div class="box-tools pull-right">
|
||||
<a href="#" class="btn btn-default" id="btnSearch" title="${text('查询')}"><i class="fa fa-filter"></i> ${text('查询')}</a>
|
||||
<% if(hasPermi('app:appComment:edit')){ %>
|
||||
<a href="${ctx}/app/appComment/form" class="btn btn-default btnTool" title="${text('新增意见')}"><i class="fa fa-plus"></i> ${text('新增')}</a>
|
||||
<% } %>
|
||||
<a href="#" class="btn btn-default" id="btnSetting" title="${text('设置')}"><i class="fa fa-navicon"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<#form:form id="searchForm" model="${appComment}" action="${ctx}/app/appComment/listData" method="post" class="form-inline hide"
|
||||
data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('问题分类')}:</label>
|
||||
<div class="control-inline width-120">
|
||||
<#form:select path="category" dictType="app_comment_category" blankOption="true" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('问题和意见')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="content" maxlength="500" class="form-control width-120"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('联系方式')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="contact" maxlength="200" class="form-control width-120"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('状态')}:</label>
|
||||
<div class="control-inline width-90">
|
||||
<#form:select path="status" dictType="app_comment_status" blankOption="true" class="form-control isQuick"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('回复人员')}:</label>
|
||||
<div class="control-inline width-120">
|
||||
<#form:listselect id="userSelect" title="用户选择" path="replyUserCode"
|
||||
url="${ctx}/sys/empUser/empUserSelect" allowClear="false"
|
||||
checkbox="false" itemCode="userCode" itemName="userName"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm isQuick">${text('重置')}</button>
|
||||
</div>
|
||||
</#form:form>
|
||||
<table id="dataGrid"></table>
|
||||
<div id="dataGridPage"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
<script>
|
||||
// 初始化DataGrid对象
|
||||
$('#dataGrid').dataGrid({
|
||||
searchForm: $("#searchForm"),
|
||||
columnModel: [
|
||||
{header:'${text("问题和意见")}', name:'content', index:'a.content', width:250, align:"left", frozen:true, formatter: function(val, obj, row, act){
|
||||
return '<a href="${ctx}/app/appComment/form?id='+row.id+'" class="btnList" data-title="${text("编辑意见")}">'+(val||row.id)+'</a>';
|
||||
}},
|
||||
{header:'${text("问题分类")}', name:'category', index:'a.category', width:100, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('app_comment_category')}, val, '${text("未知")}', true);
|
||||
}},
|
||||
{header:'${text("联系方式")}', name:'contact', index:'a.contact', width:150, align:"center"},
|
||||
{header:'${text("状态")}', name:'status', index:'a.status', width:100, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('app_comment_status')}, val, '${text("未知")}', true);
|
||||
}},
|
||||
{header:'${text("提问时间")}', name:'createDate', index:'a.create_date', width:150, align:"center"},
|
||||
{header:'${text("提问人员")}', name:'createByName', index:'a.create_by_name', width:150, align:"center"},
|
||||
{header:'${text("回复时间")}', name:'replyDate', index:'a.reply_date', width:150, align:"center"},
|
||||
{header:'${text("回复意见")}', name:'replyContent', index:'a.reply_content', width:150, align:"left"},
|
||||
{header:'${text("回复人员")}', name:'replyUserName', index:'a.reply_user_name', width:150, align:"center"},
|
||||
{header:'${text("操作")}', name:'actions', width:120, formatter: function(val, obj, row, act){
|
||||
var actions = [];
|
||||
//<% if(hasPermi('app:appComment:edit')){ %>
|
||||
actions.push('<a href="${ctx}/app/appComment/form?id='+row.id+'" class="btnList" title="${text("编辑意见")}"><i class="fa fa-pencil"></i></a> ');
|
||||
if (row.status == Global.STATUS_NORMAL){
|
||||
actions.push('<a href="${ctx}/app/appComment/disable?id='+row.id+'" class="btnList" title="${text("停用意见")}" data-confirm="${text("确认要停用该意见吗?")}"><i class="glyphicon glyphicon-ban-circle"></i></a> ');
|
||||
} else if (row.status == Global.STATUS_DISABLE){
|
||||
actions.push('<a href="${ctx}/app/appComment/enable?id='+row.id+'" class="btnList" title="${text("启用意见")}" data-confirm="${text("确认要启用该意见吗?")}"><i class="glyphicon glyphicon-ok-circle"></i></a> ');
|
||||
}
|
||||
actions.push('<a href="${ctx}/app/appComment/delete?id='+row.id+'" class="btnList" title="${text("删除意见")}" data-confirm="${text("确认要删除该意见吗?")}"><i class="fa fa-trash-o"></i></a> ');
|
||||
//<% } %>
|
||||
return actions.join('');
|
||||
}}
|
||||
],
|
||||
// 加载成功后执行事件
|
||||
ajaxSuccess: function(data){
|
||||
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,147 @@
|
||||
<% layout('/layouts/default.html', {title: '版本管理', libs: ['validate']}){ %>
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
<div class="box-header with-border">
|
||||
<div class="box-title">
|
||||
<i class="fa icon-note"></i> ${text(appUpgrade.isNewRecord ? '新增版本' : '编辑版本')}
|
||||
</div>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<#form:form id="inputForm" model="${appUpgrade}" action="${ctx}/app/appUpgrade/save" method="post" class="form-horizontal">
|
||||
<div class="box-body">
|
||||
<div class="form-unit">${text('基本信息')}</div>
|
||||
<#form:hidden path="id"/>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('升级标题')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="upTitle" maxlength="200" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('应用代号')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:select path="appCode" dictType="app_code" blankOption="true" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required hide">*</span> ${text('版本号码')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-4">
|
||||
<#form:input path="upVersion" class="form-control digits"/>
|
||||
</div>
|
||||
<div class="col-sm-4 control-text" style="color:#888">
|
||||
内部版本号,请填写数字
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('升级类型')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:select path="upType" dictType="app_upgrade_type" blankOption="true" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('发布时间')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="upDate" readonly="true" maxlength="20" class="form-control laydate"
|
||||
dataFormat="date" data-type="date" data-format="yyyy-MM-dd"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required hide">*</span> ${text('升级内容')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:textarea path="upContent" maxlength="1000" rows="4" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required hide">*</span> ${text('APK下载地址')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="apkUrl" maxlength="500" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required hide">*</span> ${text('资源下载地址')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="resUrl" maxlength="500" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required hide">*</span> ${text('备注信息')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:textarea path="remarks" rows="4" maxlength="500" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<div class="row">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<% if (hasPermi('app:appUpgrade:edit')){ %>
|
||||
<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> ${text('保 存')}</button>
|
||||
<% } %>
|
||||
<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> ${text('关 闭')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</#form:form>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
<script>
|
||||
$("#inputForm").validate({
|
||||
submitHandler: function(form){
|
||||
js.ajaxSubmitForm($(form), function(data){
|
||||
js.showMessage(data.message);
|
||||
if(data.result == Global.TRUE){
|
||||
js.closeCurrentTabPage(function(contentWindow){
|
||||
contentWindow.page();
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,101 @@
|
||||
<% layout('/layouts/default.html', {title: '版本管理', libs: ['dataGrid']}){ %>
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
<div class="box-header">
|
||||
<div class="box-title">
|
||||
<i class="fa icon-notebook"></i> ${text('版本管理')}
|
||||
</div>
|
||||
<div class="box-tools pull-right">
|
||||
<a href="#" class="btn btn-default" id="btnSearch" title="${text('查询')}"><i class="fa fa-filter"></i> ${text('查询')}</a>
|
||||
<% if(hasPermi('app:appUpgrade:edit')){ %>
|
||||
<a href="${ctx}/app/appUpgrade/form" class="btn btn-default btnTool" title="${text('新增版本')}"><i class="fa fa-plus"></i> ${text('新增')}</a>
|
||||
<% } %>
|
||||
<a href="#" class="btn btn-default" id="btnSetting" title="${text('设置')}"><i class="fa fa-navicon"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<#form:form id="searchForm" model="${appUpgrade}" action="${ctx}/app/appUpgrade/listData" method="post" class="form-inline hide"
|
||||
data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('应用代号')}:</label>
|
||||
<div class="control-inline width-120">
|
||||
<#form:select path="appCode" dictType="app_code" blankOption="true" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('升级标题')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="upTitle" maxlength="200" class="form-control width-120"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('升级类型')}:</label>
|
||||
<div class="control-inline width-120">
|
||||
<#form:select path="upType" dictType="app_upgrade_type" blankOption="true" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('发布时间')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="upDate" readonly="true" maxlength="20" class="form-control laydate width-datetime"
|
||||
dataFormat="date" data-type="date" data-format="yyyy-MM-dd"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('状态')}:</label>
|
||||
<div class="control-inline width-90">
|
||||
<#form:select path="status" dictType="sys_search_status" blankOption="true" class="form-control isQuick"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm isQuick">${text('重置')}</button>
|
||||
</div>
|
||||
</#form:form>
|
||||
<table id="dataGrid"></table>
|
||||
<div id="dataGridPage"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
<script>
|
||||
// 初始化DataGrid对象
|
||||
$('#dataGrid').dataGrid({
|
||||
searchForm: $("#searchForm"),
|
||||
columnModel: [
|
||||
{header:'${text("升级标题")}', name:'upTitle', index:'a.up_title', width:350, align:"left", frozen:true, formatter: function(val, obj, row, act){
|
||||
return '<a href="${ctx}/app/appUpgrade/form?id='+row.id+'" class="btnList" data-title="${text("编辑版本")}">'+(val||row.id)+'</a>';
|
||||
}},
|
||||
{header:'${text("应用代号")}', name:'appCode', index:'a.app_code', width:150, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('app_code')}, val, val, true);
|
||||
}},
|
||||
{header:'${text("版本号码")}', name:'upVersion', index:'a.up_version', width:100, align:"center"},
|
||||
{header:'${text("升级类型")}', name:'upType', index:'a.up_type', width:150, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('app_upgrade_type')}, val, '${text("未知")}', true);
|
||||
}},
|
||||
{header:'${text("发布时间")}', name:'upDate', index:'a.up_date', width:150, align:"center"},
|
||||
{header:'${text("升级内容")}', name:'upContent', index:'a.up_content', width:250, align:"left"},
|
||||
{header:'${text("状态")}', name:'status', index:'a.status', width:100, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_search_status')}, val, '${text("未知")}', true);
|
||||
}},
|
||||
{header:'${text("更新时间")}', name:'updateDate', index:'a.update_date', width:150, align:"center"},
|
||||
{header:'${text("操作")}', name:'actions', width:120, formatter: function(val, obj, row, act){
|
||||
var actions = [];
|
||||
//<% if(hasPermi('app:appUpgrade:edit')){ %>
|
||||
actions.push('<a href="${ctx}/app/appUpgrade/form?id='+row.id+'" class="btnList" title="${text("编辑版本")}"><i class="fa fa-pencil"></i></a> ');
|
||||
if (row.status == Global.STATUS_NORMAL){
|
||||
actions.push('<a href="${ctx}/app/appUpgrade/disable?id='+row.id+'" class="btnList" title="${text("停用版本")}" data-confirm="${text("确认要停用该版本吗?")}"><i class="glyphicon glyphicon-ban-circle"></i></a> ');
|
||||
} else if (row.status == Global.STATUS_DISABLE){
|
||||
actions.push('<a href="${ctx}/app/appUpgrade/enable?id='+row.id+'" class="btnList" title="${text("启用版本")}" data-confirm="${text("确认要启用该版本吗?")}"><i class="glyphicon glyphicon-ok-circle"></i></a> ');
|
||||
}
|
||||
actions.push('<a href="${ctx}/app/appUpgrade/delete?id='+row.id+'" class="btnList" title="${text("删除版本")}" data-confirm="${text("确认要删除该版本吗?")}"><i class="fa fa-trash-o"></i></a> ');
|
||||
//<% } %>
|
||||
return actions.join('');
|
||||
}}
|
||||
],
|
||||
// 加载成功后执行事件
|
||||
ajaxSuccess: function(data){
|
||||
|
||||
}
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user