feat:first commit

This commit is contained in:
xiang
2025-07-17 22:41:44 +08:00
parent 767bce5ce8
commit 4fd2ea30e6
68 changed files with 218 additions and 1061 deletions

View File

@@ -0,0 +1,59 @@
<?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.xiang.xservice.xb.repository.XBFundMapper">
<resultMap id="BaseResultMap" type="com.xiang.xservice.xb.entity.pojo.xb.FundInfo" >
<result column="id" property="id"/>
<result column="code" property="code" />
<result column="name" property="name" />
<result column="change" property="change" />
<result column="update_time" property="updateTime" />
</resultMap>
<resultMap id="XbFundListMap" type="com.xiang.xservice.xb.entity.pojo.xb.XbFundList">
<result column="id" property="id"/>
<result column="code" property="code" />
<result column="name" property="name" />
<result column="status" property="status" />
<result column="type" property="type" />
</resultMap>
<sql id="Base_Column_List">
id, code,
name,
`change`,
update_time
</sql>
<insert id="batchSave">
insert into xb_fund_info(code, name, `change`, update_time) values
<foreach collection="list" item="item" separator=",">
(#{item.code}, #{item.name}, #{item.change}, #{item.updateTime})
</foreach>
</insert>
<insert id="addCounts">
insert into xb_fund_count(l_id, code, name, `change`, update_time) values
<foreach collection="list" item="item" separator=",">
(#{item.lId}, #{item.code}, #{item.name}, #{item.change}, #{item.updateTime})
</foreach>
</insert>
<select id="queryListIn2Min" resultMap="BaseResultMap">
select <include refid="Base_Column_List"/>
from xb_fund_info
where update_time >= NOW() - INTERVAL 3 MINUTE
order by update_time desc
</select>
<select id="queryFundList" resultMap="XbFundListMap" parameterType="Integer">
select * from xb_fund_list
where status = 1
<if test="type != null">
and type = #{type}
</if>
</select>
<select id="queryFundInWeek" resultType="com.xiang.xservice.xb.entity.pojo.xb.XbFundCount">
select * from xb_fund_count
where update_time between NOW() - INTERVAL 7 DAY and NOW()
</select>
</mapper>