ZengTao
2024-06-17 70f2265af5c8ec078ef2a7be65dd7229ab5f2924
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package com.example.springboot.mapper;
 
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.springboot.entity.GlassInfo;
 
 
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;
 
import java.util.List;
 
@Mapper
@Repository
public interface GlassInfoMapper extends BaseMapper<GlassInfo> {
 
    @Select("select gi.* from flowcard as fd LEFT JOIN glassinfo as gi on fd.flowcard=gi.flowcard where fd.orderstate=1 and gi.flowcard is not null and  gi.width<=#{maxwidth} and gi.width>=#{minwidth} and gi.height<=#{maxheight} and gi.height>=#{minheight} and gi.measurenumber<number")
    List<GlassInfo> selectGlassInfos(@Param("maxwidth") double maxwidth, @Param("minwidth") double minwidth, @Param("maxheight") double maxheight, @Param("minheight") double minheight);
 
    // @Select("SELECT COUNT(*) FROM role_permission WHERE role_id = #{roleId} AND permission_id = #{permissionId}")
    // boolean checkExists(@Param("roleId") int roleId, @Param("permissionId") int permissionId);
 
    @Select("SELECT g.* FROM flowcard as f left join glassinfo as g on f.flowcard=g.flowcard WHERE f.orderstate = #{orderstate}")
    List<GlassInfo> selectOrderState(@Param("orderstate") int orderstate);
 
    @Update("UPDATE glassinfo SET measurenumber = measurenumber+1 WHERE id = #{id}")
    void updatemeasurenumber(@Param("id") int roleId);
 
    // @Insert("INSERT INTO role_permission (role_id, permission_id, state) VALUES (#{roleId}, #{permissionId}, #{state})")
    // void insert(@Param("roleId") int roleId, @Param("permissionId") int permissionId, @Param("state") int state);
 
}