Merge branch 'refs/heads/test'
This commit is contained in:
@ -65,4 +65,7 @@ public class BusinessRespVO {
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
private Long carteenId;
|
||||
|
||||
|
||||
}
|
@ -30,7 +30,7 @@ public class DevuceController {
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获取菜品剩余重量")
|
||||
public CommonResult<List<DevuceListVO>> get() {
|
||||
return success(devuceService.getList());
|
||||
public CommonResult<List<DevuceListVO>> get(Long storeId) {
|
||||
return success(devuceService.getList(storeId));
|
||||
}
|
||||
}
|
@ -14,4 +14,7 @@ public class DevuceReqVO {
|
||||
@Schema(description = "剩余重量")
|
||||
private BigDecimal remWeight;
|
||||
|
||||
@Schema(description = "菜品总重量")
|
||||
private BigDecimal totalWeight;
|
||||
|
||||
}
|
@ -29,7 +29,9 @@ public interface DevuceMapper extends BaseMapperX<DevuceDO> {
|
||||
.orderByDesc(DevuceDO::getId));
|
||||
}
|
||||
|
||||
@Select("select de.*,di.dishes_name from t_devuce de left join t_dishes di on de.dishes_id = di.id\n" +
|
||||
"where bind = true")
|
||||
List<DevuceListVO> getList();
|
||||
@Select(" select de.*,di.dishes_name from t_devuce de\n" +
|
||||
" left join t_device_info dn on de.device_sn = dn.device_ip\n" +
|
||||
" left join t_dishes di on de.dishes_id = di.id\n" +
|
||||
" where bind = true and de.deleted = false and dn.carteen_id = #{storeId}")
|
||||
List<DevuceListVO> getList(Long storeId);
|
||||
}
|
@ -90,7 +90,7 @@ public interface DevuceService {
|
||||
List<Map> getDishesNutrition(Long dishesId,String cId);
|
||||
|
||||
void updateWeight(DevuceReqVO updateReqVO);
|
||||
List<DevuceListVO> getList();
|
||||
List<DevuceListVO> getList(Long storeId);
|
||||
|
||||
|
||||
}
|
@ -237,14 +237,15 @@ public class DevuceServiceImpl implements DevuceService {
|
||||
public void updateWeight(DevuceReqVO updateReqVO) {
|
||||
String hearder = this.getHearder();
|
||||
devuceMapper.update(new DevuceDO(),new LambdaUpdateWrapper<DevuceDO>()
|
||||
.set(DevuceDO::getRemWeight,updateReqVO.getRemWeight())
|
||||
.set(updateReqVO.getRemWeight()!=null,DevuceDO::getRemWeight,updateReqVO.getRemWeight())
|
||||
.set(updateReqVO.getTotalWeight()!=null,DevuceDO::getTotalWeight,updateReqVO.getTotalWeight())
|
||||
.eq(DevuceDO::getDeviceSn,hearder)
|
||||
.eq(DevuceDO::getBind,true));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DevuceListVO> getList() {
|
||||
List<DevuceListVO> list = devuceMapper.getList();
|
||||
public List<DevuceListVO> getList(Long storeId) {
|
||||
List<DevuceListVO> list = devuceMapper.getList(storeId);
|
||||
return list;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user