Compare commits

..

No commits in common. "master" and "boom-light" have entirely different histories.

11 changed files with 13 additions and 20 deletions

View File

@ -9,7 +9,7 @@ public class TmTradeInfo {
/**
* 太米系统流水Id
*/
private String id;
private Integer id;
/**
* 第三方内部流水号

View File

@ -91,7 +91,7 @@ public class DataScopeUtil {
}
// 全部数据范围
if (DataScopeConstants.DATA_SCOPE_ALL.equals(dataScope)) {
sqlString = new StringBuilder(" OR 1=1 ");
sqlString = new StringBuilder();
conditions.add(dataScope);
break;
}

View File

@ -15,7 +15,4 @@ public class BoothQuery extends BoothVO {
@ApiModelProperty("当前时间")
private LocalDateTime time;
@ApiModelProperty("父分区ID")
private Long partParentId;
}

View File

@ -47,12 +47,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="query.userId != null "> and bb.user_id = #{query.userId}</if>
<if test="query.deleted != null "> and bb.deleted = #{query.deleted}</if>
<if test="query.boothId != null "> and bb.booth_id = #{query.boothId}</if>
<if test="query.storeId != null "> and bs.store_id = #{query.storeId}</if>
<if test="query.boothName != null and query.boothName != ''"> and bb.booth_name like concat('%', #{query.boothName}, '%')</if>
<if test="query.picture != null and query.picture != ''"> and bb.picture = #{query.picture}</if>
<if test="query.partName != null and query.partName != ''"> and bp.part_name like concat('%', #{query.partName}, '%') </if>
<if test="query.time != null"> and bb.expired_time &gt;= #{query.time} </if>
<if test="query.partParentId != null"> or bp_parent.part_id = #{query.partParentId} </if>
<if test="query.storeName != null and query.storeName != ''"> and bs.store_name like concat('%', #{query.storeName}, '%') </if>
${@com.ruoyi.framework.util.DataScopeUtil@create(query.scope)
.userSetAlias("bs.user_id")

View File

@ -97,6 +97,4 @@ public interface BoothService
int unbindUser(BoothVO booth);
int userChangeBind(Long usingBoothId ,Long changeBoothId,Long userId);
List<Long> selectChildrenIds(BoothQuery query);
}

View File

@ -1,7 +1,6 @@
package com.ruoyi.bst.booth.service.impl;
import java.time.LocalDateTime;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.TimeUnit;
@ -262,17 +261,13 @@ public class BoothServiceImpl implements BoothService {
}
}
@Override
public List<Long> selectChildrenIds(BoothQuery query) {
return Collections.emptyList();
}
@Override
public DeviceIotVO lighting(BoothVO booth, Long userId, boolean requiredIot) {
// 操作校验
ServiceUtil.assertion(booth.getStoreId() == null, "当前卡座未绑定店铺");
ServiceUtil.assertion(booth.getExpiredTime().isBefore(LocalDateTime.now()), "请重新绑定卡座");
// 判断当前用户是否在该店铺下有余额
LightingNumVO vo = lightingNumMapper.selectLightingNumByUserId(userId, booth.getStoreId());
@ -345,7 +340,7 @@ public class BoothServiceImpl implements BoothService {
ServiceUtil.assertion(res == null, "设备爆灯失败:未知错误");
return IotUtil.isSuccess(res);
} else {
ServiceUtil.assertion(true, "当前设备正在爆灯,请等待爆灯结束后再进行操作");
ServiceUtil.assertion(true, "爆灯频繁,请稍等后再进行爆灯");
}
return false;
}

View File

@ -15,6 +15,7 @@ public class SuitConverterImpl implements SuitConverter {
}
Suit po = new Suit();
// 设置基本信息
po.setUserId(data.getUserId());
po.setStoreId(data.getStoreId());
po.setOrderNum(data.getOrderNum());
po.setLightingNums(data.getLightingNums());

View File

@ -6,7 +6,6 @@ import com.github.pagehelper.PageHelper;
import com.ruoyi.bst.store.domain.StoreQuery;
import com.ruoyi.bst.store.domain.StoreVO;
import com.ruoyi.bst.store.service.StoreService;
import com.ruoyi.bst.storeStaff.domain.StoreStaff;
import com.ruoyi.bst.storeStaff.domain.enums.StoreStaffPermission;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ServiceUtil;
@ -66,8 +65,6 @@ public class SuitServiceImpl implements SuitService
@Override
public int insertSuit(Suit suit)
{
storeService.selectStoreById(suit.getStoreId());
suit.setUserId(suit.getUserId());
suit.setCreateTime(DateUtils.getNowDate());
return suitMapper.insertSuit(suit);
}

View File

@ -41,6 +41,12 @@ public class AppBoothController extends BaseController {
if (booth == null) {
return error("当前卡座信息不存在");
}
if (booth.getUserId()==null) {
return error("您无权操作当前卡座设备");
}
if (!booth.getUserId().equals(getUserId())){
return error("您无权操作当前卡座设备");
}
return success(boothService.lighting(booth,getUserId(),requiredIot));
}

View File

@ -61,7 +61,7 @@ public class BoothController extends BaseController {
*/
@PreAuthorize("@ss.hasPermi('bst:booth:list')")
@GetMapping("/list")
public TableDataInfo list(BoothQuery query,boolean needChildren) {
public TableDataInfo list(BoothQuery query) {
startPage();
startOrderBy();
query.setScope(true);

View File

@ -98,6 +98,7 @@ public class SuitController extends BaseController
if (!userValidator.canView(suit.getUserId())) {
suit.setUserId(getUserId());
}
suit.setUserId(getUserId());
suitConverter.toPoByCreate(suit);
return toAjax(suitService.insertSuit(suit));
}