微信小程序点歌接口

This commit is contained in:
2024-07-09 17:16:11 +08:00
parent 71bc50e8bd
commit ec0dbc3337
22 changed files with 1294 additions and 7 deletions

View File

@@ -1,7 +1,10 @@
package com.chaozhanggui.system.cashierservice.dao;
import com.chaozhanggui.system.cashierservice.entity.TbMerchantAccount;
import com.chaozhanggui.system.cashierservice.entity.TbMerchantThirdApply;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;
@Component
@@ -20,4 +23,8 @@ public interface TbMerchantThirdApplyMapper {
int updateByPrimaryKeyWithBLOBs(TbMerchantThirdApply record);
int updateByPrimaryKey(TbMerchantThirdApply record);
}
@Select("select a.* from tb_merchant_third_apply as a left join tb_merchant_account as b on a.id=b.id where b.shop_id=#{shopId}")
TbMerchantThirdApply selectByShopId(@Param("shopId") Integer shopId);
}

View File

@@ -0,0 +1,39 @@
package com.chaozhanggui.system.cashierservice.dao;
import com.chaozhanggui.system.cashierservice.entity.TbShopSong;
import com.chaozhanggui.system.cashierservice.entity.TbShopSongOrder;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import java.util.List;
/**
* @author Administrator
* @description 针对表【tb_shop_song】的数据库操作Mapper
* @createDate 2024-07-09 11:52:30
* @Entity com.chaozhanggui.system.cashierservice.entity.TbShopSong
*/
public interface TbShopSongMapper {
int deleteByPrimaryKey(Long id);
int insert(TbShopSong record);
int insertSelective(TbShopSong record);
TbShopSong selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(TbShopSong record);
int updateByPrimaryKey(TbShopSong record);
List<TbShopSong> selectAllAndSearch(Integer shopId, String keyWord);
@Select("select * from fycashier.tb_shop_song where id=#{songId} and status=1")
TbShopSong selectById(@Param("songId") Integer songId);
@Update("update fycashier.tb_shop_song set sales_number=sales_number+#{num} where id=#{id}")
int incrNum(@Param("num") Integer num,@Param("id") Integer id);
}

View File

@@ -0,0 +1,50 @@
package com.chaozhanggui.system.cashierservice.dao;
import com.chaozhanggui.system.cashierservice.entity.TbShopSongOrder;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
import java.util.Map;
/**
* @author Administrator
* @description 针对表【tb_shop_song_order】的数据库操作Mapper
* @createDate 2024-07-09 15:23:30
* @Entity com.chaozhanggui.system.cashierservice.entity.TbShopSongOrder
*/
public interface TbShopSongOrderMapper {
int deleteByPrimaryKey(Long id);
int insert(TbShopSongOrder record);
int insertSelective(TbShopSongOrder record);
TbShopSongOrder selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(TbShopSongOrder record);
int updateByPrimaryKey(TbShopSongOrder record);
@Select("<script>SELECT\n" +
" b.img, b.name, b.origin_singer originSinger, b.price, a.from_name fromName, a.to_name toName, a.note\n" +
" FROM\n" +
" tb_shop_song_order AS a\n" +
" LEFT JOIN tb_shop_song AS b ON a.song_id = b.id\n" +
" WHERE\n" +
" a.user_id = #{userId}\n" +
" <if test=\"state!=null\">AND a.state = #{state}</if></script>")
List<Map<String, Object>> selectByUserId(@Param("userId") Integer userId, @Param("state") Integer state);
Map<String, Object> selectByUserIdAndId(@Param("userId") Integer userId, @Param("id") Integer id);
@Select("select * from fycashier.tb_shop_song_order where order_no=#{orderNo};")
TbShopSongOrder selectByOrderNo(@Param("orderNo") String orderNo);
@Delete("DELETE FROM tb_shop_song_order\n" +
"WHERE create_time < NOW() - INTERVAL 10 MINUTE AND state=-1;\n")
int deleteExpireOrder();
}