WebsiteMapper.java
826 Bytes
package com.uccc.number.mapper;
import com.uccc.number.domain.WebsiteConfig;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
/**
* Created by bert on 2021-10-07 00:57
*/
public interface WebsiteMapper {
static final String TABLE_NAME = "website_config";
@Update({
"<script>",
"UPDATE " + TABLE_NAME + " SET name = #{websiteConfig.name}",
"<when test='websiteConfig.value!=null'>",
",value = #{websiteConfig.value}" ,
"</when>",
"<when test='websiteConfig.title!=null'>",
",title = #{websiteConfig.title}" ,
"</when>",
"where id = #{websiteConfig.id}",
"</script>",
})
int updateWebsite(@Param("websiteConfig") WebsiteConfig websiteConfig);
}