ConfigDao.xml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.liang.dao.ConfigDao">
  4. <resultMap id="SysConfig" type="com.liang.entity.Config">
  5. <id column="id" jdbcType="INTEGER" property="id"/>
  6. <result column="system_name" jdbcType="VARCHAR" property="systemName"/>
  7. <result column="system_full_name" jdbcType="VARCHAR" property="systemFullName"/>
  8. <result column="system_logo" jdbcType="VARCHAR" property="systemLogo"/>
  9. <result column="website_title" jdbcType="VARCHAR" property="websiteTitle"/>
  10. <result column="website_icon" jdbcType="VARCHAR" property="websiteIcon"/>
  11. <result column="website_keywords" jdbcType="VARCHAR" property="websiteKeywords"/>
  12. <result column="website_description" jdbcType="VARCHAR" property="websiteDescription"/>
  13. <result column="record_no" jdbcType="VARCHAR" property="recordNo"/>
  14. <result column="copyright" jdbcType="VARCHAR" property="copyright"/>
  15. <result column="login_back_img" jdbcType="VARCHAR" property="loginBackImg"/>
  16. <result column="homepage_href" jdbcType="VARCHAR" property="homepageHref"/>
  17. <result column="create_user" jdbcType="VARCHAR" property="createUser"/>
  18. <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
  19. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
  20. <result column="update_user" jdbcType="VARCHAR" property="updateUser"/>
  21. </resultMap>
  22. <!--查询配置-->
  23. <select id="getSysConfig" resultMap="SysConfig">
  24. select * from sys_configure
  25. </select>
  26. <!--更新配置-->
  27. <update id="updateSysConfig" parameterType="com.liang.entity.Config">
  28. update sys_configure
  29. set system_name = #{systemName},
  30. system_full_name = #{systemFullName},
  31. system_logo = #{systemLogo},
  32. website_title = #{websiteTitle},
  33. website_icon = #{websiteIcon},
  34. website_keywords = #{websiteKeywords},
  35. website_description = #{websiteDescription},
  36. record_no = #{recordNo},
  37. copyright = #{copyright},
  38. login_back_img = #{loginBackImg},
  39. homepage_href = #{homepageHref},
  40. update_user = #{updateUser}
  41. where id = #{id}
  42. </update>
  43. </mapper>