feat:first commit

This commit is contained in:
Zhujx
2025-06-06 16:01:37 +08:00
commit ec437bb088
55 changed files with 2513 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
<?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.repository.GladosMapper">
<resultMap id="BaseResultMap" type="com.xiang.entity.pojo.User" >
<result column="id" property="id"/>
<result column="user" property="user" />
<result column="email" property="email" />
<result column="cookie" property="cookie" />
<result column="status" property="status" />
</resultMap>
<sql id="Base_Column_List">
id, user,
email,
cookie,
status
</sql>
<insert id="insertScriptRunLog" keyProperty="id" useGeneratedKeys="true" parameterType="com.xiang.entity.pojo.GladosRunLog">
insert into scirpt_glados_run(time, status, response, user, user_id, code) values (#{time}, #{status}, #{response}, #{user}, #{userId}, #{code})
</insert>
<select id="listAllUser" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM script_glados_user
where status = 1
</select>
</mapper>

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.repository.XBFundMapper">
<resultMap id="BaseResultMap" type="com.xiang.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.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.entity.pojo.xb.XbFundCount">
select * from xb_fund_count
where update_time between NOW() - INTERVAL 7 DAY and NOW()
</select>
</mapper>