Merge branch 'master' of gitee.com:darlk/ShengTangManage into develop
This commit is contained in:
@ -0,0 +1,36 @@
|
||||
package com.stdiet.custom.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.stdiet.common.annotation.Excel;
|
||||
import com.stdiet.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 导粉管理对象 sys_import_fan_record
|
||||
*
|
||||
* @author xzj
|
||||
* @date 2021-05-17
|
||||
*/
|
||||
public class SysImportFanRecord extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 导粉日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "导粉日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date importFanDate;
|
||||
|
||||
/** 导粉渠道 */
|
||||
@Excel(name = "导粉渠道")
|
||||
private Long importFanChannel;
|
||||
|
||||
/** 进粉直播间 */
|
||||
@Excel(name = "进粉直播间")
|
||||
private Long importFanLive;
|
||||
|
||||
/** 删除标识,0未删除 1已删除 */
|
||||
private Long delFlag;
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package com.stdiet.custom.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import com.stdiet.common.annotation.Excel;
|
||||
import com.stdiet.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 导粉记录中对应微信记录对象 sys_import_fan_wx_account
|
||||
*
|
||||
* @author xzj
|
||||
* @date 2021-05-17
|
||||
*/
|
||||
@Data
|
||||
public class SysImportFanWxAccount extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 导粉记录ID */
|
||||
@Excel(name = "导粉记录ID")
|
||||
private Long importFanRecordId;
|
||||
|
||||
/** 导粉微信ID */
|
||||
@Excel(name = "导粉微信ID")
|
||||
private Long importWxAccountId;
|
||||
|
||||
/** 导粉数量 */
|
||||
@Excel(name = "导粉数量")
|
||||
private Long importFanNum;
|
||||
|
||||
/** 删除标识 0未删除 1已删除 */
|
||||
private Long delFlag;
|
||||
}
|
@ -282,6 +282,7 @@ public class SysOrder extends BaseEntity {
|
||||
|
||||
private Integer counted;
|
||||
|
||||
|
||||
//食谱计划是否连续上个订单
|
||||
private Integer recipesPlanContinue;
|
||||
|
||||
}
|
@ -26,4 +26,6 @@ public class NutritionQuestionResponse implements Serializable {
|
||||
|
||||
/** 小程序是否显示,0不显示 1显示 */
|
||||
private String showFlag;
|
||||
|
||||
private String createTime;
|
||||
}
|
||||
|
@ -0,0 +1,61 @@
|
||||
package com.stdiet.custom.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.stdiet.custom.domain.SysImportFanRecord;
|
||||
|
||||
/**
|
||||
* 导粉管理Mapper接口
|
||||
*
|
||||
* @author xzj
|
||||
* @date 2021-05-17
|
||||
*/
|
||||
public interface SysImportFanRecordMapper
|
||||
{
|
||||
/**
|
||||
* 查询导粉管理
|
||||
*
|
||||
* @param id 导粉管理ID
|
||||
* @return 导粉管理
|
||||
*/
|
||||
public SysImportFanRecord selectSysImportFanRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 查询导粉管理列表
|
||||
*
|
||||
* @param sysImportFanRecord 导粉管理
|
||||
* @return 导粉管理集合
|
||||
*/
|
||||
public List<SysImportFanRecord> selectSysImportFanRecordList(SysImportFanRecord sysImportFanRecord);
|
||||
|
||||
/**
|
||||
* 新增导粉管理
|
||||
*
|
||||
* @param sysImportFanRecord 导粉管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysImportFanRecord(SysImportFanRecord sysImportFanRecord);
|
||||
|
||||
/**
|
||||
* 修改导粉管理
|
||||
*
|
||||
* @param sysImportFanRecord 导粉管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysImportFanRecord(SysImportFanRecord sysImportFanRecord);
|
||||
|
||||
/**
|
||||
* 删除导粉管理
|
||||
*
|
||||
* @param id 导粉管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysImportFanRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除导粉管理
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysImportFanRecordByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.stdiet.custom.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.stdiet.custom.domain.SysImportFanWxAccount;
|
||||
|
||||
/**
|
||||
* 导粉记录中对应微信记录Mapper接口
|
||||
*
|
||||
* @author xzj
|
||||
* @date 2021-05-17
|
||||
*/
|
||||
public interface SysImportFanWxAccountMapper
|
||||
{
|
||||
/**
|
||||
* 查询导粉记录中对应微信记录
|
||||
*
|
||||
* @param id 导粉记录中对应微信记录ID
|
||||
* @return 导粉记录中对应微信记录
|
||||
*/
|
||||
public SysImportFanWxAccount selectSysImportFanWxAccountById(Long id);
|
||||
|
||||
/**
|
||||
* 查询导粉记录中对应微信记录列表
|
||||
*
|
||||
* @param sysImportFanWxAccount 导粉记录中对应微信记录
|
||||
* @return 导粉记录中对应微信记录集合
|
||||
*/
|
||||
public List<SysImportFanWxAccount> selectSysImportFanWxAccountList(SysImportFanWxAccount sysImportFanWxAccount);
|
||||
|
||||
/**
|
||||
* 新增导粉记录中对应微信记录
|
||||
*
|
||||
* @param sysImportFanWxAccount 导粉记录中对应微信记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysImportFanWxAccount(SysImportFanWxAccount sysImportFanWxAccount);
|
||||
|
||||
/**
|
||||
* 修改导粉记录中对应微信记录
|
||||
*
|
||||
* @param sysImportFanWxAccount 导粉记录中对应微信记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysImportFanWxAccount(SysImportFanWxAccount sysImportFanWxAccount);
|
||||
|
||||
/**
|
||||
* 删除导粉记录中对应微信记录
|
||||
*
|
||||
* @param id 导粉记录中对应微信记录ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysImportFanWxAccountById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除导粉记录中对应微信记录
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysImportFanWxAccountByIds(Long[] ids);
|
||||
}
|
@ -77,4 +77,17 @@ public interface SysLiveSchedulMapper
|
||||
* @return
|
||||
*/
|
||||
public SysLiveSchedul getLastLiveSchedulById(SysLiveSchedul sysLiveSchedul);
|
||||
|
||||
/**
|
||||
* 获取所有计划
|
||||
* @param sysLiveSchedul
|
||||
* @return
|
||||
*/
|
||||
public List<SysLiveSchedul> getAllLiveSchedulByDate(SysLiveSchedul sysLiveSchedul);
|
||||
|
||||
/**
|
||||
* 获取最后一次直播计划
|
||||
* @return
|
||||
*/
|
||||
public SysLiveSchedul getLastLiveSchedul();
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.stdiet.custom.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.stdiet.custom.domain.SysImportFanRecord;
|
||||
|
||||
/**
|
||||
* 导粉管理Service接口
|
||||
*
|
||||
* @author xzj
|
||||
* @date 2021-05-17
|
||||
*/
|
||||
public interface ISysImportFanRecordService
|
||||
{
|
||||
/**
|
||||
* 查询导粉管理
|
||||
*
|
||||
* @param id 导粉管理ID
|
||||
* @return 导粉管理
|
||||
*/
|
||||
public SysImportFanRecord selectSysImportFanRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 查询导粉管理列表
|
||||
*
|
||||
* @param sysImportFanRecord 导粉管理
|
||||
* @return 导粉管理集合
|
||||
*/
|
||||
public List<SysImportFanRecord> selectSysImportFanRecordList(SysImportFanRecord sysImportFanRecord);
|
||||
|
||||
/**
|
||||
* 新增导粉管理
|
||||
*
|
||||
* @param sysImportFanRecord 导粉管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysImportFanRecord(SysImportFanRecord sysImportFanRecord);
|
||||
|
||||
/**
|
||||
* 修改导粉管理
|
||||
*
|
||||
* @param sysImportFanRecord 导粉管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysImportFanRecord(SysImportFanRecord sysImportFanRecord);
|
||||
|
||||
/**
|
||||
* 批量删除导粉管理
|
||||
*
|
||||
* @param ids 需要删除的导粉管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysImportFanRecordByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除导粉管理信息
|
||||
*
|
||||
* @param id 导粉管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysImportFanRecordById(Long id);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.stdiet.custom.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.stdiet.custom.domain.SysImportFanWxAccount;
|
||||
|
||||
/**
|
||||
* 导粉记录中对应微信记录Service接口
|
||||
*
|
||||
* @author xzj
|
||||
* @date 2021-05-17
|
||||
*/
|
||||
public interface ISysImportFanWxAccountService
|
||||
{
|
||||
/**
|
||||
* 查询导粉记录中对应微信记录
|
||||
*
|
||||
* @param id 导粉记录中对应微信记录ID
|
||||
* @return 导粉记录中对应微信记录
|
||||
*/
|
||||
public SysImportFanWxAccount selectSysImportFanWxAccountById(Long id);
|
||||
|
||||
/**
|
||||
* 查询导粉记录中对应微信记录列表
|
||||
*
|
||||
* @param sysImportFanWxAccount 导粉记录中对应微信记录
|
||||
* @return 导粉记录中对应微信记录集合
|
||||
*/
|
||||
public List<SysImportFanWxAccount> selectSysImportFanWxAccountList(SysImportFanWxAccount sysImportFanWxAccount);
|
||||
|
||||
/**
|
||||
* 新增导粉记录中对应微信记录
|
||||
*
|
||||
* @param sysImportFanWxAccount 导粉记录中对应微信记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysImportFanWxAccount(SysImportFanWxAccount sysImportFanWxAccount);
|
||||
|
||||
/**
|
||||
* 修改导粉记录中对应微信记录
|
||||
*
|
||||
* @param sysImportFanWxAccount 导粉记录中对应微信记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysImportFanWxAccount(SysImportFanWxAccount sysImportFanWxAccount);
|
||||
|
||||
/**
|
||||
* 批量删除导粉记录中对应微信记录
|
||||
*
|
||||
* @param ids 需要删除的导粉记录中对应微信记录ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysImportFanWxAccountByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除导粉记录中对应微信记录信息
|
||||
*
|
||||
* @param id 导粉记录中对应微信记录ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysImportFanWxAccountById(Long id);
|
||||
}
|
@ -1,6 +1,8 @@
|
||||
package com.stdiet.custom.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.stdiet.common.core.domain.AjaxResult;
|
||||
import com.stdiet.custom.domain.SysLiveSchedul;
|
||||
|
||||
/**
|
||||
@ -77,4 +79,10 @@ public interface ISysLiveSchedulService
|
||||
* @return
|
||||
*/
|
||||
public SysLiveSchedul getLastLiveSchedulById(SysLiveSchedul sysLiveSchedul);
|
||||
|
||||
/**
|
||||
* 复制上一次直播间计划,并将上次的直播计划状态全部改为未开播
|
||||
* @return
|
||||
*/
|
||||
public AjaxResult copyLastTimeLiveSchedul();
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.stdiet.custom.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.stdiet.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.stdiet.custom.mapper.SysImportFanRecordMapper;
|
||||
import com.stdiet.custom.domain.SysImportFanRecord;
|
||||
import com.stdiet.custom.service.ISysImportFanRecordService;
|
||||
|
||||
/**
|
||||
* 导粉管理Service业务层处理
|
||||
*
|
||||
* @author xzj
|
||||
* @date 2021-05-17
|
||||
*/
|
||||
@Service
|
||||
public class SysImportFanRecordServiceImpl implements ISysImportFanRecordService
|
||||
{
|
||||
@Autowired
|
||||
private SysImportFanRecordMapper sysImportFanRecordMapper;
|
||||
|
||||
/**
|
||||
* 查询导粉管理
|
||||
*
|
||||
* @param id 导粉管理ID
|
||||
* @return 导粉管理
|
||||
*/
|
||||
@Override
|
||||
public SysImportFanRecord selectSysImportFanRecordById(Long id)
|
||||
{
|
||||
return sysImportFanRecordMapper.selectSysImportFanRecordById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询导粉管理列表
|
||||
*
|
||||
* @param sysImportFanRecord 导粉管理
|
||||
* @return 导粉管理
|
||||
*/
|
||||
@Override
|
||||
public List<SysImportFanRecord> selectSysImportFanRecordList(SysImportFanRecord sysImportFanRecord)
|
||||
{
|
||||
return sysImportFanRecordMapper.selectSysImportFanRecordList(sysImportFanRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增导粉管理
|
||||
*
|
||||
* @param sysImportFanRecord 导粉管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSysImportFanRecord(SysImportFanRecord sysImportFanRecord)
|
||||
{
|
||||
sysImportFanRecord.setCreateTime(DateUtils.getNowDate());
|
||||
return sysImportFanRecordMapper.insertSysImportFanRecord(sysImportFanRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改导粉管理
|
||||
*
|
||||
* @param sysImportFanRecord 导粉管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSysImportFanRecord(SysImportFanRecord sysImportFanRecord)
|
||||
{
|
||||
sysImportFanRecord.setUpdateTime(DateUtils.getNowDate());
|
||||
return sysImportFanRecordMapper.updateSysImportFanRecord(sysImportFanRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除导粉管理
|
||||
*
|
||||
* @param ids 需要删除的导粉管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSysImportFanRecordByIds(Long[] ids)
|
||||
{
|
||||
return sysImportFanRecordMapper.deleteSysImportFanRecordByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除导粉管理信息
|
||||
*
|
||||
* @param id 导粉管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSysImportFanRecordById(Long id)
|
||||
{
|
||||
return sysImportFanRecordMapper.deleteSysImportFanRecordById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.stdiet.custom.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.stdiet.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.stdiet.custom.mapper.SysImportFanWxAccountMapper;
|
||||
import com.stdiet.custom.domain.SysImportFanWxAccount;
|
||||
import com.stdiet.custom.service.ISysImportFanWxAccountService;
|
||||
|
||||
/**
|
||||
* 导粉记录中对应微信记录Service业务层处理
|
||||
*
|
||||
* @author xzj
|
||||
* @date 2021-05-17
|
||||
*/
|
||||
@Service
|
||||
public class SysImportFanWxAccountServiceImpl implements ISysImportFanWxAccountService
|
||||
{
|
||||
@Autowired
|
||||
private SysImportFanWxAccountMapper sysImportFanWxAccountMapper;
|
||||
|
||||
/**
|
||||
* 查询导粉记录中对应微信记录
|
||||
*
|
||||
* @param id 导粉记录中对应微信记录ID
|
||||
* @return 导粉记录中对应微信记录
|
||||
*/
|
||||
@Override
|
||||
public SysImportFanWxAccount selectSysImportFanWxAccountById(Long id)
|
||||
{
|
||||
return sysImportFanWxAccountMapper.selectSysImportFanWxAccountById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询导粉记录中对应微信记录列表
|
||||
*
|
||||
* @param sysImportFanWxAccount 导粉记录中对应微信记录
|
||||
* @return 导粉记录中对应微信记录
|
||||
*/
|
||||
@Override
|
||||
public List<SysImportFanWxAccount> selectSysImportFanWxAccountList(SysImportFanWxAccount sysImportFanWxAccount)
|
||||
{
|
||||
return sysImportFanWxAccountMapper.selectSysImportFanWxAccountList(sysImportFanWxAccount);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增导粉记录中对应微信记录
|
||||
*
|
||||
* @param sysImportFanWxAccount 导粉记录中对应微信记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSysImportFanWxAccount(SysImportFanWxAccount sysImportFanWxAccount)
|
||||
{
|
||||
sysImportFanWxAccount.setCreateTime(DateUtils.getNowDate());
|
||||
return sysImportFanWxAccountMapper.insertSysImportFanWxAccount(sysImportFanWxAccount);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改导粉记录中对应微信记录
|
||||
*
|
||||
* @param sysImportFanWxAccount 导粉记录中对应微信记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSysImportFanWxAccount(SysImportFanWxAccount sysImportFanWxAccount)
|
||||
{
|
||||
sysImportFanWxAccount.setUpdateTime(DateUtils.getNowDate());
|
||||
return sysImportFanWxAccountMapper.updateSysImportFanWxAccount(sysImportFanWxAccount);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除导粉记录中对应微信记录
|
||||
*
|
||||
* @param ids 需要删除的导粉记录中对应微信记录ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSysImportFanWxAccountByIds(Long[] ids)
|
||||
{
|
||||
return sysImportFanWxAccountMapper.deleteSysImportFanWxAccountByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除导粉记录中对应微信记录信息
|
||||
*
|
||||
* @param id 导粉记录中对应微信记录ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSysImportFanWxAccountById(Long id)
|
||||
{
|
||||
return sysImportFanWxAccountMapper.deleteSysImportFanWxAccountById(id);
|
||||
}
|
||||
}
|
@ -1,7 +1,13 @@
|
||||
package com.stdiet.custom.service.impl;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.stdiet.common.core.domain.AjaxResult;
|
||||
import com.stdiet.common.utils.DateUtils;
|
||||
import com.stdiet.common.utils.SecurityUtils;
|
||||
import lombok.Data;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -123,4 +129,53 @@ public class SysLiveSchedulServiceImpl implements ISysLiveSchedulService
|
||||
public SysLiveSchedul getLastLiveSchedulById(SysLiveSchedul sysLiveSchedul){
|
||||
return sysLiveSchedulMapper.getLastLiveSchedulById(sysLiveSchedul);
|
||||
}
|
||||
|
||||
/**
|
||||
* 复制上一次直播间计划,并将上次的直播计划状态全部改为未开播
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult copyLastTimeLiveSchedul(){
|
||||
AjaxResult result = AjaxResult.success();
|
||||
//获取上一次直播时间
|
||||
SysLiveSchedul lastLiveSchedul = sysLiveSchedulMapper.getLastLiveSchedul();
|
||||
if(lastLiveSchedul == null){
|
||||
return AjaxResult.error("不存在直播记录,无法复制");
|
||||
}
|
||||
Date nowDate = new Date();
|
||||
LocalDate nowLocalDate = DateUtils.dateToLocalDate(nowDate);
|
||||
if(DateUtils.isSameDay(lastLiveSchedul.getLiveSchedulDate(), nowDate)){
|
||||
return AjaxResult.error("今日已存在直播记录,无法复制");
|
||||
}
|
||||
//获取上一次所有计划
|
||||
List<SysLiveSchedul> list = sysLiveSchedulMapper.getAllLiveSchedulByDate(lastLiveSchedul);
|
||||
if(list != null && list.size() > 0){
|
||||
int row = 0;
|
||||
for (SysLiveSchedul schedul : list) {
|
||||
schedul.setLiveStatus(0L);
|
||||
schedul.setCreateTime(new Date());
|
||||
schedul.setUpdateTime(null);
|
||||
schedul.setCreateBy(SecurityUtils.getLoginUser().getUser().getUserId()+"");
|
||||
schedul.setUpdateBy(null);
|
||||
schedul.setLiveSchedulDate(DateUtils.dateToDate(nowDate));
|
||||
if(schedul.getLiveStartTime() != null) {
|
||||
LocalDateTime liveStartTime = DateUtils.dateToLocalDateTime(schedul.getLiveStartTime());
|
||||
schedul.setLiveStartTime(DateUtils.localDateTimeToDate(LocalDateTime.of(nowLocalDate.getYear(),nowLocalDate.getMonthValue(),nowLocalDate.getDayOfMonth(),
|
||||
liveStartTime.getHour(),liveStartTime.getMinute())));
|
||||
System.out.println(liveStartTime.getHour() + "-" +liveStartTime.getMinute());
|
||||
}
|
||||
if(schedul.getLiveEndTime() != null) {
|
||||
LocalDateTime liveEndTime = DateUtils.dateToLocalDateTime(schedul.getLiveEndTime());
|
||||
schedul.setLiveEndTime(DateUtils.localDateTimeToDate(LocalDateTime.of(nowLocalDate.getYear(),nowLocalDate.getMonthValue(),nowLocalDate.getDayOfMonth(),
|
||||
liveEndTime.getHour(),liveEndTime.getMinute())));
|
||||
System.out.println(liveEndTime.getHour() + "-" +liveEndTime.getMinute());
|
||||
}
|
||||
|
||||
row = sysLiveSchedulMapper.insertSysLiveSchedul(schedul);
|
||||
}
|
||||
}else{
|
||||
return AjaxResult.error("不存在直播记录,无法复制");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
@ -40,7 +40,7 @@ public class SysNutritionQuestionServiceImpl implements ISysNutritionQuestionSer
|
||||
public String index_path;
|
||||
|
||||
//建立索引的字段名称
|
||||
public static final String[] index_field_array = {"id", "title", "content", "key", "showFlag"};
|
||||
public static final String[] index_field_array = {"id", "title", "content", "key", "showFlag", "createTime"};
|
||||
//查询字段
|
||||
public static final String[] index_select_field_array = {"title", "content", "key"};
|
||||
|
||||
@ -275,7 +275,8 @@ public class SysNutritionQuestionServiceImpl implements ISysNutritionQuestionSer
|
||||
private NutritionQuestionResponse documentToNutritionQuestion(Document document){
|
||||
NutritionQuestionResponse nutritionQuestionResponse = new NutritionQuestionResponse();
|
||||
for (String fieldName : index_field_array) {
|
||||
ReflectUtils.setFieldValue(nutritionQuestionResponse, fieldName, document.get(fieldName));
|
||||
String value = document.get(fieldName);
|
||||
ReflectUtils.setFieldValue(nutritionQuestionResponse, fieldName, StringUtils.isEmpty(value) ? "" : value);
|
||||
}
|
||||
return nutritionQuestionResponse;
|
||||
}
|
||||
@ -288,7 +289,12 @@ public class SysNutritionQuestionServiceImpl implements ISysNutritionQuestionSer
|
||||
private Document nutritionQuestionToDocument(SysNutritionQuestion sysNutritionQuestion){
|
||||
Document document = new Document();
|
||||
for (String fieldName : index_field_array) {
|
||||
TextField field = new TextField(fieldName, ReflectUtils.getFieldValue(sysNutritionQuestion, fieldName)+"", Field.Store.YES);
|
||||
TextField field = null;
|
||||
if("createTime".equals(fieldName)){
|
||||
field = new TextField(fieldName, DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS,sysNutritionQuestion.getCreateTime()), Field.Store.YES);
|
||||
} else{
|
||||
field = new TextField(fieldName, ReflectUtils.getFieldValue(sysNutritionQuestion, fieldName)+"", Field.Store.YES);
|
||||
}
|
||||
if(nutritionQuestionBoostMap.containsKey(fieldName)){
|
||||
field.setBoost(nutritionQuestionBoostMap.get(fieldName).floatValue());
|
||||
}
|
||||
|
@ -208,6 +208,19 @@ public class SysOrderServiceImpl implements ISysOrderService {
|
||||
sysOrder.setOperatorId(null);
|
||||
sysOrder.setOperatorAssisId(null);
|
||||
}
|
||||
if(oldSysOrder.getStartTime() == null){//确保提成计算时间不为空
|
||||
sysOrder.setCommissStartTime(sysOrder.getOrderTime());
|
||||
}
|
||||
//如果更新了开始服务时间,需要判断是否需要同步提成计算时间
|
||||
if (oldSysOrder.getStartTime() != null && sysOrder.getStartTime() != null
|
||||
&& ChronoUnit.DAYS.between(DateUtils.dateToLocalDate(oldSysOrder.getStartTime()), DateUtils.dateToLocalDate(sysOrder.getStartTime())) != 0) {
|
||||
//本月第一天
|
||||
LocalDate monthStart = LocalDate.now().with(TemporalAdjusters.firstDayOfMonth());
|
||||
//旧的开始时间和新的开始时间都要需要大于本月第一天
|
||||
if(oldSysOrder.getCommissStartTime() != null && ChronoUnit.DAYS.between(monthStart, DateUtils.dateToLocalDate(oldSysOrder.getCommissStartTime())) >= 0 && ChronoUnit.DAYS.between(monthStart, DateUtils.dateToLocalDate(sysOrder.getStartTime())) >= 0){
|
||||
sysOrder.setCommissStartTime(sysOrder.getStartTime());
|
||||
}
|
||||
}
|
||||
//更新订单
|
||||
int row = sysOrderMapper.updateSysOrder(sysOrder);
|
||||
// 审核后的订单才生成食谱
|
||||
@ -300,7 +313,7 @@ public class SysOrderServiceImpl implements ISysOrderService {
|
||||
for (SysOrder sysOrder : orderList) {
|
||||
LocalDate newStartTime = null;
|
||||
//判断是否提成单,拆分单中的副单,体验单,定金单
|
||||
if(sysOrder.getAfterSaleCommissOrder().intValue() == 1 || ("1".equals(sysOrder.getOrderType()) && sysOrder.getMainOrderId().intValue() != 0) ||
|
||||
if(sysOrder.getStartTime() == null || sysOrder.getAfterSaleCommissOrder().intValue() == 1 || ("1".equals(sysOrder.getOrderType()) && sysOrder.getMainOrderId().intValue() != 0) ||
|
||||
"2".equals(sysOrder.getOrderType()) || "1".equals(sysOrder.getOrderMoneyType())){
|
||||
continue;
|
||||
}
|
||||
@ -310,7 +323,7 @@ public class SysOrderServiceImpl implements ISysOrderService {
|
||||
//本月第一天
|
||||
LocalDate monthStart = LocalDate.now().with(TemporalAdjusters.firstDayOfMonth());
|
||||
//旧的开始时间和新的开始时间都要需要大于本月第一天
|
||||
if(ChronoUnit.DAYS.between(monthStart, DateUtils.dateToLocalDate(sysOrder.getStartTime())) >= 0 && ChronoUnit.DAYS.between(monthStart, newStartTime) >= 0){
|
||||
if(sysOrder.getCommissStartTime() != null && ChronoUnit.DAYS.between(monthStart, DateUtils.dateToLocalDate(sysOrder.getCommissStartTime())) >= 0 && ChronoUnit.DAYS.between(monthStart, newStartTime) >= 0){
|
||||
sysOrder.setCommissStartTime(DateUtils.localDateToDate(newStartTime));
|
||||
}
|
||||
sysOrder.setStartTime(DateUtils.localDateToDate(newStartTime));
|
||||
|
@ -262,8 +262,9 @@ public class SysRecipesPlanServiceImpl implements ISysRecipesPlanService {
|
||||
//查询在上一个订单最后一条食谱计划
|
||||
SysRecipesPlan beforeOrderLastPlan = getLastDayRecipesPlan(sysOrder.getCusId(), sysOrder.getOrderTime());
|
||||
int startNumDay = 0;
|
||||
//之前是否存在食谱
|
||||
if (beforeOrderLastPlan != null) {
|
||||
//System.out.println(sysOrder.getRecipesPlanContinue() == null);
|
||||
//之前是否存在食谱以及该订单食谱计划是否需要连续
|
||||
if (beforeOrderLastPlan != null && sysOrder.getRecipesPlanContinue().intValue() == 1) {
|
||||
long differDay = ChronoUnit.DAYS.between(DateUtils.dateToLocalDate(beforeOrderLastPlan.getEndDate()), serverStartDate);
|
||||
//检查之前食谱的结束时间和目前该订单的开始时间是否连续
|
||||
if (differDay <= 1) {
|
||||
@ -280,6 +281,7 @@ public class SysRecipesPlanServiceImpl implements ISysRecipesPlanService {
|
||||
}
|
||||
startNumDay = beforeOrderLastPlan.getEndNumDay();
|
||||
}
|
||||
//System.out.println(startNumDay + "-------------------------------");
|
||||
List<SysRecipesPlan> planList = new ArrayList<>();
|
||||
LocalDate planStartDate = null;
|
||||
LocalDate planEndDate = serverStartDate.plusDays(-1);
|
||||
|
Reference in New Issue
Block a user