package com.example.demo.mapper;
import com.example.demo.domain.entity.Detail;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@Mapper
public interface DetailMapper {
@Insert({
"insert into detail",
"(jwcode,activity_id,recharge_way,product_id,consume_platform,consume_type,refund_type,refund_goods," +
"contact_id,remark,recharge_coin,free_coin,task_coin,admin_id,update_type,detail_flag,create_time,first_recharge)",
"values ",
"(#{jwcode},#{activityId},#{rechargeWay},#{productId},#{consumePlatform},#{consumeType},#{refundType}" +
",#{refundGoods},#{contactId},#{remark},#{rechargeCoin}" +
",#{freeCoin},#{taskCoin},#{adminId},#{updateType},1,now(),#{firstRecharge})"
})
@Options(useGeneratedKeys = true,keyColumn = "detail_id",keyProperty = "detailId")
int add(Detail detail);
@Select({
"SELECT * from detail where detail =#{detail}"
})
Detail selectById(Integer id);
@Select({
""
})
List select(Detail detail);
}