Compare commits
No commits in common. "master" and "boom-light" have entirely different histories.
master
...
boom-light
|
@ -9,7 +9,7 @@ public class TmTradeInfo {
|
||||||
/**
|
/**
|
||||||
* 太米系统流水Id
|
* 太米系统流水Id
|
||||||
*/
|
*/
|
||||||
private String id;
|
private Integer id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 第三方内部流水号
|
* 第三方内部流水号
|
||||||
|
|
|
@ -91,7 +91,7 @@ public class DataScopeUtil {
|
||||||
}
|
}
|
||||||
// 全部数据范围
|
// 全部数据范围
|
||||||
if (DataScopeConstants.DATA_SCOPE_ALL.equals(dataScope)) {
|
if (DataScopeConstants.DATA_SCOPE_ALL.equals(dataScope)) {
|
||||||
sqlString = new StringBuilder(" OR 1=1 ");
|
sqlString = new StringBuilder();
|
||||||
conditions.add(dataScope);
|
conditions.add(dataScope);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,4 @@ public class BoothQuery extends BoothVO {
|
||||||
@ApiModelProperty("当前时间")
|
@ApiModelProperty("当前时间")
|
||||||
private LocalDateTime time;
|
private LocalDateTime time;
|
||||||
|
|
||||||
@ApiModelProperty("父分区ID")
|
|
||||||
private Long partParentId;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.userId != null "> and bb.user_id = #{query.userId}</if>
|
||||||
<if test="query.deleted != null "> and bb.deleted = #{query.deleted}</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.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.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.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.partName != null and query.partName != ''"> and bp.part_name like concat('%', #{query.partName}, '%') </if>
|
||||||
<if test="query.time != null"> and bb.expired_time >= #{query.time} </if>
|
<if test="query.time != null"> and bb.expired_time >= #{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>
|
<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)
|
${@com.ruoyi.framework.util.DataScopeUtil@create(query.scope)
|
||||||
.userSetAlias("bs.user_id")
|
.userSetAlias("bs.user_id")
|
||||||
|
|
|
@ -97,6 +97,4 @@ public interface BoothService
|
||||||
int unbindUser(BoothVO booth);
|
int unbindUser(BoothVO booth);
|
||||||
|
|
||||||
int userChangeBind(Long usingBoothId ,Long changeBoothId,Long userId);
|
int userChangeBind(Long usingBoothId ,Long changeBoothId,Long userId);
|
||||||
|
|
||||||
List<Long> selectChildrenIds(BoothQuery query);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package com.ruoyi.bst.booth.service.impl;
|
package com.ruoyi.bst.booth.service.impl;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.concurrent.TimeUnit;
|
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
|
@Override
|
||||||
public DeviceIotVO lighting(BoothVO booth, Long userId, boolean requiredIot) {
|
public DeviceIotVO lighting(BoothVO booth, Long userId, boolean requiredIot) {
|
||||||
|
|
||||||
// 操作校验
|
// 操作校验
|
||||||
ServiceUtil.assertion(booth.getStoreId() == null, "当前卡座未绑定店铺");
|
ServiceUtil.assertion(booth.getStoreId() == null, "当前卡座未绑定店铺");
|
||||||
|
ServiceUtil.assertion(booth.getExpiredTime().isBefore(LocalDateTime.now()), "请重新绑定卡座");
|
||||||
|
|
||||||
// 判断当前用户是否在该店铺下有余额
|
// 判断当前用户是否在该店铺下有余额
|
||||||
LightingNumVO vo = lightingNumMapper.selectLightingNumByUserId(userId, booth.getStoreId());
|
LightingNumVO vo = lightingNumMapper.selectLightingNumByUserId(userId, booth.getStoreId());
|
||||||
|
@ -345,7 +340,7 @@ public class BoothServiceImpl implements BoothService {
|
||||||
ServiceUtil.assertion(res == null, "设备爆灯失败:未知错误");
|
ServiceUtil.assertion(res == null, "设备爆灯失败:未知错误");
|
||||||
return IotUtil.isSuccess(res);
|
return IotUtil.isSuccess(res);
|
||||||
} else {
|
} else {
|
||||||
ServiceUtil.assertion(true, "当前设备正在爆灯,请等待爆灯结束后再进行操作");
|
ServiceUtil.assertion(true, "爆灯频繁,请稍等后再进行爆灯");
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,7 @@ public class SuitConverterImpl implements SuitConverter {
|
||||||
}
|
}
|
||||||
Suit po = new Suit();
|
Suit po = new Suit();
|
||||||
// 设置基本信息
|
// 设置基本信息
|
||||||
|
po.setUserId(data.getUserId());
|
||||||
po.setStoreId(data.getStoreId());
|
po.setStoreId(data.getStoreId());
|
||||||
po.setOrderNum(data.getOrderNum());
|
po.setOrderNum(data.getOrderNum());
|
||||||
po.setLightingNums(data.getLightingNums());
|
po.setLightingNums(data.getLightingNums());
|
||||||
|
|
|
@ -6,7 +6,6 @@ import com.github.pagehelper.PageHelper;
|
||||||
import com.ruoyi.bst.store.domain.StoreQuery;
|
import com.ruoyi.bst.store.domain.StoreQuery;
|
||||||
import com.ruoyi.bst.store.domain.StoreVO;
|
import com.ruoyi.bst.store.domain.StoreVO;
|
||||||
import com.ruoyi.bst.store.service.StoreService;
|
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.bst.storeStaff.domain.enums.StoreStaffPermission;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
import com.ruoyi.common.utils.ServiceUtil;
|
import com.ruoyi.common.utils.ServiceUtil;
|
||||||
|
@ -66,8 +65,6 @@ public class SuitServiceImpl implements SuitService
|
||||||
@Override
|
@Override
|
||||||
public int insertSuit(Suit suit)
|
public int insertSuit(Suit suit)
|
||||||
{
|
{
|
||||||
storeService.selectStoreById(suit.getStoreId());
|
|
||||||
suit.setUserId(suit.getUserId());
|
|
||||||
suit.setCreateTime(DateUtils.getNowDate());
|
suit.setCreateTime(DateUtils.getNowDate());
|
||||||
return suitMapper.insertSuit(suit);
|
return suitMapper.insertSuit(suit);
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,6 +41,12 @@ public class AppBoothController extends BaseController {
|
||||||
if (booth == null) {
|
if (booth == null) {
|
||||||
return error("当前卡座信息不存在");
|
return error("当前卡座信息不存在");
|
||||||
}
|
}
|
||||||
|
if (booth.getUserId()==null) {
|
||||||
|
return error("您无权操作当前卡座设备");
|
||||||
|
}
|
||||||
|
if (!booth.getUserId().equals(getUserId())){
|
||||||
|
return error("您无权操作当前卡座设备");
|
||||||
|
}
|
||||||
return success(boothService.lighting(booth,getUserId(),requiredIot));
|
return success(boothService.lighting(booth,getUserId(),requiredIot));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ public class BoothController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('bst:booth:list')")
|
@PreAuthorize("@ss.hasPermi('bst:booth:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(BoothQuery query,boolean needChildren) {
|
public TableDataInfo list(BoothQuery query) {
|
||||||
startPage();
|
startPage();
|
||||||
startOrderBy();
|
startOrderBy();
|
||||||
query.setScope(true);
|
query.setScope(true);
|
||||||
|
|
|
@ -98,6 +98,7 @@ public class SuitController extends BaseController
|
||||||
if (!userValidator.canView(suit.getUserId())) {
|
if (!userValidator.canView(suit.getUserId())) {
|
||||||
suit.setUserId(getUserId());
|
suit.setUserId(getUserId());
|
||||||
}
|
}
|
||||||
|
suit.setUserId(getUserId());
|
||||||
suitConverter.toPoByCreate(suit);
|
suitConverter.toPoByCreate(suit);
|
||||||
return toAjax(suitService.insertSuit(suit));
|
return toAjax(suitService.insertSuit(suit));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user