提交 7762566b 编写于 作者: ibizdev's avatar ibizdev

xignzi006 发布系统代码

上级 9eee95e3
...@@ -73,6 +73,10 @@ public class mail_messageFallback implements mail_messageFeignClient{ ...@@ -73,6 +73,10 @@ public class mail_messageFallback implements mail_messageFeignClient{
return null; return null;
} }
public Mail_message post_message( Long id, Mail_message mail_message){
return null;
}
public Boolean save(Mail_message mail_message){ public Boolean save(Mail_message mail_message){
return false; return false;
} }
......
...@@ -68,6 +68,10 @@ public interface mail_messageFeignClient { ...@@ -68,6 +68,10 @@ public interface mail_messageFeignClient {
Mail_message generate_tracking_message_id(@PathVariable("id") Long id,@RequestBody Mail_message mail_message); Mail_message generate_tracking_message_id(@PathVariable("id") Long id,@RequestBody Mail_message mail_message);
@RequestMapping(method = RequestMethod.POST, value = "/mail_messages/{id}/post_message")
Mail_message post_message(@PathVariable("id") Long id,@RequestBody Mail_message mail_message);
@RequestMapping(method = RequestMethod.POST, value = "/mail_messages/save") @RequestMapping(method = RequestMethod.POST, value = "/mail_messages/save")
Boolean save(@RequestBody Mail_message mail_message); Boolean save(@RequestBody Mail_message mail_message);
......
...@@ -36,6 +36,7 @@ public interface IMail_messageService extends IService<Mail_message>{ ...@@ -36,6 +36,7 @@ public interface IMail_messageService extends IService<Mail_message>{
Mail_message getDraft(Mail_message et) ; Mail_message getDraft(Mail_message et) ;
boolean checkKey(Mail_message et) ; boolean checkKey(Mail_message et) ;
Mail_message generate_tracking_message_id(Mail_message et) ; Mail_message generate_tracking_message_id(Mail_message et) ;
Mail_message post_message(Mail_message et) ;
boolean save(Mail_message et) ; boolean save(Mail_message et) ;
void saveBatch(List<Mail_message> list) ; void saveBatch(List<Mail_message> list) ;
Page<Mail_message> searchDefault(Mail_messageSearchContext context) ; Page<Mail_message> searchDefault(Mail_messageSearchContext context) ;
......
...@@ -205,6 +205,13 @@ public class Mail_messageServiceImpl extends EBSServiceImpl<Mail_messageMapper, ...@@ -205,6 +205,13 @@ public class Mail_messageServiceImpl extends EBSServiceImpl<Mail_messageMapper,
return et; return et;
} }
@Override
@Transactional
public Mail_message post_message(Mail_message et) {
//自定义代码
return et;
}
@Override @Override
@Transactional @Transactional
public boolean save(Mail_message et) { public boolean save(Mail_message et) {
......
...@@ -132,6 +132,17 @@ public class Mail_messageResource { ...@@ -132,6 +132,17 @@ public class Mail_messageResource {
return ResponseEntity.status(HttpStatus.OK).body(mail_messagedto); return ResponseEntity.status(HttpStatus.OK).body(mail_messagedto);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Mail_message-Post_message-all')")
@ApiOperation(value = "发送消息", tags = {"消息" }, notes = "发送消息")
@RequestMapping(method = RequestMethod.POST, value = "/mail_messages/{mail_message_id}/post_message")
public ResponseEntity<Mail_messageDTO> post_message(@PathVariable("mail_message_id") Long mail_message_id, @RequestBody Mail_messageDTO mail_messagedto) {
Mail_message domain = mail_messageMapping.toDomain(mail_messagedto);
domain.setId(mail_message_id);
domain = mail_messageService.post_message(domain);
mail_messagedto = mail_messageMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(mail_messagedto);
}
@PreAuthorize("hasPermission(this.mail_messageMapping.toDomain(#mail_messagedto),'iBizBusinessCentral-Mail_message-Save')") @PreAuthorize("hasPermission(this.mail_messageMapping.toDomain(#mail_messagedto),'iBizBusinessCentral-Mail_message-Save')")
@ApiOperation(value = "保存消息", tags = {"消息" }, notes = "保存消息") @ApiOperation(value = "保存消息", tags = {"消息" }, notes = "保存消息")
@RequestMapping(method = RequestMethod.POST, value = "/mail_messages/save") @RequestMapping(method = RequestMethod.POST, value = "/mail_messages/save")
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册