ShareLogMapper.xml
541 Bytes
<?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.example.mapper.ShareLogMapper">
<insert id="create">
insert into `t_kmr_share_log` (
`openid`,
`share_time`
)
values(
#{openid},
#{share_time}
);
</insert>
<select id="countByDay" resultType="long">
select count(*) c
from `t_kmr_share_log`
where share_time BETWEEN #{startDate} and #{endDate}
and openid= #{openid};
</select>
</mapper>