commit
3478669604
6
pom.xml
6
pom.xml
@ -198,6 +198,12 @@
|
|||||||
<artifactId>aliyun-sdk-oss</artifactId>
|
<artifactId>aliyun-sdk-oss</artifactId>
|
||||||
<version>${aliyun-oss.version}</version>
|
<version>${aliyun-oss.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- 阿里云视频点播 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.aliyun</groupId>
|
||||||
|
<artifactId>vod20170321</artifactId>
|
||||||
|
<version>2.0.0</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
|
@ -15,12 +15,14 @@ import com.stdiet.custom.domain.SysCustomerPhysicalSigns;
|
|||||||
import com.stdiet.custom.service.ISysCustomerHealthyService;
|
import com.stdiet.custom.service.ISysCustomerHealthyService;
|
||||||
import com.stdiet.custom.service.ISysCustomerPhysicalSignsService;
|
import com.stdiet.custom.service.ISysCustomerPhysicalSignsService;
|
||||||
import com.stdiet.custom.service.ISysCustomerService;
|
import com.stdiet.custom.service.ISysCustomerService;
|
||||||
|
import com.stdiet.custom.service.ISysPhysicalSignsService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 客户体征信息Controller
|
* 客户体征信息Controller
|
||||||
@ -40,6 +42,9 @@ public class SysCustomerController extends BaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ISysCustomerHealthyService sysCustomerHealthyService;
|
private ISysCustomerHealthyService sysCustomerHealthyService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISysPhysicalSignsService sysPhysicalSignsService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询客户信息列表
|
* 查询客户信息列表
|
||||||
*/
|
*/
|
||||||
@ -56,6 +61,20 @@ public class SysCustomerController extends BaseController {
|
|||||||
sysCustomer.setChannels(remark.split("\\|"));
|
sysCustomer.setChannels(remark.split("\\|"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//体征查询
|
||||||
|
if(StringUtils.isNotEmpty(sysCustomer.getPhysicalSignsId())){
|
||||||
|
//判断是否数字ID
|
||||||
|
Pattern pattern = Pattern.compile("^[-\\+]?[\\d]*$");
|
||||||
|
if(pattern.matcher(sysCustomer.getPhysicalSignsId()).matches()){
|
||||||
|
List<Long> signIdList = new ArrayList<>();
|
||||||
|
signIdList.add(Long.parseLong(sysCustomer.getPhysicalSignsId()));
|
||||||
|
sysCustomer.setSignIdList(signIdList);
|
||||||
|
}else {
|
||||||
|
sysCustomer.setSignIdList(sysPhysicalSignsService.getSignIdByName(sysCustomer.getPhysicalSignsId()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
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) {
|
||||||
|
@ -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.SysNutritionalVideo;
|
||||||
|
import com.stdiet.custom.service.ISysNutritionalVideoService;
|
||||||
|
import com.stdiet.common.utils.poi.ExcelUtil;
|
||||||
|
import com.stdiet.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 营养视频Controller
|
||||||
|
*
|
||||||
|
* @author xzj
|
||||||
|
* @date 2021-04-29
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/custom/nutritionalVideo")
|
||||||
|
public class SysNutritionalVideoController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ISysNutritionalVideoService sysNutritionalVideoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询营养视频列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('custom:nutritionalVideo:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(SysNutritionalVideo sysNutritionalVideo)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<SysNutritionalVideo> list = sysNutritionalVideoService.selectSysNutritionalVideoList(sysNutritionalVideo);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出营养视频列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('custom:nutritionalVideo:export')")
|
||||||
|
@Log(title = "营养视频", businessType = BusinessType.EXPORT)
|
||||||
|
@GetMapping("/export")
|
||||||
|
public AjaxResult export(SysNutritionalVideo sysNutritionalVideo)
|
||||||
|
{
|
||||||
|
List<SysNutritionalVideo> list = sysNutritionalVideoService.selectSysNutritionalVideoList(sysNutritionalVideo);
|
||||||
|
ExcelUtil<SysNutritionalVideo> util = new ExcelUtil<SysNutritionalVideo>(SysNutritionalVideo.class);
|
||||||
|
return util.exportExcel(list, "nutritionalVideo");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取营养视频详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('custom:nutritionalVideo:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return AjaxResult.success(sysNutritionalVideoService.selectSysNutritionalVideoById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增营养视频
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('custom:nutritionalVideo:add')")
|
||||||
|
@Log(title = "营养视频", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody SysNutritionalVideo sysNutritionalVideo)
|
||||||
|
{
|
||||||
|
return toAjax(sysNutritionalVideoService.insertSysNutritionalVideo(sysNutritionalVideo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改营养视频
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('custom:nutritionalVideo:edit')")
|
||||||
|
@Log(title = "营养视频", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody SysNutritionalVideo sysNutritionalVideo)
|
||||||
|
{
|
||||||
|
return toAjax(sysNutritionalVideoService.updateSysNutritionalVideo(sysNutritionalVideo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除营养视频
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('custom:nutritionalVideo:remove')")
|
||||||
|
@Log(title = "营养视频", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(sysNutritionalVideoService.deleteSysNutritionalVideoByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
@ -1,11 +1,15 @@
|
|||||||
package com.stdiet.web.controller.custom;
|
package com.stdiet.web.controller.custom;
|
||||||
|
|
||||||
|
import com.aliyun.vod20170321.models.GetPlayInfoResponseBody;
|
||||||
|
import com.aliyun.vod20170321.models.GetVideoInfoResponseBody;
|
||||||
|
import com.aliyun.vod20170321.models.GetVideoListResponseBody;
|
||||||
import com.itextpdf.io.util.DateTimeUtil;
|
import com.itextpdf.io.util.DateTimeUtil;
|
||||||
import com.stdiet.common.core.controller.BaseController;
|
import com.stdiet.common.core.controller.BaseController;
|
||||||
import com.stdiet.common.core.domain.AjaxResult;
|
import com.stdiet.common.core.domain.AjaxResult;
|
||||||
import com.stdiet.common.core.page.TableDataInfo;
|
import com.stdiet.common.core.page.TableDataInfo;
|
||||||
import com.stdiet.common.enums.BusinessType;
|
import com.stdiet.common.enums.BusinessType;
|
||||||
import com.stdiet.common.exception.file.FileNameLengthLimitExceededException;
|
import com.stdiet.common.exception.file.FileNameLengthLimitExceededException;
|
||||||
|
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.StringUtils;
|
||||||
import com.stdiet.common.utils.file.FileUploadUtils;
|
import com.stdiet.common.utils.file.FileUploadUtils;
|
||||||
@ -15,6 +19,7 @@ import com.stdiet.common.utils.sign.AesUtils;
|
|||||||
import com.stdiet.custom.domain.*;
|
import com.stdiet.custom.domain.*;
|
||||||
import com.stdiet.custom.dto.response.CustomerCaseResponse;
|
import com.stdiet.custom.dto.response.CustomerCaseResponse;
|
||||||
import com.stdiet.custom.dto.response.MessageNoticeResponse;
|
import com.stdiet.custom.dto.response.MessageNoticeResponse;
|
||||||
|
import com.stdiet.custom.dto.response.NutritionalVideoResponse;
|
||||||
import com.stdiet.custom.page.WxLogInfo;
|
import com.stdiet.custom.page.WxLogInfo;
|
||||||
import com.stdiet.custom.service.*;
|
import com.stdiet.custom.service.*;
|
||||||
import org.aspectj.weaver.loadtime.Aj;
|
import org.aspectj.weaver.loadtime.Aj;
|
||||||
@ -59,6 +64,9 @@ public class WechatAppletController extends BaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ISysCustomerService sysCustomerService;
|
private ISysCustomerService sysCustomerService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISysNutritionalVideoService sysNutritionalVideoService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询微信小程序中展示的客户案例
|
* 查询微信小程序中展示的客户案例
|
||||||
*/
|
*/
|
||||||
@ -353,4 +361,70 @@ public class WechatAppletController extends BaseController {
|
|||||||
sysMessageNotice.setId(id);
|
sysMessageNotice.setId(id);
|
||||||
return toAjax(sysMessageNoticeService.updateSysMessageNotice(sysMessageNotice));
|
return toAjax(sysMessageNoticeService.updateSysMessageNotice(sysMessageNotice));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新用户通知消息已读状态
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/getVideoList")
|
||||||
|
public TableDataInfo getVideoList(SysNutritionalVideo sysNutritionalVideo) {
|
||||||
|
AjaxResult result = AjaxResult.success();
|
||||||
|
startPage();
|
||||||
|
//int total = 0;
|
||||||
|
//List<NutritionalVideoResponse> nutritionalVideoList = new ArrayList<>();
|
||||||
|
try{
|
||||||
|
/**GetVideoListResponseBody videoListResponseBody = AliyunVideoUtils.getVideoListByPage(null, "Normal", 1, 10);
|
||||||
|
if(videoListResponseBody != null){
|
||||||
|
total = videoListResponseBody.total;
|
||||||
|
for (GetVideoListResponseBody.GetVideoListResponseBodyVideoListVideo video : videoListResponseBody.videoList.video) {
|
||||||
|
NutritionalVideoResponse nutritionalVideoResponse = new NutritionalVideoResponse();
|
||||||
|
nutritionalVideoResponse.setCoverURL(video.getCoverURL());
|
||||||
|
nutritionalVideoResponse.setTitle(video.getTitle());
|
||||||
|
nutritionalVideoResponse.setVideoId(video.getVideoId());
|
||||||
|
nutritionalVideoResponse.setDescription(video.getDescription());
|
||||||
|
nutritionalVideoResponse.setTags(video.getTags());
|
||||||
|
nutritionalVideoList.add(nutritionalVideoResponse);
|
||||||
|
System.out.println(video.getVideoId());
|
||||||
|
System.out.println(video.getCoverURL());
|
||||||
|
System.out.println(video.getTitle());
|
||||||
|
System.out.println(video.getDescription());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
System.out.println();**/
|
||||||
|
sysNutritionalVideo.setShowFlag(1);
|
||||||
|
List<SysNutritionalVideo> list = sysNutritionalVideoService.selectSysNutritionalVideoList(sysNutritionalVideo);
|
||||||
|
return getDataTable(list);
|
||||||
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据视频id获取播放链接
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/getVideoDetailById")
|
||||||
|
public AjaxResult getVideoDetailById(@RequestParam(value = "videoId") String videoId) {
|
||||||
|
AjaxResult result = AjaxResult.success();
|
||||||
|
NutritionalVideoResponse nutritionalVideoResponse = new NutritionalVideoResponse();
|
||||||
|
try{
|
||||||
|
SysNutritionalVideo sysNutritionalVideo = sysNutritionalVideoService.selectSysNutritionalVideByVideoId(videoId);
|
||||||
|
if(sysNutritionalVideo != null){
|
||||||
|
GetPlayInfoResponseBody playInfoResponseBody = AliyunVideoUtils.getVideoVisitDetail(videoId);
|
||||||
|
//GetVideoInfoResponseBody videoInfoResponseBody = AliyunVideoUtils.getVideoById(videoId);
|
||||||
|
List<GetPlayInfoResponseBody.GetPlayInfoResponseBodyPlayInfoListPlayInfo> playList = playInfoResponseBody.playInfoList.playInfo;
|
||||||
|
if(playList != null && playList.size() > 0){
|
||||||
|
nutritionalVideoResponse.setPlayUrl(playList.get(0).getPlayURL());
|
||||||
|
}
|
||||||
|
nutritionalVideoResponse.setDescription(sysNutritionalVideo.getDescription());
|
||||||
|
nutritionalVideoResponse.setTags(sysNutritionalVideo.getTags());
|
||||||
|
nutritionalVideoResponse.setTitle(sysNutritionalVideo.getTitle());
|
||||||
|
nutritionalVideoResponse.setCreateTime(DateUtils.dateTime(sysNutritionalVideo.getCreateTime()));
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
result.put("videoDetail", nutritionalVideoResponse);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,127 @@
|
|||||||
|
package com.stdiet.common.utils;
|
||||||
|
|
||||||
|
import com.aliyun.vod20170321.models.*;
|
||||||
|
import com.aliyun.teaopenapi.models.*;
|
||||||
|
import com.stdiet.common.config.AliyunOSSConfig;
|
||||||
|
import org.apache.commons.collections4.Get;
|
||||||
|
|
||||||
|
public class AliyunVideoUtils {
|
||||||
|
|
||||||
|
public static com.aliyun.vod20170321.Client videoClient = null;
|
||||||
|
|
||||||
|
public static final String default_definition = "FD,LD,SD,HD";
|
||||||
|
|
||||||
|
public static final String default_stream_type = "video";
|
||||||
|
|
||||||
|
public static final String default_output_type = "oss";
|
||||||
|
|
||||||
|
public static final String default_formats = "mp4";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化视频点播Client
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public static com.aliyun.vod20170321.Client createClient() throws Exception {
|
||||||
|
if(videoClient == null){
|
||||||
|
synchronized (com.aliyun.vod20170321.Client.class){
|
||||||
|
if(videoClient == null){
|
||||||
|
Config config = new Config()
|
||||||
|
// 您的AccessKey ID
|
||||||
|
.setAccessKeyId(AliyunOSSConfig.AccessKeyID)
|
||||||
|
// 您的AccessKey Secret
|
||||||
|
.setAccessKeySecret(AliyunOSSConfig.AccessKeySecret);
|
||||||
|
// 访问的域名
|
||||||
|
config.endpoint = "vod.cn-shenzhen.aliyuncs.com";
|
||||||
|
videoClient = new com.aliyun.vod20170321.Client(config);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return videoClient;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页获取视频列表
|
||||||
|
* @param pageNo 页码
|
||||||
|
* @param pageSize 每页数量
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public static GetVideoListResponseBody getVideoListByPage(Long cateId, String status, Integer pageNo, Integer pageSize) throws Exception{
|
||||||
|
com.aliyun.vod20170321.Client client = AliyunVideoUtils.createClient();
|
||||||
|
GetVideoListRequest getVideoListRequest = new GetVideoListRequest()
|
||||||
|
.setCateId(cateId == null ? null : cateId)
|
||||||
|
.setStatus(status == null ? "Normal": status)
|
||||||
|
.setPageNo(pageNo == null ? 1 : pageNo)
|
||||||
|
.setPageSize(pageSize == null ? 10 : pageSize);
|
||||||
|
GetVideoListResponse videoListResponse = client.getVideoList(getVideoListRequest);
|
||||||
|
if(videoListResponse != null){
|
||||||
|
return videoListResponse.getBody();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据videoID获取视频访问地址信息
|
||||||
|
* @param videoId
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public static GetPlayInfoResponseBody getVideoVisitDetail(String videoId) throws Exception{
|
||||||
|
com.aliyun.vod20170321.Client client = AliyunVideoUtils.createClient();
|
||||||
|
GetPlayInfoRequest getPlayInfoRequest = new GetPlayInfoRequest()
|
||||||
|
.setVideoId(videoId)
|
||||||
|
.setStreamType(default_stream_type)
|
||||||
|
.setOutputType(default_output_type)
|
||||||
|
.setFormats(default_formats);
|
||||||
|
GetPlayInfoResponse getPlayInfoResponse = client.getPlayInfo(getPlayInfoRequest);
|
||||||
|
if(getPlayInfoResponse != null){
|
||||||
|
return getPlayInfoResponse.getBody();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据videoID获取视频信息
|
||||||
|
* @param videoId
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public static GetVideoInfoResponseBody getVideoById (String videoId) throws Exception{
|
||||||
|
com.aliyun.vod20170321.Client client = AliyunVideoUtils.createClient();
|
||||||
|
GetVideoInfoRequest getVideoInfoRequest = new GetVideoInfoRequest()
|
||||||
|
.setVideoId(videoId);
|
||||||
|
GetVideoInfoResponse response = client.getVideoInfo(getVideoInfoRequest);
|
||||||
|
if(response != null){
|
||||||
|
return response.body;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据视频消息获取上传凭证
|
||||||
|
* @param cateId
|
||||||
|
* @param fileName
|
||||||
|
* @param title
|
||||||
|
* @param coverURL
|
||||||
|
* @param tags
|
||||||
|
* @param description
|
||||||
|
*/
|
||||||
|
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();
|
||||||
|
CreateUploadVideoRequest createUploadVideoRequest = new CreateUploadVideoRequest()
|
||||||
|
.setDescription(description)
|
||||||
|
.setCoverURL(coverURL)
|
||||||
|
.setFileName(fileName)
|
||||||
|
.setTitle(title)
|
||||||
|
.setCateId(cateId)
|
||||||
|
.setTags(tags);
|
||||||
|
return client.createUploadVideo(createUploadVideoRequest);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -2,6 +2,8 @@ package com.stdiet.custom.domain;
|
|||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
@ -102,4 +104,10 @@ public class SysCustomer extends BaseEntity
|
|||||||
|
|
||||||
private String[] channels;
|
private String[] channels;
|
||||||
|
|
||||||
|
//病史体征ID集合,非持久化字段
|
||||||
|
private List<Long> signIdList;
|
||||||
|
|
||||||
|
//病史体征ID
|
||||||
|
private String physicalSignsId;
|
||||||
|
|
||||||
}
|
}
|
@ -0,0 +1,55 @@
|
|||||||
|
package com.stdiet.custom.domain;
|
||||||
|
|
||||||
|
import com.stdiet.common.annotation.Excel;
|
||||||
|
import com.stdiet.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 营养视频对象 sys_nutritional_video
|
||||||
|
*
|
||||||
|
* @author xzj
|
||||||
|
* @date 2021-04-29
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SysNutritionalVideo extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** $column.columnComment */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 视频分类ID */
|
||||||
|
@Excel(name = "视频分类ID")
|
||||||
|
private Long cateId;
|
||||||
|
|
||||||
|
/** 阿里云视频ID */
|
||||||
|
@Excel(name = "阿里云视频ID")
|
||||||
|
private String videoId;
|
||||||
|
|
||||||
|
/** 视频封面URL */
|
||||||
|
@Excel(name = "视频封面URL")
|
||||||
|
private String coverUrl;
|
||||||
|
|
||||||
|
/** 视频标题 */
|
||||||
|
@Excel(name = "视频标题")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/** 视频描述 */
|
||||||
|
@Excel(name = "视频描述")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/** 视频大小,单位:字节 */
|
||||||
|
@Excel(name = "视频大小,单位:字节")
|
||||||
|
private Long videoSize;
|
||||||
|
|
||||||
|
/** 标签,使用 , 隔开 */
|
||||||
|
@Excel(name = "标签,使用 , 隔开")
|
||||||
|
private String tags;
|
||||||
|
|
||||||
|
/** 是否显示,0不显示 1显示,默认0 */
|
||||||
|
@Excel(name = "是否显示,0不显示 1显示,默认0")
|
||||||
|
private Integer showFlag;
|
||||||
|
|
||||||
|
/** 删除标识,0未删除 1已删除,默认0 */
|
||||||
|
private Integer delFlag;
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
package com.stdiet.custom.dto.response;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class NutritionalVideoResponse implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
//分类ID
|
||||||
|
public Long cateId;
|
||||||
|
|
||||||
|
//分类名称
|
||||||
|
public String cateName;
|
||||||
|
|
||||||
|
//标题
|
||||||
|
public String title;
|
||||||
|
|
||||||
|
//标签
|
||||||
|
public String tags;
|
||||||
|
|
||||||
|
//视频ID
|
||||||
|
public String videoId;
|
||||||
|
|
||||||
|
//封面URL
|
||||||
|
public String coverURL;
|
||||||
|
|
||||||
|
//视频描述
|
||||||
|
public String description;
|
||||||
|
|
||||||
|
//播放链接
|
||||||
|
public String playUrl;
|
||||||
|
|
||||||
|
|
||||||
|
public String createTime;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,69 @@
|
|||||||
|
package com.stdiet.custom.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.stdiet.custom.domain.SysNutritionalVideo;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 营养视频Mapper接口
|
||||||
|
*
|
||||||
|
* @author xzj
|
||||||
|
* @date 2021-04-29
|
||||||
|
*/
|
||||||
|
public interface SysNutritionalVideoMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询营养视频
|
||||||
|
*
|
||||||
|
* @param id 营养视频ID
|
||||||
|
* @return 营养视频
|
||||||
|
*/
|
||||||
|
public SysNutritionalVideo selectSysNutritionalVideoById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询营养视频列表
|
||||||
|
*
|
||||||
|
* @param sysNutritionalVideo 营养视频
|
||||||
|
* @return 营养视频集合
|
||||||
|
*/
|
||||||
|
public List<SysNutritionalVideo> selectSysNutritionalVideoList(SysNutritionalVideo sysNutritionalVideo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增营养视频
|
||||||
|
*
|
||||||
|
* @param sysNutritionalVideo 营养视频
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSysNutritionalVideo(SysNutritionalVideo sysNutritionalVideo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改营养视频
|
||||||
|
*
|
||||||
|
* @param sysNutritionalVideo 营养视频
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSysNutritionalVideo(SysNutritionalVideo sysNutritionalVideo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除营养视频
|
||||||
|
*
|
||||||
|
* @param id 营养视频ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSysNutritionalVideoById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除营养视频
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSysNutritionalVideoByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取视频
|
||||||
|
* @param videoId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public SysNutritionalVideo selectSysNutritionalVideByVideoId(@Param("videoId")String videoId);
|
||||||
|
}
|
@ -2,6 +2,7 @@ package com.stdiet.custom.mapper;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.stdiet.custom.domain.SysPhysicalSigns;
|
import com.stdiet.custom.domain.SysPhysicalSigns;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 体征Mapper接口
|
* 体征Mapper接口
|
||||||
@ -58,4 +59,11 @@ public interface SysPhysicalSignsMapper
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteSysPhysicalSignsByIds(Long[] ids);
|
public int deleteSysPhysicalSignsByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据名称查询体征ID集合
|
||||||
|
* @param name
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<Long> getSignIdByName(@Param("name") String name);
|
||||||
}
|
}
|
@ -0,0 +1,68 @@
|
|||||||
|
package com.stdiet.custom.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.stdiet.custom.domain.SysNutritionalVideo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 营养视频Service接口
|
||||||
|
*
|
||||||
|
* @author xzj
|
||||||
|
* @date 2021-04-29
|
||||||
|
*/
|
||||||
|
public interface ISysNutritionalVideoService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询营养视频
|
||||||
|
*
|
||||||
|
* @param id 营养视频ID
|
||||||
|
* @return 营养视频
|
||||||
|
*/
|
||||||
|
public SysNutritionalVideo selectSysNutritionalVideoById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询营养视频列表
|
||||||
|
*
|
||||||
|
* @param sysNutritionalVideo 营养视频
|
||||||
|
* @return 营养视频集合
|
||||||
|
*/
|
||||||
|
public List<SysNutritionalVideo> selectSysNutritionalVideoList(SysNutritionalVideo sysNutritionalVideo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增营养视频
|
||||||
|
*
|
||||||
|
* @param sysNutritionalVideo 营养视频
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSysNutritionalVideo(SysNutritionalVideo sysNutritionalVideo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改营养视频
|
||||||
|
*
|
||||||
|
* @param sysNutritionalVideo 营养视频
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSysNutritionalVideo(SysNutritionalVideo sysNutritionalVideo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除营养视频
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的营养视频ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSysNutritionalVideoByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除营养视频信息
|
||||||
|
*
|
||||||
|
* @param id 营养视频ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSysNutritionalVideoById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取视频
|
||||||
|
* @param videoId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public SysNutritionalVideo selectSysNutritionalVideByVideoId(String videoId);
|
||||||
|
}
|
@ -58,4 +58,11 @@ public interface ISysPhysicalSignsService
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteSysPhysicalSignsById(Long id);
|
public int deleteSysPhysicalSignsById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据名称查询体征ID集合
|
||||||
|
* @param name
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<Long> getSignIdByName(String name);
|
||||||
}
|
}
|
@ -0,0 +1,105 @@
|
|||||||
|
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.SysNutritionalVideoMapper;
|
||||||
|
import com.stdiet.custom.domain.SysNutritionalVideo;
|
||||||
|
import com.stdiet.custom.service.ISysNutritionalVideoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 营养视频Service业务层处理
|
||||||
|
*
|
||||||
|
* @author xzj
|
||||||
|
* @date 2021-04-29
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class SysNutritionalVideoServiceImpl implements ISysNutritionalVideoService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private SysNutritionalVideoMapper sysNutritionalVideoMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询营养视频
|
||||||
|
*
|
||||||
|
* @param id 营养视频ID
|
||||||
|
* @return 营养视频
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SysNutritionalVideo selectSysNutritionalVideoById(Long id)
|
||||||
|
{
|
||||||
|
return sysNutritionalVideoMapper.selectSysNutritionalVideoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询营养视频列表
|
||||||
|
*
|
||||||
|
* @param sysNutritionalVideo 营养视频
|
||||||
|
* @return 营养视频
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<SysNutritionalVideo> selectSysNutritionalVideoList(SysNutritionalVideo sysNutritionalVideo)
|
||||||
|
{
|
||||||
|
return sysNutritionalVideoMapper.selectSysNutritionalVideoList(sysNutritionalVideo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增营养视频
|
||||||
|
*
|
||||||
|
* @param sysNutritionalVideo 营养视频
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertSysNutritionalVideo(SysNutritionalVideo sysNutritionalVideo)
|
||||||
|
{
|
||||||
|
sysNutritionalVideo.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return sysNutritionalVideoMapper.insertSysNutritionalVideo(sysNutritionalVideo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改营养视频
|
||||||
|
*
|
||||||
|
* @param sysNutritionalVideo 营养视频
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateSysNutritionalVideo(SysNutritionalVideo sysNutritionalVideo)
|
||||||
|
{
|
||||||
|
sysNutritionalVideo.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return sysNutritionalVideoMapper.updateSysNutritionalVideo(sysNutritionalVideo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除营养视频
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的营养视频ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSysNutritionalVideoByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return sysNutritionalVideoMapper.deleteSysNutritionalVideoByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除营养视频信息
|
||||||
|
*
|
||||||
|
* @param id 营养视频ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSysNutritionalVideoById(Long id)
|
||||||
|
{
|
||||||
|
return sysNutritionalVideoMapper.deleteSysNutritionalVideoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取视频
|
||||||
|
* @param videoId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public SysNutritionalVideo selectSysNutritionalVideByVideoId(String videoId){
|
||||||
|
return sysNutritionalVideoMapper.selectSysNutritionalVideByVideoId(videoId);
|
||||||
|
}
|
||||||
|
}
|
@ -90,4 +90,14 @@ public class SysPhysicalSignsServiceImpl implements ISysPhysicalSignsService
|
|||||||
{
|
{
|
||||||
return sysPhysicalSignsMapper.deleteSysPhysicalSignsById(id);
|
return sysPhysicalSignsMapper.deleteSysPhysicalSignsById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据名称查询体征ID集合
|
||||||
|
* @param name
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Long> getSignIdByName(String name){
|
||||||
|
return sysPhysicalSignsMapper.getSignIdByName(name);
|
||||||
|
}
|
||||||
}
|
}
|
@ -34,26 +34,41 @@
|
|||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectSysCustomerList" parameterType="SysCustomer" resultMap="SysCustomerResult">
|
<select id="selectSysCustomerList" parameterType="SysCustomer" resultMap="SysCustomerResult">
|
||||||
<include refid="selectSysCustomerVo"/>
|
select
|
||||||
where del_flag = 0
|
sc.id, sc.name, sc.phone, sc.email, sc.fans_time, sc.fans_channel, sc.address, sc.pay_date, sc.start_date, sc.purchase_num, sc.pay_total, sc.main_dietitian,
|
||||||
<if test="name != null and name != ''"> and (name like concat('%', #{name}, '%') or phone like concat('%', #{name}, '%'))</if>
|
sc.assistant_dietitian, sc.after_dietitian, sc.salesman, sc.charge_person, sc.follow_status, sc.create_time,sc.channel_id
|
||||||
<if test="mainDietitian != null and mainDietitian != ''"> and main_dietitian = #{mainDietitian}</if>
|
from sys_customer sc
|
||||||
<if test="mainDietitian == 0"> and (isnull(main_dietitian) or main_dietitian=0)</if>
|
left join sys_customer_healthy as sch
|
||||||
<if test="salesman != null and salesman != ''"> and salesman = #{salesman}</if>
|
on sch.customer_id = sc.id and sch.del_flag = 0
|
||||||
<if test="salesman == 0"> and (isnull(salesman) or salesman=0)</if>
|
where sc.del_flag = 0
|
||||||
<if test="afterDietitian != null and afterDietitian != ''"> and after_dietitian = #{afterDietitian}</if>
|
<if test="name != null and name != ''">
|
||||||
<if test="afterDietitian == 0"> and (isnull(after_dietitian) or after_dietitian=0)</if>
|
and (sc.name like concat('%', #{name}, '%') or sc.phone like concat('%', #{name}, '%'))
|
||||||
<if test="assistantDietitian != null and assistantDietitian != ''"> and assistant_dietitian = #{assistantDietitian}</if>
|
</if>
|
||||||
<if test="assistantDietitian == 0"> and (isnull(assistant_dietitian) or assistant_dietitian=0)</if>
|
<if test="mainDietitian != null and mainDietitian != ''"> and sc.main_dietitian = #{mainDietitian}</if>
|
||||||
<if test="fansChannel != null "> and fans_channel = #{fansChannel}</if>
|
<if test="mainDietitian == 0"> and (isnull(sc.main_dietitian) or sc.main_dietitian=0)</if>
|
||||||
<if test="channelId != null "> and channel_id = #{channelId}</if>
|
<if test="salesman != null and salesman != ''"> and sc.salesman = #{salesman}</if>
|
||||||
|
<if test="salesman == 0"> and (isnull(sc.salesman) or sc.salesman=0)</if>
|
||||||
|
<if test="afterDietitian != null and afterDietitian != ''"> and sc.after_dietitian = #{afterDietitian}</if>
|
||||||
|
<if test="afterDietitian == 0"> and (isnull(sc.after_dietitian) or sc.after_dietitian=0)</if>
|
||||||
|
<if test="assistantDietitian != null and assistantDietitian != ''"> and sc.assistant_dietitian = #{assistantDietitian}</if>
|
||||||
|
<if test="assistantDietitian == 0"> and (isnull(sc.assistant_dietitian) or sc.assistant_dietitian=0)</if>
|
||||||
|
<if test="fansChannel != null "> and sc.fans_channel = #{fansChannel}</if>
|
||||||
|
<if test="channelId != null "> and sc.channel_id = #{channelId}</if>
|
||||||
<if test="channels != null">
|
<if test="channels != null">
|
||||||
and channel_id in
|
and sc.channel_id in
|
||||||
<foreach collection="channels" item="cn" separator="," open="(" close=")">
|
<foreach collection="channels" item="cn" separator="," open="(" close=")">
|
||||||
#{cn}
|
#{cn}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
order by create_time desc
|
<if test="signIdList != null">
|
||||||
|
and (
|
||||||
|
sch.other_physical_signs like concat('%', #{name}, '%')
|
||||||
|
<foreach collection="signIdList " item="signId" index="index" open=" OR (" close=")" separator=" OR ">
|
||||||
|
FIND_IN_SET(#{signId}, sch.physical_signs_id)
|
||||||
|
</foreach>
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
order by sc.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectSysCustomerById" parameterType="Long" resultMap="SysCustomerResult">
|
<select id="selectSysCustomerById" parameterType="Long" resultMap="SysCustomerResult">
|
||||||
|
@ -0,0 +1,109 @@
|
|||||||
|
<?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.SysNutritionalVideoMapper">
|
||||||
|
|
||||||
|
<resultMap type="SysNutritionalVideo" id="SysNutritionalVideoResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="cateId" column="cate_id" />
|
||||||
|
<result property="videoId" column="video_id" />
|
||||||
|
<result property="coverUrl" column="cover_url" />
|
||||||
|
<result property="title" column="title" />
|
||||||
|
<result property="description" column="description" />
|
||||||
|
<result property="videoSize" column="video_size" />
|
||||||
|
<result property="tags" column="tags" />
|
||||||
|
<result property="showFlag" column="show_flag" />
|
||||||
|
<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="selectSysNutritionalVideoVo">
|
||||||
|
select id, cate_id, video_id, cover_url, title, description, video_size, tags, show_flag, create_time, create_by, update_time, update_by, del_flag from sys_nutritional_video
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectSysNutritionalVideoList" parameterType="SysNutritionalVideo" resultMap="SysNutritionalVideoResult">
|
||||||
|
<include refid="selectSysNutritionalVideoVo"/> where del_flag = 0
|
||||||
|
<if test="showFlag != null">
|
||||||
|
and show_flag = #{showFlag}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSysNutritionalVideoById" parameterType="Long" resultMap="SysNutritionalVideoResult">
|
||||||
|
<include refid="selectSysNutritionalVideoVo"/>
|
||||||
|
where id = #{id} and del_flag = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertSysNutritionalVideo" parameterType="SysNutritionalVideo" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into sys_nutritional_video
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="cateId != null">cate_id,</if>
|
||||||
|
<if test="videoId != null">video_id,</if>
|
||||||
|
<if test="coverUrl != null">cover_url,</if>
|
||||||
|
<if test="title != null">title,</if>
|
||||||
|
<if test="description != null">description,</if>
|
||||||
|
<if test="videoSize != null">video_size,</if>
|
||||||
|
<if test="tags != null">tags,</if>
|
||||||
|
<if test="showFlag != null">show_flag,</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="cateId != null">#{cateId},</if>
|
||||||
|
<if test="videoId != null">#{videoId},</if>
|
||||||
|
<if test="coverUrl != null">#{coverUrl},</if>
|
||||||
|
<if test="title != null">#{title},</if>
|
||||||
|
<if test="description != null">#{description},</if>
|
||||||
|
<if test="videoSize != null">#{videoSize},</if>
|
||||||
|
<if test="tags != null">#{tags},</if>
|
||||||
|
<if test="showFlag != null">#{showFlag},</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="updateSysNutritionalVideo" parameterType="SysNutritionalVideo">
|
||||||
|
update sys_nutritional_video
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="cateId != null">cate_id = #{cateId},</if>
|
||||||
|
<if test="videoId != null">video_id = #{videoId},</if>
|
||||||
|
<if test="coverUrl != null">cover_url = #{coverUrl},</if>
|
||||||
|
<if test="title != null">title = #{title},</if>
|
||||||
|
<if test="description != null">description = #{description},</if>
|
||||||
|
<if test="videoSize != null">video_size = #{videoSize},</if>
|
||||||
|
<if test="tags != null">tags = #{tags},</if>
|
||||||
|
<if test="showFlag != null">show_flag = #{showFlag},</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="deleteSysNutritionalVideoById" parameterType="Long">
|
||||||
|
update sys_nutritional_video set del_flag = 1 where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="deleteSysNutritionalVideoByIds" parameterType="String">
|
||||||
|
update sys_nutritional_video set del_flag = 1 where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<select id="selectSysNutritionalVideByVideoId" parameterType="String" resultMap="SysNutritionalVideoResult">
|
||||||
|
<include refid="selectSysNutritionalVideoVo"/> where video_id = #{videoId} and del_flag = 0 limit 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
@ -66,5 +66,10 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<!-- 根据体征名称查询体征ID -->
|
||||||
|
<select id="getSignIdByName" parameterType="String" resultType="Long">
|
||||||
|
select sps.id from sys_physical_signs sps where sps.name like concat('%', #{name}, '%')
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
@ -49,6 +49,7 @@
|
|||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="创建时间" align="center" prop="createTime" />
|
||||||
<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">
|
||||||
<el-button
|
<el-button
|
||||||
|
@ -83,6 +83,26 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="病史体征" prop="physicalSignsId">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.physicalSignsId"
|
||||||
|
filterable
|
||||||
|
clearable
|
||||||
|
allow-create
|
||||||
|
default-first-option
|
||||||
|
placeholder="请选择病史体征"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="physicalSign in physicalSignsList"
|
||||||
|
:key="physicalSign.id"
|
||||||
|
:label="physicalSign.name"
|
||||||
|
:value="physicalSign.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="cyan" icon="el-icon-search" @click="handleQuery"
|
<el-button type="cyan" icon="el-icon-search" @click="handleQuery"
|
||||||
>搜索</el-button
|
>搜索</el-button
|
||||||
@ -434,6 +454,7 @@ import ContractDrawer from "@/components/ContractDrawer";
|
|||||||
import HeatStatisticsDrawer from "@/components/HeatStatisticsDrawer";
|
import HeatStatisticsDrawer from "@/components/HeatStatisticsDrawer";
|
||||||
import RecipesPlanDrawer from "@/components/RecipesPlanDrawer";
|
import RecipesPlanDrawer from "@/components/RecipesPlanDrawer";
|
||||||
import CustomerPunchLogDrawer from "@/components/PunchLog/CustomerPunchLog";
|
import CustomerPunchLogDrawer from "@/components/PunchLog/CustomerPunchLog";
|
||||||
|
import { listPhysicalSigns } from "@/api/custom/physicalSigns";
|
||||||
import { mapGetters } from "vuex";
|
import { mapGetters } from "vuex";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -483,6 +504,7 @@ export default {
|
|||||||
assistantDietitian: null,
|
assistantDietitian: null,
|
||||||
afterDietitian: null,
|
afterDietitian: null,
|
||||||
salesman: null,
|
salesman: null,
|
||||||
|
physicalSignsId: null
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
@ -524,6 +546,8 @@ export default {
|
|||||||
return time.getTime() > Date.now();
|
return time.getTime() > Date.now();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
//病史体征
|
||||||
|
physicalSignsList:[]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -545,6 +569,9 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.getList();
|
this.getList();
|
||||||
|
listPhysicalSigns().then(response => {
|
||||||
|
this.physicalSignsList = response.rows;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
isPartner() {
|
isPartner() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user