赞
踩
<insert id="addLicense"> insert into ocr_auth_info <trim prefix="(" suffix=")" suffixOverrides=","> <if test="licensekey != null "> `license_key`, </if> <if test="deviceId != null "> `device_id`, </if> <if test="licenseName != null "> `license_name`, </if> <if test="authType != null "> `auth_type`, </if> <if test="lastAuthStatus != null "> `last_auth_status`, </if> <if test="lastAuthTime != null "> `last_auth_time`, </if> <if test="expiredTime != null "> `expired_time`, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="licensekey != null "> #{licensekey}, </if> <if test="deviceId != null"> #{deviceId}, </if> <if test="licenseName != null "> #{licenseName}, </if> <if test="authType != null "> #{authType}, </if> <if test="lastAuthStatus != null "> #{lastAuthStatus}, </if> <if test="lastAuthTime != null "> #{lastAuthTime}, </if> <if test="expiredTime != null "> #{expiredTime}, </if> </trim> </insert>
<update id="updateLicense"> update ocr_auth_info <set> <if test="licensekey != null"> license_key=#{licensekey}, </if> <if test="licenseName != null"> license_name=#{licenseName}, </if> <if test="authType != null"> auth_type=#{authType}, </if> <if test="lastAuthStatus != null"> last_auth_status=#{lastAuthStatus}, </if> <if test="lastAuthTime != null"> last_auth_time=#{lastAuthTime}, </if> <if test="expiredTime != null"> expired_time=#{expiredTime} </if> </set> where device_id = #{deviceId} </update>
<select id="querylist" resultType="com.jhlinux.clothes.entity.ClothesList"> SELECT c.id,c.number,c.type,c.status,c.times_cleaned,c.create_time,f.deadline,f.number total FROM `clothes` c LEFT JOIN config f on c.type = f.type where 1=1 <if test="status != null"> and c.status = #{status} </if> <if test="type != null and type != ''"> and c.type = #{type} </if> <if test="number != null and number != ''"> and c.number = #{number} </if> </select>
赞
踩
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。