提交 013cb603 编写于 作者: ibizdev's avatar ibizdev

xignzi006 发布系统代码

上级 cd7c83e8
package cn.ibizlab.businesscentral.core.extensions.service;
import cn.ibizlab.businesscentral.core.odoo_mail.service.impl.Mail_tracking_valueServiceImpl;
import lombok.extern.slf4j.Slf4j;
import cn.ibizlab.businesscentral.core.odoo_mail.domain.Mail_tracking_value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Primary;
import java.util.*;
/**
* 实体[邮件跟踪值] 自定义服务对象
*/
@Slf4j
@Primary
@Service("Mail_tracking_valueExService")
public class Mail_tracking_valueExService extends Mail_tracking_valueServiceImpl {
@Override
protected Class currentModelClass() {
return com.baomidou.mybatisplus.core.toolkit.ReflectionKit.getSuperClassGenericType(this.getClass().getSuperclass(), 1);
}
/**
* 自定义行为[A]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public Mail_tracking_value a(Mail_tracking_value et) {
return super.a(et);
}
}
...@@ -64,6 +64,10 @@ public class mail_tracking_valueFallback implements mail_tracking_valueFeignClie ...@@ -64,6 +64,10 @@ public class mail_tracking_valueFallback implements mail_tracking_valueFeignClie
public Mail_tracking_value a( Long id, Mail_tracking_value mail_tracking_value){
return null;
}
public Boolean checkKey(Mail_tracking_value mail_tracking_value){ public Boolean checkKey(Mail_tracking_value mail_tracking_value){
return false; return false;
} }
......
...@@ -60,6 +60,10 @@ public interface mail_tracking_valueFeignClient { ...@@ -60,6 +60,10 @@ public interface mail_tracking_valueFeignClient {
Mail_tracking_value getDraft(); Mail_tracking_value getDraft();
@RequestMapping(method = RequestMethod.POST, value = "/mail_tracking_values/{id}/a")
Mail_tracking_value a(@PathVariable("id") Long id,@RequestBody Mail_tracking_value mail_tracking_value);
@RequestMapping(method = RequestMethod.POST, value = "/mail_tracking_values/checkkey") @RequestMapping(method = RequestMethod.POST, value = "/mail_tracking_values/checkkey")
Boolean checkKey(@RequestBody Mail_tracking_value mail_tracking_value); Boolean checkKey(@RequestBody Mail_tracking_value mail_tracking_value);
......
...@@ -34,6 +34,7 @@ public interface IMail_tracking_valueService extends IService<Mail_tracking_valu ...@@ -34,6 +34,7 @@ public interface IMail_tracking_valueService extends IService<Mail_tracking_valu
void removeBatch(Collection<Long> idList) ; void removeBatch(Collection<Long> idList) ;
Mail_tracking_value get(Long key) ; Mail_tracking_value get(Long key) ;
Mail_tracking_value getDraft(Mail_tracking_value et) ; Mail_tracking_value getDraft(Mail_tracking_value et) ;
Mail_tracking_value a(Mail_tracking_value et) ;
boolean checkKey(Mail_tracking_value et) ; boolean checkKey(Mail_tracking_value et) ;
boolean save(Mail_tracking_value et) ; boolean save(Mail_tracking_value et) ;
void saveBatch(List<Mail_tracking_value> list) ; void saveBatch(List<Mail_tracking_value> list) ;
......
...@@ -123,6 +123,13 @@ public class Mail_tracking_valueServiceImpl extends ServiceImpl<Mail_tracking_va ...@@ -123,6 +123,13 @@ public class Mail_tracking_valueServiceImpl extends ServiceImpl<Mail_tracking_va
return et; return et;
} }
@Override
@Transactional
public Mail_tracking_value a(Mail_tracking_value et) {
//自定义代码
return et;
}
@Override @Override
public boolean checkKey(Mail_tracking_value et) { public boolean checkKey(Mail_tracking_value et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId()))); return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId())));
......
...@@ -115,6 +115,17 @@ public class Mail_tracking_valueResource { ...@@ -115,6 +115,17 @@ public class Mail_tracking_valueResource {
return ResponseEntity.status(HttpStatus.OK).body(mail_tracking_valueMapping.toDto(mail_tracking_valueService.getDraft(new Mail_tracking_value()))); return ResponseEntity.status(HttpStatus.OK).body(mail_tracking_valueMapping.toDto(mail_tracking_valueService.getDraft(new Mail_tracking_value())));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Mail_tracking_value-A-all')")
@ApiOperation(value = "行为", tags = {"邮件跟踪值" }, notes = "行为")
@RequestMapping(method = RequestMethod.POST, value = "/mail_tracking_values/{mail_tracking_value_id}/a")
public ResponseEntity<Mail_tracking_valueDTO> a(@PathVariable("mail_tracking_value_id") Long mail_tracking_value_id, @RequestBody Mail_tracking_valueDTO mail_tracking_valuedto) {
Mail_tracking_value domain = mail_tracking_valueMapping.toDomain(mail_tracking_valuedto);
domain.setId(mail_tracking_value_id);
domain = mail_tracking_valueService.a(domain);
mail_tracking_valuedto = mail_tracking_valueMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(mail_tracking_valuedto);
}
@ApiOperation(value = "检查邮件跟踪值", tags = {"邮件跟踪值" }, notes = "检查邮件跟踪值") @ApiOperation(value = "检查邮件跟踪值", tags = {"邮件跟踪值" }, notes = "检查邮件跟踪值")
@RequestMapping(method = RequestMethod.POST, value = "/mail_tracking_values/checkkey") @RequestMapping(method = RequestMethod.POST, value = "/mail_tracking_values/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody Mail_tracking_valueDTO mail_tracking_valuedto) { public ResponseEntity<Boolean> checkKey(@RequestBody Mail_tracking_valueDTO mail_tracking_valuedto) {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册