yonge 4 jaren geleden
bovenliggende
commit
3bb3a2858d

+ 7 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/MusicGroupPaymentCalenderService.java

@@ -64,6 +64,13 @@ public interface MusicGroupPaymentCalenderService extends BaseService<Long, Musi
 	 * @param id
 	 */
 	void del(Long id);
+	
+	/**
+	 * 根据批次号删除对象
+	 * @param batchNo
+	 * @return
+	 */
+	boolean deleteByBatchNo(String batchNo);
 
 	/**
 	 * 推送乐团缴费提醒

+ 14 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupPaymentCalenderServiceImpl.java

@@ -30,6 +30,7 @@ import org.springframework.transaction.annotation.Isolation;
 import org.springframework.transaction.annotation.Transactional;
 
 import com.alibaba.fastjson.JSON;
+import com.timevale.tgtext.text.pdf.de;
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.auth.api.entity.SysUserRole;
@@ -1262,6 +1263,19 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 	}
 
 	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public boolean deleteByBatchNo(String batchNo) {
+		if(StringUtils.isBlank(batchNo)){
+			throw new BizException("参数错误");
+		}
+		List<MusicGroupPaymentCalender> musicGroupPaymentCalenderList = musicGroupPaymentCalenderDao.findByBatchNo(batchNo);
+		for(MusicGroupPaymentCalender musicGroupPaymentCalender : musicGroupPaymentCalenderList){
+			del(musicGroupPaymentCalender.getId());
+		}
+		return true;
+	}
+
+	@Override
 	public void paymentPush(Long id, String userIds) {
 		// 推送所有
 		if (StringUtils.isEmpty(userIds)) {

+ 8 - 0
mec-web/src/main/java/com/ym/mec/web/controller/MusicGroupPaymentCalenderController.java

@@ -85,6 +85,14 @@ public class MusicGroupPaymentCalenderController extends BaseController {
         return succeed();
     }
 
+    @ApiOperation(value = "删除乐团缴费日历")
+    @PostMapping("/delByBatchNo")
+    @PreAuthorize("@pcs.hasPermissions('musicGroupPaymentCalender/delByBatchNo')")
+    public Object delByBatchNo(String batchNo) {
+        musicGroupPaymentCalenderService.deleteByBatchNo(batchNo);
+        return succeed();
+    }
+
     @ApiOperation(value = "修改乐团缴费时间")
     @PostMapping("/update")
     @PreAuthorize("@pcs.hasPermissions('musicGroupPaymentCalender/update')")