需求更改
parent
8a3bed8ed8
commit
ce4e804251
@ -0,0 +1,13 @@
|
|||||||
|
package com.supervision.mapper;
|
||||||
|
|
||||||
|
import com.supervision.vo.session.CreateAjResVO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface RobotDataMapper {
|
||||||
|
|
||||||
|
List<CreateAjResVO> queryAjByAjidOrAjmc(@Param("ajid") Integer ajid, @Param("ajmc") String ajmc);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
package com.supervision.vo.session;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class CreateAjResVO {
|
||||||
|
|
||||||
|
private Integer ajid;
|
||||||
|
|
||||||
|
private String ajmc;
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.supervision.mapper.RobotDataMapper">
|
||||||
|
|
||||||
|
<select id="queryAjByAjidOrAjmc" resultType="com.supervision.vo.session.CreateAjResVO">
|
||||||
|
select ajid, ajmc
|
||||||
|
from yxyc_robot_data.yxyc_case
|
||||||
|
where 1 = 1
|
||||||
|
<if test="ajid != null ">
|
||||||
|
and ajid = #{ajid} or ajmc like concat('%', #{ajmc}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="ajid == null ">
|
||||||
|
and ajmc like concat('%', #{ajmc}, '%')
|
||||||
|
</if>
|
||||||
|
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue