nnnjjj123
2021-01-28 71b6b716361c52af290493d365a328fc1a3467e2
src/main/java/org/springblade/modules/equipment/mapper/EquipmentMapper.xml
@@ -94,7 +94,8 @@
    <select id="lazyList" resultMap="deptVOResultMap">
        SELECT dept.id,dept.deviceName,dept.deviceNumber,dept.deviceType,dept.ownership,
        dept.ownerId,dept.devicestate,dept.stime,
        ST_ASTEXT(dept.coordinate) as coordinate,dept.dtype,dept.serialNumber,dept.stype,dept.channelNumber,dept.pay,dept.expireTime,dept.heartbeat,
        ST_ASTEXT(dept.coordinate) as
        coordinate,dept.dtype,dept.serialNumber,dept.stype,dept.channelNumber,dept.pay,dept.expireTime,dept.heartbeat,
        dept.parent_id,FORMAT(dept.jd,6) as jd,FORMAT(dept.wd,6) as wd,dept.street as
        streeName,u.yname,d.addvnm,dept.addvcd,
        (
@@ -135,6 +136,42 @@
    coordinate=POINT(#{jd},#{wd}),parent_id=#{parentId},jd=#{jd},wd=#{wd},addvcd=#{addvnm},street=#{streeName},dtype=#{dtype} where id=#{id}
    </update>
    <update id="updateClinent" parameterType="org.springblade.modules.equipment.entity.Equipment">
    update sys_equipment SET deviceName=#{deviceName},deviceNumber=#{deviceNumber},deviceType=#{deviceType},
    ownership=#{ownership},devicestate=#{devicestate},
    addvcd=#{addvcd},street=#{street},dtype=#{dtype},pay=#{pay}
    <choose>
        <when test="expireTime!=null and expireTime!=''">
            ,expireTime=#{expireTime}
        </when>
        <otherwise>
            ,expireTime= null
        </otherwise>
    </choose>
    <choose>
        <when test="heartbeat!=null and heartbeat!=''">
            ,heartbeat=#{heartbeat}
        </when>
        <otherwise>
            ,heartbeat= null
        </otherwise>
    </choose>
    <choose>
        <when test="stime!=null and stime!=''">
            ,stime=#{stime}
        </when>
        <otherwise>
            ,stime= null
        </otherwise>
    </choose>
    where id=#{id}
    </update>
    <update id="updataType">
        update sys_equipment SET devicestate = 1 where id in (${arr})
    </update>