package com.cyksj.mapper.fission;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cyksj.model.entity.UserMirrorFissionRecord;
import org.apache.ibatis.annotations.Update;

/**
 * 项目名: yhlxj2
 * 文件名: UserMirrorFissionRecordMapper
 * 创建者: JavaZou
 * 创建时间:2024/11/21 17:46
 */
public interface UserMirrorFissionRecordMapper extends BaseMapper<UserMirrorFissionRecord> {

	@Update("update user_mirror_fission_record set remain_num = remain_num - 1 where id = #{fissionId} and remain_num > 0")
	Integer updateFissionRemainNum(Long fissionId);

	@Update("update user_mirror_fission_record set remain_num = remain_num + 1 where id = #{fissionId}")
	void incrFissionRemainNum(Long fissionId);
}
