You've already forked FrameTour-BE
IProfitSharing
This commit is contained in:
@ -0,0 +1,32 @@
|
||||
package com.ycwl.basic.profitsharing.mapper;
|
||||
|
||||
import com.ycwl.basic.profitsharing.entity.ProfitSharingConfig;
|
||||
import org.apache.ibatis.annotations.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface ProfitSharingConfigMapper {
|
||||
@Insert("INSERT INTO profit_sharing_config (scenic_id, name, description, create_time, update_time) " +
|
||||
"VALUES (#{scenicId}, #{name}, #{description}, #{createTime}, #{updateTime})")
|
||||
@Options(useGeneratedKeys = true, keyProperty = "id")
|
||||
void insert(ProfitSharingConfig config);
|
||||
|
||||
@Update("UPDATE profit_sharing_config SET scenic_id = #{scenicId}, name = #{name}, description = #{description}, " +
|
||||
"create_time = #{createTime}, update_time = #{updateTime} WHERE id = #{id}")
|
||||
void update(ProfitSharingConfig config);
|
||||
|
||||
@Delete("DELETE FROM profit_sharing_config WHERE id = #{id}")
|
||||
void deleteById(Long id);
|
||||
|
||||
@Select("SELECT * FROM profit_sharing_config WHERE id = #{id}")
|
||||
ProfitSharingConfig findById(Long id);
|
||||
|
||||
@Select("SELECT * FROM profit_sharing_config")
|
||||
List<ProfitSharingConfig> findAll();
|
||||
|
||||
// 修改: 根据scenicId查询单个记录
|
||||
@Select("SELECT * FROM profit_sharing_config WHERE scenic_id = #{scenicId}")
|
||||
ProfitSharingConfig findByScenicId(Long scenicId);
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.ycwl.basic.profitsharing.mapper;
|
||||
|
||||
import com.ycwl.basic.profitsharing.entity.ProfitSharingRecord;
|
||||
import org.apache.ibatis.annotations.Delete;
|
||||
import org.apache.ibatis.annotations.Insert;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Options;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface ProfitSharingRecordMapper {
|
||||
void batchInsert(List<ProfitSharingRecord> records);
|
||||
|
||||
@Delete("DELETE FROM profit_sharing_record WHERE scenic_id = #{scenicId} AND order_id = #{orderId}")
|
||||
void deleteByScenicIdAndOrderId(Long scenicId, Long orderId);
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.ycwl.basic.profitsharing.mapper;
|
||||
|
||||
import com.ycwl.basic.profitsharing.entity.ProfitSharingUser;
|
||||
import org.apache.ibatis.annotations.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface ProfitSharingUserMapper {
|
||||
@Insert("INSERT INTO profit_sharing_user (config_id, wx_pay_type, wx_pay_config, name, description, wx_rate, real_rate) " +
|
||||
"VALUES (#{configId}, #{wxPayType}, #{wxPayConfig}, #{name}, #{description}, #{wxRate}, #{realRate})")
|
||||
@Options(useGeneratedKeys = true, keyProperty = "id")
|
||||
void insert(ProfitSharingUser user);
|
||||
|
||||
@Update("UPDATE profit_sharing_user SET config_id = #{configId}, wx_pay_type = #{wxPayType}, wx_pay_config = #{wxPayConfig}, " +
|
||||
"name = #{name}, description = #{description}, wx_rate = #{wxRate}, real_rate = #{realRate} WHERE id = #{id}")
|
||||
void update(ProfitSharingUser user);
|
||||
|
||||
@Delete("DELETE FROM profit_sharing_user WHERE id = #{id}")
|
||||
void deleteById(Long id);
|
||||
|
||||
@Delete("DELETE FROM profit_sharing_user WHERE config_id = #{configId}")
|
||||
void deleteByConfigId(Long configId);
|
||||
|
||||
@Select("SELECT * FROM profit_sharing_user WHERE id = #{id}")
|
||||
ProfitSharingUser findById(Long id);
|
||||
|
||||
@Select("SELECT * FROM profit_sharing_user")
|
||||
List<ProfitSharingUser> findAll();
|
||||
|
||||
// 新增: 根据configId查询所有记录
|
||||
@Select("SELECT * FROM profit_sharing_user WHERE config_id = #{configId}")
|
||||
List<ProfitSharingUser> findByConfigId(Long configId);
|
||||
}
|
Reference in New Issue
Block a user