Commit 2ec5c75d by 吕明尚

根据测试用例进行修改

parent 1aaf5343
......@@ -2,11 +2,11 @@ package share.common.enums;
public enum VoiceEnum {
//开门欢迎,续费提醒1,续费提醒2,续费成功提醒,送客
OPEN("1", "开门欢迎", ",您的好运时刻已开启,弘扬国粹文化,牌不落地,永不放弃,祝您玩的开心,找客服关注凑角微信小程序"),
OPEN("1", "开门欢迎", "欢迎来到凑角共享棋牌,您的好运时刻已开启,弘扬国粹文化,牌不落地,永不放弃,祝您玩的开心,找客服请扫码关注凑角微信小程序"),
RENEWAL_REMINDER1("2", "续费提醒1", "您的房间使用时间还剩15分钟,继续使用,请在小程序进行续单,或联系客服。"),
RENEWAL_REMINDER2("3", "续费提醒2", "您的房间使用时间还剩5分钟,系统届时会自动断电,提前拿好随身物品;继续使用,请在小程序进行续单,或联系客服"),
RENEWAL_SUCCESS("4", "续费成功提醒", "您的房间已成功续订,祝您玩的开心,找客服关注凑角微信小程序"),
SEND_CUSTOMER("5", "送客", ",您的满意是我们最大的动力,联系客服,送您小惊喜,期待下一次的相遇");
SEND_CUSTOMER("5", "送客", "感谢来凑角共享棋牌,您的满意是我们最大的动力,联系客服,送您小惊喜,期待下一次的相遇");
private String code;
private String name;
private String value;
......
......@@ -142,7 +142,7 @@ public class OrderTask {
execute = transactionTemplate.execute(e -> {
orderService.updateById(sOrder);
// 退优惠券
if (sOrder.getCouponId() > 0L ) {
if (ObjectUtil.isNotNull(sOrder.getCouponId())) {
SConsumerCoupon couponUser = consumerCouponService.getById(sOrder.getCouponId());
couponUser.setUseStatus(CouponStatusEnum.NORMAL.getValue());
consumerCouponService.updateById(couponUser);
......
package share.system.service.impl;
import java.util.*;
import java.util.Arrays;
import java.util.stream.Collectors;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.commons.collections4.CollectionUtils;
import share.common.enums.YesNoEnum;
import share.common.exception.base.BaseException;
import share.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -99,6 +101,14 @@ public class PackServiceImpl extends ServiceImpl<PackMapper, SPack> implements I
*/
@Override
public int deletePackByIds(Long[] ids) {
//查询订单下是否有套餐
List<Long> packIds = Arrays.asList(ids);
LambdaQueryWrapper<SOrder> queryWrapper = new LambdaQueryWrapper();
queryWrapper.in(SOrder::getPackId, packIds);
List<SOrder> sOrders = orderService.list(queryWrapper);
if (CollectionUtils.isNotEmpty(sOrders)) {
throw new BaseException("当前套餐下存在订单,不能删除!");
}
return baseMapper.deletePackByIds(ids);
}
......
......@@ -19,9 +19,7 @@ import org.locationtech.spatial4j.context.SpatialContext;
import org.locationtech.spatial4j.distance.DistanceUtils;
import org.locationtech.spatial4j.shape.Point;
import org.springframework.beans.BeanUtils;
import share.common.enums.CleaningStatusEnum;
import share.common.enums.RoleTypeEnum;
import share.common.enums.YesNoEnum;
import share.common.enums.*;
import share.common.exception.base.BaseException;
import share.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -117,6 +115,20 @@ public class SStoreServiceImpl extends ServiceImpl<SStoreMapper, SStore> impleme
@Override
public int updateSStore(SStore sStore) {
sStore.setUpdateTime(DateUtils.getNowDate());
if (sStore.getStatus().equals(YesNoEnum.no.getIndex().toString())) {
//判断门店下是否有已支付.待使用,使用中订单
LambdaQueryWrapper<SOrder> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(SOrder::getStoreId, sStore.getId());
queryWrapper.in(SOrder::getStatus, OrderStatusEnum.UNUSED.getCode(), OrderStatusEnum.INUSE.getCode());
queryWrapper.eq(SOrder::getPayStatus, PayStatusEnum.PAID.getCode());
queryWrapper.eq(SOrder::getRefundStatus, RefundStatusEnum.UNREFUND.getCode());
List<SOrder> sOrders = orderService.list(queryWrapper);
if (CollectionUtils.isNotEmpty(sOrders)) {
throw new BaseException("当前门店下存在未完成订单,不能维护!");
}
}
return baseMapper.updateSStore(sStore);
}
......
......@@ -100,8 +100,12 @@
<if test="payPrice != null and payPrice != ''">and pay_price = #{payPrice}</if>
<if test="payTime != null and payTime != ''">and pay_time = #{payTime}</if>
<if test="timeLong != null and timeLong != ''">and time_long = #{timeLong}</if>
<if test="preStartDate != null and preStartDate != ''">and pre_start_date = #{preStartDate}</if>
<if test="preEndDate != null and preEndDate != ''">and pre_end_date = #{preEndDate}</if>
<if test="preStartDate != null">
and DATE_FORMAT(pre_start_date, '%Y-%m-%d') &gt;= DATE_FORMAT(#{preStartDate}, '%Y-%m-%d')
</if>
<if test="preEndDate != null">
and DATE_FORMAT(pre_end_date, '%Y-%m-%d') &lt;= DATE_FORMAT(#{preEndDate}, '%Y-%m-%d')
</if>
<if test="startDate != null">
and DATE_FORMAT(create_time, '%Y-%m-%d') &gt;= DATE_FORMAT(#{startDate}, '%Y-%m-%d')
</if>
......
......@@ -56,11 +56,11 @@
<where>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="images != null and images != ''"> and images = #{images}</if>
<if test="address != null and address != ''"> and address = #{address}</if>
<if test="address != null and address != ''">and address like concat('%', #{address}, '%')</if>
<if test="longitude != null and longitude != ''"> and longitude = #{longitude}</if>
<if test="latitude != null and latitude != ''"> and latitude = #{latitude}</if>
<if test="manager != null and manager != ''"> and manager = #{manager}</if>
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
<if test="manager != null and manager != ''">and manager like concat('%', #{manager}, '%')</if>
<if test="phone != null and phone != ''">and phone like concat('%', #{phone}, '%')</if>
<if test="info != null and info != ''"> and info = #{info}</if>
<if test="openShopUuid != null and openShopUuid != ''">and open_shop_uuid = #{openShopUuid}</if>
<if test="deviceGroup != null and deviceGroup != ''">and device_group = #{deviceGroup}</if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment