|
@@ -72,6 +72,8 @@ public class MaterialInfoController {
|
|
private IBytedanceVideoSlogenInfoService slogenInfoService;
|
|
private IBytedanceVideoSlogenInfoService slogenInfoService;
|
|
@Autowired
|
|
@Autowired
|
|
private IProductService productService;
|
|
private IProductService productService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private IProjectService projectService;
|
|
|
|
|
|
|
|
|
|
@GetMapping("/supplierWatermark")
|
|
@GetMapping("/supplierWatermark")
|
|
@@ -523,8 +525,24 @@ public class MaterialInfoController {
|
|
// 如果状态为2 审核拒绝 给上传人发送消息
|
|
// 如果状态为2 审核拒绝 给上传人发送消息
|
|
if (status == 2) {
|
|
if (status == 2) {
|
|
Product product = productService.getById(materialInfoEntity.getProductId());
|
|
Product product = productService.getById(materialInfoEntity.getProductId());
|
|
- String text = messageTemplate.getMaterialRejectTemplate(product.getProductName(), materialInfoEntity.getMaterialName(), materialInfo.getRefuseReason());
|
|
|
|
- sendMessageService.sendMessage(materialInfoEntity.getUserId(), text);
|
|
|
|
|
|
+ Project project = projectService.getById(materialInfoEntity.getProjectId());
|
|
|
|
+ String text = messageTemplate.getMaterialRejectTemplate(product.getProductName(), project.getProjectName(), materialInfoEntity.getMaterialName(), materialInfo.getRefuseReason());
|
|
|
|
+ MaterialAscription ascription = materialAscriptionService.getInfoByCode(materialInfoEntity.getCode());
|
|
|
|
+ List<String> userList = new ArrayList<>();
|
|
|
|
+ if (!Check.isNull(ascription)) {
|
|
|
|
+ if (!Check.isNull(ascription.getClipId())) {
|
|
|
|
+ userList.add(ascription.getClipId());
|
|
|
|
+ }
|
|
|
|
+ if (!Check.isNull(ascription.getPlanId())) {
|
|
|
|
+ userList.add(ascription.getPlanId());
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ userList.add(materialInfoEntity.getUserId());
|
|
|
|
+ }
|
|
|
|
+ for (int i = 0; i < userList.size(); i++) {
|
|
|
|
+ String userId = userList.get(i);
|
|
|
|
+ sendMessageService.sendMessage(userId, text);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
return result;
|
|
return result;
|
|
|
|
|
|
@@ -745,8 +763,24 @@ public class MaterialInfoController {
|
|
// 如果状态为2 审核拒绝 给上传人发送消息
|
|
// 如果状态为2 审核拒绝 给上传人发送消息
|
|
if (status == 2) {
|
|
if (status == 2) {
|
|
Product product = productService.getById(materialInfoEntity.getProductId());
|
|
Product product = productService.getById(materialInfoEntity.getProductId());
|
|
- String text = messageTemplate.getMaterialRejectTemplate(product.getProductName(), materialInfoEntity.getMaterialName(), materialInfo.getRefuseReason());
|
|
|
|
- sendMessageService.sendMessage(materialInfoEntity.getUserId(), text);
|
|
|
|
|
|
+ Project project = projectService.getById(materialInfoEntity.getProjectId());
|
|
|
|
+ String text = messageTemplate.getMaterialRejectTemplate(product.getProductName(), project.getProjectName(), materialInfoEntity.getMaterialName(), materialInfo.getRefuseReason());
|
|
|
|
+ List<String> userList = new ArrayList<>();
|
|
|
|
+ MaterialAscription ascription = materialAscriptionService.getInfoByCode(materialInfoEntity.getCode());
|
|
|
|
+ if (!Check.isNull(ascription)) {
|
|
|
|
+ if (!Check.isNull(ascription.getClipId())) {
|
|
|
|
+ userList.add(ascription.getClipId());
|
|
|
|
+ }
|
|
|
|
+ if (!Check.isNull(ascription.getPlanId())) {
|
|
|
|
+ userList.add(ascription.getPlanId());
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ userList.add(materialInfoEntity.getUserId());
|
|
|
|
+ }
|
|
|
|
+ for (int i = 0; i < userList.size(); i++) {
|
|
|
|
+ String userId = userList.get(i);
|
|
|
|
+ sendMessageService.sendMessage(userId, text);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|