提交 35afd3b8 authored 作者: 吴德鹏's avatar 吴德鹏

新增是否强制更新

上级 84b45a2e
...@@ -33,6 +33,10 @@ public class TbCfVersionEntity implements Serializable { ...@@ -33,6 +33,10 @@ public class TbCfVersionEntity implements Serializable {
* 版本分类(0安卓,1苹果) * 版本分类(0安卓,1苹果)
*/ */
private Integer versionSort; private Integer versionSort;
private Integer status;
/** /**
* 设置:版本号Id * 设置:版本号Id
*/ */
...@@ -46,6 +50,7 @@ public class TbCfVersionEntity implements Serializable { ...@@ -46,6 +50,7 @@ public class TbCfVersionEntity implements Serializable {
public String getVersionId() { public String getVersionId() {
return versionId; return versionId;
} }
/** /**
* 设置:版本code * 设置:版本code
*/ */
...@@ -59,6 +64,7 @@ public class TbCfVersionEntity implements Serializable { ...@@ -59,6 +64,7 @@ public class TbCfVersionEntity implements Serializable {
public String getVersionCode() { public String getVersionCode() {
return versionCode; return versionCode;
} }
/** /**
* 设置:版本更新链接 * 设置:版本更新链接
*/ */
...@@ -72,6 +78,7 @@ public class TbCfVersionEntity implements Serializable { ...@@ -72,6 +78,7 @@ public class TbCfVersionEntity implements Serializable {
public String getVersionLike() { public String getVersionLike() {
return versionLike; return versionLike;
} }
/** /**
* 设置:版本更新内容 * 设置:版本更新内容
*/ */
...@@ -92,10 +99,19 @@ public class TbCfVersionEntity implements Serializable { ...@@ -92,10 +99,19 @@ public class TbCfVersionEntity implements Serializable {
public Integer getVersionSort() { public Integer getVersionSort() {
return versionSort; return versionSort;
} }
/** /**
* 设置: 版本分类(0安卓,1苹果) * 设置: 版本分类(0安卓,1苹果)
*/ */
public void setVersionSort(Integer versionSort) { public void setVersionSort(Integer versionSort) {
this.versionSort = versionSort; this.versionSort = versionSort;
} }
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
} }
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
<result property="versionLike" column="version_like"/> <result property="versionLike" column="version_like"/>
<result property="versionDetail" column="version_detail"/> <result property="versionDetail" column="version_detail"/>
<result property="versionSort" column="version_sort"/> <result property="versionSort" column="version_sort"/>
<result property="status" column="status"/>
</resultMap> </resultMap>
<select id="queryObject" resultType="com.platform.entity.TbCfVersionEntity"> <select id="queryObject" resultType="com.platform.entity.TbCfVersionEntity">
...@@ -17,7 +18,8 @@ ...@@ -17,7 +18,8 @@
`version_code`, `version_code`,
`version_like`, `version_like`,
`version_detail`, `version_detail`,
`version_sort` `version_sort`,
status
from tb_cf_version from tb_cf_version
where version_id = #{id} where version_id = #{id}
</select> </select>
...@@ -28,7 +30,8 @@ ...@@ -28,7 +30,8 @@
`version_code`, `version_code`,
`version_like`, `version_like`,
`version_detail`, `version_detail`,
`version_sort` `version_sort`,
status
from tb_cf_version from tb_cf_version
WHERE 1=1 WHERE 1=1
<if test="name != null and name.trim() != ''"> <if test="name != null and name.trim() != ''">
...@@ -61,22 +64,25 @@ ...@@ -61,22 +64,25 @@
`version_code`, `version_code`,
`version_like`, `version_like`,
`version_detail`, `version_detail`,
`version_sort`) `version_sort`,
status)
values( values(
#{versionId}, #{versionId},
#{versionCode}, #{versionCode},
#{versionLike}, #{versionLike},
#{versionDetail}, #{versionDetail},
#{versionSort}) #{versionSort},
#{status})
</insert> </insert>
<update id="update" parameterType="com.platform.entity.TbCfVersionEntity"> <update id="update" parameterType="com.platform.entity.TbCfVersionEntity">
update tb_cf_version update tb_cf_version
<set> <set>
<if test="versionCode != null">`version_code` = #{versionCode}, </if> <if test="versionCode != null">`version_code` = #{versionCode},</if>
<if test="versionSort != null">`version_sort` = #{versionSort}, </if> <if test="versionSort != null">`version_sort` = #{versionSort},</if>
<if test="versionLike != null">`version_like` = #{versionLike}, </if> <if test="versionLike != null">`version_like` = #{versionLike},</if>
<if test="versionDetail != null">`version_detail` = #{versionDetail}</if> <if test="versionDetail != null">`version_detail` = #{versionDetail},</if>
<if test="status != null">`status` = #{status}</if>
</set> </set>
where version_id = #{versionId} where version_id = #{versionId}
</update> </update>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#jdbc.password=diaoyun666 #jdbc.password=diaoyun666
jdbc.url: jdbc:mysql://159.138.48.71:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false jdbc.url: jdbc:mysql://159.138.48.71:3306/test?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false
jdbc.username: root jdbc.username: root
jdbc.password: Diaoyunnuli.8 jdbc.password: Diaoyunnuli.8
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#jdbc.password=diaoyun666 #jdbc.password=diaoyun666
jdbc.url: jdbc:mysql://159.138.48.71:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false jdbc.url: jdbc:mysql://159.138.48.71:3306/test?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false
jdbc.username: root jdbc.username: root
jdbc.password: Diaoyunnuli.8 jdbc.password: Diaoyunnuli.8
......
...@@ -4,9 +4,10 @@ ...@@ -4,9 +4,10 @@
<title></title> <title></title>
#parse("sys/header.html") #parse("sys/header.html")
<style> <style>
.ui-jqgrid .ui-jqgrid-bdiv{ .ui-jqgrid .ui-jqgrid-bdiv {
height:auto!important; height: auto !important;
} }
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td { .table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
border-top: 2px solid #e7eaec; border-top: 2px solid #e7eaec;
line-height: 1.38857; line-height: 1.38857;
...@@ -45,26 +46,47 @@ ...@@ -45,26 +46,47 @@
<Card v-show="!showList"> <Card v-show="!showList">
<p slot="title">{{title}}</p> <p slot="title">{{title}}</p>
<i-form ref="formValidate" :model="tbCfVersion" :rules="ruleValidate" :label-width="80"> <i-form ref="formValidate" :model="tbCfVersion" :rules="ruleValidate" :label-width="80">
<Form-item label="版本code" prop="versionCode"> <Form-item label="版本code" prop="versionCode" style="width:800px">
<i-input v-model="tbCfVersion.versionCode" placeholder="版本code"/> <i-input v-model="tbCfVersion.versionCode" placeholder="版本code"/>
</Form-item> </Form-item>
<Form-item label="版本分类" prop="versionSort"> <!-- <Form-item label="版本分类" prop="versionSort" style="width:800px">
<i-select placeholder="版本分类" v-model="tbCfVersion.versionSort"> <i-select placeholder="版本分类" v-model="tbCfVersion.versionSort">
<i-option value="0">安卓</i-option> <i-option value="0">安卓</i-option>
<i-option value="1">苹果</i-option> <i-option value="1">苹果</i-option>
</i-select> </i-select>
</Form-item> </Form-item>
<Form-item label="版本更新链接" prop="versionLike"> <Form-item label="是否强制更新" prop="status" style="width:800px">
<i-select placeholder="是否强制更新" v-model="tbCfVersion.status">
<i-option value="1">是</i-option>
<i-option value="0">否</i-option>
</i-select>
</Form-item>-->
<Form-item label="版本分类" prop="versionSort" style="width:800px">
<i-select placeholder="请选择" v-model="tbCfVersion.versionSort">
<i-option v-for=" e in versionList"
:value="e.value">{{e.label}}
</i-option>
</i-select>
</Form-item>
<Form-item label="是否强制更新" prop="status" style="width:800px">
<i-select placeholder="请选择" v-model="tbCfVersion.status">
<i-option v-for=" e in statusList"
:value="e.value">{{e.label}}
</i-option>
</i-select>
</Form-item>
<Form-item label="版本更新链接" prop="versionLike" style="width:800px">
<i-input v-model="tbCfVersion.versionLike" placeholder="版本更新链接"/> <i-input v-model="tbCfVersion.versionLike" placeholder="版本更新链接"/>
</Form-item> </Form-item>
<Form-item label="版本更新内容" prop="versionDetail"> <Form-item label="版本更新内容" prop="versionDetail" style="width:800px">
<!-- <script id="Detail" name="tbCfVersion.versionDetail"type="text/plain">${pd.COLLSORT_DETAILS}</script>--> <!-- <script id="Detail" name="tbCfVersion.versionDetail"type="text/plain">${pd.COLLSORT_DETAILS}</script>-->
<textarea id="Detail" style="width: 800px;height: 600px;"></textarea> <textarea id="Detail" style="width: 800px;height: 600px;"></textarea>
</Form-item> </Form-item>
<Form-item> <Form-item>
<i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button> <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
<i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button> <i-button type="warning" @click="reload" style="margin-left: 8px"/>
返回</i-button>
<i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button> <i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
</Form-item> </Form-item>
</i-form> </i-form>
...@@ -75,10 +97,10 @@ ...@@ -75,10 +97,10 @@
<script type="text/javascript"> <script type="text/javascript">
var content = UE.getEditor('Detail'); var content = UE.getEditor('Detail');
UE.Editor.prototype._bkGetActionUrl = UE.Editor.prototype.getActionUrl; UE.Editor.prototype._bkGetActionUrl = UE.Editor.prototype.getActionUrl;
UE.Editor.prototype.getActionUrl = function(action){ UE.Editor.prototype.getActionUrl = function (action) {
if(action == 'uploadimage' || action == 'uploadscrawl' || action == 'uploadimage'){ if (action == 'uploadimage' || action == 'uploadscrawl' || action == 'uploadimage') {
return '${rc.contextPath}/api/osstest/uploaditemimage'; return '${rc.contextPath}/api/osstest/uploaditemimage';
}else{ } else {
return this._bkGetActionUrl.call(this, action); return this._bkGetActionUrl.call(this, action);
} }
}; };
......
...@@ -6,11 +6,12 @@ $(function () { ...@@ -6,11 +6,12 @@ $(function () {
{label: '版本code', name: 'versionCode', index: 'version_code', width: 80}, {label: '版本code', name: 'versionCode', index: 'version_code', width: 80},
{label: '版本更新链接', name: 'versionLike', index: 'version_like', width: 80}, {label: '版本更新链接', name: 'versionLike', index: 'version_like', width: 80},
{label: '版本更新内容', name: 'versionDetail', index: 'version_detail', width: 80}, {label: '版本更新内容', name: 'versionDetail', index: 'version_detail', width: 80},
{label: '版本分类', name: 'versionSort', index: 'version_sort', width: 80,formatter:sortFormat}], {label: '版本分类', name: 'versionSort', index: 'version_sort', width: 80, formatter: sortFormat},
{label: '是否强制更新', name: 'status', index: 'status', width: 80, formatter: yesOrNoFormat},],
shrinkToFit: true, shrinkToFit: true,
datatype : "json", datatype: "json",
rowNum:15, rowNum: 15,
rowList:[15,30,45], rowList: [15, 30, 45],
mtype: "POST", mtype: "POST",
rownumbers: true, rownumbers: true,
rownumWidth: 40, rownumWidth: 40,
...@@ -27,6 +28,26 @@ let vm = new Vue({ ...@@ -27,6 +28,26 @@ let vm = new Vue({
data: { data: {
showList: true, showList: true,
title: null, title: null,
statusList: [
{
value: 1,
label: '是'
},
{
value: 0,
label: '否'
}
],
versionList: [
{
value: 1,
label: 'ios'
},
{
value: 0,
label: 'android'
}
],
tbCfVersion: {}, tbCfVersion: {},
ruleValidate: { ruleValidate: {
name: [ name: [
...@@ -48,7 +69,9 @@ let vm = new Vue({ ...@@ -48,7 +69,9 @@ let vm = new Vue({
UE.getEditor('Detail').setContent(""); // 富文本赋值 UE.getEditor('Detail').setContent(""); // 富文本赋值
}, },
update: function (event) { update: function (event) {
let versionId = getSelectedRow("#jqGrid"); let versionId = getSelectedRow("#jqGrid");
if (versionId == null) { if (versionId == null) {
return; return;
} }
...@@ -75,7 +98,7 @@ let vm = new Vue({ ...@@ -75,7 +98,7 @@ let vm = new Vue({
}, },
del: function (event) { del: function (event) {
let versionIds = getSelectedRows("#jqGrid"); let versionIds = getSelectedRows("#jqGrid");
if (versionIds == null){ if (versionIds == null) {
return; return;
} }
...@@ -93,9 +116,9 @@ let vm = new Vue({ ...@@ -93,9 +116,9 @@ let vm = new Vue({
}); });
}); });
}, },
getInfo: function(versionId){ getInfo: function (versionId) {
Ajax.request({ Ajax.request({
url: "../tbcfversion/info/"+versionId, url: "../tbcfversion/info/" + versionId,
async: false, async: false,
successCallback: function (r) { successCallback: function (r) {
vm.tbCfVersion = r.tbCfVersion; vm.tbCfVersion = r.tbCfVersion;
...@@ -114,7 +137,7 @@ let vm = new Vue({ ...@@ -114,7 +137,7 @@ let vm = new Vue({
}).trigger("reloadGrid"); }).trigger("reloadGrid");
vm.handleReset('formValidate'); vm.handleReset('formValidate');
}, },
reloadSearch: function() { reloadSearch: function () {
vm.q = { vm.q = {
name: '' name: ''
}; };
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论