generated from root/miduo_server
删除扶持记录
parent
8ceca7193a
commit
940ad7e436
|
|
@ -37,21 +37,28 @@ public class GmController {
|
||||||
private UserInfoDao userInfoDao;
|
private UserInfoDao userInfoDao;
|
||||||
@Resource
|
@Resource
|
||||||
private BanFuctionDao banFuctionDao;
|
private BanFuctionDao banFuctionDao;
|
||||||
|
@Resource
|
||||||
|
private SupportController supportController;
|
||||||
|
|
||||||
@RequestMapping(value = "/sendGm", method = {RequestMethod.POST, RequestMethod.GET})
|
@RequestMapping(value = "/sendGm", method = {RequestMethod.POST, RequestMethod.GET})
|
||||||
public @ResponseBody
|
public @ResponseBody
|
||||||
int publishNotice(HttpServletRequest request) throws Exception {
|
int publishNotice(HttpServletRequest request) throws Exception {
|
||||||
List<ServerInfo> allServerInfo = serverInfoDao.getAllServerInfo();
|
List<ServerInfo> allServerInfo = serverInfoDao.getAllServerInfo();
|
||||||
List<String> serverList = new ArrayList<>();
|
List<String> serverList = new ArrayList<>();
|
||||||
|
allServerInfo.forEach(v->serverList.add(v.getServer_id()));
|
||||||
for (ServerInfo serverInfo : allServerInfo) {
|
|
||||||
serverList.add(serverInfo.getServer_id());
|
|
||||||
}
|
|
||||||
|
|
||||||
String cmd = request.getParameter("content");
|
String cmd = request.getParameter("content");
|
||||||
|
// 订单返利
|
||||||
if(cmd.equals("recharge")){
|
if(cmd.equals("recharge")){
|
||||||
recharge();
|
recharge();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
// 扶持删除条目
|
||||||
|
if (cmd.contains("support#remove#")){
|
||||||
|
String[] split = cmd.split("#");
|
||||||
|
supportController.removeSupportOrderById(Integer.parseInt(split[2]));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
String serverId = request.getParameter("serverId");
|
String serverId = request.getParameter("serverId");
|
||||||
String[] split = serverId.split(",");
|
String[] split = serverId.split(",");
|
||||||
for (String str : split) {
|
for (String str : split) {
|
||||||
|
|
|
||||||
|
|
@ -467,4 +467,13 @@ public class SupportController {
|
||||||
}
|
}
|
||||||
return num;
|
return num;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除扶持记录
|
||||||
|
* @param id
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public void removeSupportOrderById(int id) throws Exception {
|
||||||
|
supportOrderDao.removeSupportOrder(id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,13 @@ public interface SupportOrderDao {
|
||||||
*/
|
*/
|
||||||
void updateSupportOrderStatus(int id,int status,String auditor) throws Exception;
|
void updateSupportOrderStatus(int id,int status,String auditor) throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改订单信息和审核人
|
||||||
|
* @param id
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
void removeSupportOrder(int id) throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据申请人修改订单状态
|
* 根据申请人修改订单状态
|
||||||
* @param proposer
|
* @param proposer
|
||||||
|
|
|
||||||
|
|
@ -26,14 +26,20 @@ public class SupportOrderDaoImpl implements SupportOrderDao {
|
||||||
public List<SupportOrder> getSupportOrderList() throws Exception {
|
public List<SupportOrder> getSupportOrderList() throws Exception {
|
||||||
MongoTemplate mongoTemplate = connect.getMongoTemplete(Constant.dbName);
|
MongoTemplate mongoTemplate = connect.getMongoTemplete(Constant.dbName);
|
||||||
Query query = new Query();
|
Query query = new Query();
|
||||||
return mongoTemplate.find(query, SupportOrder.class);
|
List<SupportOrder> orders = mongoTemplate.find(query, SupportOrder.class);
|
||||||
|
orders.removeIf(v->v.getIsDelete() == 1);
|
||||||
|
return orders;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SupportOrder getSupportOrder(int id) throws Exception {
|
public SupportOrder getSupportOrder(int id) throws Exception {
|
||||||
MongoTemplate mongoTemplate = connect.getMongoTemplete(Constant.dbName);
|
MongoTemplate mongoTemplate = connect.getMongoTemplete(Constant.dbName);
|
||||||
Query query = new Query(Criteria.where("_id").is(id));
|
Query query = new Query(Criteria.where("_id").is(id));
|
||||||
return mongoTemplate.findOne(query, SupportOrder.class);
|
SupportOrder order = mongoTemplate.findOne(query, SupportOrder.class);
|
||||||
|
if (order == null || order.getIsDelete() == 1){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return order;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -52,6 +58,15 @@ public class SupportOrderDaoImpl implements SupportOrderDao {
|
||||||
mongoTemplate.updateMulti(query, update, SupportOrder.class);
|
mongoTemplate.updateMulti(query, update, SupportOrder.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void removeSupportOrder(int id) throws Exception {
|
||||||
|
MongoTemplate mongoTemplate = connect.getMongoTemplete(Constant.dbName);
|
||||||
|
Query query = new Query(Criteria.where("_id").is(id));
|
||||||
|
Update update = new Update();
|
||||||
|
update.set("isDelete",1);
|
||||||
|
mongoTemplate.updateMulti(query, update, SupportOrder.class);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateSupportOrderStatusByProposer(String proposer, int status) throws Exception {
|
public void updateSupportOrderStatusByProposer(String proposer, int status) throws Exception {
|
||||||
MongoTemplate mongoTemplate = connect.getMongoTemplete(Constant.dbName);
|
MongoTemplate mongoTemplate = connect.getMongoTemplete(Constant.dbName);
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,12 @@ public class SupportOrder {
|
||||||
@Field(value = "createTime")
|
@Field(value = "createTime")
|
||||||
private String createTime;
|
private String createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否删除
|
||||||
|
*/
|
||||||
|
@Field(value = "isDelete")
|
||||||
|
private int isDelete;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 描述内容,不入库
|
* 描述内容,不入库
|
||||||
*/
|
*/
|
||||||
|
|
@ -188,6 +194,14 @@ public class SupportOrder {
|
||||||
this.userMessage = userMessage;
|
this.userMessage = userMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getIsDelete() {
|
||||||
|
return isDelete;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsDelete(int isDelete) {
|
||||||
|
this.isDelete = isDelete;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "SupportOrder{" +
|
return "SupportOrder{" +
|
||||||
|
|
|
||||||
|
|
@ -125,11 +125,19 @@
|
||||||
|
|
||||||
function sub() {
|
function sub() {
|
||||||
var content = $("input[name='content']").val();
|
var content = $("input[name='content']").val();
|
||||||
var serverId = $("#serverId").val().toString();
|
if (content == null || content === ""){
|
||||||
|
alert("发送内容不能为空");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var serverId = $("#serverId").val();
|
||||||
|
if (serverId == null || serverId === ""){
|
||||||
|
alert("服务器列表不能为空");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
data: {
|
data: {
|
||||||
"serverId": serverId,
|
"serverId": serverId.toString(),
|
||||||
"content": content
|
"content": content
|
||||||
},
|
},
|
||||||
url: "/sendGm",
|
url: "/sendGm",
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,9 @@
|
||||||
<i class="Hui-iconfont"></i> 首页
|
<i class="Hui-iconfont"></i> 首页
|
||||||
<span class="c-gray en">></span> 扶持功能
|
<span class="c-gray en">></span> 扶持功能
|
||||||
<span class="c-gray en">></span> 扶持进度查看
|
<span class="c-gray en">></span> 扶持进度查看
|
||||||
|
<a class="btn btn-success radius r" style="margin-top:3px;padding-bottom: 3px;" href="javascript:location.replace(location.href);" title="刷新">
|
||||||
|
<i class="Hui-iconfont"></i>
|
||||||
|
</a>
|
||||||
</nav>
|
</nav>
|
||||||
<div class="page-container" style="text-align: center">
|
<div class="page-container" style="text-align: center">
|
||||||
<h2><span style="color:red;">扶持进度查看</span></h2>
|
<h2><span style="color:red;">扶持进度查看</span></h2>
|
||||||
|
|
@ -32,7 +35,7 @@
|
||||||
<table class="table table-border table-bordered table-bg table-hover table-sort table-responsive">
|
<table class="table table-border table-bordered table-bg table-hover table-sort table-responsive">
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="text-c">
|
<tr class="text-c">
|
||||||
<!--<th width="25"><input type="checkbox" name="" value=""/></th>-->
|
<th width="20">ID</th>
|
||||||
<th width="100">申请日期</th>
|
<th width="100">申请日期</th>
|
||||||
<th width="500">描述</th>
|
<th width="500">描述</th>
|
||||||
<th width="100">进度</th>
|
<th width="100">进度</th>
|
||||||
|
|
@ -41,7 +44,7 @@
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr th:each="obj:${orderList}">
|
<tr th:each="obj:${orderList}">
|
||||||
<!--<td><input type="checkbox" value="" name=""/></td>-->
|
<td th:text="${obj.getId()}" style="text-align: center;"></td>
|
||||||
<td th:text="${obj.createTime}" style="text-align: center;"></td>
|
<td th:text="${obj.createTime}" style="text-align: center;"></td>
|
||||||
<td th:text="${obj.content}" style="text-align: center;"></td>
|
<td th:text="${obj.content}" style="text-align: center;"></td>
|
||||||
<th th:switch="${obj.status}" style="text-align: center;">
|
<th th:switch="${obj.status}" style="text-align: center;">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue