generated from root/miduo_server
邮件审核
parent
b39158fe67
commit
4b0be8a6a7
|
|
@ -73,6 +73,7 @@ public class LoginController {
|
||||||
powersVo.setAdminList(0);
|
powersVo.setAdminList(0);
|
||||||
powersVo.setShopItemFlow(0);
|
powersVo.setShopItemFlow(0);
|
||||||
powersVo.setQuestion(0);
|
powersVo.setQuestion(0);
|
||||||
|
powersVo.setCheck(0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (Integer str : powerList) {
|
for (Integer str : powerList) {
|
||||||
|
|
@ -112,6 +113,8 @@ public class LoginController {
|
||||||
break;
|
break;
|
||||||
case 12:
|
case 12:
|
||||||
powersVo.setQuestion(0);
|
powersVo.setQuestion(0);
|
||||||
|
case 13:
|
||||||
|
powersVo.setCheck(0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -209,6 +212,12 @@ public class LoginController {
|
||||||
case 10:
|
case 10:
|
||||||
powers = "用户管理";
|
powers = "用户管理";
|
||||||
break;
|
break;
|
||||||
|
case 12:
|
||||||
|
powers = "问卷";
|
||||||
|
break;
|
||||||
|
case 13:
|
||||||
|
powers = "审核";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (power.length() == 0) {
|
if (power.length() == 0) {
|
||||||
power = new StringBuilder(powers);
|
power = new StringBuilder(powers);
|
||||||
|
|
|
||||||
|
|
@ -1,33 +1,223 @@
|
||||||
package com.jmfy.controller;
|
package com.jmfy.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.jmfy.WebSecurityConfig;
|
||||||
import com.jmfy.dao.MailDao;
|
import com.jmfy.dao.MailDao;
|
||||||
import com.jmfy.model.PersonalMail;
|
import com.jmfy.model.PersonalMail;
|
||||||
|
import com.jmfy.model.SCdkInfo;
|
||||||
import com.jmfy.model.ServerMail;
|
import com.jmfy.model.ServerMail;
|
||||||
|
import com.jmfy.model.vo.CDKInfoVo;
|
||||||
|
import com.jmfy.model.vo.ServerMailVo;
|
||||||
|
import com.jmfy.model.vo.ServerPMailVo;
|
||||||
|
import com.jmfy.utils.JsonUtil;
|
||||||
|
import com.jmfy.utils.SeqUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.ui.ModelMap;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpSession;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
public class MailController {
|
public class MailController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
public MailDao mailDao;
|
public MailDao mailDao;
|
||||||
|
@Resource
|
||||||
|
private SeqUtils seqUtils;
|
||||||
|
|
||||||
|
private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
|
||||||
|
|
||||||
|
@RequestMapping(value = "/deleteSysMailCheck", method = {RequestMethod.POST, RequestMethod.GET})
|
||||||
@PostMapping(value = "/sendSysMail")
|
|
||||||
public @ResponseBody
|
public @ResponseBody
|
||||||
int sendSysMail(@RequestBody ServerMail mail) throws Exception {
|
int removeSysMail(HttpServletRequest request) throws Exception {
|
||||||
|
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
|
||||||
|
String id = parameterMap.get("mailId");
|
||||||
|
if(null ==id){
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
mailDao.removeSysMail(Integer.valueOf(id));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@RequestMapping(value = "/deletePMailCheck", method = {RequestMethod.POST, RequestMethod.GET})
|
||||||
|
public @ResponseBody
|
||||||
|
int removePMail(HttpServletRequest request) throws Exception {
|
||||||
|
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
|
||||||
|
String id = parameterMap.get("mailId");
|
||||||
|
if(null ==id){
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
mailDao.removePMail(Integer.valueOf(id));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/refuseSysMailCheck", method = {RequestMethod.POST, RequestMethod.GET})
|
||||||
|
public @ResponseBody
|
||||||
|
int refuseSysMailCheck(HttpServletRequest request) throws Exception {
|
||||||
|
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
|
||||||
|
String id = parameterMap.get("mailId");
|
||||||
|
if(null ==id){
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
ServerMail mail = mailDao.findSysMailId(Integer.valueOf(id));
|
||||||
|
if(mail.getState()!=0){
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
mailDao.refreshSysMail(Integer.valueOf(id),1);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/refusePMailCheck", method = {RequestMethod.POST, RequestMethod.GET})
|
||||||
|
public @ResponseBody
|
||||||
|
int refusePMailCheck(HttpServletRequest request) throws Exception {
|
||||||
|
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
|
||||||
|
String id = parameterMap.get("mailId");
|
||||||
|
if(null ==id){
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
PersonalMail mail = mailDao.findPersonalMailId(Integer.valueOf(id));
|
||||||
|
if(mail.getState()!=0){
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
mailDao.refreshPMail(Integer.valueOf(id),1);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@RequestMapping(value = "/toSendSysMail", method = {RequestMethod.POST, RequestMethod.GET})
|
||||||
|
public @ResponseBody
|
||||||
|
int sendSysMail(HttpServletRequest request) throws Exception {
|
||||||
|
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
|
||||||
|
String id = parameterMap.get("mailId");
|
||||||
|
if(null ==id){
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
ServerMail mail = mailDao.findSysMailId(Integer.valueOf(id));
|
||||||
|
if(mail.getState()!=0){
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
mailDao.refreshSysMail(Integer.valueOf(id),2);
|
||||||
mailDao.sendSysMail(mail);
|
mailDao.sendSysMail(mail);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@PostMapping(value = "/sendPersonalMail")
|
@PostMapping(value = "/tosendPersonalMail")
|
||||||
public @ResponseBody
|
public @ResponseBody
|
||||||
int sendPersonalMail(@RequestBody PersonalMail mail){
|
int sendPersonalMail(HttpServletRequest request)throws Exception{
|
||||||
|
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
|
||||||
|
String id = parameterMap.get("mailId");
|
||||||
|
if(null ==id){
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
PersonalMail mail = mailDao.findPersonalMailId(Integer.valueOf(id));
|
||||||
|
if(mail.getState()!=0){
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
mailDao.refreshPMail(Integer.valueOf(id),2);
|
||||||
mailDao.sendPersonalMail(mail);
|
mailDao.sendPersonalMail(mail);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping(value = "/sendSysMailWithBack")
|
||||||
|
public @ResponseBody
|
||||||
|
int sendSysMailWithBack(@RequestBody ServerMail mail,HttpSession session) throws Exception{
|
||||||
|
String useName = (String) session.getAttribute(WebSecurityConfig.SESSION_KEY);
|
||||||
|
if(null!= useName){
|
||||||
|
mail.setCreateUser(useName);
|
||||||
|
}
|
||||||
|
mail.setCreateTime(sdf.format(new Date()));
|
||||||
|
mail.setId(seqUtils.getSequence("c_mail_id"));
|
||||||
|
mailDao.sendSysMailWithBack(mail);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
@PostMapping(value = "/sendPersonalMailWithBack")
|
||||||
|
public @ResponseBody
|
||||||
|
int sendPersonalMailWithBack(@RequestBody PersonalMail mail,HttpSession session)throws Exception{
|
||||||
|
String useName = (String) session.getAttribute(WebSecurityConfig.SESSION_KEY);
|
||||||
|
if(null!= useName){
|
||||||
|
mail.setCreateUser(useName);
|
||||||
|
}
|
||||||
|
mail.setCreateTime(sdf.format(new Date()));
|
||||||
|
mail.setId(seqUtils.getSequence("c_mail_id"));
|
||||||
|
mailDao.sendPersonalMailWithBack(mail);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@RequestMapping(value = "/sysMailCheck", method = {RequestMethod.POST, RequestMethod.GET})
|
||||||
|
public String sysMailCheck (HttpSession session, ModelMap map , HttpServletRequest request) throws Exception {
|
||||||
|
List<ServerMail> serverMails = mailDao.getSMailList();
|
||||||
|
List<ServerMailVo> sServerMailListVo = new ArrayList<>();
|
||||||
|
for (ServerMail serverMail :serverMails){
|
||||||
|
ServerMailVo serverMailVo = new ServerMailVo();
|
||||||
|
serverMailVo.setId(serverMail.getId());
|
||||||
|
serverMailVo.setServerId(serverMail.getServerId());
|
||||||
|
serverMailVo.setMailContent(serverMail.getMailContent());
|
||||||
|
serverMailVo.setMailTitle(serverMail.getMailTitle());
|
||||||
|
serverMailVo.setVersion(serverMail.getVersion());
|
||||||
|
serverMailVo.setCreateTime(serverMail.getCreateTime());
|
||||||
|
serverMailVo.setState(serverMail.getState());
|
||||||
|
serverMailVo.setCreateUser(serverMail.getCreateUser());
|
||||||
|
String[] itemIds =new String[serverMail.getItemIds().size()];
|
||||||
|
String[] itemNums = new String[serverMail.getItemNums().size()];
|
||||||
|
for (int i = 0; i < serverMail.getItemIds().size(); i++) {
|
||||||
|
itemIds[i]=String.valueOf(serverMail.getItemIds().get(i));
|
||||||
|
}
|
||||||
|
for (int i = 0; i < serverMail.getItemNums().size(); i++) {
|
||||||
|
itemNums[i]=String.valueOf(serverMail.getItemNums().get(i));
|
||||||
|
}
|
||||||
|
serverMailVo.setRewards(JsonUtil.getInstence().getReward(itemIds,itemNums));
|
||||||
|
sServerMailListVo.add(serverMailVo);
|
||||||
|
}
|
||||||
|
map.put("sServerMailListVo",sServerMailListVo);
|
||||||
|
return "sendSysMailCheck";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@RequestMapping(value = "/pMailCheck", method = {RequestMethod.POST, RequestMethod.GET})
|
||||||
|
public String pMailCheck (HttpSession session, ModelMap map , HttpServletRequest request) throws Exception {
|
||||||
|
List<PersonalMail> personalMail = mailDao.getPMailList();
|
||||||
|
|
||||||
|
List<ServerPMailVo> sServerMailListVo = new ArrayList<>();
|
||||||
|
for (PersonalMail serverMail :personalMail){
|
||||||
|
ServerPMailVo serverMailVo = new ServerPMailVo();
|
||||||
|
serverMailVo.setId(serverMail.getId());
|
||||||
|
serverMailVo.setUserId(serverMail.getUserId());
|
||||||
|
serverMailVo.setServerId(serverMail.getServerId());
|
||||||
|
serverMailVo.setMailContent(serverMail.getMailContent());
|
||||||
|
serverMailVo.setMailTitle(serverMail.getMailTitle());
|
||||||
|
serverMailVo.setVersion(serverMail.getVersion());
|
||||||
|
serverMailVo.setCreateTime(serverMail.getCreateTime());
|
||||||
|
serverMailVo.setState(serverMail.getState());
|
||||||
|
serverMailVo.setCreateUser(serverMail.getCreateUser());
|
||||||
|
String[] itemIds =new String[serverMail.getItemIds().size()];
|
||||||
|
String[] itemNums = new String[serverMail.getItemNums().size()];
|
||||||
|
for (int i = 0; i < serverMail.getItemIds().size(); i++) {
|
||||||
|
itemIds[i]=String.valueOf(serverMail.getItemIds().get(i));
|
||||||
|
}
|
||||||
|
for (int i = 0; i < serverMail.getItemNums().size(); i++) {
|
||||||
|
itemNums[i]=String.valueOf(serverMail.getItemNums().get(i));
|
||||||
|
}
|
||||||
|
serverMailVo.setRewards(JsonUtil.getInstence().getReward(itemIds,itemNums));
|
||||||
|
sServerMailListVo.add(serverMailVo);
|
||||||
|
}
|
||||||
|
map.put("sServerMailListVo",sServerMailListVo);
|
||||||
|
return "sendPMailCheck";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,28 @@ package com.jmfy.dao;
|
||||||
import com.jmfy.model.PersonalMail;
|
import com.jmfy.model.PersonalMail;
|
||||||
import com.jmfy.model.ServerMail;
|
import com.jmfy.model.ServerMail;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public interface MailDao {
|
public interface MailDao {
|
||||||
|
|
||||||
void sendSysMail(ServerMail mail) throws Exception;
|
void sendSysMail(ServerMail mail) throws Exception;
|
||||||
|
|
||||||
void sendPersonalMail(PersonalMail mail);
|
void sendPersonalMail(PersonalMail mail);
|
||||||
|
|
||||||
|
void sendSysMailWithBack(ServerMail mail) throws Exception;
|
||||||
|
|
||||||
|
void sendPersonalMailWithBack(PersonalMail mail) throws Exception;
|
||||||
|
|
||||||
|
List<ServerMail> getSMailList() throws Exception;
|
||||||
|
|
||||||
|
List<PersonalMail> getPMailList() throws Exception;
|
||||||
|
|
||||||
|
ServerMail findSysMailId(int id) throws Exception;
|
||||||
|
|
||||||
|
PersonalMail findPersonalMailId(int id) throws Exception;
|
||||||
|
|
||||||
|
void removeSysMail(int id) throws Exception;
|
||||||
|
void removePMail(int id) throws Exception;
|
||||||
|
void refreshSysMail(int id,int state) throws Exception;
|
||||||
|
void refreshPMail(int id,int state) throws Exception;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ import org.springframework.data.mongodb.core.query.Update;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
public class MailDaoImpl implements MailDao {
|
public class MailDaoImpl implements MailDao {
|
||||||
|
|
@ -66,4 +67,83 @@ public class MailDaoImpl implements MailDao {
|
||||||
RedisUtil.getInstence().putMapEntry(String.valueOf(mail.getServerId()),RedisUserKey.READY_TO_USER_MAIL+RedisUserKey.Delimiter_colon,uid[i],mailPersonalCache,240);
|
RedisUtil.getInstence().putMapEntry(String.valueOf(mail.getServerId()),RedisUserKey.READY_TO_USER_MAIL+RedisUserKey.Delimiter_colon,uid[i],mailPersonalCache,240);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ServerMail> getSMailList() throws Exception {
|
||||||
|
MongoTemplate mongoTemplate = connect.getMongoTemplete(Constant.dbName);
|
||||||
|
Query query = new Query();
|
||||||
|
return mongoTemplate.find(query,ServerMail.class);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<PersonalMail> getPMailList() throws Exception {
|
||||||
|
MongoTemplate mongoTemplate = connect.getMongoTemplete(Constant.dbName);
|
||||||
|
Query query = new Query();
|
||||||
|
return mongoTemplate.find(query,PersonalMail.class);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void sendSysMailWithBack(ServerMail mail) throws Exception {
|
||||||
|
MongoTemplate mongoTemplate = connect.getMongoTemplete(Constant.dbName);
|
||||||
|
mongoTemplate.insert(mail);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void sendPersonalMailWithBack(PersonalMail mail)throws Exception {
|
||||||
|
MongoTemplate mongoTemplate = connect.getMongoTemplete(Constant.dbName);
|
||||||
|
mongoTemplate.insert(mail);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ServerMail findSysMailId(int id) throws Exception {
|
||||||
|
MongoTemplate mongoTemplate = connect.getMongoTemplete(Constant.dbName);
|
||||||
|
Query query = new Query();
|
||||||
|
query.addCriteria(Criteria.where("_id").is(id));
|
||||||
|
return mongoTemplate.findOne(query, ServerMail.class);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public PersonalMail findPersonalMailId(int id) throws Exception {
|
||||||
|
MongoTemplate mongoTemplate = connect.getMongoTemplete(Constant.dbName);
|
||||||
|
Query query = new Query();
|
||||||
|
query.addCriteria(Criteria.where("_id").is(id));
|
||||||
|
return mongoTemplate.findOne(query, PersonalMail.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void removeSysMail(int id) throws Exception {
|
||||||
|
MongoTemplate mongoTemplate = connect.getMongoTemplete(Constant.dbName);
|
||||||
|
Query query = new Query();
|
||||||
|
query.addCriteria(Criteria.where("_id").is(id));
|
||||||
|
mongoTemplate.remove(query, ServerMail.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void removePMail(int id) throws Exception {
|
||||||
|
MongoTemplate mongoTemplate = connect.getMongoTemplete(Constant.dbName);
|
||||||
|
Query query = new Query();
|
||||||
|
query.addCriteria(Criteria.where("_id").is(id));
|
||||||
|
mongoTemplate.remove(query, PersonalMail.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void refreshSysMail(int id,int state) throws Exception {
|
||||||
|
MongoTemplate mongoTemplate = connect.getMongoTemplete(Constant.dbName);
|
||||||
|
Query query = new Query(Criteria.where("_id").is(id));
|
||||||
|
Update update = new Update();
|
||||||
|
update.set("state",state);
|
||||||
|
mongoTemplate.updateMulti(query, update, ServerMail.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void refreshPMail(int id ,int state) throws Exception {
|
||||||
|
MongoTemplate mongoTemplate = connect.getMongoTemplete(Constant.dbName);
|
||||||
|
Query query = new Query(Criteria.where("_id").is(id));
|
||||||
|
Update update = new Update();
|
||||||
|
update.set("state",state);
|
||||||
|
mongoTemplate.updateMulti(query, update, PersonalMail.class);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,50 @@
|
||||||
package com.jmfy.model;
|
package com.jmfy.model;
|
||||||
|
|
||||||
public class PersonalMail extends ServerMail {
|
import org.springframework.data.annotation.Id;
|
||||||
|
import org.springframework.data.mongodb.core.mapping.Field;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class PersonalMail {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
private int id;
|
||||||
|
|
||||||
|
@Field(value = "serverId")
|
||||||
|
private int serverId;
|
||||||
|
|
||||||
|
@Field(value = "mailTitle")
|
||||||
|
private String mailTitle;
|
||||||
|
|
||||||
|
@Field(value = "mailContent")
|
||||||
|
private String mailContent;
|
||||||
|
|
||||||
|
@Field(value = "isAttach")
|
||||||
|
private int isAttach;
|
||||||
|
|
||||||
|
@Field(value = "itemIds")
|
||||||
|
private List<Integer> itemIds;
|
||||||
|
|
||||||
|
@Field(value = "itemNums")
|
||||||
|
private List<Integer> itemNums;
|
||||||
|
|
||||||
|
@Field(value = "sendTime")
|
||||||
|
private String sendTime;
|
||||||
|
|
||||||
|
@Field(value = "version")
|
||||||
|
private int version;
|
||||||
|
@Field(value = "userId")
|
||||||
public String userId;
|
public String userId;
|
||||||
|
|
||||||
|
@Field(value = "createtime")
|
||||||
|
private String createTime;
|
||||||
|
|
||||||
|
@Field(value = "state")
|
||||||
|
private int state;//0 1拒绝 2审核通过
|
||||||
|
@Field(value = "createUser")
|
||||||
|
private String createUser;//创建者
|
||||||
|
|
||||||
|
|
||||||
public String getUserId() {
|
public String getUserId() {
|
||||||
return userId;
|
return userId;
|
||||||
}
|
}
|
||||||
|
|
@ -10,4 +52,100 @@ public class PersonalMail extends ServerMail {
|
||||||
public void setUserId(String uid) {
|
public void setUserId(String uid) {
|
||||||
this.userId = uid;
|
this.userId = uid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(int id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getServerId() {
|
||||||
|
return serverId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setServerId(int serverId) {
|
||||||
|
this.serverId = serverId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMailTitle() {
|
||||||
|
return mailTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMailTitle(String mailTitle) {
|
||||||
|
this.mailTitle = mailTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMailContent() {
|
||||||
|
return mailContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMailContent(String mailContent) {
|
||||||
|
this.mailContent = mailContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getIsAttach() {
|
||||||
|
return isAttach;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsAttach(int isAttach) {
|
||||||
|
this.isAttach = isAttach;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Integer> getItemIds() {
|
||||||
|
return itemIds;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setItemIds(List<Integer> itemIds) {
|
||||||
|
this.itemIds = itemIds;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Integer> getItemNums() {
|
||||||
|
return itemNums;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setItemNums(List<Integer> itemNums) {
|
||||||
|
this.itemNums = itemNums;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSendTime() {
|
||||||
|
return sendTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSendTime(String sendTime) {
|
||||||
|
this.sendTime = sendTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getVersion() {
|
||||||
|
return version;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVersion(int version) {
|
||||||
|
this.version = version;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(String createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getState() {
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setState(int state) {
|
||||||
|
this.state = state;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreateUser() {
|
||||||
|
return createUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateUser(String createUser) {
|
||||||
|
this.createUser = createUser;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,25 +1,50 @@
|
||||||
package com.jmfy.model;
|
package com.jmfy.model;
|
||||||
|
|
||||||
|
import org.springframework.data.annotation.Id;
|
||||||
|
import org.springframework.data.mongodb.core.mapping.Document;
|
||||||
|
import org.springframework.data.mongodb.core.mapping.Field;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@Document(collection = "server_mail")
|
||||||
public class ServerMail {
|
public class ServerMail {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
private int id;
|
||||||
|
|
||||||
|
@Field(value = "serverId")
|
||||||
private int serverId;
|
private int serverId;
|
||||||
|
|
||||||
|
@Field(value = "mailTitle")
|
||||||
private String mailTitle;
|
private String mailTitle;
|
||||||
|
|
||||||
|
@Field(value = "mailContent")
|
||||||
private String mailContent;
|
private String mailContent;
|
||||||
|
|
||||||
|
@Field(value = "isAttach")
|
||||||
private int isAttach;
|
private int isAttach;
|
||||||
|
|
||||||
|
@Field(value = "itemIds")
|
||||||
private List<Integer> itemIds;
|
private List<Integer> itemIds;
|
||||||
|
|
||||||
|
@Field(value = "itemNums")
|
||||||
private List<Integer> itemNums;
|
private List<Integer> itemNums;
|
||||||
|
|
||||||
|
@Field(value = "sendTime")
|
||||||
private String sendTime;
|
private String sendTime;
|
||||||
|
|
||||||
|
@Field(value = "createtime")
|
||||||
|
private String createTime;
|
||||||
|
|
||||||
|
@Field(value = "version")
|
||||||
private int version;
|
private int version;
|
||||||
|
|
||||||
|
@Field(value = "state")
|
||||||
|
private int state;//0 -1拒绝 1 审核通过
|
||||||
|
|
||||||
|
@Field(value = "createUser")
|
||||||
|
private String createUser;//创建者
|
||||||
|
|
||||||
// "mailTitle": mailTitle,
|
// "mailTitle": mailTitle,
|
||||||
// "mailContent": mailContent,
|
// "mailContent": mailContent,
|
||||||
// "isAttach": isAttach,
|
// "isAttach": isAttach,
|
||||||
|
|
@ -101,4 +126,36 @@ public class ServerMail {
|
||||||
public void setVersion(int version) {
|
public void setVersion(int version) {
|
||||||
this.version = version;
|
this.version = version;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(String createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getState() {
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setState(int state) {
|
||||||
|
this.state = state;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(int id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreateUser() {
|
||||||
|
return createUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateUser(String createUser) {
|
||||||
|
this.createUser = createUser;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ public class PowersVo {
|
||||||
public int arenaInfo=1;
|
public int arenaInfo=1;
|
||||||
public int shopItemFlow =1;
|
public int shopItemFlow =1;
|
||||||
public int question =1;
|
public int question =1;
|
||||||
|
public int check =1;
|
||||||
public void setAdminList(int adminList) {
|
public void setAdminList(int adminList) {
|
||||||
this.adminList = adminList;
|
this.adminList = adminList;
|
||||||
}
|
}
|
||||||
|
|
@ -65,4 +66,12 @@ public class PowersVo {
|
||||||
public void setQuestion(int question) {
|
public void setQuestion(int question) {
|
||||||
this.question = question;
|
this.question = question;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getCheck() {
|
||||||
|
return check;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCheck(int check) {
|
||||||
|
this.check = check;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,94 @@
|
||||||
|
package com.jmfy.model.vo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class ServerMailVo {
|
||||||
|
|
||||||
|
private int id;
|
||||||
|
|
||||||
|
private int serverId;
|
||||||
|
|
||||||
|
private String mailTitle;
|
||||||
|
|
||||||
|
private String createTime;
|
||||||
|
private String mailContent;
|
||||||
|
private String rewards;
|
||||||
|
private int version;
|
||||||
|
private int state;
|
||||||
|
private String createUser;
|
||||||
|
|
||||||
|
public int getServerId() {
|
||||||
|
return serverId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setServerId(int serverId) {
|
||||||
|
this.serverId = serverId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMailTitle() {
|
||||||
|
return mailTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMailContent() {
|
||||||
|
return mailContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setMailTitle(String mailTitle) {
|
||||||
|
this.mailTitle = mailTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMailContent(String mailContent) {
|
||||||
|
this.mailContent = mailContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public int getVersion() {
|
||||||
|
return version;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRewards() {
|
||||||
|
return rewards;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVersion(int version) {
|
||||||
|
this.version = version;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRewards(String rewards) {
|
||||||
|
this.rewards = rewards;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(int id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(String createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getState() {
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setState(int state) {
|
||||||
|
this.state = state;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreateUser() {
|
||||||
|
return createUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateUser(String createUser) {
|
||||||
|
this.createUser = createUser;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,101 @@
|
||||||
|
package com.jmfy.model.vo;
|
||||||
|
|
||||||
|
public class ServerPMailVo {
|
||||||
|
|
||||||
|
private int id;
|
||||||
|
|
||||||
|
private int serverId;
|
||||||
|
private String userId;
|
||||||
|
|
||||||
|
private String mailTitle;
|
||||||
|
|
||||||
|
private String createTime;
|
||||||
|
private String mailContent;
|
||||||
|
private String rewards;
|
||||||
|
private int version;
|
||||||
|
private int state;
|
||||||
|
private String createUser;
|
||||||
|
|
||||||
|
public int getServerId() {
|
||||||
|
return serverId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setServerId(int serverId) {
|
||||||
|
this.serverId = serverId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMailTitle() {
|
||||||
|
return mailTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMailContent() {
|
||||||
|
return mailContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setMailTitle(String mailTitle) {
|
||||||
|
this.mailTitle = mailTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMailContent(String mailContent) {
|
||||||
|
this.mailContent = mailContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public int getVersion() {
|
||||||
|
return version;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRewards() {
|
||||||
|
return rewards;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVersion(int version) {
|
||||||
|
this.version = version;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRewards(String rewards) {
|
||||||
|
this.rewards = rewards;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(int id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(String createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getState() {
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setState(int state) {
|
||||||
|
this.state = state;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserId() {
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserId(String userId) {
|
||||||
|
this.userId = userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreateUser() {
|
||||||
|
return createUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateUser(String createUser) {
|
||||||
|
this.createUser = createUser;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -51,6 +51,12 @@ public class JsonUtil {
|
||||||
StringBuilder reward = new StringBuilder();
|
StringBuilder reward = new StringBuilder();
|
||||||
String[] itemIds = request.getParameterValues("itemIds[]");
|
String[] itemIds = request.getParameterValues("itemIds[]");
|
||||||
String[] itemNums = request.getParameterValues("itemNums[]");
|
String[] itemNums = request.getParameterValues("itemNums[]");
|
||||||
|
return getReward(itemIds,itemNums);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String getReward(String[] itemIds,String[] itemNums) {
|
||||||
|
StringBuilder reward = new StringBuilder();
|
||||||
|
|
||||||
if (itemIds.length ==0 || itemNums.length ==0 ){
|
if (itemIds.length ==0 || itemNums.length ==0 ){
|
||||||
return reward.toString();
|
return reward.toString();
|
||||||
|
|
@ -68,6 +74,7 @@ public class JsonUtil {
|
||||||
return reward.toString();
|
return reward.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static String getServiceKey(String serviceName, String host, String port) {
|
public static String getServiceKey(String serviceName, String host, String port) {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
return sb.append(serviceName).append("|")
|
return sb.append(serviceName).append("|")
|
||||||
|
|
|
||||||
|
|
@ -70,12 +70,15 @@
|
||||||
<label class="">
|
<label class="">
|
||||||
<input type="checkbox" value="1" name="power" id="user-Character-1-0-0"/>
|
<input type="checkbox" value="1" name="power" id="user-Character-1-0-0"/>
|
||||||
服务器管理</label>
|
服务器管理</label>
|
||||||
|
<label class="">
|
||||||
|
<input type="checkbox" value="3" name="power" id="user-Character-1-0-2"/>
|
||||||
|
序列號管理</label>
|
||||||
<label class="">
|
<label class="">
|
||||||
<input type="checkbox" value="6" name="power" id="user-Character-1-0-5"/>
|
<input type="checkbox" value="6" name="power" id="user-Character-1-0-5"/>
|
||||||
個人信息管理</label>
|
個人信息管理</label>
|
||||||
<label class="">
|
<label class="">
|
||||||
<input type="checkbox" value="3" name="power" id="user-Character-1-0-2"/>
|
<input type="checkbox" value="5" name="power" id="user-Character-1-0-6"/>
|
||||||
序列號管理</label>
|
Gm管理</label>
|
||||||
<label class="">
|
<label class="">
|
||||||
<input type="checkbox" value="4" name="power" id="user-Character-1-0-3"/>
|
<input type="checkbox" value="4" name="power" id="user-Character-1-0-3"/>
|
||||||
流水日誌管理</label>
|
流水日誌管理</label>
|
||||||
|
|
@ -83,14 +86,14 @@
|
||||||
<input type="checkbox" value="9" name="power" id="user-Character-1-0-8"/>
|
<input type="checkbox" value="9" name="power" id="user-Character-1-0-8"/>
|
||||||
封號/解封/禁言/解封</label>
|
封號/解封/禁言/解封</label>
|
||||||
<label class=""><br>
|
<label class=""><br>
|
||||||
<input type="checkbox" value="10" name="power" id="user-Character-1-0-9"/>
|
<input type="checkbox" value="10" name="power" id="user-Character-1-0-11"/>
|
||||||
用户管理</label>
|
用户管理</label>
|
||||||
<label class=""><br>
|
<label class=""><br>
|
||||||
<input type="checkbox" value="12" name="power" id="user-Character-1-0-9"/>
|
<input type="checkbox" value="12" name="power" id="user-Character-1-0-12"/>
|
||||||
问卷</label>
|
问卷</label>
|
||||||
<label class=""><br>
|
<label class=""><br>
|
||||||
<input type="checkbox" value="13" name="power" id="user-Character-1-0-9"/>
|
<input type="checkbox" value="13" name="power" id="user-Character-1-0-13"/>
|
||||||
公告</label>
|
审核</label>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</dd>
|
</dd>
|
||||||
|
|
|
||||||
|
|
@ -268,7 +268,7 @@
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
contentType:'application/json',
|
contentType:'application/json',
|
||||||
|
|
||||||
url: "/sendPersonalMail",
|
url: "/sendPersonalMailWithBack",
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
if (data == 0) {
|
if (data == 0) {
|
||||||
layer.msg('发送邮件成功!', {icon: 6, time: 1000});
|
layer.msg('发送邮件成功!', {icon: 6, time: 1000});
|
||||||
|
|
|
||||||
|
|
@ -264,7 +264,7 @@ function sendSysMail() {
|
||||||
"version": version
|
"version": version
|
||||||
})
|
})
|
||||||
,
|
,
|
||||||
url: "/sendSysMail",
|
url: "/sendSysMailWithBack",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
contentType:'application/json',
|
contentType:'application/json',
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@
|
||||||
</nav>
|
</nav>
|
||||||
<div class="page-container">
|
<div class="page-container">
|
||||||
|
|
||||||
<form class="form form-horizontal" id="form-article-add" action="/publishNotice" method="post" target="updataSYSQuest"
|
<form class="form form-horizontal" id="form-article-add" action="/publishNotice" method="post" target="updataSYSNotice"
|
||||||
onsubmit="return sendCheck()">
|
onsubmit="return sendCheck()">
|
||||||
<div class="row cl">
|
<div class="row cl">
|
||||||
<label class="form-label col-xs-4 col-sm-2">
|
<label class="form-label col-xs-4 col-sm-2">
|
||||||
|
|
@ -68,7 +68,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<iframe name='updataSYSQuest' id="updataSYSQuest" style='display: none'></iframe>
|
<iframe name='updataSYSNotice' id="updataSYSNotice" style='display: none'></iframe>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -95,7 +95,7 @@ $(function(){
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#updataSYSQuest').load(function () {
|
$('#updataSYSNotice').load(function () {
|
||||||
// 根据后台返回值处理结果
|
// 根据后台返回值处理结果
|
||||||
var text=$(this).contents().find("body").text();
|
var text=$(this).contents().find("body").text();
|
||||||
if (text != 0) {
|
if (text != 0) {
|
||||||
|
|
|
||||||
|
|
@ -107,6 +107,16 @@
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
<div th:case="1">
|
||||||
|
<dl id="menu-GM">
|
||||||
|
<dt><i class="Hui-iconfont"></i> GM管理<i class="Hui-iconfont menu_dropdown-arrow"></i></dt>
|
||||||
|
<dd>
|
||||||
|
<ul>
|
||||||
|
<li><a data-href="/html/sendPersonalMail.html" data-title="单人,多人邮件" href="javascript:;">单人,多人邮件</a></li>
|
||||||
|
</ul>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div th: th:switch="${powersVo.flowInfo}">
|
<div th: th:switch="${powersVo.flowInfo}">
|
||||||
<div th:case="0">
|
<div th:case="0">
|
||||||
|
|
@ -159,6 +169,19 @@
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div th: th:switch="${powersVo.check}">
|
||||||
|
<div th:case="0">
|
||||||
|
<dl id="menu-user">
|
||||||
|
<dt><i class="Hui-iconfont"></i> 审核<i class="Hui-iconfont menu_dropdown-arrow"></i></dt>
|
||||||
|
<dd>
|
||||||
|
<ul>
|
||||||
|
<li><a data-href="sysMailCheck" data-title="系统邮件审核" href="javascript:void(0)">系统邮件审核</a></li>
|
||||||
|
<li><a data-href="pMailCheck" data-title="个人邮件审核" href="javascript:void(0)">个人邮件审核</a></li>
|
||||||
|
</ul>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,172 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8"/>
|
||||||
|
<meta name="renderer" content="webkit|ie-comp|ie-stand"/>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
|
||||||
|
<meta name="viewport"
|
||||||
|
content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
|
||||||
|
<meta http-equiv="Cache-Control" content="no-siteapp"/>
|
||||||
|
<script type="text/javascript" src="lib/html5shiv.js"></script>
|
||||||
|
<script type="text/javascript" src="lib/respond.min.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
<link rel="stylesheet" type="text/css" href="h-ui/css/H-ui.min.css"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="h-ui.admin/css/H-ui.admin.css"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="lib/Hui-iconfont/1.0.8/iconfont.css"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="h-ui.admin/skin/default/skin.css" id="skin"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="h-ui.admin/css/style.css"/>
|
||||||
|
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js"></script>
|
||||||
|
<script>DD_belatedPNG.fix('*');</script>
|
||||||
|
<title>审核信息</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<nav class="breadcrumb">
|
||||||
|
<i class="Hui-iconfont"></i> 首页
|
||||||
|
<span class="c-gray en">></span> 审核信息 <span class="c-gray en">></span> 个人邮件审核
|
||||||
|
</nav>
|
||||||
|
<div class="page-container" style="text-align: center">
|
||||||
|
<h2><span style="color:red;">审核信息</span></h2>
|
||||||
|
<div class="text-c">
|
||||||
|
<div class="mt-20">
|
||||||
|
<table class="table table-border table-bordered table-bg table-hover table-sort table-responsive">
|
||||||
|
<thead>
|
||||||
|
<tr class="text-c">
|
||||||
|
<!--<th width="25"><input type="checkbox" name="" value=""/></th>-->
|
||||||
|
<th width="200">服务器id</th>
|
||||||
|
<th width="200">玩家id</th>
|
||||||
|
<th width="200">标题</th>
|
||||||
|
<th width="200">内容</th>
|
||||||
|
<th width="200">创建时间</th>
|
||||||
|
<th width="200">附件</th>
|
||||||
|
<th width="200">客户端版本号</th>
|
||||||
|
<th width="200">发件人</th>
|
||||||
|
<th width="200">状态</th>
|
||||||
|
<th width="200">操作</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr th:each="obj:${sServerMailListVo}">
|
||||||
|
<!--<td><input type="checkbox" value="" name=""/></td>-->
|
||||||
|
<td th:text="${obj.serverId}" style="text-align: center;"></td>
|
||||||
|
<td th:text="${obj.userId}" style="text-align: center;"></td>
|
||||||
|
<td th:text="${obj.mailTitle}" style="text-align: center;"></td>
|
||||||
|
<td th:text="${obj.mailContent}" style="text-align: center;"></td>
|
||||||
|
<td th:text="${obj.createTime}" style="text-align: center;"></td>
|
||||||
|
<td th:text="${obj.rewards}" style="text-align: center;"></td>
|
||||||
|
<td th:text="${obj.version}" style="text-align: center;"></td>
|
||||||
|
<td th:text="${obj.createUser}" style="text-align: center;"></td>
|
||||||
|
<th th:switch="${obj.state}" style="text-align: center;">
|
||||||
|
<span th:case="0" class="label label-defaunt radius">待审核</span>
|
||||||
|
<span th:case="1" class="Hui-iconfont" style="color: #8b0000">拒绝</span>
|
||||||
|
<span th:case="2" class="Hui-iconfont" style="color: #00B83F">通过</span>
|
||||||
|
</th>
|
||||||
|
<td style="text-align: center; width: 300px">
|
||||||
|
<button type="button" th:id="${obj.id}" class="btn btn-primary"
|
||||||
|
onclick="return deleteMail(this)"><i class="Hui-iconfont"></i> 删除
|
||||||
|
</button>
|
||||||
|
<button type="button" th:id="${obj.id}" class="btn btn-primary"
|
||||||
|
onclick="return refuseMail(this)"><i class="Hui-iconfont"></i> 拒绝
|
||||||
|
</button>
|
||||||
|
<button type="button" th:id="${obj.id}" class="btn btn-success" onclick="return sendMail(this)">
|
||||||
|
<i class="Hui-iconfont"></i> 确认并发送
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--_footer 作为公共模版分离出去-->
|
||||||
|
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
|
||||||
|
<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
|
||||||
|
<script type="text/javascript" src="h-ui/js/H-ui.min.js"></script>
|
||||||
|
<script type="text/javascript" src="h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->
|
||||||
|
|
||||||
|
<!--请在下方写此页面业务相关的脚本-->
|
||||||
|
<script type="text/javascript" src="lib/My97DatePicker/4.8/WdatePicker.js"></script>
|
||||||
|
<script type="text/javascript" src="lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
|
||||||
|
<script type="text/javascript" src="lib/laypage/1.2/laypage.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$('.table-sort').dataTable({
|
||||||
|
"aaSorting": [[1, "desc"]],//默认第几个排序
|
||||||
|
"bStateSave": true,//状态保存
|
||||||
|
"pading": false,
|
||||||
|
"aoColumnDefs": [
|
||||||
|
//{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
|
||||||
|
{"orderable": false, "aTargets": [0, 5]}// 不参与排序的列
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
function refuseMail(obj, mailId) {
|
||||||
|
mailId = $(obj).attr("id");
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
data: {"mailId": mailId},
|
||||||
|
url: "/refusePMailCheck",
|
||||||
|
success: function (data) {
|
||||||
|
if (data < 0) {
|
||||||
|
layer.msg('操作失败!', {icon: 6, time: 1000});
|
||||||
|
}
|
||||||
|
if (data == 0) {
|
||||||
|
layer.msg('操作成功!', {icon: 6, time: 1000});
|
||||||
|
}
|
||||||
|
if (data == 1) {
|
||||||
|
layer.msg('没有权限!', {icon: 6, time: 1000});
|
||||||
|
}
|
||||||
|
if (data == 2) {
|
||||||
|
layer.msg('此邮件已被审核 请刷新页面!', {icon: 6, time: 1000});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteMail(obj, mailId) {
|
||||||
|
mailId = $(obj).attr("id");
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
data: {"mailId": mailId},
|
||||||
|
url: "/deletePMailCheck",
|
||||||
|
success: function (data) {
|
||||||
|
if (data < 0) {
|
||||||
|
layer.msg('操作失败!', {icon: 6, time: 1000});
|
||||||
|
}
|
||||||
|
if (data == 0) {
|
||||||
|
layer.msg('删除成功!', {icon: 6, time: 1000});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function sendMail(obj, mailId) {
|
||||||
|
mailId = $(obj).attr("id");
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
data: {"mailId": mailId},
|
||||||
|
url: "/tosendPersonalMail",
|
||||||
|
data: {
|
||||||
|
"mailId": mailId,
|
||||||
|
"uid": 123123,
|
||||||
|
},
|
||||||
|
success: function (data) {
|
||||||
|
if (data < 0) {
|
||||||
|
layer.msg('操作失败!', {icon: 6, time: 1000});
|
||||||
|
}
|
||||||
|
if (data == 0) {
|
||||||
|
layer.msg('发送成功!', {icon: 6, time: 1000});
|
||||||
|
}
|
||||||
|
if (data == 1) {
|
||||||
|
layer.msg('没有权限!', {icon: 6, time: 1000});
|
||||||
|
}
|
||||||
|
if (data == 2) {
|
||||||
|
layer.msg('此邮件已被审核 请刷新页面!', {icon: 6, time: 1000});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,170 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8"/>
|
||||||
|
<meta name="renderer" content="webkit|ie-comp|ie-stand"/>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
|
||||||
|
<meta name="viewport"
|
||||||
|
content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
|
||||||
|
<meta http-equiv="Cache-Control" content="no-siteapp"/>
|
||||||
|
<script type="text/javascript" src="lib/html5shiv.js"></script>
|
||||||
|
<script type="text/javascript" src="lib/respond.min.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
<link rel="stylesheet" type="text/css" href="h-ui/css/H-ui.min.css"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="h-ui.admin/css/H-ui.admin.css"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="lib/Hui-iconfont/1.0.8/iconfont.css"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="h-ui.admin/skin/default/skin.css" id="skin"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="h-ui.admin/css/style.css"/>
|
||||||
|
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js"></script>
|
||||||
|
<script>DD_belatedPNG.fix('*');</script>
|
||||||
|
<title>审核信息</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<nav class="breadcrumb">
|
||||||
|
<i class="Hui-iconfont"></i> 首页
|
||||||
|
<span class="c-gray en">></span> 审核信息 <span class="c-gray en">></span> 全服邮件审核
|
||||||
|
</nav>
|
||||||
|
<div class="page-container" style="text-align: center">
|
||||||
|
<h2><span style="color:red;">审核信息</span></h2>
|
||||||
|
<div class="text-c">
|
||||||
|
<div class="mt-20">
|
||||||
|
<table class="table table-border table-bordered table-bg table-hover table-sort table-responsive">
|
||||||
|
<thead>
|
||||||
|
<tr class="text-c">
|
||||||
|
<!--<th width="25"><input type="checkbox" name="" value=""/></th>-->
|
||||||
|
<th width="200">服务器id</th>
|
||||||
|
<th width="200">标题</th>
|
||||||
|
<th width="200">内容</th>
|
||||||
|
<th width="200">创建时间</th>
|
||||||
|
<th width="200">附件</th>
|
||||||
|
<th width="200">客户端版本号</th>
|
||||||
|
<th width="200">发件人</th>
|
||||||
|
<th width="200">状态</th>
|
||||||
|
<th width="200">操作</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr th:each="obj:${sServerMailListVo}">
|
||||||
|
<!--<td><input type="checkbox" value="" name=""/></td>-->
|
||||||
|
<td th:text="${obj.serverId}" style="text-align: center;"></td>
|
||||||
|
<td th:text="${obj.mailTitle}" style="text-align: center;"></td>
|
||||||
|
<td th:text="${obj.mailContent}" style="text-align: center;"></td>
|
||||||
|
<td th:text="${obj.createTime}" style="text-align: center;"></td>
|
||||||
|
<td th:text="${obj.rewards}" style="text-align: center;"></td>
|
||||||
|
<td th:text="${obj.version}" style="text-align: center;"></td>
|
||||||
|
<td th:text="${obj.createUser}" style="text-align: center;"></td>
|
||||||
|
<th th:switch="${obj.state}" style="text-align: center;">
|
||||||
|
<span th:case="0" class="label label-defaunt radius">待审核</span>
|
||||||
|
<span th:case="1" class="Hui-iconfont" style="color: #8b0000">拒绝</span>
|
||||||
|
<span th:case="2" class="Hui-iconfont" style="color: #00B83F">通过</span>
|
||||||
|
</th>
|
||||||
|
<td style="text-align: center; width: 300px">
|
||||||
|
<button type="button" th:id="${obj.id}" class="btn btn-primary"
|
||||||
|
onclick="return deleteMail(this)"><i class="Hui-iconfont"></i> 删除
|
||||||
|
</button>
|
||||||
|
<button type="button" th:id="${obj.id}" class="btn btn-primary"
|
||||||
|
onclick="return refuseMail(this)"><i class="Hui-iconfont"></i> 拒绝
|
||||||
|
</button>
|
||||||
|
<button type="button" th:id="${obj.id}" class="btn btn-success" onclick="return sendMail(this)">
|
||||||
|
<i class="Hui-iconfont"></i> 确认并发送
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--_footer 作为公共模版分离出去-->
|
||||||
|
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
|
||||||
|
<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
|
||||||
|
<script type="text/javascript" src="h-ui/js/H-ui.min.js"></script>
|
||||||
|
<script type="text/javascript" src="h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->
|
||||||
|
|
||||||
|
<!--请在下方写此页面业务相关的脚本-->
|
||||||
|
<script type="text/javascript" src="lib/My97DatePicker/4.8/WdatePicker.js"></script>
|
||||||
|
<script type="text/javascript" src="lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
|
||||||
|
<script type="text/javascript" src="lib/laypage/1.2/laypage.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$('.table-sort').dataTable({
|
||||||
|
"aaSorting": [[1, "desc"]],//默认第几个排序
|
||||||
|
"bStateSave": true,//状态保存
|
||||||
|
"pading": false,
|
||||||
|
"aoColumnDefs": [
|
||||||
|
//{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
|
||||||
|
{"orderable": false, "aTargets": [0, 5]}// 不参与排序的列
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
function refuseMail(obj, mailId) {
|
||||||
|
mailId = $(obj).attr("id");
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
data: {"mailId": mailId},
|
||||||
|
url: "/refuseSysMailCheck",
|
||||||
|
success: function (data) {
|
||||||
|
if (data < 0) {
|
||||||
|
layer.msg('操作失败!', {icon: 6, time: 1000});
|
||||||
|
}
|
||||||
|
if (data == 0) {
|
||||||
|
layer.msg('操作成功!', {icon: 6, time: 1000});
|
||||||
|
}
|
||||||
|
if (data == 1) {
|
||||||
|
layer.msg('没有权限!', {icon: 6, time: 1000});
|
||||||
|
}
|
||||||
|
if (data == 2) {
|
||||||
|
layer.msg('此邮件已被审核 请刷新页面!', {icon: 6, time: 1000});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteMail(obj, mailId) {
|
||||||
|
mailId = $(obj).attr("id");
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
data: {"mailId": mailId},
|
||||||
|
url: "/deleteSysMailCheck",
|
||||||
|
success: function (data) {
|
||||||
|
if (data < 0) {
|
||||||
|
layer.msg('操作失败!', {icon: 6, time: 1000});
|
||||||
|
}
|
||||||
|
if (data == 0) {
|
||||||
|
layer.msg('删除成功!', {icon: 6, time: 1000});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function sendMail(obj, mailId) {
|
||||||
|
mailId = $(obj).attr("id");
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
data: {"mailId": mailId},
|
||||||
|
url: "/toSendSysMail",
|
||||||
|
data: {
|
||||||
|
"mailId": mailId,
|
||||||
|
"uid": 123123,
|
||||||
|
},
|
||||||
|
success: function (data) {
|
||||||
|
if (data < 0) {
|
||||||
|
layer.msg('操作失败!', {icon: 6, time: 1000});
|
||||||
|
}
|
||||||
|
if (data == 0) {
|
||||||
|
layer.msg('发送成功!', {icon: 6, time: 1000});
|
||||||
|
}
|
||||||
|
if (data == 1) {
|
||||||
|
layer.msg('没有权限!', {icon: 6, time: 1000});
|
||||||
|
}
|
||||||
|
if (data == 2) {
|
||||||
|
layer.msg('此邮件已被审核 请刷新页面!', {icon: 6, time: 1000});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Loading…
Reference in New Issue