|  | @@ -5,7 +5,8 @@ import java.util.List;
 | 
	
		
			
				|  |  |  import com.fs.common.core.domain.R;
 | 
	
		
			
				|  |  |  import com.fs.course.domain.FsUserCoursePeriodDays;
 | 
	
		
			
				|  |  |  import com.fs.course.domain.FsUserCourseVideoRedPackage;
 | 
	
		
			
				|  |  | -import com.fs.course.param.CompanyRedPacket;
 | 
	
		
			
				|  |  | +import com.fs.course.param.CompanyRedPacketParam;
 | 
	
		
			
				|  |  | +import com.fs.course.param.PeriodRedPacketParam;
 | 
	
		
			
				|  |  |  import com.fs.course.service.IFsUserCoursePeriodDaysService;
 | 
	
		
			
				|  |  |  import com.fs.course.service.IFsUserCourseVideoRedPackageService;
 | 
	
		
			
				|  |  |  import com.fs.course.vo.FsUserCoursePeriodVO;
 | 
	
	
		
			
				|  | @@ -138,25 +139,24 @@ public class FsUserCoursePeriodController extends BaseController {
 | 
	
		
			
				|  |  |          return fsUserCoursePeriodDaysService.updateListCourseData(entity);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    @ApiOperation("根据营期id获取公司红包金额列表")
 | 
	
		
			
				|  |  | +    @ApiOperation("根据营期id获取公司红包金额列表(暂废弃)")
 | 
	
		
			
				|  |  |      @GetMapping("/companyList")
 | 
	
		
			
				|  |  |      public R getCompanyByPeriod(Long periodId, Long videoId) {
 | 
	
		
			
				|  |  | -        List<CompanyRedPacket> companyList = fsUserCoursePeriodDaysService.getCompanyByPeriod(periodId, videoId);
 | 
	
		
			
				|  |  | +        List<CompanyRedPacketParam> companyList = fsUserCoursePeriodDaysService.getCompanyByPeriod(periodId, videoId);
 | 
	
		
			
				|  |  |          return R.ok().put("data", companyList);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    @ApiOperation("批量保存设置红包金额")
 | 
	
		
			
				|  |  | +    @ApiOperation("获取设置红包金额列表")
 | 
	
		
			
				|  |  | +    @GetMapping("/redPacketList")
 | 
	
		
			
				|  |  | +    public R getPeriodRedPacketList(Long periodId, Long companyId) {
 | 
	
		
			
				|  |  | +        List<PeriodRedPacketParam> periodRedPacketList = fsUserCoursePeriodDaysService.getPeriodRedPacketList(periodId, companyId);
 | 
	
		
			
				|  |  | +        return R.ok().put("data", periodRedPacketList);
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    @ApiOperation("批量保存设置红包金额(全删全增)")
 | 
	
		
			
				|  |  |      @PostMapping("/batchRedPacket")
 | 
	
		
			
				|  |  |      public R batchRedPacketMoney(@RequestBody List<FsUserCourseVideoRedPackage> videoRedPackageList) {
 | 
	
		
			
				|  |  | -        //查询该公司红包金额数据是否存在,如果存在,则修改
 | 
	
		
			
				|  |  | -        try {
 | 
	
		
			
				|  |  | -            fsUserCourseVideoRedPackageService.batchDeleteParams(videoRedPackageList);
 | 
	
		
			
				|  |  | -        } catch (Exception e) {
 | 
	
		
			
				|  |  | -            e.printStackTrace();
 | 
	
		
			
				|  |  | -            log.info("删除数据失败,参数:{}", videoRedPackageList);
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        int i = fsUserCourseVideoRedPackageService.batchSaveFsUserCourseVideoRedPackage(videoRedPackageList);
 | 
	
		
			
				|  |  | +        int i = fsUserCourseVideoRedPackageService.batchSaveCompanyRedPackage(videoRedPackageList);
 | 
	
		
			
				|  |  |          if (i <= 0) {
 | 
	
		
			
				|  |  |              return R.error("保存失败!");
 | 
	
		
			
				|  |  |          }
 |