package com.example.springboot.mapper;
|
|
import com.example.springboot.entity.StorageRack;
|
|
import org.apache.ibatis.annotations.*;
|
|
import java.util.List;
|
|
@Mapper
|
public interface StorageRackMapper{
|
@Select("SELECT cageno,round(round(1-sum(state)/42,2)*100) as cell,42-sum(state) as falg FROM storage_rack group by cageno")
|
List<StorageRack> selectAll();
|
|
@Select("SELECT state from storage_rack where cageno<=5 and cell=1")
|
List<StorageRack> selectRack1();
|
|
@Select("SELECT state from storage_rack where cageno>5 and cell=1")
|
List<StorageRack> selectRack2();
|
|
@Select("SELECT state from storage_rack where cageno<=5 and cell=2")
|
List<StorageRack> selectRack3();
|
|
@Select("SELECT state from storage_rack where cageno>5 and cell=2")
|
List<StorageRack> selectRack4();
|
|
void insert(StorageRack storageRack);
|
|
void update(StorageRack storageRack);
|
}
|
|