@ -54,4 +54,7 @@ public class SysCustomerCase extends BaseEntity
|
||||
|
||||
//案例文件URL数组
|
||||
private String[] caseFileUrl;
|
||||
|
||||
//病史体征ID集合,非持久化字段
|
||||
private List<Long> signIdList;
|
||||
}
|
@ -61,7 +61,7 @@ public class SysNutritionalVideo extends BaseEntity
|
||||
|
||||
/** 视频付费等级,0无需付费 1客户可看 2付费可看 */
|
||||
@Excel(name = "视频付费等级,0无需付费 1客户可看 2付费可看")
|
||||
private Long payLevel;
|
||||
private Integer payLevel;
|
||||
|
||||
private String payLevelName;
|
||||
|
||||
@ -72,6 +72,8 @@ public class SysNutritionalVideo extends BaseEntity
|
||||
/** 删除标识,0未删除 1已删除,默认0 */
|
||||
private Integer delFlag;
|
||||
|
||||
private String playUrl;
|
||||
|
||||
//文件名称
|
||||
private String fileName;
|
||||
|
||||
@ -79,4 +81,9 @@ public class SysNutritionalVideo extends BaseEntity
|
||||
|
||||
//排序方式 1 按照创建时间倒序 2按照优先级、时间倒序
|
||||
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;
|
||||
|
||||
/**订单ID*/
|
||||
@Excel(name = "订单ID")
|
||||
private Long orderId;
|
||||
|
||||
/**订单成交时间*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "订单成交时间")
|
||||
private LocalDateTime orderTime;
|
||||
|
||||
/**客户姓名*/
|
||||
@Excel(name = "客户姓名")
|
||||
private String name;
|
||||
|
||||
/**服务结束时间*/
|
||||
/**订单金额或服务订单金额*/
|
||||
@Excel(name = "订单金额")
|
||||
private BigDecimal orderAmount;
|
||||
|
||||
/**服务开始时间*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "服务开始时间")
|
||||
private LocalDate serverStartDate;
|
||||
|
||||
/**服务结束时间*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "服务结束时间")
|
||||
private LocalDate serverEndDate;
|
||||
|
||||
/**服务月数*/
|
||||
private Integer serverMonth;
|
||||
|
||||
/**服务天数*/
|
||||
@Excel(name = "服务天数")
|
||||
private Integer serverDay;
|
||||
|
||||
/**赠送天数*/
|
||||
private Integer giveDay;
|
||||
|
||||
/**订单金额或服务订单金额*/
|
||||
private BigDecimal orderAmount;
|
||||
/** 暂停总天数 **/
|
||||
|
||||
/**订单总提成**/
|
||||
private BigDecimal orderCommission;
|
||||
private int pauseTotalDay;
|
||||
|
||||
//已发放提成
|
||||
private BigDecimal hasSendOrderCommission;
|
||||
@ -54,15 +65,10 @@ public class SysOrderCommisionDayDetail extends BaseEntity {
|
||||
//未发放提成
|
||||
private BigDecimal notHasSendOrderCommission;
|
||||
|
||||
/**服务天数*/
|
||||
private Integer serverDay;
|
||||
|
||||
/**每天金额*/
|
||||
@Excel(name = "每天金额")
|
||||
private BigDecimal dayMoney;
|
||||
|
||||
/** 暂停总天数 **/
|
||||
private int pauseTotalDay;
|
||||
|
||||
/**每年每月暂停天数*/
|
||||
private Map<String, Integer> everyYearMonthPauseDay;
|
||||
|
||||
@ -79,11 +85,17 @@ public class SysOrderCommisionDayDetail extends BaseEntity {
|
||||
private Map<String, Boolean> everyYearMonthCommissionSendFlag;
|
||||
|
||||
//该笔订单成交的当月的总成交额,用于确定提成比例
|
||||
@Excel(name = "当月的成交额")
|
||||
private BigDecimal monthOrderTotalAmount;
|
||||
|
||||
//该笔订单对应提成比例
|
||||
@Excel(name = "提成比例")
|
||||
private Float commissionRate;
|
||||
|
||||
/**订单总提成**/
|
||||
@Excel(name = "订单提成")
|
||||
private BigDecimal orderCommission;
|
||||
|
||||
//售后
|
||||
private Long afterSaleId;
|
||||
|
||||
|
@ -106,4 +106,18 @@ public interface SysOrderMapper
|
||||
* @return
|
||||
*/
|
||||
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
|
||||
*/
|
||||
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.stdiet.common.utils.AliyunVideoUtils;
|
||||
import com.stdiet.common.utils.DateUtils;
|
||||
import com.stdiet.common.utils.StringUtils;
|
||||
import com.stdiet.common.utils.oss.AliyunOSSUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
@ -53,15 +54,42 @@ public class SysNutritionalVideoServiceImpl implements ISysNutritionalVideoServi
|
||||
List<SysNutritionalVideo> list = sysNutritionalVideoMapper.selectSysNutritionalVideoList(sysNutritionalVideo);
|
||||
if(flag && list != null && list.size() > 0){
|
||||
List<String> fileUrl = new ArrayList<>();
|
||||
List<String> videoIdList = new ArrayList<>();
|
||||
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(downUrlList != null && downUrlList.size() > 0){
|
||||
int index = 0;
|
||||
for (String downUrl : downUrlList) {
|
||||
list.get(index).setCoverUrl(downUrl);
|
||||
index++;
|
||||
if(fileUrl.size() > 0){
|
||||
List<String> downUrlList = AliyunOSSUtils.generatePresignedUrl(fileUrl);
|
||||
if(downUrlList != null && downUrlList.size() > 0){
|
||||
int index = 0;
|
||||
for (SysNutritionalVideo video : list) {
|
||||
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){
|
||||
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 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_healthy as sch on sch.customer_id = sc.id and sch.del_flag = 0
|
||||
where scc.del_flag = 0
|
||||
<include refid="searchKey">
|
||||
<property name="keywordArray" value="#{keywordArray}"/>
|
||||
@ -52,6 +53,21 @@
|
||||
<if test="customerName != null and customerName != ''">
|
||||
and sc.name like concat('%', #{customerName}, '%')
|
||||
</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">
|
||||
and scc.wx_show = #{wxShow}
|
||||
</if>
|
||||
|
@ -62,7 +62,7 @@
|
||||
</if>
|
||||
<if test="signIdList != null">
|
||||
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 ">
|
||||
FIND_IN_SET(#{signId}, sch.physical_signs_id)
|
||||
</foreach>
|
||||
|
@ -47,6 +47,14 @@
|
||||
<if test="payLevel != null">
|
||||
and snv.pay_level = #{payLevel}
|
||||
</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 != ''">
|
||||
and (snv.title like concat('%',#{key},'%') or snv.description like concat('%',#{key},'%'))
|
||||
</if>
|
||||
|
@ -516,4 +516,15 @@
|
||||
select * from sys_order where del_flag = 0 and cus_id = #{cusId} order by order_time asc
|
||||
</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>
|
Reference in New Issue
Block a user