update
This commit is contained in:
parent
25f9f043d9
commit
c3c3f46073
|
@ -61,6 +61,7 @@ public class ApiVoterSuggestDbController extends ApiBaseController {
|
|||
public void voterSuggestDbListAll(@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
QueryWrapper<VoterSuggestDb> qw = new QueryWrapper<>();
|
||||
qw.eq("is_show","1");
|
||||
qw.orderByDesc("created_at");
|
||||
IPage<VoterSuggestDb> paged = voterSuggestDbService.page(new Page<>(pageNo, pageSize), qw);
|
||||
render(Ret.ok().paged(VoterSuggestDbWrapper.build().pageVO(paged)));
|
||||
|
|
|
@ -8,7 +8,6 @@ import lombok.Data;
|
|||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 选民对代表的建议、联系代表(VoterSuggest)实体类
|
||||
|
@ -69,4 +68,9 @@ public class VoterSuggestDb extends BaseEntity {
|
|||
*/
|
||||
@ApiModelProperty(value = "1已读 0未读")
|
||||
private Integer isRead;
|
||||
/**
|
||||
* 1是 0否
|
||||
*/
|
||||
@ApiModelProperty(value = "是否显示")
|
||||
private String isShow;
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
package com.ydool.boot.modules.rddb.web;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
@ -61,9 +62,10 @@ public class VoterSuggestDbController extends BaseController {
|
|||
|
||||
@PreAuth("rddb:voter_suggest_db:save")
|
||||
@PostMapping("/save")
|
||||
public void save(@Validated VoterSuggestDbVO vo) {
|
||||
vo.setStatus("0");
|
||||
vo.setIsRead(0);
|
||||
public void save(@Validated VoterSuggestDb vo) {
|
||||
if(StrUtil.isBlank(vo.getStatus())) vo.setStatus("0");
|
||||
if(StrUtil.isBlank(vo.getIsShow())) vo.setIsShow("0");
|
||||
if(vo.getIsRead()==null) vo.setIsRead(0);
|
||||
boolean flag = voterSuggestDbService.saveOrUpdate(vo);
|
||||
renderJson(flag ? Ret.ok() : Ret.fail("操作失败"));
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@ package com.ydool.boot.modules.rddb.wrapper;
|
|||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.ydool.boot.common.cache.StreetUtils;
|
||||
import com.ydool.boot.common.utils.SpringUtils;
|
||||
import com.ydool.boot.core.wrapper.BaseWrapper;
|
||||
import com.ydool.boot.modules.rddb.entity.Db;
|
||||
|
@ -26,7 +25,7 @@ public class VoterSuggestDbWrapper extends BaseWrapper<VoterSuggestDb, VoterSugg
|
|||
@Override
|
||||
public VoterSuggestDbVO entityVO(VoterSuggestDb voterSuggestDb) {
|
||||
VoterSuggestDbVO vo = BeanUtil.copyProperties(voterSuggestDb, VoterSuggestDbVO.class);
|
||||
vo.setDbRegion(StreetUtils.getStreetName(vo.getDbRegion()));
|
||||
// vo.setDbRegion(StreetUtils.getStreetName(vo.getDbRegion()));
|
||||
DbService dbService = SpringUtils.getBean(DbService.class);
|
||||
Db db = dbService.getById(vo.getDb());
|
||||
if (db != null) {
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
.van-loading--vertical[data-v-0e6e51f5]{height:100% min-height 2.5rem;justify-content:center}
|
|
@ -1 +0,0 @@
|
|||
.login-box[data-v-01727d28]{background-color:#fff}.login-wrapper[data-v-01727d28]{padding:2.13333rem .85333rem 0 .85333rem;z-index:50}.login-wrapper .title[data-v-01727d28]{font-size:.64rem;font-family:PingFang SC,PingFang SC-Bold;font-weight:700;color:#000;position:relative}.login-wrapper .title span[data-v-01727d28]{position:absolute;right:0;bottom:0;font-size:.42667rem;font-family:PingFang SC,PingFang SC-Regular;font-weight:400;color:#d03a29}.login-wrapper .account[data-v-01727d28]{padding-top:1.06667rem;margin-bottom:.85333rem}.login-wrapper .password[data-v-01727d28]{margin-bottom:1.06667rem}.login-wrapper .account .line[data-v-01727d28],.login-wrapper .password .line[data-v-01727d28]{height:.02667rem;background:#efefef}.login-wrapper .account p[data-v-01727d28],.login-wrapper .password p[data-v-01727d28]{font-size:.42667rem;font-family:PingFang SC,PingFang SC-Bold;font-weight:700;text-align:left;color:#000;padding-bottom:.34667rem}.login-wrapper .account .loginconter[data-v-01727d28],.login-wrapper .password .loginconter[data-v-01727d28]{display:flex;align-items:center;margin-bottom:.10667rem}.login-wrapper .account .loginconter .van-cell[data-v-01727d28],.login-wrapper .password .loginconter .van-cell[data-v-01727d28]{padding:0}.login-wrapper .account .loginconter .van-cell[data-v-01727d28]:after,.login-wrapper .password .loginconter .van-cell[data-v-01727d28]:after{display:none}.login-wrapper .account .loginconter input[data-v-01727d28],.login-wrapper .password .loginconter input[data-v-01727d28]{width:100%;outline:none;border:none;font-size:.37333rem;font-family:PingFang SC,PingFang SC-Bold;font-weight:700;text-align:left;color:#333}.login-wrapper .account .loginconter img[data-v-01727d28],.login-wrapper .password .loginconter img[data-v-01727d28]{width:.32rem;height:.32rem}.login-wrapper .remember[data-v-01727d28]{margin-bottom:1.06667rem;display:flex;justify-content:space-between;align-items:center}.login-wrapper .remember .label[data-v-01727d28]{font-size:.42667rem;color:#000;font-weight:700}.login-wrapper .btn[data-v-01727d28]{width:8.53333rem;height:1.06667rem;background:#d03a29;border-radius:.53333rem;box-shadow:0 .08rem .16rem 0 rgba(208,58,41,.2);line-height:1.06667rem;font-size:.37333rem;text-align:center;font-family:PingFang SC,PingFang SC-Bold;font-weight:700;color:#fff;letter-spacing:.02667rem}.login-box[data-v-01727d28]{position:relative;display:flex;flex-direction:column;height:100%}.footerbg[data-v-01727d28]{width:100%;z-index:30;position:absolute;bottom:0}.footerbg img[data-v-01727d28]{display:block;width:100%}
|
|
@ -1 +0,0 @@
|
|||
.van-loading--vertical[data-v-8bd2ea46]{height:100% min-height 2.5rem;justify-content:center}
|
|
@ -0,0 +1 @@
|
|||
.login-box[data-v-faa13ab0]{background-color:#fff}.login-wrapper[data-v-faa13ab0]{padding:2.13333rem .85333rem 0 .85333rem;z-index:50}.login-wrapper .title[data-v-faa13ab0]{font-size:.64rem;font-family:PingFang SC,PingFang SC-Bold;font-weight:700;color:#000;position:relative}.login-wrapper .title span[data-v-faa13ab0]{position:absolute;right:0;bottom:0;font-size:.42667rem;font-family:PingFang SC,PingFang SC-Regular;font-weight:400;color:#d03a29}.login-wrapper .account[data-v-faa13ab0]{padding-top:1.06667rem;margin-bottom:.85333rem}.login-wrapper .password[data-v-faa13ab0]{margin-bottom:1.06667rem}.login-wrapper .account .line[data-v-faa13ab0],.login-wrapper .password .line[data-v-faa13ab0]{height:.02667rem;background:#efefef}.login-wrapper .account p[data-v-faa13ab0],.login-wrapper .password p[data-v-faa13ab0]{font-size:.42667rem;font-family:PingFang SC,PingFang SC-Bold;font-weight:700;text-align:left;color:#000;padding-bottom:.34667rem}.login-wrapper .account .loginconter[data-v-faa13ab0],.login-wrapper .password .loginconter[data-v-faa13ab0]{display:flex;align-items:center;margin-bottom:.10667rem}.login-wrapper .account .loginconter .van-cell[data-v-faa13ab0],.login-wrapper .password .loginconter .van-cell[data-v-faa13ab0]{padding:0}.login-wrapper .account .loginconter .van-cell[data-v-faa13ab0]:after,.login-wrapper .password .loginconter .van-cell[data-v-faa13ab0]:after{display:none}.login-wrapper .account .loginconter input[data-v-faa13ab0],.login-wrapper .password .loginconter input[data-v-faa13ab0]{width:100%;outline:none;border:none;font-size:.37333rem;font-family:PingFang SC,PingFang SC-Bold;font-weight:700;text-align:left;color:#333}.login-wrapper .account .loginconter img[data-v-faa13ab0],.login-wrapper .password .loginconter img[data-v-faa13ab0]{width:.32rem;height:.32rem}.login-wrapper .remember[data-v-faa13ab0]{margin-bottom:1.06667rem;display:flex;justify-content:space-between;align-items:center}.login-wrapper .remember .label[data-v-faa13ab0]{font-size:.42667rem;color:#000;font-weight:700}.login-wrapper .btn[data-v-faa13ab0]{width:8.53333rem;height:1.06667rem;background:#d03a29;border-radius:.53333rem;box-shadow:0 .08rem .16rem 0 rgba(208,58,41,.2);line-height:1.06667rem;font-size:.37333rem;text-align:center;font-family:PingFang SC,PingFang SC-Bold;font-weight:700;color:#fff;letter-spacing:.02667rem}.login-box[data-v-faa13ab0]{position:relative;display:flex;flex-direction:column;height:100%}.footerbg[data-v-faa13ab0]{width:100%;z-index:30;position:absolute;bottom:0}.footerbg img[data-v-faa13ab0]{display:block;width:100%}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -11,12 +11,13 @@
|
|||
<act:form id="inputForm" model="${bean!}" action="${ctx}/rddb/voter_suggest_db/save" remote="true" result="updateResult">
|
||||
<input type="hidden" name="id" value="${bean.id!}">
|
||||
<div class="box-body">
|
||||
<act:title title="" fields="6"/>
|
||||
<act:title title="" fields="7"/>
|
||||
<act:input text="选民姓名" name="voterName" required="true" col="2"/>
|
||||
<act:input text="代表地区" name="dbRegion" required="true"/>
|
||||
<act:input text="代表地区" name="dbRegion" required="true" col="2"/>
|
||||
<act:input text="代表姓名" name="db" required="true" col="2"/>
|
||||
<act:input text="建议内容" name="suggestContent" as="textarea" required="true" col="2"/>
|
||||
<act:input text="是否回复" as="bool" name="status" required="true" col="2"/>
|
||||
<act:input text="是否显示" as="bool" name="isShow" required="true" col="2"/>
|
||||
<act:input text="回复内容" name="replyContent" as="textarea" required="true" col="2"/>
|
||||
<!-- <act:input text="图片" name="photo" as="file"/>-->
|
||||
</div>
|
||||
|
@ -24,11 +25,9 @@
|
|||
<div class="box-footer">
|
||||
<div class="row">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<% if(hasAuth('rddb:voter_suggest_db:save')) { %>
|
||||
<!-- <button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i>-->
|
||||
<!-- 保 存-->
|
||||
<!-- </button> -->
|
||||
<% } %>
|
||||
<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i>
|
||||
保 存
|
||||
</button>
|
||||
<button type="button" class="btn btn-sm btn-default" id="btnCancel"
|
||||
onclick="act.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> 关 闭
|
||||
</button>
|
||||
|
|
|
@ -53,6 +53,17 @@
|
|||
if (val === "1") return "是";
|
||||
}
|
||||
},
|
||||
{
|
||||
header: '是否显示',
|
||||
name: 'isShow',
|
||||
sortable: false,
|
||||
width: 100,
|
||||
align: "center",
|
||||
formatter: function (val, obj, row, act) {
|
||||
if (val === "0") return "否";
|
||||
if (val === "1") return "是";
|
||||
}
|
||||
},
|
||||
{header: '回复内容', name: 'replyContent', sortable: false, width: 100, align: "center"},
|
||||
// {
|
||||
// header: '图片',
|
||||
|
|
Loading…
Reference in New Issue