Merge branch 'master' of gitee.com:darlk/ShengTangManage into develop
This commit is contained in:
commit
6ac09ed80a
@ -0,0 +1,103 @@
|
|||||||
|
package com.stdiet.web.controller.custom;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.stdiet.common.annotation.Log;
|
||||||
|
import com.stdiet.common.core.controller.BaseController;
|
||||||
|
import com.stdiet.common.core.domain.AjaxResult;
|
||||||
|
import com.stdiet.common.enums.BusinessType;
|
||||||
|
import com.stdiet.custom.domain.SysImportFanRecord;
|
||||||
|
import com.stdiet.custom.service.ISysImportFanRecordService;
|
||||||
|
import com.stdiet.common.utils.poi.ExcelUtil;
|
||||||
|
import com.stdiet.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导粉管理Controller
|
||||||
|
*
|
||||||
|
* @author xzj
|
||||||
|
* @date 2021-05-17
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/custom/importFanRecord")
|
||||||
|
public class SysImportFanRecordController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ISysImportFanRecordService sysImportFanRecordService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询导粉管理列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('custom:importFanRecord:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(SysImportFanRecord sysImportFanRecord)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<SysImportFanRecord> list = sysImportFanRecordService.selectSysImportFanRecordList(sysImportFanRecord);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出导粉管理列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('custom:importFanRecord:export')")
|
||||||
|
@Log(title = "导粉管理", businessType = BusinessType.EXPORT)
|
||||||
|
@GetMapping("/export")
|
||||||
|
public AjaxResult export(SysImportFanRecord sysImportFanRecord)
|
||||||
|
{
|
||||||
|
List<SysImportFanRecord> list = sysImportFanRecordService.selectSysImportFanRecordList(sysImportFanRecord);
|
||||||
|
ExcelUtil<SysImportFanRecord> util = new ExcelUtil<SysImportFanRecord>(SysImportFanRecord.class);
|
||||||
|
return util.exportExcel(list, "importFanRecord");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取导粉管理详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('custom:importFanRecord:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return AjaxResult.success(sysImportFanRecordService.selectSysImportFanRecordById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增导粉管理
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('custom:importFanRecord:add')")
|
||||||
|
@Log(title = "导粉管理", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody SysImportFanRecord sysImportFanRecord)
|
||||||
|
{
|
||||||
|
return toAjax(sysImportFanRecordService.insertSysImportFanRecord(sysImportFanRecord));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改导粉管理
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('custom:importFanRecord:edit')")
|
||||||
|
@Log(title = "导粉管理", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody SysImportFanRecord sysImportFanRecord)
|
||||||
|
{
|
||||||
|
return toAjax(sysImportFanRecordService.updateSysImportFanRecord(sysImportFanRecord));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除导粉管理
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('custom:importFanRecord:remove')")
|
||||||
|
@Log(title = "导粉管理", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(sysImportFanRecordService.deleteSysImportFanRecordByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
@ -2,6 +2,8 @@ package com.stdiet.web.controller.custom;
|
|||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.stdiet.common.utils.DateUtils;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
@ -84,7 +86,12 @@ public class SysLiveSchedulController extends BaseController
|
|||||||
//下播,补全下播时间
|
//下播,补全下播时间
|
||||||
if (sysLiveSchedul.getLiveStatus() != null && sysLiveSchedul.getLiveStatus().longValue() == 2
|
if (sysLiveSchedul.getLiveStatus() != null && sysLiveSchedul.getLiveStatus().longValue() == 2
|
||||||
&& sysLiveSchedul.getLiveEndTime() == null){
|
&& sysLiveSchedul.getLiveEndTime() == null){
|
||||||
sysLiveSchedul.setLiveEndTime(new Date());
|
Date now = new Date();
|
||||||
|
if(!DateUtils.isSameDay(now,sysLiveSchedul.getLiveStartTime())){
|
||||||
|
sysLiveSchedul.setLiveEndTime(DateUtils.getLastMinuteDate(sysLiveSchedul.getLiveStartTime()));
|
||||||
|
}else{
|
||||||
|
sysLiveSchedul.setLiveEndTime(now);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
int row = sysLiveSchedulService.insertSysLiveSchedul(sysLiveSchedul);
|
int row = sysLiveSchedulService.insertSysLiveSchedul(sysLiveSchedul);
|
||||||
if(row > 0){
|
if(row > 0){
|
||||||
@ -96,7 +103,11 @@ public class SysLiveSchedulController extends BaseController
|
|||||||
if(lastLiveSchedul != null && lastLiveSchedul.getLiveStatus().longValue() == 1){
|
if(lastLiveSchedul != null && lastLiveSchedul.getLiveStatus().longValue() == 1){
|
||||||
lastLiveSchedul.setLiveStatus(2L);
|
lastLiveSchedul.setLiveStatus(2L);
|
||||||
if(lastLiveSchedul.getLiveEndTime() == null){
|
if(lastLiveSchedul.getLiveEndTime() == null){
|
||||||
lastLiveSchedul.setLiveEndTime(sysLiveSchedul.getLiveStartTime());
|
if(!DateUtils.isSameDay(lastLiveSchedul.getLiveStartTime(),sysLiveSchedul.getLiveStartTime())){
|
||||||
|
lastLiveSchedul.setLiveEndTime(DateUtils.getLastMinuteDate(lastLiveSchedul.getLiveStartTime()));
|
||||||
|
}else{
|
||||||
|
lastLiveSchedul.setLiveEndTime(sysLiveSchedul.getLiveStartTime());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
row = sysLiveSchedulService.updateSysLiveSchedul(lastLiveSchedul);
|
row = sysLiveSchedulService.updateSysLiveSchedul(lastLiveSchedul);
|
||||||
}
|
}
|
||||||
@ -121,7 +132,12 @@ public class SysLiveSchedulController extends BaseController
|
|||||||
//下播,补全下播时间
|
//下播,补全下播时间
|
||||||
if (sysLiveSchedul.getLiveStatus() != null && sysLiveSchedul.getLiveStatus().longValue() == 2
|
if (sysLiveSchedul.getLiveStatus() != null && sysLiveSchedul.getLiveStatus().longValue() == 2
|
||||||
&& sysLiveSchedul.getLiveEndTime() == null){
|
&& sysLiveSchedul.getLiveEndTime() == null){
|
||||||
sysLiveSchedul.setLiveEndTime(new Date());
|
Date now = new Date();
|
||||||
|
if(!DateUtils.isSameDay(now,sysLiveSchedul.getLiveStartTime())){
|
||||||
|
sysLiveSchedul.setLiveEndTime(DateUtils.getLastMinuteDate(sysLiveSchedul.getLiveStartTime()));
|
||||||
|
}else{
|
||||||
|
sysLiveSchedul.setLiveEndTime(now);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
int row = sysLiveSchedulService.updateSysLiveSchedulById(sysLiveSchedul);
|
int row = sysLiveSchedulService.updateSysLiveSchedulById(sysLiveSchedul);
|
||||||
if(row > 0){
|
if(row > 0){
|
||||||
@ -133,7 +149,11 @@ public class SysLiveSchedulController extends BaseController
|
|||||||
if(lastLiveSchedul != null && lastLiveSchedul.getLiveStatus().longValue() == 1){
|
if(lastLiveSchedul != null && lastLiveSchedul.getLiveStatus().longValue() == 1){
|
||||||
lastLiveSchedul.setLiveStatus(2L);
|
lastLiveSchedul.setLiveStatus(2L);
|
||||||
if(lastLiveSchedul.getLiveEndTime() == null){
|
if(lastLiveSchedul.getLiveEndTime() == null){
|
||||||
lastLiveSchedul.setLiveEndTime(sysLiveSchedul.getLiveStartTime());
|
if(!DateUtils.isSameDay(lastLiveSchedul.getLiveStartTime(),sysLiveSchedul.getLiveStartTime())){
|
||||||
|
lastLiveSchedul.setLiveEndTime(DateUtils.getLastMinuteDate(lastLiveSchedul.getLiveStartTime()));
|
||||||
|
}else{
|
||||||
|
lastLiveSchedul.setLiveEndTime(sysLiveSchedul.getLiveStartTime());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
row = sysLiveSchedulService.updateSysLiveSchedul(lastLiveSchedul);
|
row = sysLiveSchedulService.updateSysLiveSchedul(lastLiveSchedul);
|
||||||
}
|
}
|
||||||
@ -178,7 +198,11 @@ public class SysLiveSchedulController extends BaseController
|
|||||||
if(lastLiveSchedul != null && lastLiveSchedul.getLiveStatus().longValue() == 1){
|
if(lastLiveSchedul != null && lastLiveSchedul.getLiveStatus().longValue() == 1){
|
||||||
lastLiveSchedul.setLiveStatus(2L);
|
lastLiveSchedul.setLiveStatus(2L);
|
||||||
if(lastLiveSchedul.getLiveEndTime() == null){
|
if(lastLiveSchedul.getLiveEndTime() == null){
|
||||||
lastLiveSchedul.setLiveEndTime(sysLiveSchedul.getLiveStartTime());
|
if(!DateUtils.isSameDay(lastLiveSchedul.getLiveStartTime(),sysLiveSchedul.getLiveStartTime())){
|
||||||
|
lastLiveSchedul.setLiveEndTime(DateUtils.getLastMinuteDate(lastLiveSchedul.getLiveStartTime()));
|
||||||
|
}else{
|
||||||
|
lastLiveSchedul.setLiveEndTime(sysLiveSchedul.getLiveStartTime());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
row = sysLiveSchedulService.updateSysLiveSchedul(lastLiveSchedul);
|
row = sysLiveSchedulService.updateSysLiveSchedul(lastLiveSchedul);
|
||||||
}
|
}
|
||||||
@ -188,10 +212,25 @@ public class SysLiveSchedulController extends BaseController
|
|||||||
}else{
|
}else{
|
||||||
SysLiveSchedul newLiveSchedul = sysLiveSchedulService.selectSysLiveSchedulById(sysLiveSchedul.getId());
|
SysLiveSchedul newLiveSchedul = sysLiveSchedulService.selectSysLiveSchedulById(sysLiveSchedul.getId());
|
||||||
if(newLiveSchedul != null && newLiveSchedul.getLiveEndTime() == null){
|
if(newLiveSchedul != null && newLiveSchedul.getLiveEndTime() == null){
|
||||||
sysLiveSchedul.setLiveEndTime(new Date());
|
Date now = new Date();
|
||||||
|
if(!DateUtils.isSameDay(now,newLiveSchedul.getLiveStartTime())){
|
||||||
|
sysLiveSchedul.setLiveEndTime(DateUtils.getLastMinuteDate(newLiveSchedul.getLiveStartTime()));
|
||||||
|
}else{
|
||||||
|
sysLiveSchedul.setLiveEndTime(now);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
row = sysLiveSchedulService.updateSysLiveSchedul(sysLiveSchedul);
|
row = sysLiveSchedulService.updateSysLiveSchedul(sysLiveSchedul);
|
||||||
}
|
}
|
||||||
return toAjax(row);
|
return toAjax(row);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 复制上次直播记录
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('custom:liveSchedul:add')")
|
||||||
|
@Log(title = "复制上次直播记录", businessType = BusinessType.INSERT)
|
||||||
|
@GetMapping(value = "/copyLastTimeLiveSchedul")
|
||||||
|
public AjaxResult copyLastTimeLiveSchedul(){
|
||||||
|
return sysLiveSchedulService.copyLastTimeLiveSchedul();
|
||||||
|
}
|
||||||
}
|
}
|
@ -169,7 +169,7 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
|
|||||||
* LocalDateTime对象转Date
|
* LocalDateTime对象转Date
|
||||||
* */
|
* */
|
||||||
public static Date localDateTimeToDate(LocalDateTime localDateTime){
|
public static Date localDateTimeToDate(LocalDateTime localDateTime){
|
||||||
ZonedDateTime zdt = LocalDateTime.now().atZone(ZoneId.systemDefault());
|
ZonedDateTime zdt = localDateTime.atZone(ZoneId.systemDefault());
|
||||||
return Date.from(zdt.toInstant());
|
return Date.from(zdt.toInstant());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -193,8 +193,42 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
|
|||||||
return date.format(fmt);
|
return date.format(fmt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String localDateTimeToString(LocalDateTime date, String pattern){
|
||||||
|
DateTimeFormatter fmt = DateTimeFormatter.ofPattern(pattern);
|
||||||
|
return date.format(fmt);
|
||||||
|
}
|
||||||
|
|
||||||
public static LocalDate stringToLocalDate(String date, String pattern){
|
public static LocalDate stringToLocalDate(String date, String pattern){
|
||||||
DateTimeFormatter fmt = DateTimeFormatter.ofPattern(pattern);
|
DateTimeFormatter fmt = DateTimeFormatter.ofPattern(pattern);
|
||||||
return LocalDate.parse(date, fmt);
|
return LocalDate.parse(date, fmt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当前Date型日期
|
||||||
|
*
|
||||||
|
* @return Date() 当前日期
|
||||||
|
*/
|
||||||
|
public static Date dateToDate(Date date)
|
||||||
|
{
|
||||||
|
return parseDate(DateFormatUtils.format(date, YYYY_MM_DD));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断两个日期是否同一天
|
||||||
|
* @param dateOne
|
||||||
|
* @param dateTwo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static boolean isSameDay(Date dateOne, Date dateTwo){
|
||||||
|
return dateToDate(dateOne).getTime() == dateToDate(dateTwo).getTime();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取该日期的最后一秒对应时间
|
||||||
|
* @param date
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static Date getLastMinuteDate(Date date){
|
||||||
|
return new Date(dateToDate(date).getTime()+(24 * 60 * 60 * 1000 - 1000));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -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 counted;
|
||||||
|
|
||||||
|
//食谱计划是否连续上个订单
|
||||||
|
private Integer recipesPlanContinue;
|
||||||
|
|
||||||
}
|
}
|
@ -26,4 +26,6 @@ public class NutritionQuestionResponse implements Serializable {
|
|||||||
|
|
||||||
/** 小程序是否显示,0不显示 1显示 */
|
/** 小程序是否显示,0不显示 1显示 */
|
||||||
private String showFlag;
|
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
|
* @return
|
||||||
*/
|
*/
|
||||||
public SysLiveSchedul getLastLiveSchedulById(SysLiveSchedul sysLiveSchedul);
|
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;
|
package com.stdiet.custom.service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.stdiet.common.core.domain.AjaxResult;
|
||||||
import com.stdiet.custom.domain.SysLiveSchedul;
|
import com.stdiet.custom.domain.SysLiveSchedul;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -77,4 +79,10 @@ public interface ISysLiveSchedulService
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public SysLiveSchedul getLastLiveSchedulById(SysLiveSchedul sysLiveSchedul);
|
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;
|
package com.stdiet.custom.service.impl;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.stdiet.common.core.domain.AjaxResult;
|
||||||
import com.stdiet.common.utils.DateUtils;
|
import com.stdiet.common.utils.DateUtils;
|
||||||
|
import com.stdiet.common.utils.SecurityUtils;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -123,4 +129,53 @@ public class SysLiveSchedulServiceImpl implements ISysLiveSchedulService
|
|||||||
public SysLiveSchedul getLastLiveSchedulById(SysLiveSchedul sysLiveSchedul){
|
public SysLiveSchedul getLastLiveSchedulById(SysLiveSchedul sysLiveSchedul){
|
||||||
return sysLiveSchedulMapper.getLastLiveSchedulById(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 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"};
|
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){
|
private NutritionQuestionResponse documentToNutritionQuestion(Document document){
|
||||||
NutritionQuestionResponse nutritionQuestionResponse = new NutritionQuestionResponse();
|
NutritionQuestionResponse nutritionQuestionResponse = new NutritionQuestionResponse();
|
||||||
for (String fieldName : index_field_array) {
|
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;
|
return nutritionQuestionResponse;
|
||||||
}
|
}
|
||||||
@ -288,7 +289,12 @@ public class SysNutritionQuestionServiceImpl implements ISysNutritionQuestionSer
|
|||||||
private Document nutritionQuestionToDocument(SysNutritionQuestion sysNutritionQuestion){
|
private Document nutritionQuestionToDocument(SysNutritionQuestion sysNutritionQuestion){
|
||||||
Document document = new Document();
|
Document document = new Document();
|
||||||
for (String fieldName : index_field_array) {
|
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)){
|
if(nutritionQuestionBoostMap.containsKey(fieldName)){
|
||||||
field.setBoost(nutritionQuestionBoostMap.get(fieldName).floatValue());
|
field.setBoost(nutritionQuestionBoostMap.get(fieldName).floatValue());
|
||||||
}
|
}
|
||||||
|
@ -208,6 +208,19 @@ public class SysOrderServiceImpl implements ISysOrderService {
|
|||||||
sysOrder.setOperatorId(null);
|
sysOrder.setOperatorId(null);
|
||||||
sysOrder.setOperatorAssisId(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);
|
int row = sysOrderMapper.updateSysOrder(sysOrder);
|
||||||
// 审核后的订单才生成食谱
|
// 审核后的订单才生成食谱
|
||||||
@ -300,7 +313,7 @@ public class SysOrderServiceImpl implements ISysOrderService {
|
|||||||
for (SysOrder sysOrder : orderList) {
|
for (SysOrder sysOrder : orderList) {
|
||||||
LocalDate newStartTime = null;
|
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())){
|
"2".equals(sysOrder.getOrderType()) || "1".equals(sysOrder.getOrderMoneyType())){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -310,7 +323,7 @@ public class SysOrderServiceImpl implements ISysOrderService {
|
|||||||
//本月第一天
|
//本月第一天
|
||||||
LocalDate monthStart = LocalDate.now().with(TemporalAdjusters.firstDayOfMonth());
|
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.setCommissStartTime(DateUtils.localDateToDate(newStartTime));
|
||||||
}
|
}
|
||||||
sysOrder.setStartTime(DateUtils.localDateToDate(newStartTime));
|
sysOrder.setStartTime(DateUtils.localDateToDate(newStartTime));
|
||||||
|
@ -262,8 +262,9 @@ public class SysRecipesPlanServiceImpl implements ISysRecipesPlanService {
|
|||||||
//查询在上一个订单最后一条食谱计划
|
//查询在上一个订单最后一条食谱计划
|
||||||
SysRecipesPlan beforeOrderLastPlan = getLastDayRecipesPlan(sysOrder.getCusId(), sysOrder.getOrderTime());
|
SysRecipesPlan beforeOrderLastPlan = getLastDayRecipesPlan(sysOrder.getCusId(), sysOrder.getOrderTime());
|
||||||
int startNumDay = 0;
|
int startNumDay = 0;
|
||||||
//之前是否存在食谱
|
//System.out.println(sysOrder.getRecipesPlanContinue() == null);
|
||||||
if (beforeOrderLastPlan != null) {
|
//之前是否存在食谱以及该订单食谱计划是否需要连续
|
||||||
|
if (beforeOrderLastPlan != null && sysOrder.getRecipesPlanContinue().intValue() == 1) {
|
||||||
long differDay = ChronoUnit.DAYS.between(DateUtils.dateToLocalDate(beforeOrderLastPlan.getEndDate()), serverStartDate);
|
long differDay = ChronoUnit.DAYS.between(DateUtils.dateToLocalDate(beforeOrderLastPlan.getEndDate()), serverStartDate);
|
||||||
//检查之前食谱的结束时间和目前该订单的开始时间是否连续
|
//检查之前食谱的结束时间和目前该订单的开始时间是否连续
|
||||||
if (differDay <= 1) {
|
if (differDay <= 1) {
|
||||||
@ -280,6 +281,7 @@ public class SysRecipesPlanServiceImpl implements ISysRecipesPlanService {
|
|||||||
}
|
}
|
||||||
startNumDay = beforeOrderLastPlan.getEndNumDay();
|
startNumDay = beforeOrderLastPlan.getEndNumDay();
|
||||||
}
|
}
|
||||||
|
//System.out.println(startNumDay + "-------------------------------");
|
||||||
List<SysRecipesPlan> planList = new ArrayList<>();
|
List<SysRecipesPlan> planList = new ArrayList<>();
|
||||||
LocalDate planStartDate = null;
|
LocalDate planStartDate = null;
|
||||||
LocalDate planEndDate = serverStartDate.plusDays(-1);
|
LocalDate planEndDate = serverStartDate.plusDays(-1);
|
||||||
|
@ -0,0 +1,86 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.stdiet.custom.mapper.SysImportFanRecordMapper">
|
||||||
|
|
||||||
|
<resultMap type="SysImportFanRecord" id="SysImportFanRecordResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="importFanDate" column="import_fan_date" />
|
||||||
|
<result property="importFanChannel" column="import_fan_channel" />
|
||||||
|
<result property="importFanLive" column="import_fan_live" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="delFlag" column="del_flag" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectSysImportFanRecordVo">
|
||||||
|
select id, import_fan_date, import_fan_channel, import_fan_live, create_time, create_by, update_time, update_by, del_flag from sys_import_fan_record
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectSysImportFanRecordList" parameterType="SysImportFanRecord" resultMap="SysImportFanRecordResult">
|
||||||
|
<include refid="selectSysImportFanRecordVo"/>
|
||||||
|
where del_flag = 0
|
||||||
|
<if test="importFanDate != null "> and import_fan_date = #{importFanDate}</if>
|
||||||
|
<if test="importFanChannel != null "> and import_fan_channel = #{importFanChannel}</if>
|
||||||
|
<if test="importFanLive != null "> and import_fan_live = #{importFanLive}</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSysImportFanRecordById" parameterType="Long" resultMap="SysImportFanRecordResult">
|
||||||
|
<include refid="selectSysImportFanRecordVo"/>
|
||||||
|
where id = #{id} and del_flag = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertSysImportFanRecord" parameterType="SysImportFanRecord" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into sys_import_fan_record
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="importFanDate != null">import_fan_date,</if>
|
||||||
|
<if test="importFanChannel != null">import_fan_channel,</if>
|
||||||
|
<if test="importFanLive != null">import_fan_live,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="delFlag != null">del_flag,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="importFanDate != null">#{importFanDate},</if>
|
||||||
|
<if test="importFanChannel != null">#{importFanChannel},</if>
|
||||||
|
<if test="importFanLive != null">#{importFanLive},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="delFlag != null">#{delFlag},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateSysImportFanRecord" parameterType="SysImportFanRecord">
|
||||||
|
update sys_import_fan_record
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="importFanDate != null">import_fan_date = #{importFanDate},</if>
|
||||||
|
<if test="importFanChannel != null">import_fan_channel = #{importFanChannel},</if>
|
||||||
|
<if test="importFanLive != null">import_fan_live = #{importFanLive},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="deleteSysImportFanRecordById" parameterType="Long">
|
||||||
|
update sys_import_fan_record set del_flag = 1 where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="deleteSysImportFanRecordByIds" parameterType="String">
|
||||||
|
update sys_import_fan_record set del_flag = 1 where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,85 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.stdiet.custom.mapper.SysImportFanWxAccountMapper">
|
||||||
|
|
||||||
|
<resultMap type="SysImportFanWxAccount" id="SysImportFanWxAccountResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="importFanRecordId" column="import_fan_record_id" />
|
||||||
|
<result property="importWxAccountId" column="import_wx_account_id" />
|
||||||
|
<result property="importFanNum" column="import_fan_num" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="delFlag" column="del_flag" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectSysImportFanWxAccountVo">
|
||||||
|
select id, import_fan_record_id, import_wx_account_id, import_fan_num, create_time, create_by, update_time, update_by, del_flag from sys_import_fan_wx_account
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectSysImportFanWxAccountList" parameterType="SysImportFanWxAccount" resultMap="SysImportFanWxAccountResult">
|
||||||
|
<include refid="selectSysImportFanWxAccountVo"/> where del_flag = 0
|
||||||
|
<if test="importFanRecordId != null "> and import_fan_record_id = #{importFanRecordId}</if>
|
||||||
|
<if test="importWxAccountId != null "> and import_wx_account_id = #{importWxAccountId}</if>
|
||||||
|
<if test="importFanNum != null "> and import_fan_num = #{importFanNum}</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSysImportFanWxAccountById" parameterType="Long" resultMap="SysImportFanWxAccountResult">
|
||||||
|
<include refid="selectSysImportFanWxAccountVo"/>
|
||||||
|
where id = #{id} and del_flag = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertSysImportFanWxAccount" parameterType="SysImportFanWxAccount" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into sys_import_fan_wx_account
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="importFanRecordId != null">import_fan_record_id,</if>
|
||||||
|
<if test="importWxAccountId != null">import_wx_account_id,</if>
|
||||||
|
<if test="importFanNum != null">import_fan_num,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="delFlag != null">del_flag,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="importFanRecordId != null">#{importFanRecordId},</if>
|
||||||
|
<if test="importWxAccountId != null">#{importWxAccountId},</if>
|
||||||
|
<if test="importFanNum != null">#{importFanNum},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="delFlag != null">#{delFlag},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateSysImportFanWxAccount" parameterType="SysImportFanWxAccount">
|
||||||
|
update sys_import_fan_wx_account
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="importFanRecordId != null">import_fan_record_id = #{importFanRecordId},</if>
|
||||||
|
<if test="importWxAccountId != null">import_wx_account_id = #{importWxAccountId},</if>
|
||||||
|
<if test="importFanNum != null">import_fan_num = #{importFanNum},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="deleteSysImportFanWxAccountById" parameterType="Long">
|
||||||
|
update sys_import_fan_wx_account set del_flag = 1 where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="deleteSysImportFanWxAccountByIds" parameterType="String">
|
||||||
|
update sys_import_fan_wx_account set del_flag = 1 where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
</mapper>
|
@ -28,7 +28,7 @@
|
|||||||
<result property="fanChannelName" column="fan_channel_name"></result>
|
<result property="fanChannelName" column="fan_channel_name"></result>
|
||||||
|
|
||||||
<!-- 根据渠道查询对应微信号(微信账号分配表中) -->
|
<!-- 根据渠道查询对应微信号(微信账号分配表中) -->
|
||||||
<association property="wxAccountList" column="fan_channel" select="getWxAccountListByFanChannel"/>
|
<!--<association property="wxAccountList" column="fan_channel" select="getWxAccountListByFanChannel"/>-->
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap type="SysLiveSchedul" id="SysLiveSchedulResultSigle">
|
<resultMap type="SysLiveSchedul" id="SysLiveSchedulResultSigle">
|
||||||
@ -60,7 +60,7 @@
|
|||||||
su_operator.nick_name as live_operator_name,fc.dict_label as fan_channel_name
|
su_operator.nick_name as live_operator_name,fc.dict_label as fan_channel_name
|
||||||
from sys_live_schedul slc
|
from sys_live_schedul slc
|
||||||
left join (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'sys_live_type') AS slt ON slt.dict_value = slc.live_room
|
left join (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'sys_live_type') AS slt ON slt.dict_value = slc.live_room
|
||||||
left join (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'fan_channel') AS fc ON fc.dict_value = slc.fan_channel
|
left join (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'cus_account') AS fc ON fc.dict_value = slc.fan_channel
|
||||||
left join sys_user su_nutritionist on su_nutritionist.user_id = slc.live_nutritionist_id and su_nutritionist.del_flag = 0
|
left join sys_user su_nutritionist on su_nutritionist.user_id = slc.live_nutritionist_id and su_nutritionist.del_flag = 0
|
||||||
left join sys_user su_plan on su_plan.user_id = slc.live_planner_id and su_plan.del_flag = 0
|
left join sys_user su_plan on su_plan.user_id = slc.live_planner_id and su_plan.del_flag = 0
|
||||||
left join sys_user su_operator on su_operator.user_id = slc.live_operator_id and su_operator.del_flag = 0
|
left join sys_user su_operator on su_operator.user_id = slc.live_operator_id and su_operator.del_flag = 0
|
||||||
@ -193,4 +193,22 @@
|
|||||||
from sys_live_schedul
|
from sys_live_schedul
|
||||||
where id <![CDATA[ < ]]> #{id} and del_flag = 0 and live_room = #{liveRoom} order by live_start_time desc limit 1
|
where id <![CDATA[ < ]]> #{id} and del_flag = 0 and live_room = #{liveRoom} order by live_start_time desc limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!-- 根据时间查询所有直播计划 -->
|
||||||
|
<select id="getAllLiveSchedulByDate" parameterType="SysLiveSchedul" resultMap="SysLiveSchedulResultSigle">
|
||||||
|
select
|
||||||
|
<include refid="selectSysLiveSchedulVo"/>
|
||||||
|
from sys_live_schedul where del_flag = 0 and live_schedul_date = #{liveSchedulDate}
|
||||||
|
order by live_start_time asc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查最后一次直播计划 -->
|
||||||
|
<select id="getLastLiveSchedul" resultMap="SysLiveSchedulResultSigle">
|
||||||
|
select
|
||||||
|
<include refid="selectSysLiveSchedulVo"/>
|
||||||
|
from sys_live_schedul
|
||||||
|
where del_flag = 0 order by live_schedul_date desc limit 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
@ -48,6 +48,7 @@
|
|||||||
<result property="mainOrderId" column="main_order_id"/>
|
<result property="mainOrderId" column="main_order_id"/>
|
||||||
<result property="afterSaleCommissOrder" column="after_sale_commiss_order"/>
|
<result property="afterSaleCommissOrder" column="after_sale_commiss_order"/>
|
||||||
<result property="commissStartTime" column="commiss_start_time"/>
|
<result property="commissStartTime" column="commiss_start_time"/>
|
||||||
|
<result property="recipesPlanContinue" column="recipes_plan_continue" />
|
||||||
<result property="delFlag" column="del_flag"/>
|
<result property="delFlag" column="del_flag"/>
|
||||||
<result property="counted" column="counted"/>
|
<result property="counted" column="counted"/>
|
||||||
|
|
||||||
@ -393,6 +394,7 @@
|
|||||||
<result property="mainOrderId" column="main_order_id"/>
|
<result property="mainOrderId" column="main_order_id"/>
|
||||||
<result property="afterSaleCommissOrder" column="after_sale_commiss_order"/>
|
<result property="afterSaleCommissOrder" column="after_sale_commiss_order"/>
|
||||||
<result property="commissStartTime" column="commiss_start_time"/>
|
<result property="commissStartTime" column="commiss_start_time"/>
|
||||||
|
<result property="recipesPlanContinue" column="recipes_plan_continue" />
|
||||||
<result property="delFlag" column="del_flag"/>
|
<result property="delFlag" column="del_flag"/>
|
||||||
|
|
||||||
<!-- 非持久化字段 -->
|
<!-- 非持久化字段 -->
|
||||||
|
@ -234,7 +234,7 @@
|
|||||||
<!-- 根据cusId查询食谱计划-->
|
<!-- 根据cusId查询食谱计划-->
|
||||||
<select id="selectPlanListByCusId" parameterType="Long" resultMap="SysRecipesPlanResult">
|
<select id="selectPlanListByCusId" parameterType="Long" resultMap="SysRecipesPlanResult">
|
||||||
<include refid="selectSysRecipesPlanVo"/>
|
<include refid="selectSysRecipesPlanVo"/>
|
||||||
where cus_id=#{cusId} and del_flag = 0 order by id asc
|
where cus_id=#{cusId} and del_flag = 0 order by start_date asc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getCusIdByOutId" parameterType="String" resultType="Long">
|
<select id="getCusIdByOutId" parameterType="String" resultType="Long">
|
||||||
|
@ -61,3 +61,14 @@ export function updateLiveStatus(data) {
|
|||||||
params: data
|
params: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 复制上次直播记录
|
||||||
|
export function copyLastTimeLiveSchedul() {
|
||||||
|
return request({
|
||||||
|
url: '/custom/liveSchedul/copyLastTimeLiveSchedul',
|
||||||
|
method: 'get',
|
||||||
|
params: {}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="微信号" prop="wxAccountId">
|
<!--<el-form-item label="微信号" prop="wxAccountId">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="queryParams.wxAccountId"
|
v-model="queryParams.wxAccountId"
|
||||||
filterable
|
filterable
|
||||||
@ -56,7 +56,7 @@
|
|||||||
:value="parseInt(dict.id)"
|
:value="parseInt(dict.id)"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -96,6 +96,15 @@
|
|||||||
v-hasPermi="['custom:liveSchedul:remove']"
|
v-hasPermi="['custom:liveSchedul:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
size="mini"
|
||||||
|
@click="copyLastTimeLiveSchedul"
|
||||||
|
v-hasPermi="['custom:liveSchedul:add']"
|
||||||
|
>一键复制上次记录</el-button>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
<!--<el-col :span="1.5">
|
<!--<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="warning"
|
type="warning"
|
||||||
@ -314,7 +323,7 @@
|
|||||||
:value="parseInt(dict.dictValue)"
|
:value="parseInt(dict.dictValue)"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<span style="margin-left:10px;color:#1890ff">该账号与销售接粉微信号绑定</span>
|
<!--<span style="margin-left:10px;color:#1890ff">该账号与销售接粉微信号绑定</span>-->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="直播状态" prop="liveStatus">
|
<el-form-item label="直播状态" prop="liveStatus">
|
||||||
<el-select
|
<el-select
|
||||||
@ -339,7 +348,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listLiveSchedul, getLiveSchedul, delLiveSchedul, addLiveSchedul, updateLiveSchedul, exportLiveSchedul,updateLiveStatus } from "@/api/custom/liveSchedul";
|
import { listLiveSchedul, getLiveSchedul, delLiveSchedul, addLiveSchedul, updateLiveSchedul, exportLiveSchedul,updateLiveStatus,copyLastTimeLiveSchedul } from "@/api/custom/liveSchedul";
|
||||||
import { listWxAccount } from "@/api/custom/wxAccount";
|
import { listWxAccount } from "@/api/custom/wxAccount";
|
||||||
import AutoHideInfo from "@/components/AutoHideInfo";
|
import AutoHideInfo from "@/components/AutoHideInfo";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
@ -416,7 +425,10 @@ export default {
|
|||||||
this.getDicts("sys_live_type").then((response) => {
|
this.getDicts("sys_live_type").then((response) => {
|
||||||
this.liveTypeOptions = response.data;
|
this.liveTypeOptions = response.data;
|
||||||
});
|
});
|
||||||
this.getDicts("fan_channel").then((response) => {
|
/**this.getDicts("fan_channel").then((response) => {
|
||||||
|
this.fanChanneloptions = response.data;
|
||||||
|
});**/
|
||||||
|
this.getDicts("cus_account").then((response) => {
|
||||||
this.fanChanneloptions = response.data;
|
this.fanChanneloptions = response.data;
|
||||||
});
|
});
|
||||||
this.getListWxAccount();
|
this.getListWxAccount();
|
||||||
@ -597,6 +609,17 @@ export default {
|
|||||||
},
|
},
|
||||||
wxAccountFormat(row){
|
wxAccountFormat(row){
|
||||||
return (row.wxAccountList != null && row.wxAccountList.length > 0) ? row.wxAccountList : [];
|
return (row.wxAccountList != null && row.wxAccountList.length > 0) ? row.wxAccountList : [];
|
||||||
|
},
|
||||||
|
copyLastTimeLiveSchedul(){
|
||||||
|
copyLastTimeLiveSchedul().then(response => {
|
||||||
|
if (response.code === 200) {
|
||||||
|
this.msgSuccess("一键复制成功");
|
||||||
|
this.getList();
|
||||||
|
}else{
|
||||||
|
this.msgError(response.msg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -112,7 +112,11 @@
|
|||||||
</el-switch>
|
</el-switch>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="创建时间" align="center" prop="createTime" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d} {h}:{i}") }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
@ -134,6 +134,11 @@
|
|||||||
</el-switch>
|
</el-switch>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="创建时间" align="center" prop="createTime" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d} {h}:{i}") }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="200">
|
<el-table-column label="操作" align="center" width="200">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
|
@ -112,6 +112,8 @@
|
|||||||
<el-table-column label="状态" align="center" prop="status">
|
<el-table-column label="状态" align="center" prop="status">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-switch
|
<el-switch
|
||||||
|
active-text="可接粉"
|
||||||
|
inactive-text="不可接粉"
|
||||||
:value="!scope.row.status"
|
:value="!scope.row.status"
|
||||||
@change="handleOnChange($event, scope.row)"
|
@change="handleOnChange($event, scope.row)"
|
||||||
/>
|
/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user