commit
102f6a87f6
@ -237,16 +237,6 @@ public class SysCommisionController extends BaseController {
|
|||||||
return getDataTable(sysCommissionDayService.calculateCommissionByDay(sysCommision));
|
return getDataTable(sysCommissionDayService.calculateCommissionByDay(sysCommision));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据用户ID查询该用户按天计算提成的详情
|
|
||||||
* */
|
|
||||||
@PreAuthorize("@ss.hasPermi('commisionDay:detail:list')")
|
|
||||||
@GetMapping("/orderDetailDay")
|
|
||||||
public AjaxResult getOrderCommissionDetailDay(SysCommision sysCommision) {
|
|
||||||
startPage();
|
|
||||||
return sysCommissionDayService.calculateOrderCommissionDetail(sysCommision);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出按天计算提成详细列表
|
* 导出按天计算提成详细列表
|
||||||
*/
|
*/
|
||||||
@ -258,4 +248,30 @@ public class SysCommisionController extends BaseController {
|
|||||||
List<SysCommissionDayDetail> list = sysCommissionDayService.calculateCommissionByDay(sysCommision);
|
List<SysCommissionDayDetail> list = sysCommissionDayService.calculateCommissionByDay(sysCommision);
|
||||||
return util.exportExcel(list, "commision");
|
return util.exportExcel(list, "commision");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户ID查询该用户按天计算提成的详情
|
||||||
|
* */
|
||||||
|
@PreAuthorize("@ss.hasPermi('commisionDay:detail:list')")
|
||||||
|
@GetMapping("/orderDetailDay")
|
||||||
|
public AjaxResult getOrderCommissionDetailDay(SysCommision sysCommision) {
|
||||||
|
startPage();
|
||||||
|
return sysCommissionDayService.calculateOrderCommissionDetail(sysCommision);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出具体地点按天计算提成详细列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('commisionDay:detail:export')")
|
||||||
|
@Log(title = "导出具体地点按天计算提成详细列表", businessType = BusinessType.EXPORT)
|
||||||
|
@GetMapping("/exportOrderDetailDay")
|
||||||
|
public AjaxResult exportOrderDetailDay(SysCommision sysCommision) {
|
||||||
|
ExcelUtil<SysOrderCommisionDayDetail> util = new ExcelUtil<>(SysOrderCommisionDayDetail.class);
|
||||||
|
AjaxResult result = sysCommissionDayService.calculateOrderCommissionDetail(sysCommision);
|
||||||
|
List<SysOrderCommisionDayDetail> orderDetailList = null;
|
||||||
|
if(result != null && (int)result.get("code") == 200){
|
||||||
|
orderDetailList = (List<SysOrderCommisionDayDetail>)result.get("list");
|
||||||
|
}
|
||||||
|
return util.exportExcel(orderDetailList == null ? new ArrayList<>() : orderDetailList, "commision");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,8 @@ import com.stdiet.common.utils.file.MimeTypeUtils;
|
|||||||
import com.stdiet.common.utils.oss.AliyunOSSUtils;
|
import com.stdiet.common.utils.oss.AliyunOSSUtils;
|
||||||
import com.stdiet.custom.domain.SysCustomerCaseFile;
|
import com.stdiet.custom.domain.SysCustomerCaseFile;
|
||||||
import com.stdiet.custom.dto.request.FileRequest;
|
import com.stdiet.custom.dto.request.FileRequest;
|
||||||
|
import com.stdiet.custom.service.ISysPhysicalSignsService;
|
||||||
|
import org.springframework.scheduling.annotation.Async;
|
||||||
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.util.unit.DataUnit;
|
import org.springframework.util.unit.DataUnit;
|
||||||
@ -49,6 +51,9 @@ public class SysCustomerCaseController extends BaseController
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ISysCustomerCaseService sysCustomerCaseService;
|
private ISysCustomerCaseService sysCustomerCaseService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISysPhysicalSignsService sysPhysicalSignsService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询客户案例管理列表
|
* 查询客户案例管理列表
|
||||||
*/
|
*/
|
||||||
@ -56,8 +61,13 @@ public class SysCustomerCaseController extends BaseController
|
|||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(SysCustomerCase sysCustomerCase)
|
public TableDataInfo list(SysCustomerCase sysCustomerCase)
|
||||||
{
|
{
|
||||||
|
//sysCustomerCase.setKeywordArray(StringUtils.isNotEmpty(sysCustomerCase.getKeyword()) ? sysCustomerCase.getKeyword().split(",") : null);
|
||||||
|
|
||||||
|
if(StringUtils.isNotEmpty(sysCustomerCase.getKeyword())){
|
||||||
|
sysCustomerCase.setSignIdList(sysPhysicalSignsService.getSignIdByName(sysCustomerCase.getKeyword()));
|
||||||
|
}
|
||||||
|
|
||||||
startPage();
|
startPage();
|
||||||
sysCustomerCase.setKeywordArray(StringUtils.isNotEmpty(sysCustomerCase.getKeyword()) ? sysCustomerCase.getKeyword().split(",") : null);
|
|
||||||
List<SysCustomerCase> list = sysCustomerCaseService.selectSysCustomerCaseList(sysCustomerCase);
|
List<SysCustomerCase> list = sysCustomerCaseService.selectSysCustomerCaseList(sysCustomerCase);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,6 @@ public class SysCustomerController extends BaseController {
|
|||||||
@PreAuthorize("@ss.hasPermi('custom:customer:list')")
|
@PreAuthorize("@ss.hasPermi('custom:customer:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(SysCustomer sysCustomer) {
|
public TableDataInfo list(SysCustomer sysCustomer) {
|
||||||
startPage();
|
|
||||||
List<SysCustomer> list = new ArrayList<>();
|
List<SysCustomer> list = new ArrayList<>();
|
||||||
if (SecurityUtils.getLoginUser().getUser().getRoles().get(0).getRoleKey().equals("partner")) {
|
if (SecurityUtils.getLoginUser().getUser().getRoles().get(0).getRoleKey().equals("partner")) {
|
||||||
String remark = SecurityUtils.getLoginUser().getUser().getRemark();
|
String remark = SecurityUtils.getLoginUser().getUser().getRemark();
|
||||||
@ -74,7 +73,7 @@ public class SysCustomerController extends BaseController {
|
|||||||
sysCustomer.setSignIdList(sysPhysicalSignsService.getSignIdByName(sysCustomer.getPhysicalSignsId()));
|
sysCustomer.setSignIdList(sysPhysicalSignsService.getSignIdByName(sysCustomer.getPhysicalSignsId()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
startPage();
|
||||||
list = sysCustomerService.selectSysCustomerList(sysCustomer);
|
list = sysCustomerService.selectSysCustomerList(sysCustomer);
|
||||||
if (list != null && list.size() > 0) {
|
if (list != null && list.size() > 0) {
|
||||||
for (SysCustomer sysCus : list) {
|
for (SysCustomer sysCus : list) {
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package com.stdiet.web.controller.custom;
|
package com.stdiet.web.controller.custom;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.aliyun.vod20170321.models.CreateUploadVideoResponse;
|
import com.aliyun.vod20170321.models.CreateUploadVideoResponse;
|
||||||
|
import com.aliyun.vod20170321.models.GetPlayInfoResponseBody;
|
||||||
import com.stdiet.common.core.page.TableDataInfo;
|
import com.stdiet.common.core.page.TableDataInfo;
|
||||||
import com.stdiet.common.utils.AliyunVideoUtils;
|
import com.stdiet.common.utils.AliyunVideoUtils;
|
||||||
import com.stdiet.common.utils.StringUtils;
|
import com.stdiet.common.utils.StringUtils;
|
||||||
@ -127,4 +127,26 @@ public class SysNutritionalVideoController extends BaseController
|
|||||||
return toAjax(sysNutritionalVideoService.updateWxshowByIds(showFlag, ids));
|
return toAjax(sysNutritionalVideoService.updateWxshowByIds(showFlag, ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取营养视频播放地址
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('custom:nutritionalVideo:query')")
|
||||||
|
@GetMapping(value = "/getVideoPlayUrlById/{id}")
|
||||||
|
public AjaxResult getVideoPlayUrlById(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
SysNutritionalVideo sysNutritionalVideos = sysNutritionalVideoService.selectSysNutritionalVideoById(id);
|
||||||
|
if(sysNutritionalVideos != null && StringUtils.isNotEmpty(sysNutritionalVideos.getVideoId())){
|
||||||
|
try{
|
||||||
|
GetPlayInfoResponseBody playInfoResponseBody = AliyunVideoUtils.getVideoVisitDetail(sysNutritionalVideos.getVideoId());
|
||||||
|
List<GetPlayInfoResponseBody.GetPlayInfoResponseBodyPlayInfoListPlayInfo> playList = playInfoResponseBody.playInfoList.playInfo;
|
||||||
|
if(playList != null && playList.size() > 0){
|
||||||
|
sysNutritionalVideos.setPlayUrl(playList.get(0).getPlayURL());
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return AjaxResult.success(sysNutritionalVideos);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -195,6 +195,4 @@ public class SysOrderController extends OrderBaseController {
|
|||||||
public AjaxResult remove(@PathVariable Long orderId) {
|
public AjaxResult remove(@PathVariable Long orderId) {
|
||||||
return toAjax(sysOrderService.deleteSysOrderById(orderId));
|
return toAjax(sysOrderService.deleteSysOrderById(orderId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -106,6 +106,14 @@ public class WechatAppletController extends BaseController {
|
|||||||
if (StringUtils.isEmpty(sysWxUserInfo.getOpenid()) || StringUtils.isEmpty(sysWxUserInfo.getPhone())) {
|
if (StringUtils.isEmpty(sysWxUserInfo.getOpenid()) || StringUtils.isEmpty(sysWxUserInfo.getPhone())) {
|
||||||
return AjaxResult.error("手机号为空");
|
return AjaxResult.error("手机号为空");
|
||||||
}
|
}
|
||||||
|
//根据手机号查询返回用户加密ID
|
||||||
|
SysCustomer customer = sysCustomerService.getCustomerByPhone(sysWxUserInfo.getPhone());
|
||||||
|
//加密ID
|
||||||
|
String customerEncId = null;
|
||||||
|
if(customer != null){
|
||||||
|
sysWxUserInfo.setCusId(customer.getId());
|
||||||
|
customerEncId = AesUtils.encrypt(customer.getId() + "", null);
|
||||||
|
}
|
||||||
// 查询微信用户
|
// 查询微信用户
|
||||||
SysWxUserInfo userInfo = sysWxUserInfoService.selectSysWxUserInfoById(sysWxUserInfo.getOpenid());
|
SysWxUserInfo userInfo = sysWxUserInfoService.selectSysWxUserInfoById(sysWxUserInfo.getOpenid());
|
||||||
if (userInfo != null) {
|
if (userInfo != null) {
|
||||||
@ -115,9 +123,7 @@ public class WechatAppletController extends BaseController {
|
|||||||
sysWxUserInfoService.insertSysWxUserInfo(sysWxUserInfo);
|
sysWxUserInfoService.insertSysWxUserInfo(sysWxUserInfo);
|
||||||
}
|
}
|
||||||
Map<String, Object> result = new HashMap<>();
|
Map<String, Object> result = new HashMap<>();
|
||||||
//根据手机号查询返回用户加密ID
|
result.put("customerId", customerEncId);
|
||||||
SysCustomer customer = sysCustomerService.getCustomerByPhone(sysWxUserInfo.getPhone());
|
|
||||||
result.put("customerId", customer != null ? AesUtils.encrypt(customer.getId() + "", null) : null);
|
|
||||||
//查询未读消息数量
|
//查询未读消息数量
|
||||||
SysMessageNotice messageParam = new SysMessageNotice();
|
SysMessageNotice messageParam = new SysMessageNotice();
|
||||||
messageParam.setReadType(0);
|
messageParam.setReadType(0);
|
||||||
@ -358,9 +364,18 @@ public class WechatAppletController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@GetMapping(value = "/getVideoList")
|
@GetMapping(value = "/getVideoList")
|
||||||
public TableDataInfo getVideoList(SysNutritionalVideo sysNutritionalVideo) {
|
public TableDataInfo getVideoList(SysNutritionalVideo sysNutritionalVideo) {
|
||||||
startPage();
|
|
||||||
sysNutritionalVideo.setShowFlag(1);
|
sysNutritionalVideo.setShowFlag(1);
|
||||||
sysNutritionalVideo.setSortType(2);
|
sysNutritionalVideo.setSortType(2);
|
||||||
|
//普通用户
|
||||||
|
sysNutritionalVideo.setUserType(0);
|
||||||
|
if(StringUtils.isNotEmpty(sysNutritionalVideo.getOpenId())){
|
||||||
|
//查询是否为客户,存在订单就视为客户
|
||||||
|
int orderNum = sysOrderService.getOrderCountByOpenId(sysNutritionalVideo.getOpenId());
|
||||||
|
if(orderNum > 0){
|
||||||
|
sysNutritionalVideo.setUserType(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
startPage();
|
||||||
List<SysNutritionalVideo> list = sysNutritionalVideoService.selectSysNutritionalVideoList(sysNutritionalVideo, true);
|
List<SysNutritionalVideo> list = sysNutritionalVideoService.selectSysNutritionalVideoList(sysNutritionalVideo, true);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
@ -381,6 +396,9 @@ public class WechatAppletController extends BaseController {
|
|||||||
if(playList != null && playList.size() > 0){
|
if(playList != null && playList.size() > 0){
|
||||||
nutritionalVideoResponse.setPlayUrl(playList.get(0).getPlayURL());
|
nutritionalVideoResponse.setPlayUrl(playList.get(0).getPlayURL());
|
||||||
}
|
}
|
||||||
|
if(StringUtils.isNotEmpty(sysNutritionalVideo.getCoverUrl())){
|
||||||
|
nutritionalVideoResponse.setCoverUrl(AliyunOSSUtils.generatePresignedUrl(sysNutritionalVideo.getCoverUrl()));
|
||||||
|
}
|
||||||
nutritionalVideoResponse.setDescription(sysNutritionalVideo.getDescription());
|
nutritionalVideoResponse.setDescription(sysNutritionalVideo.getDescription());
|
||||||
nutritionalVideoResponse.setTags(sysNutritionalVideo.getTags());
|
nutritionalVideoResponse.setTags(sysNutritionalVideo.getTags());
|
||||||
nutritionalVideoResponse.setTitle(sysNutritionalVideo.getTitle());
|
nutritionalVideoResponse.setTitle(sysNutritionalVideo.getTitle());
|
||||||
|
@ -4,6 +4,11 @@ import com.aliyun.vod20170321.models.*;
|
|||||||
import com.aliyun.teaopenapi.models.*;
|
import com.aliyun.teaopenapi.models.*;
|
||||||
import com.stdiet.common.config.AliyunOSSConfig;
|
import com.stdiet.common.config.AliyunOSSConfig;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public class AliyunVideoUtils {
|
public class AliyunVideoUtils {
|
||||||
|
|
||||||
public static com.aliyun.vod20170321.Client videoClient = null;
|
public static com.aliyun.vod20170321.Client videoClient = null;
|
||||||
@ -116,12 +121,16 @@ public class AliyunVideoUtils {
|
|||||||
public static CreateUploadVideoResponse createUploadVideoRequest(Long cateId, String fileName, String title, String coverURL, String tags, String description) throws Exception{
|
public static CreateUploadVideoResponse createUploadVideoRequest(Long cateId, String fileName, String title, String coverURL, String tags, String description) throws Exception{
|
||||||
com.aliyun.vod20170321.Client client = AliyunVideoUtils.createClient();
|
com.aliyun.vod20170321.Client client = AliyunVideoUtils.createClient();
|
||||||
CreateUploadVideoRequest createUploadVideoRequest = new CreateUploadVideoRequest()
|
CreateUploadVideoRequest createUploadVideoRequest = new CreateUploadVideoRequest()
|
||||||
.setDescription(description)
|
.setDescription(description).setFileName(fileName).setTitle(title);
|
||||||
.setCoverURL(coverURL)
|
if(StringUtils.isNotEmpty(coverURL)){
|
||||||
.setFileName(fileName)
|
createUploadVideoRequest.setCoverURL(coverURL);
|
||||||
.setTitle(title)
|
}
|
||||||
.setCateId(cateId)
|
if(cateId != null){
|
||||||
.setTags(tags);
|
createUploadVideoRequest.setCateId(cateId);
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotEmpty(tags)){
|
||||||
|
createUploadVideoRequest.setTags(tags);
|
||||||
|
}
|
||||||
return client.createUploadVideo(createUploadVideoRequest);
|
return client.createUploadVideo(createUploadVideoRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -202,6 +211,33 @@ public class AliyunVideoUtils {
|
|||||||
return updateVideo(videoId, null,null,null, default_delete_cateId);
|
return updateVideo(videoId, null,null,null, default_delete_cateId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据VideoId获取封面
|
||||||
|
* @param videoId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static List<String> getVideoCoverUrl(List<String> videoId){
|
||||||
|
List<String> result = new ArrayList<>();
|
||||||
|
try{
|
||||||
|
com.aliyun.vod20170321.Client client = AliyunVideoUtils.createClient();
|
||||||
|
GetVideoInfosRequest getVideoInfosRequest = new GetVideoInfosRequest()
|
||||||
|
.setVideoIds(StringUtils.join(videoId.toArray(), ","));
|
||||||
|
GetVideoInfosResponse getVideoInfosResponse = client.getVideoInfos(getVideoInfosRequest);
|
||||||
|
if(getVideoInfosResponse != null){
|
||||||
|
GetVideoInfosResponseBody body = getVideoInfosResponse.body;
|
||||||
|
List<GetVideoInfosResponseBody.GetVideoInfosResponseBodyVideoList> videoList = body.videoList;
|
||||||
|
if(videoList != null && videoList.size() > 0){
|
||||||
|
for (GetVideoInfosResponseBody.GetVideoInfosResponseBodyVideoList video : videoList) {
|
||||||
|
result.add(video.getCoverURL());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -54,4 +54,7 @@ public class SysCustomerCase extends BaseEntity
|
|||||||
|
|
||||||
//案例文件URL数组
|
//案例文件URL数组
|
||||||
private String[] caseFileUrl;
|
private String[] caseFileUrl;
|
||||||
|
|
||||||
|
//病史体征ID集合,非持久化字段
|
||||||
|
private List<Long> signIdList;
|
||||||
}
|
}
|
@ -61,7 +61,7 @@ public class SysNutritionalVideo extends BaseEntity
|
|||||||
|
|
||||||
/** 视频付费等级,0无需付费 1客户可看 2付费可看 */
|
/** 视频付费等级,0无需付费 1客户可看 2付费可看 */
|
||||||
@Excel(name = "视频付费等级,0无需付费 1客户可看 2付费可看")
|
@Excel(name = "视频付费等级,0无需付费 1客户可看 2付费可看")
|
||||||
private Long payLevel;
|
private Integer payLevel;
|
||||||
|
|
||||||
private String payLevelName;
|
private String payLevelName;
|
||||||
|
|
||||||
@ -72,6 +72,8 @@ public class SysNutritionalVideo extends BaseEntity
|
|||||||
/** 删除标识,0未删除 1已删除,默认0 */
|
/** 删除标识,0未删除 1已删除,默认0 */
|
||||||
private Integer delFlag;
|
private Integer delFlag;
|
||||||
|
|
||||||
|
private String playUrl;
|
||||||
|
|
||||||
//文件名称
|
//文件名称
|
||||||
private String fileName;
|
private String fileName;
|
||||||
|
|
||||||
@ -79,4 +81,9 @@ public class SysNutritionalVideo extends BaseEntity
|
|||||||
|
|
||||||
//排序方式 1 按照创建时间倒序 2按照优先级、时间倒序
|
//排序方式 1 按照创建时间倒序 2按照优先级、时间倒序
|
||||||
private Integer sortType;
|
private Integer sortType;
|
||||||
|
|
||||||
|
private String openId;
|
||||||
|
|
||||||
|
//微信用户类型 0 普通用户 1 已下单客户
|
||||||
|
private Integer userType;
|
||||||
}
|
}
|
@ -19,34 +19,45 @@ public class SysOrderCommisionDayDetail extends BaseEntity {
|
|||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/**订单ID*/
|
/**订单ID*/
|
||||||
|
@Excel(name = "订单ID")
|
||||||
private Long orderId;
|
private Long orderId;
|
||||||
|
|
||||||
/**订单成交时间*/
|
/**订单成交时间*/
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@Excel(name = "订单成交时间")
|
||||||
private LocalDateTime orderTime;
|
private LocalDateTime orderTime;
|
||||||
|
|
||||||
/**客户姓名*/
|
/**客户姓名*/
|
||||||
|
@Excel(name = "客户姓名")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
/**服务结束时间*/
|
/**订单金额或服务订单金额*/
|
||||||
|
@Excel(name = "订单金额")
|
||||||
|
private BigDecimal orderAmount;
|
||||||
|
|
||||||
|
/**服务开始时间*/
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "服务开始时间")
|
||||||
private LocalDate serverStartDate;
|
private LocalDate serverStartDate;
|
||||||
|
|
||||||
/**服务结束时间*/
|
/**服务结束时间*/
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "服务结束时间")
|
||||||
private LocalDate serverEndDate;
|
private LocalDate serverEndDate;
|
||||||
|
|
||||||
/**服务月数*/
|
/**服务月数*/
|
||||||
private Integer serverMonth;
|
private Integer serverMonth;
|
||||||
|
|
||||||
|
/**服务天数*/
|
||||||
|
@Excel(name = "服务天数")
|
||||||
|
private Integer serverDay;
|
||||||
|
|
||||||
/**赠送天数*/
|
/**赠送天数*/
|
||||||
private Integer giveDay;
|
private Integer giveDay;
|
||||||
|
|
||||||
/**订单金额或服务订单金额*/
|
/** 暂停总天数 **/
|
||||||
private BigDecimal orderAmount;
|
|
||||||
|
|
||||||
/**订单总提成**/
|
private int pauseTotalDay;
|
||||||
private BigDecimal orderCommission;
|
|
||||||
|
|
||||||
//已发放提成
|
//已发放提成
|
||||||
private BigDecimal hasSendOrderCommission;
|
private BigDecimal hasSendOrderCommission;
|
||||||
@ -54,15 +65,10 @@ public class SysOrderCommisionDayDetail extends BaseEntity {
|
|||||||
//未发放提成
|
//未发放提成
|
||||||
private BigDecimal notHasSendOrderCommission;
|
private BigDecimal notHasSendOrderCommission;
|
||||||
|
|
||||||
/**服务天数*/
|
|
||||||
private Integer serverDay;
|
|
||||||
|
|
||||||
/**每天金额*/
|
/**每天金额*/
|
||||||
|
@Excel(name = "每天金额")
|
||||||
private BigDecimal dayMoney;
|
private BigDecimal dayMoney;
|
||||||
|
|
||||||
/** 暂停总天数 **/
|
|
||||||
private int pauseTotalDay;
|
|
||||||
|
|
||||||
/**每年每月暂停天数*/
|
/**每年每月暂停天数*/
|
||||||
private Map<String, Integer> everyYearMonthPauseDay;
|
private Map<String, Integer> everyYearMonthPauseDay;
|
||||||
|
|
||||||
@ -79,11 +85,17 @@ public class SysOrderCommisionDayDetail extends BaseEntity {
|
|||||||
private Map<String, Boolean> everyYearMonthCommissionSendFlag;
|
private Map<String, Boolean> everyYearMonthCommissionSendFlag;
|
||||||
|
|
||||||
//该笔订单成交的当月的总成交额,用于确定提成比例
|
//该笔订单成交的当月的总成交额,用于确定提成比例
|
||||||
|
@Excel(name = "当月的成交额")
|
||||||
private BigDecimal monthOrderTotalAmount;
|
private BigDecimal monthOrderTotalAmount;
|
||||||
|
|
||||||
//该笔订单对应提成比例
|
//该笔订单对应提成比例
|
||||||
|
@Excel(name = "提成比例")
|
||||||
private Float commissionRate;
|
private Float commissionRate;
|
||||||
|
|
||||||
|
/**订单总提成**/
|
||||||
|
@Excel(name = "订单提成")
|
||||||
|
private BigDecimal orderCommission;
|
||||||
|
|
||||||
//售后
|
//售后
|
||||||
private Long afterSaleId;
|
private Long afterSaleId;
|
||||||
|
|
||||||
|
@ -106,4 +106,18 @@ public interface SysOrderMapper
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<SysOrder> getAllOrderByCusId(@Param("cusId") Long cusId);
|
List<SysOrder> getAllOrderByCusId(@Param("cusId") Long cusId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据openid查询订单数量
|
||||||
|
* @param openid
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int getOrderCountByOpenId(@Param("openid")String openid);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据营养师ID查询最后一个订单
|
||||||
|
* @param nutritionistId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
SysOrder getLastOrderByNutritionistId(@Param("nutritionistId")Long nutritionistId);
|
||||||
}
|
}
|
@ -114,4 +114,11 @@ public interface ISysOrderService
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<SysOrder> getAllOrderByCusId(Long cusId);
|
List<SysOrder> getAllOrderByCusId(Long cusId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据openid查询订单数量
|
||||||
|
* @param openid
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int getOrderCountByOpenId(String openid);
|
||||||
}
|
}
|
@ -9,6 +9,7 @@ import com.aliyun.vod20170321.models.SearchMediaResponse;
|
|||||||
import com.aliyun.vod20170321.models.SearchMediaResponseBody;
|
import com.aliyun.vod20170321.models.SearchMediaResponseBody;
|
||||||
import com.stdiet.common.utils.AliyunVideoUtils;
|
import com.stdiet.common.utils.AliyunVideoUtils;
|
||||||
import com.stdiet.common.utils.DateUtils;
|
import com.stdiet.common.utils.DateUtils;
|
||||||
|
import com.stdiet.common.utils.StringUtils;
|
||||||
import com.stdiet.common.utils.oss.AliyunOSSUtils;
|
import com.stdiet.common.utils.oss.AliyunOSSUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.scheduling.annotation.Async;
|
import org.springframework.scheduling.annotation.Async;
|
||||||
@ -53,15 +54,42 @@ public class SysNutritionalVideoServiceImpl implements ISysNutritionalVideoServi
|
|||||||
List<SysNutritionalVideo> list = sysNutritionalVideoMapper.selectSysNutritionalVideoList(sysNutritionalVideo);
|
List<SysNutritionalVideo> list = sysNutritionalVideoMapper.selectSysNutritionalVideoList(sysNutritionalVideo);
|
||||||
if(flag && list != null && list.size() > 0){
|
if(flag && list != null && list.size() > 0){
|
||||||
List<String> fileUrl = new ArrayList<>();
|
List<String> fileUrl = new ArrayList<>();
|
||||||
|
List<String> videoIdList = new ArrayList<>();
|
||||||
for (SysNutritionalVideo video : list) {
|
for (SysNutritionalVideo video : list) {
|
||||||
fileUrl.add(video.getCoverUrl());
|
if(StringUtils.isNotEmpty(video.getCoverUrl())){
|
||||||
|
fileUrl.add(video.getCoverUrl());
|
||||||
|
}else{
|
||||||
|
videoIdList.add(video.getVideoId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
List<String> downUrlList = AliyunOSSUtils.generatePresignedUrl(fileUrl);
|
if(fileUrl.size() > 0){
|
||||||
if(downUrlList != null && downUrlList.size() > 0){
|
List<String> downUrlList = AliyunOSSUtils.generatePresignedUrl(fileUrl);
|
||||||
int index = 0;
|
if(downUrlList != null && downUrlList.size() > 0){
|
||||||
for (String downUrl : downUrlList) {
|
int index = 0;
|
||||||
list.get(index).setCoverUrl(downUrl);
|
for (SysNutritionalVideo video : list) {
|
||||||
index++;
|
if (StringUtils.isNotEmpty(video.getCoverUrl())) {
|
||||||
|
video.setCoverUrl(downUrlList.get(index));
|
||||||
|
index++;
|
||||||
|
if(index == downUrlList.size()){
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(videoIdList.size() > 0) {
|
||||||
|
List<String> coverUrlList = AliyunVideoUtils.getVideoCoverUrl(videoIdList);
|
||||||
|
if (coverUrlList != null && coverUrlList.size() > 0) {
|
||||||
|
int index = 0;
|
||||||
|
for (SysNutritionalVideo video : list) {
|
||||||
|
if (StringUtils.isEmpty(video.getCoverUrl())) {
|
||||||
|
video.setCoverUrl(coverUrlList.get(index));
|
||||||
|
index++;
|
||||||
|
if(index == coverUrlList.size()){
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -406,4 +406,13 @@ public class SysOrderServiceImpl implements ISysOrderService {
|
|||||||
public List<SysOrder> getAllOrderByCusId(Long cusId){
|
public List<SysOrder> getAllOrderByCusId(Long cusId){
|
||||||
return sysOrderMapper.getAllOrderByCusId(cusId);
|
return sysOrderMapper.getAllOrderByCusId(cusId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据openid查询订单数量
|
||||||
|
* @param openid
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public int getOrderCountByOpenId(String openid){
|
||||||
|
return sysOrderMapper.getOrderCountByOpenId(openid);
|
||||||
|
}
|
||||||
}
|
}
|
@ -45,6 +45,7 @@
|
|||||||
<select id="selectSysCustomerCaseList" parameterType="SysCustomerCase" resultMap="SysCustomerCaseResult">
|
<select id="selectSysCustomerCaseList" parameterType="SysCustomerCase" resultMap="SysCustomerCaseResult">
|
||||||
select scc.id, scc.name, scc.keyword, scc.remark, scc.customer_id, scc.wx_show, scc.create_time,sc.name as customer_name from sys_customer_case scc
|
select scc.id, scc.name, scc.keyword, scc.remark, scc.customer_id, scc.wx_show, scc.create_time,sc.name as customer_name from sys_customer_case scc
|
||||||
left join sys_customer sc on sc.id = scc.customer_id and sc.del_flag = 0
|
left join sys_customer sc on sc.id = scc.customer_id and sc.del_flag = 0
|
||||||
|
left join sys_customer_healthy as sch on sch.customer_id = sc.id and sch.del_flag = 0
|
||||||
where scc.del_flag = 0
|
where scc.del_flag = 0
|
||||||
<include refid="searchKey">
|
<include refid="searchKey">
|
||||||
<property name="keywordArray" value="#{keywordArray}"/>
|
<property name="keywordArray" value="#{keywordArray}"/>
|
||||||
@ -52,6 +53,21 @@
|
|||||||
<if test="customerName != null and customerName != ''">
|
<if test="customerName != null and customerName != ''">
|
||||||
and sc.name like concat('%', #{customerName}, '%')
|
and sc.name like concat('%', #{customerName}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="keyword != null">
|
||||||
|
and
|
||||||
|
(
|
||||||
|
sc.name like concat('%', #{keyword}, '%') or
|
||||||
|
scc.keyword like concat('%', #{keyword}, '%') or scc.name like concat('%', #{keyword}, '%')
|
||||||
|
or scc.remark like concat('%', #{keyword}, '%') or sch.other_physical_signs like concat('%', #{keyword}, '%')
|
||||||
|
or sch.remark like concat('%', #{keyword}, '%')
|
||||||
|
<if test="signIdList != null">
|
||||||
|
<foreach collection="signIdList " item="signId" index="index" open=" OR (" close=")" separator=" OR ">
|
||||||
|
FIND_IN_SET(#{signId}, sch.physical_signs_id)
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
|
||||||
<if test="wxShow != null">
|
<if test="wxShow != null">
|
||||||
and scc.wx_show = #{wxShow}
|
and scc.wx_show = #{wxShow}
|
||||||
</if>
|
</if>
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="signIdList != null">
|
<if test="signIdList != null">
|
||||||
and (
|
and (
|
||||||
sch.other_physical_signs like concat('%', #{name}, '%')
|
sch.other_physical_signs like concat('%', #{physicalSignsId}, '%')
|
||||||
<foreach collection="signIdList " item="signId" index="index" open=" OR (" close=")" separator=" OR ">
|
<foreach collection="signIdList " item="signId" index="index" open=" OR (" close=")" separator=" OR ">
|
||||||
FIND_IN_SET(#{signId}, sch.physical_signs_id)
|
FIND_IN_SET(#{signId}, sch.physical_signs_id)
|
||||||
</foreach>
|
</foreach>
|
||||||
|
@ -47,6 +47,14 @@
|
|||||||
<if test="payLevel != null">
|
<if test="payLevel != null">
|
||||||
and snv.pay_level = #{payLevel}
|
and snv.pay_level = #{payLevel}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="userType != null">
|
||||||
|
<if test="userType == 0">
|
||||||
|
and pay_level = 0
|
||||||
|
</if>
|
||||||
|
<if test="userType == 1">
|
||||||
|
and (pay_level = 0 or pay_level = 1)
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
<if test="key != null and key != ''">
|
<if test="key != null and key != ''">
|
||||||
and (snv.title like concat('%',#{key},'%') or snv.description like concat('%',#{key},'%'))
|
and (snv.title like concat('%',#{key},'%') or snv.description like concat('%',#{key},'%'))
|
||||||
</if>
|
</if>
|
||||||
|
@ -516,4 +516,15 @@
|
|||||||
select * from sys_order where del_flag = 0 and cus_id = #{cusId} order by order_time asc
|
select * from sys_order where del_flag = 0 and cus_id = #{cusId} order by order_time asc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!-- 根据微信openId查询客户订单数量 -->
|
||||||
|
<select id="getOrderCountByOpenId" parameterType="String" resultType="int">
|
||||||
|
select count(so.order_id) from sys_order so
|
||||||
|
where so.del_flag = 0 and so.cus_id is not null and so.cus_id = (select su.cus_id from sys_wx_user_info su where su.openid = #{openid} limit 1)
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 根据营养师ID查询最后一单的情况 -->
|
||||||
|
<select id="getLastOrderByNutritionistId" parameterType="Long" resultMap="SysOrderResult">
|
||||||
|
select * from sys_order so
|
||||||
|
where del_flag = 0 and nutritionist_id = #{nutritionistId} order by order_id desc limit 1
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
@ -96,3 +96,13 @@ export function orderDetailDay(query) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 导出具体订单按天计算提成明细
|
||||||
|
export function exportOrderDetailDay(query) {
|
||||||
|
return request({
|
||||||
|
url: '/custom/commision/exportOrderDetailDay',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -69,3 +69,12 @@ export function updateWxShow(data){
|
|||||||
params: data
|
params: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询营养视频播放地址
|
||||||
|
export function getVideoPlayUrlById(id) {
|
||||||
|
return request({
|
||||||
|
url: '/custom/nutritionalVideo/getVideoPlayUrlById/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -9,10 +9,11 @@
|
|||||||
:before-upload="beforeAvatarUpload">
|
:before-upload="beforeAvatarUpload">
|
||||||
<img v-if="imageUrl || coverUrl" :src="imageUrl || coverUrl" class="avatar">
|
<img v-if="imageUrl || coverUrl" :src="imageUrl || coverUrl" class="avatar">
|
||||||
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
||||||
<div class="el-upload__tip" slot="tip">
|
<div class="el-upload__tip" slot="tip" style="color:#1890ff">
|
||||||
1、只能上传png、jpg文件,且每个文件不超过{{
|
<div>1、只能上传png、jpg文件,且每个文件不超过{{
|
||||||
upload.fileSize / (1024 * 1024)
|
upload.fileSize / (1024 * 1024)
|
||||||
}}M
|
}}M</div>
|
||||||
|
<div style="margin-top:-10px;">{{tips ? ('2、'+tips) : ''}}</div>
|
||||||
</div>
|
</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</template>
|
</template>
|
||||||
@ -79,6 +80,10 @@ export default {
|
|||||||
coverUrl:{
|
coverUrl:{
|
||||||
type: String,
|
type: String,
|
||||||
default: ""
|
default: ""
|
||||||
|
},
|
||||||
|
tips: {
|
||||||
|
type: String,
|
||||||
|
default: ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
<div
|
<div
|
||||||
class="order_total_data"
|
class="order_total_data"
|
||||||
>
|
>
|
||||||
|
|
||||||
<span class="order_total_data_span_right20">
|
<span class="order_total_data_span_right20">
|
||||||
当前页总服务金额:{{totalServerAmount}}元
|
当前页总服务金额:{{totalServerAmount}}元
|
||||||
</span>
|
</span>
|
||||||
@ -50,6 +51,18 @@
|
|||||||
>未发放总提成:{{ totalNotSendCommission }}元</span
|
>未发放总提成:{{ totalNotSendCommission }}元</span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
<el-row :gutter="10" class="mb8" style="margin-top: 10px;margin-left:10px">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['commisionDay:detail:export']"
|
||||||
|
>导出
|
||||||
|
</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
<div style="width:100%;height:80%;overflow: auto">
|
<div style="width:100%;height:80%;overflow: auto">
|
||||||
<el-table :data="orderList" v-loading="loading" stripe>
|
<el-table :data="orderList" v-loading="loading" stripe>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@ -208,7 +221,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { orderDetailDay } from "@/api/custom/commision";
|
import { orderDetailDay,exportOrderDetailDay } from "@/api/custom/commision";
|
||||||
import OrderDetail from "@/components/OrderDetail";
|
import OrderDetail from "@/components/OrderDetail";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -317,6 +330,23 @@ export default {
|
|||||||
handleOnDetailClick(data) {
|
handleOnDetailClick(data) {
|
||||||
this.$refs.orderDetailRef.showDialog(data.orderId);
|
this.$refs.orderDetailRef.showDialog(data.orderId);
|
||||||
},
|
},
|
||||||
|
handleExport(){
|
||||||
|
this.queryParam.serverScopeStartTime = this.serverDateScope && this.serverDateScope.length > 0 ? this.serverDateScope[0] : null;
|
||||||
|
this.queryParam.serverScopeEndTime = this.serverDateScope && this.serverDateScope.length > 0 ? this.serverDateScope[1] : null;
|
||||||
|
const queryParams = this.queryParam;
|
||||||
|
this.$confirm("是否确认导出所有订单提成比例数据项?", "警告", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning",
|
||||||
|
})
|
||||||
|
.then(function () {
|
||||||
|
return exportOrderDetailDay(queryParams);
|
||||||
|
})
|
||||||
|
.then((response) => {
|
||||||
|
this.download(response.msg);
|
||||||
|
})
|
||||||
|
.catch(function () {});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@ -332,7 +362,7 @@ export default {
|
|||||||
.order_total_data {
|
.order_total_data {
|
||||||
float: right;
|
float: right;
|
||||||
margin-right: 40px;
|
margin-right: 40px;
|
||||||
margin-bottom:20px
|
margin-bottom:15px
|
||||||
}
|
}
|
||||||
|
|
||||||
.order_total_data_span_right20 {
|
.order_total_data_span_right20 {
|
||||||
|
@ -102,7 +102,7 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<!-- 其他信息 -->
|
<!-- 其他信息 -->
|
||||||
<div style="height: 390px; overflow: auto">
|
<div style="height: 370px; overflow: auto">
|
||||||
<div
|
<div
|
||||||
v-for="(item, index) in dataList.slice(1, 10)"
|
v-for="(item, index) in dataList.slice(1, 10)"
|
||||||
style="margin-bottom: 50px"
|
style="margin-bottom: 50px"
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="视频封面" prop="coverUrl">
|
<el-form-item label="视频封面" prop="coverUrl">
|
||||||
<UploadFile ref="uploadFile" :prefix="'videoCover'" @callbackMethod="handleCoverUrl"></UploadFile>
|
<UploadFile ref="uploadFile" :prefix="'videoCover'" @callbackMethod="handleCoverUrl" :tips="'视频未传封面图片时,会主动截取封面,但会存在延迟,请勿直接发布到小程序'"></UploadFile>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div style="display:flex">
|
<div style="display:flex">
|
||||||
<el-form-item label="视频类别" prop="cateId">
|
<el-form-item label="视频类别" prop="cateId">
|
||||||
@ -52,7 +52,9 @@
|
|||||||
<div>
|
<div>
|
||||||
<input type="file" accept=".mp4" ref="videoFile" id="videoFile" @change="fileChange($event)">
|
<input type="file" accept=".mp4" ref="videoFile" id="videoFile" @change="fileChange($event)">
|
||||||
<div > <span>上传状态:{{statusText}}</span><span style="margin-left:100px">进度:{{authProgress}}%</span></div>
|
<div > <span>上传状态:{{statusText}}</span><span style="margin-left:100px">进度:{{authProgress}}%</span></div>
|
||||||
<div > 1、只能上传mp4文件,上传大文件时请使用客户端上传,防止上传超时</div>
|
<div style="color:#1890ff">
|
||||||
|
1、只能上传mp4文件,上传大文件时请使用客户端上传,防止上传超时
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="展示状态" prop="wxShow">
|
<el-form-item label="展示状态" prop="wxShow">
|
||||||
@ -61,7 +63,7 @@
|
|||||||
active-text="小程序展示"
|
active-text="小程序展示"
|
||||||
inactive-text="小程序不展示">
|
inactive-text="小程序不展示">
|
||||||
</el-switch>
|
</el-switch>
|
||||||
<div>提示:请保证内容正确再展示到小程序</div>
|
<div style="color:red">提示:请保证内容正确再展示到小程序</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
@ -86,9 +88,6 @@
|
|||||||
title: [
|
title: [
|
||||||
{ required: true, message: "标题不能为空", trigger: "blur" },
|
{ required: true, message: "标题不能为空", trigger: "blur" },
|
||||||
],
|
],
|
||||||
coverUrl: [
|
|
||||||
{ required: true, message: "封面不能为空", trigger: "blur" },
|
|
||||||
],
|
|
||||||
cateId:[
|
cateId:[
|
||||||
{ required: true, message: "视频类别不能为空", trigger: "blur" },
|
{ required: true, message: "视频类别不能为空", trigger: "blur" },
|
||||||
],
|
],
|
||||||
@ -145,13 +144,13 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showDialog(classifyList, callback){
|
showDialog(classifyList, callback){
|
||||||
|
if(classifyList != null && classifyList.length > 0){
|
||||||
|
this.defaultClassify = classifyList[0].id;
|
||||||
|
}
|
||||||
this.resetVideoFrom();
|
this.resetVideoFrom();
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.callback = callback;
|
this.callback = callback;
|
||||||
this.classifyList = classifyList;
|
this.classifyList = classifyList;
|
||||||
if(classifyList != null && classifyList.length > 0){
|
|
||||||
this.defaultClassify = classifyList[0].id;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
handleCoverUrl(url){
|
handleCoverUrl(url){
|
||||||
this.videoFrom.coverUrl = url;
|
this.videoFrom.coverUrl = url;
|
||||||
|
@ -17,8 +17,7 @@
|
|||||||
</el-form-item>-->
|
</el-form-item>-->
|
||||||
<el-form-item label="案例信息" prop="name">
|
<el-form-item label="案例信息" prop="name">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="keywordArray"
|
v-model="queryParams.keyword"
|
||||||
multiple
|
|
||||||
filterable
|
filterable
|
||||||
allow-create
|
allow-create
|
||||||
clearable
|
clearable
|
||||||
@ -150,12 +149,22 @@
|
|||||||
></AutoHideMessage>
|
></AutoHideMessage>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="所属客户" align="center" prop="customerName" />
|
<el-table-column label="所属客户" align="center" prop="customerName">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="normal"
|
||||||
|
type="text"
|
||||||
|
@click="handleOnHealthSignClick(scope.row.customerId)"
|
||||||
|
title="点击查看用户详情"
|
||||||
|
>{{scope.row.customerName}}</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="文件" align="center">
|
<el-table-column label="文件" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="normal"
|
||||||
type="text"
|
type="text"
|
||||||
@click="getFileListByCaseId(scope.row)"
|
@click="getFileListByCaseId(scope.row)"
|
||||||
>文件列表
|
>文件列表
|
||||||
@ -323,6 +332,9 @@
|
|||||||
@dealCustomerId="dealCustomerId"
|
@dealCustomerId="dealCustomerId"
|
||||||
ref="selectCustomerRef"
|
ref="selectCustomerRef"
|
||||||
></SelectCustomer>
|
></SelectCustomer>
|
||||||
|
|
||||||
|
<!-- 健康评估弹窗 -->
|
||||||
|
<PhysicalSignsDialog ref="physicalSignsDialogRef" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -337,13 +349,16 @@ import {
|
|||||||
getFileListByCaseId,
|
getFileListByCaseId,
|
||||||
updateWxShow
|
updateWxShow
|
||||||
} from "@/api/custom/customerCase";
|
} from "@/api/custom/customerCase";
|
||||||
|
import {
|
||||||
|
getCustomer
|
||||||
|
} from "@/api/custom/customer";
|
||||||
import DragUpload from "@/components/FileUpload/DragUpload";
|
import DragUpload from "@/components/FileUpload/DragUpload";
|
||||||
import DragUploadEdit from "@/components/FileUpload/DragUploadEdit";
|
import DragUploadEdit from "@/components/FileUpload/DragUploadEdit";
|
||||||
import SelectCustomer from "@/components/Customer/SelectCustomer";
|
import SelectCustomer from "@/components/Customer/SelectCustomer";
|
||||||
import MuchFileDown from "@/components/FileDownload/MuchFileDown";
|
import MuchFileDown from "@/components/FileDownload/MuchFileDown";
|
||||||
import AutoHideMessage from "@/components/AutoHideMessage";
|
import AutoHideMessage from "@/components/AutoHideMessage";
|
||||||
import AutoHideInfo from "@/components/AutoHideInfo";
|
import AutoHideInfo from "@/components/AutoHideInfo";
|
||||||
|
import PhysicalSignsDialog from "@/components/PhysicalSignsDialog";
|
||||||
export default {
|
export default {
|
||||||
name: "CustomerCase",
|
name: "CustomerCase",
|
||||||
data() {
|
data() {
|
||||||
@ -398,6 +413,7 @@ export default {
|
|||||||
AutoHideMessage: AutoHideMessage,
|
AutoHideMessage: AutoHideMessage,
|
||||||
AutoHideInfo: AutoHideInfo,
|
AutoHideInfo: AutoHideInfo,
|
||||||
DragUploadEdit: DragUploadEdit,
|
DragUploadEdit: DragUploadEdit,
|
||||||
|
PhysicalSignsDialog
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
@ -409,7 +425,7 @@ export default {
|
|||||||
/** 查询客户案例管理列表 */
|
/** 查询客户案例管理列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.queryParams.keyword = this.keywordArray.join(",");
|
//this.queryParams.keyword = this.keywordArray.join(",");
|
||||||
listCustomerCase(this.queryParams).then((response) => {
|
listCustomerCase(this.queryParams).then((response) => {
|
||||||
this.customerCaseList = response.rows;
|
this.customerCaseList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
@ -425,6 +441,14 @@ export default {
|
|||||||
this.$refs["editUploadCaseFile"].uploadReset();
|
this.$refs["editUploadCaseFile"].uploadReset();
|
||||||
this.reset();
|
this.reset();
|
||||||
},
|
},
|
||||||
|
handleOnHealthSignClick(id) {
|
||||||
|
getCustomer(id).then((response) => {
|
||||||
|
if(response.code == 200){
|
||||||
|
this.$refs["physicalSignsDialogRef"].showDialog(response.data);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
// 表单重置
|
// 表单重置
|
||||||
reset() {
|
reset() {
|
||||||
this.form = {
|
this.form = {
|
||||||
|
@ -110,8 +110,16 @@
|
|||||||
</el-image>
|
</el-image>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="标题" align="center" prop="title" width="200"/>
|
<el-table-column label="标题" align="center" prop="title" width="200">
|
||||||
<el-table-column label="描述" align="center" prop="description" />
|
<template slot-scope="scope" >
|
||||||
|
<AutoHideMessage :data="scope.row.title == null ? '' : (scope.row.title+'')" :maxLength="20"></AutoHideMessage>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="描述" align="center" prop="description" >
|
||||||
|
<template slot-scope="scope" >
|
||||||
|
<AutoHideMessage :data="scope.row.description == null ? '' : (scope.row.description+'')" :maxLength="100"></AutoHideMessage>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<!--<el-table-column label="标签" align="center" prop="tags" width="100"/>-->
|
<!--<el-table-column label="标签" align="center" prop="tags" width="100"/>-->
|
||||||
<el-table-column label="分类" align="center" prop="cateName" width="100"/>
|
<el-table-column label="分类" align="center" prop="cateName" width="100"/>
|
||||||
<el-table-column label="权限等级" align="center" prop="payLevelName" width="100"/>
|
<el-table-column label="权限等级" align="center" prop="payLevelName" width="100"/>
|
||||||
@ -128,6 +136,13 @@
|
|||||||
</el-table-column>
|
</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
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="getVideoPlayUrl(scope.row.id)"
|
||||||
|
v-hasPermi="['custom:nutritionalVideo:query']"
|
||||||
|
>播放</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
@ -229,11 +244,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listNutritionalVideo, getNutritionalVideo, delNutritionalVideo, addNutritionalVideo, updateNutritionalVideo, exportNutritionalVideo, updateWxShow } from "@/api/custom/nutritionalVideo";
|
import { listNutritionalVideo, getNutritionalVideo, delNutritionalVideo, addNutritionalVideo, updateNutritionalVideo, exportNutritionalVideo, updateWxShow,getVideoPlayUrlById } from "@/api/custom/nutritionalVideo";
|
||||||
import {getAllClassify } from "@/api/custom/videoClassify";
|
import {getAllClassify } from "@/api/custom/videoClassify";
|
||||||
import UploadVideo from "@/components/UploadVideo";
|
import UploadVideo from "@/components/UploadVideo";
|
||||||
import UploadFile from "@/components/FileUpload/UploadFile";
|
import UploadFile from "@/components/FileUpload/UploadFile";
|
||||||
import VideoClassify from "../videoClassify";
|
import VideoClassify from "../videoClassify";
|
||||||
|
import AutoHideMessage from "@/components/AutoHideMessage";
|
||||||
export default {
|
export default {
|
||||||
name: "NutritionalVideo",
|
name: "NutritionalVideo",
|
||||||
data() {
|
data() {
|
||||||
@ -269,6 +285,15 @@
|
|||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
|
title: [
|
||||||
|
{ required: true, message: "标题不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
cateId:[
|
||||||
|
{ required: true, message: "视频类别不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
payLevel:[
|
||||||
|
{ required: true, message: "视频权限不能为空", trigger: "blur" },
|
||||||
|
]
|
||||||
},
|
},
|
||||||
coverImageList:[],
|
coverImageList:[],
|
||||||
//分类列表
|
//分类列表
|
||||||
@ -288,7 +313,7 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
UploadVideo,UploadFile,VideoClassify
|
UploadVideo,UploadFile,VideoClassify,AutoHideMessage
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 查询营养视频列表 */
|
/** 查询营养视频列表 */
|
||||||
@ -372,6 +397,15 @@
|
|||||||
this.title = "修改营养视频";
|
this.title = "修改营养视频";
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//获取播放地址
|
||||||
|
getVideoPlayUrl(id){
|
||||||
|
getVideoPlayUrlById(id).then(response => {
|
||||||
|
let url = response.data.playUrl;
|
||||||
|
if(url != undefined && url != null){
|
||||||
|
window.open(url, '_blank');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user