直播记录排班
This commit is contained in:
@ -0,0 +1,83 @@
|
||||
package com.stdiet.custom.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.stdiet.common.annotation.Excel;
|
||||
import com.stdiet.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 直播排班对象 sys_live_schedul
|
||||
*
|
||||
* @author xzj
|
||||
* @date 2021-05-12
|
||||
*/
|
||||
@Data
|
||||
public class SysLiveSchedul extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 直播间序号 */
|
||||
@Excel(name = "直播间序号")
|
||||
private Integer liveRoom;
|
||||
|
||||
/** 排班日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "排班日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date liveSchedulDate;
|
||||
|
||||
/** 直播开始时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||
@Excel(name = "直播开始时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date liveStartTime;
|
||||
|
||||
/** 直播结束时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||
@Excel(name = "直播结束时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date liveEndTime;
|
||||
|
||||
/** 直播营养师 */
|
||||
@Excel(name = "直播营养师")
|
||||
private Long liveNutritionistId;
|
||||
|
||||
/** 直播运营 */
|
||||
@Excel(name = "直播运营")
|
||||
private Long liveOperatorId;
|
||||
|
||||
/** 直播策划 */
|
||||
@Excel(name = "直播策划")
|
||||
private Long livePlannerId;
|
||||
|
||||
/** 微信账号管理的进粉渠道 */
|
||||
@Excel(name = "微信账号管理的进粉渠道")
|
||||
private Integer fanChannel;
|
||||
|
||||
/** 直播状态,0未开播 1已开播 2已下播 */
|
||||
@Excel(name = "直播状态,0未开播 1已开播 2已下播")
|
||||
private Long liveStatus;
|
||||
|
||||
/** 删除标识,默认0 */
|
||||
private Integer delFlag;
|
||||
|
||||
//微信账号ID
|
||||
private Long wxAccountId;
|
||||
|
||||
//直播间名称
|
||||
private String liveRoomName;
|
||||
|
||||
private String liveNutritionistName;
|
||||
|
||||
private String livePlannerName;
|
||||
|
||||
private String liveOperatorName;
|
||||
|
||||
private String fanChannelName;
|
||||
|
||||
private List<Map<String,Object>> wxAccountList;
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
package com.stdiet.custom.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.stdiet.custom.domain.SysLiveSchedul;
|
||||
|
||||
/**
|
||||
* 直播排班Mapper接口
|
||||
*
|
||||
* @author xzj
|
||||
* @date 2021-05-12
|
||||
*/
|
||||
public interface SysLiveSchedulMapper
|
||||
{
|
||||
/**
|
||||
* 查询直播排班
|
||||
*
|
||||
* @param id 直播排班ID
|
||||
* @return 直播排班
|
||||
*/
|
||||
public SysLiveSchedul selectSysLiveSchedulById(Long id);
|
||||
|
||||
/**
|
||||
* 查询直播排班列表
|
||||
*
|
||||
* @param sysLiveSchedul 直播排班
|
||||
* @return 直播排班集合
|
||||
*/
|
||||
public List<SysLiveSchedul> selectSysLiveSchedulList(SysLiveSchedul sysLiveSchedul);
|
||||
|
||||
/**
|
||||
* 新增直播排班
|
||||
*
|
||||
* @param sysLiveSchedul 直播排班
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysLiveSchedul(SysLiveSchedul sysLiveSchedul);
|
||||
|
||||
/**
|
||||
* 修改直播排班
|
||||
*
|
||||
* @param sysLiveSchedul 直播排班
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysLiveSchedul(SysLiveSchedul sysLiveSchedul);
|
||||
|
||||
/**
|
||||
* 删除直播排班
|
||||
*
|
||||
* @param id 直播排班ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysLiveSchedulById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除直播排班
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysLiveSchedulByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 根据直播时间查询是否重叠
|
||||
*/
|
||||
public SysLiveSchedul getLiveSchedulByLiveTime(SysLiveSchedul sysLiveSchedul);
|
||||
|
||||
/**
|
||||
* 更新部分字段
|
||||
* @param sysLiveSchedul
|
||||
* @return
|
||||
*/
|
||||
public int updateSysLiveSchedulById(SysLiveSchedul sysLiveSchedul);
|
||||
|
||||
/**
|
||||
* 根据ID查询上一条记录
|
||||
* @param sysLiveSchedul
|
||||
* @return
|
||||
*/
|
||||
public SysLiveSchedul getLastLiveSchedulById(SysLiveSchedul sysLiveSchedul);
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
package com.stdiet.custom.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.stdiet.custom.domain.SysLiveSchedul;
|
||||
|
||||
/**
|
||||
* 直播排班Service接口
|
||||
*
|
||||
* @author xzj
|
||||
* @date 2021-05-12
|
||||
*/
|
||||
public interface ISysLiveSchedulService
|
||||
{
|
||||
/**
|
||||
* 查询直播排班
|
||||
*
|
||||
* @param id 直播排班ID
|
||||
* @return 直播排班
|
||||
*/
|
||||
public SysLiveSchedul selectSysLiveSchedulById(Long id);
|
||||
|
||||
/**
|
||||
* 查询直播排班列表
|
||||
*
|
||||
* @param sysLiveSchedul 直播排班
|
||||
* @return 直播排班集合
|
||||
*/
|
||||
public List<SysLiveSchedul> selectSysLiveSchedulList(SysLiveSchedul sysLiveSchedul);
|
||||
|
||||
/**
|
||||
* 新增直播排班
|
||||
*
|
||||
* @param sysLiveSchedul 直播排班
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysLiveSchedul(SysLiveSchedul sysLiveSchedul);
|
||||
|
||||
/**
|
||||
* 修改直播排班
|
||||
*
|
||||
* @param sysLiveSchedul 直播排班
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysLiveSchedul(SysLiveSchedul sysLiveSchedul);
|
||||
|
||||
/**
|
||||
* 批量删除直播排班
|
||||
*
|
||||
* @param ids 需要删除的直播排班ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysLiveSchedulByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除直播排班信息
|
||||
*
|
||||
* @param id 直播排班ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysLiveSchedulById(Long id);
|
||||
|
||||
/**
|
||||
* 根据直播时间查询是否重叠
|
||||
*/
|
||||
public SysLiveSchedul getLiveSchedulByLiveTime(SysLiveSchedul sysLiveSchedul);
|
||||
|
||||
/**
|
||||
* 更新部分字段
|
||||
* @param sysLiveSchedul
|
||||
* @return
|
||||
*/
|
||||
public int updateSysLiveSchedulById(SysLiveSchedul sysLiveSchedul);
|
||||
|
||||
/**
|
||||
* 根据ID查询上一条记录
|
||||
* @param sysLiveSchedul
|
||||
* @return
|
||||
*/
|
||||
public SysLiveSchedul getLastLiveSchedulById(SysLiveSchedul sysLiveSchedul);
|
||||
}
|
@ -0,0 +1,126 @@
|
||||
package com.stdiet.custom.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.stdiet.common.utils.DateUtils;
|
||||
import lombok.Data;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.stdiet.custom.mapper.SysLiveSchedulMapper;
|
||||
import com.stdiet.custom.domain.SysLiveSchedul;
|
||||
import com.stdiet.custom.service.ISysLiveSchedulService;
|
||||
|
||||
/**
|
||||
* 直播排班Service业务层处理
|
||||
*
|
||||
* @author xzj
|
||||
* @date 2021-05-12
|
||||
*/
|
||||
@Service
|
||||
public class SysLiveSchedulServiceImpl implements ISysLiveSchedulService
|
||||
{
|
||||
@Autowired
|
||||
private SysLiveSchedulMapper sysLiveSchedulMapper;
|
||||
|
||||
/**
|
||||
* 查询直播排班
|
||||
*
|
||||
* @param id 直播排班ID
|
||||
* @return 直播排班
|
||||
*/
|
||||
@Override
|
||||
public SysLiveSchedul selectSysLiveSchedulById(Long id)
|
||||
{
|
||||
return sysLiveSchedulMapper.selectSysLiveSchedulById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询直播排班列表
|
||||
*
|
||||
* @param sysLiveSchedul 直播排班
|
||||
* @return 直播排班
|
||||
*/
|
||||
@Override
|
||||
public List<SysLiveSchedul> selectSysLiveSchedulList(SysLiveSchedul sysLiveSchedul)
|
||||
{
|
||||
return sysLiveSchedulMapper.selectSysLiveSchedulList(sysLiveSchedul);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增直播排班
|
||||
*
|
||||
* @param sysLiveSchedul 直播排班
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSysLiveSchedul(SysLiveSchedul sysLiveSchedul)
|
||||
{
|
||||
sysLiveSchedul.setCreateTime(DateUtils.getNowDate());
|
||||
return sysLiveSchedulMapper.insertSysLiveSchedul(sysLiveSchedul);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改直播排班
|
||||
*
|
||||
* @param sysLiveSchedul 直播排班
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSysLiveSchedul(SysLiveSchedul sysLiveSchedul)
|
||||
{
|
||||
sysLiveSchedul.setUpdateTime(DateUtils.getNowDate());
|
||||
return sysLiveSchedulMapper.updateSysLiveSchedul(sysLiveSchedul);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除直播排班
|
||||
*
|
||||
* @param ids 需要删除的直播排班ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSysLiveSchedulByIds(Long[] ids)
|
||||
{
|
||||
return sysLiveSchedulMapper.deleteSysLiveSchedulByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除直播排班信息
|
||||
*
|
||||
* @param id 直播排班ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSysLiveSchedulById(Long id)
|
||||
{
|
||||
return sysLiveSchedulMapper.deleteSysLiveSchedulById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据直播时间查询是否重叠
|
||||
*/
|
||||
@Override
|
||||
public SysLiveSchedul getLiveSchedulByLiveTime(SysLiveSchedul sysLiveSchedul){
|
||||
return sysLiveSchedulMapper.getLiveSchedulByLiveTime(sysLiveSchedul);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新部分字段
|
||||
* @param sysLiveSchedul
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public int updateSysLiveSchedulById(SysLiveSchedul sysLiveSchedul){
|
||||
sysLiveSchedul.setUpdateTime(DateUtils.getNowDate());
|
||||
return sysLiveSchedulMapper.updateSysLiveSchedulById(sysLiveSchedul);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID查询上一条记录
|
||||
* @param sysLiveSchedul
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public SysLiveSchedul getLastLiveSchedulById(SysLiveSchedul sysLiveSchedul){
|
||||
return sysLiveSchedulMapper.getLastLiveSchedulById(sysLiveSchedul);
|
||||
}
|
||||
}
|
@ -98,10 +98,13 @@ public class SysOrderPauseServiceImpl implements ISysOrderPauseService
|
||||
public int deleteSysOrderPauseByIds(Long[] ids)
|
||||
{
|
||||
SysOrderPause sysOrderPause = selectSysOrderPauseById(ids[0]);
|
||||
if(sysOrderPauseMapper.deleteSysOrderPauseByIds(ids) > 0){
|
||||
return sysOrderService.updateOrderServerStartEndDate(sysOrderPause.getCusId());
|
||||
int row = sysOrderPauseMapper.deleteSysOrderPauseByIds(ids);
|
||||
if(row > 0){
|
||||
if(sysOrderPause != null && sysOrderPause.getCusId() != null){
|
||||
sysOrderService.updateOrderServerStartEndDate(sysOrderPause.getCusId());
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
return row;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user