|
|
@ -1,13 +1,17 @@
|
|
|
|
package au.com.royalpay.payment.manage.system.web;
|
|
|
|
package au.com.royalpay.payment.manage.system.web;
|
|
|
|
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.permission.manager.RequireManager;
|
|
|
|
import au.com.royalpay.payment.manage.notice.core.MailService;
|
|
|
|
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
|
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @author kira
|
|
|
|
* @author kira
|
|
|
|
* @date 2018/6/12
|
|
|
|
* @date 2018/6/12
|
|
|
@ -16,11 +20,27 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
|
@RequestMapping("/sys/mail")
|
|
|
|
@RequestMapping("/sys/mail")
|
|
|
|
public class MailController {
|
|
|
|
public class MailController {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private MailService mailService;
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/sub/{id}",method = RequestMethod.DELETE)
|
|
|
|
@RequestMapping(value = "/sub/{id}",method = RequestMethod.DELETE)
|
|
|
|
@RequireManager(role = {ManagerRole.ADMIN, ManagerRole.BD_USER, ManagerRole.OPERATOR, ManagerRole.SERVANT})
|
|
|
|
// @RequireManager(role = {ManagerRole.ADMIN, ManagerRole.BD_USER, ManagerRole.OPERATOR, ManagerRole.SERVANT})
|
|
|
|
public void removeSub(@PathVariable Long id) {
|
|
|
|
public void removeSub(@PathVariable Long id) {
|
|
|
|
|
|
|
|
mailService.removeUnsub(id);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// return clientApply.listPartnerApply(manager,apply);
|
|
|
|
@RequestMapping(value = "/sub",method = RequestMethod.POST)
|
|
|
|
|
|
|
|
// @RequireManager(role = {ManagerRole.ADMIN, ManagerRole.BD_USER, ManagerRole.OPERATOR, ManagerRole.SERVANT})
|
|
|
|
|
|
|
|
public void removeSub(@RequestParam String client_moniker) {
|
|
|
|
|
|
|
|
mailService.addUnsub(client_moniker);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/sub/query",method = RequestMethod.GET)
|
|
|
|
|
|
|
|
// @RequireManager(role = {ManagerRole.ADMIN, ManagerRole.BD_USER, ManagerRole.OPERATOR, ManagerRole.SERVANT})
|
|
|
|
|
|
|
|
public JSONObject list(@RequestParam String client_moniker,@RequestParam String address,@RequestParam int limit ,@RequestParam int page) {
|
|
|
|
|
|
|
|
JSONObject params = new JSONObject();
|
|
|
|
|
|
|
|
params.put("client_moinker",client_moniker);
|
|
|
|
|
|
|
|
params.put("address",address);
|
|
|
|
|
|
|
|
return mailService.queryUnsubPageable(params,limit,page);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|