视频接口优化,案例检索
This commit is contained in:
@ -237,16 +237,6 @@ public class SysCommisionController extends BaseController {
|
||||
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);
|
||||
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.custom.domain.SysCustomerCaseFile;
|
||||
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.beans.factory.annotation.Autowired;
|
||||
import org.springframework.util.unit.DataUnit;
|
||||
@ -49,6 +51,9 @@ public class SysCustomerCaseController extends BaseController
|
||||
@Autowired
|
||||
private ISysCustomerCaseService sysCustomerCaseService;
|
||||
|
||||
@Autowired
|
||||
private ISysPhysicalSignsService sysPhysicalSignsService;
|
||||
|
||||
/**
|
||||
* 查询客户案例管理列表
|
||||
*/
|
||||
@ -56,8 +61,13 @@ public class SysCustomerCaseController extends BaseController
|
||||
@GetMapping("/list")
|
||||
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();
|
||||
sysCustomerCase.setKeywordArray(StringUtils.isNotEmpty(sysCustomerCase.getKeyword()) ? sysCustomerCase.getKeyword().split(",") : null);
|
||||
List<SysCustomerCase> list = sysCustomerCaseService.selectSysCustomerCaseList(sysCustomerCase);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
@ -51,7 +51,6 @@ public class SysCustomerController extends BaseController {
|
||||
@PreAuthorize("@ss.hasPermi('custom:customer:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SysCustomer sysCustomer) {
|
||||
startPage();
|
||||
List<SysCustomer> list = new ArrayList<>();
|
||||
if (SecurityUtils.getLoginUser().getUser().getRoles().get(0).getRoleKey().equals("partner")) {
|
||||
String remark = SecurityUtils.getLoginUser().getUser().getRemark();
|
||||
@ -74,7 +73,7 @@ public class SysCustomerController extends BaseController {
|
||||
sysCustomer.setSignIdList(sysPhysicalSignsService.getSignIdByName(sysCustomer.getPhysicalSignsId()));
|
||||
}
|
||||
}
|
||||
|
||||
startPage();
|
||||
list = sysCustomerService.selectSysCustomerList(sysCustomer);
|
||||
if (list != null && list.size() > 0) {
|
||||
for (SysCustomer sysCus : list) {
|
||||
|
@ -1,9 +1,9 @@
|
||||
package com.stdiet.web.controller.custom;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.aliyun.vod20170321.models.CreateUploadVideoResponse;
|
||||
import com.aliyun.vod20170321.models.GetPlayInfoResponseBody;
|
||||
import com.stdiet.common.core.page.TableDataInfo;
|
||||
import com.stdiet.common.utils.AliyunVideoUtils;
|
||||
import com.stdiet.common.utils.StringUtils;
|
||||
@ -127,4 +127,26 @@ public class SysNutritionalVideoController extends BaseController
|
||||
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) {
|
||||
return toAjax(sysOrderService.deleteSysOrderById(orderId));
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -106,6 +106,14 @@ public class WechatAppletController extends BaseController {
|
||||
if (StringUtils.isEmpty(sysWxUserInfo.getOpenid()) || StringUtils.isEmpty(sysWxUserInfo.getPhone())) {
|
||||
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());
|
||||
if (userInfo != null) {
|
||||
@ -115,9 +123,7 @@ public class WechatAppletController extends BaseController {
|
||||
sysWxUserInfoService.insertSysWxUserInfo(sysWxUserInfo);
|
||||
}
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
//根据手机号查询返回用户加密ID
|
||||
SysCustomer customer = sysCustomerService.getCustomerByPhone(sysWxUserInfo.getPhone());
|
||||
result.put("customerId", customer != null ? AesUtils.encrypt(customer.getId() + "", null) : null);
|
||||
result.put("customerId", customerEncId);
|
||||
//查询未读消息数量
|
||||
SysMessageNotice messageParam = new SysMessageNotice();
|
||||
messageParam.setReadType(0);
|
||||
@ -358,9 +364,18 @@ public class WechatAppletController extends BaseController {
|
||||
*/
|
||||
@GetMapping(value = "/getVideoList")
|
||||
public TableDataInfo getVideoList(SysNutritionalVideo sysNutritionalVideo) {
|
||||
startPage();
|
||||
sysNutritionalVideo.setShowFlag(1);
|
||||
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);
|
||||
return getDataTable(list);
|
||||
}
|
||||
@ -381,6 +396,9 @@ public class WechatAppletController extends BaseController {
|
||||
if(playList != null && playList.size() > 0){
|
||||
nutritionalVideoResponse.setPlayUrl(playList.get(0).getPlayURL());
|
||||
}
|
||||
if(StringUtils.isNotEmpty(sysNutritionalVideo.getCoverUrl())){
|
||||
nutritionalVideoResponse.setCoverUrl(AliyunOSSUtils.generatePresignedUrl(sysNutritionalVideo.getCoverUrl()));
|
||||
}
|
||||
nutritionalVideoResponse.setDescription(sysNutritionalVideo.getDescription());
|
||||
nutritionalVideoResponse.setTags(sysNutritionalVideo.getTags());
|
||||
nutritionalVideoResponse.setTitle(sysNutritionalVideo.getTitle());
|
||||
|
Reference in New Issue
Block a user