店铺分享 点歌
This commit is contained in:
@@ -18,8 +18,8 @@ public class CodeGen {
|
|||||||
private final static String DATABASE = "czg_cashier_test";
|
private final static String DATABASE = "czg_cashier_test";
|
||||||
private final static String OLD_DATABASE = "fycashier";
|
private final static String OLD_DATABASE = "fycashier";
|
||||||
|
|
||||||
private final static boolean IS_OLD_VERSION = false;
|
// private final static boolean IS_OLD_VERSION = false;
|
||||||
// private final static boolean IS_OLD_VERSION = true;
|
private final static boolean IS_OLD_VERSION = true;
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
//配置数据源
|
//配置数据源
|
||||||
@@ -81,7 +81,7 @@ public class CodeGen {
|
|||||||
//设置表前缀和只生成哪些表,setGenerateTable 未配置时,生成所有表
|
//设置表前缀和只生成哪些表,setGenerateTable 未配置时,生成所有表
|
||||||
globalConfig.getStrategyConfig()
|
globalConfig.getStrategyConfig()
|
||||||
.setTablePrefix("tb_")
|
.setTablePrefix("tb_")
|
||||||
.setGenerateTable("tb_credit_buyer", "tb_credit_buyer_order", "tb_credit_payment_record");
|
.setGenerateTable("tb_shop_share_record", "tb_shop_share", "tb_shop_song_order", "tb_shop_song");
|
||||||
|
|
||||||
EntityConfig entityConfig = globalConfig.getEntityConfig();
|
EntityConfig entityConfig = globalConfig.getEntityConfig();
|
||||||
if (IS_OLD_VERSION) {
|
if (IS_OLD_VERSION) {
|
||||||
|
|||||||
@@ -28,6 +28,22 @@ public class ShopInfoController {
|
|||||||
@Resource
|
@Resource
|
||||||
private CurCreditBuyerService curCreditBuyerService;
|
private CurCreditBuyerService curCreditBuyerService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private CurShopSongService curShopSongService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private CurShopShareService curShopShareService;
|
||||||
|
|
||||||
|
@RequestMapping("/share")
|
||||||
|
public CzgResult<String> share() {
|
||||||
|
return curShopShareService.mergeShopShare();
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/song")
|
||||||
|
public CzgResult<String> song() {
|
||||||
|
return curShopSongService.mergeSong();
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping("/credit")
|
@RequestMapping("/credit")
|
||||||
public CzgResult<String> mergeCreditBuyer() {
|
public CzgResult<String> mergeCreditBuyer() {
|
||||||
return curCreditBuyerService.mergeCredit();
|
return curCreditBuyerService.mergeCredit();
|
||||||
|
|||||||
95
src/main/java/com/czg/mergedata/cur/entity/CurShopShare.java
Normal file
95
src/main/java/com/czg/mergedata/cur/entity/CurShopShare.java
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
package com.czg.mergedata.cur.entity;
|
||||||
|
|
||||||
|
import com.mybatisflex.annotation.Id;
|
||||||
|
import com.mybatisflex.annotation.KeyType;
|
||||||
|
import com.mybatisflex.annotation.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺分享 实体类。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-15
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Table("tb_shop_share")
|
||||||
|
public class CurShopShare implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Id(keyType = KeyType.Auto)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺Id
|
||||||
|
*/
|
||||||
|
private Long shopId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标题
|
||||||
|
*/
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分享封面图
|
||||||
|
*/
|
||||||
|
private String shareImg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邀请顶部图
|
||||||
|
*/
|
||||||
|
private String invitedImg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 被邀顶部图
|
||||||
|
*/
|
||||||
|
private String beInvitedImg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动开始时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime startTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动结束时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新用户获得券
|
||||||
|
*/
|
||||||
|
private String newCoupon;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邀请人数
|
||||||
|
*/
|
||||||
|
private Integer invitedNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 奖励券
|
||||||
|
*/
|
||||||
|
private String rewardCoupon;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取方法 get-新用户领取获得 use-新用户使用获得
|
||||||
|
*/
|
||||||
|
private String getMethod;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0 关闭 1 开启
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
package com.czg.mergedata.cur.entity;
|
||||||
|
|
||||||
|
import com.mybatisflex.annotation.Id;
|
||||||
|
import com.mybatisflex.annotation.KeyType;
|
||||||
|
import com.mybatisflex.annotation.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺分享记录 实体类。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-15
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Table("tb_shop_share_record")
|
||||||
|
public class CurShopShareRecord implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Id(keyType = KeyType.Auto)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* tb_shop_share 主键Id
|
||||||
|
*/
|
||||||
|
private Integer shareId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺Id
|
||||||
|
*/
|
||||||
|
private Integer shopId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邀请人id
|
||||||
|
*/
|
||||||
|
private Integer invitedId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邀请人名称
|
||||||
|
*/
|
||||||
|
private String invitedName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 被邀请人Id
|
||||||
|
*/
|
||||||
|
private Integer beInvitedId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 奖励券获得方式 get/use 领取获得/使用获得
|
||||||
|
*/
|
||||||
|
private String method;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0 非新用户 1 未领取 2 已领取 3 已使用
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生效时间/获得奖励的时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime rewardTime;
|
||||||
|
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
}
|
||||||
93
src/main/java/com/czg/mergedata/cur/entity/CurShopSong.java
Normal file
93
src/main/java/com/czg/mergedata/cur/entity/CurShopSong.java
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
package com.czg.mergedata.cur.entity;
|
||||||
|
|
||||||
|
import com.mybatisflex.annotation.Id;
|
||||||
|
import com.mybatisflex.annotation.KeyType;
|
||||||
|
import com.mybatisflex.annotation.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点歌-歌曲表 实体类。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-15
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Table("tb_shop_song")
|
||||||
|
public class CurShopSong implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Id(keyType = KeyType.Auto)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺id
|
||||||
|
*/
|
||||||
|
private Long shopId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 歌曲图片
|
||||||
|
*/
|
||||||
|
private String img;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 歌曲名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原唱歌手
|
||||||
|
*/
|
||||||
|
private String originSinger;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 演出歌手id
|
||||||
|
*/
|
||||||
|
private Integer singerId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 演出歌手名称
|
||||||
|
*/
|
||||||
|
private String singer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单价
|
||||||
|
*/
|
||||||
|
private BigDecimal price;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点播次数
|
||||||
|
*/
|
||||||
|
private Integer salesNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 歌曲状态:1-开启;0-关闭
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
private Integer sort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
}
|
||||||
106
src/main/java/com/czg/mergedata/cur/entity/CurShopSongOrder.java
Normal file
106
src/main/java/com/czg/mergedata/cur/entity/CurShopSongOrder.java
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
package com.czg.mergedata.cur.entity;
|
||||||
|
|
||||||
|
import com.mybatisflex.annotation.Id;
|
||||||
|
import com.mybatisflex.annotation.KeyType;
|
||||||
|
import com.mybatisflex.annotation.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点歌-店铺点歌订单 实体类。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-15
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Table("tb_shop_song_order")
|
||||||
|
public class CurShopSongOrder implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Id(keyType = KeyType.Auto)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 歌曲id
|
||||||
|
*/
|
||||||
|
private Integer songId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 歌曲名称
|
||||||
|
*/
|
||||||
|
private String songName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户openId
|
||||||
|
*/
|
||||||
|
private String openId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付金额
|
||||||
|
*/
|
||||||
|
private BigDecimal payMoney;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态 -1 未支付 0 已取消 1 已支付 2 演唱中 3 已演唱
|
||||||
|
*/
|
||||||
|
private Integer state;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下单来源
|
||||||
|
*/
|
||||||
|
private Integer clientType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单编号
|
||||||
|
*/
|
||||||
|
private String orderNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点歌人
|
||||||
|
*/
|
||||||
|
private String fromName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收歌人
|
||||||
|
*/
|
||||||
|
private String toName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 祝福语
|
||||||
|
*/
|
||||||
|
private String note;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺id
|
||||||
|
*/
|
||||||
|
private Integer shopId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 歌曲实际价格
|
||||||
|
*/
|
||||||
|
private BigDecimal realMoney;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 平台订单号
|
||||||
|
*/
|
||||||
|
private String payOrderId;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.czg.mergedata.cur.mapper;
|
||||||
|
|
||||||
|
import com.mybatisflex.core.BaseMapper;
|
||||||
|
import com.czg.mergedata.cur.entity.CurShopShare;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺分享 映射层。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-15
|
||||||
|
*/
|
||||||
|
public interface CurShopShareMapper extends BaseMapper<CurShopShare> {
|
||||||
|
|
||||||
|
@Select("truncate tb_shop_share")
|
||||||
|
void truncateTable();
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.czg.mergedata.cur.mapper;
|
||||||
|
|
||||||
|
import com.mybatisflex.core.BaseMapper;
|
||||||
|
import com.czg.mergedata.cur.entity.CurShopShareRecord;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺分享记录 映射层。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-15
|
||||||
|
*/
|
||||||
|
public interface CurShopShareRecordMapper extends BaseMapper<CurShopShareRecord> {
|
||||||
|
|
||||||
|
@Select("truncate tb_shop_share_record")
|
||||||
|
void truncateTable();
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.czg.mergedata.cur.mapper;
|
||||||
|
|
||||||
|
import com.mybatisflex.core.BaseMapper;
|
||||||
|
import com.czg.mergedata.cur.entity.CurShopSong;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点歌-歌曲表 映射层。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-15
|
||||||
|
*/
|
||||||
|
public interface CurShopSongMapper extends BaseMapper<CurShopSong> {
|
||||||
|
|
||||||
|
@Select("truncate tb_shop_song")
|
||||||
|
void truncateTable();
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.czg.mergedata.cur.mapper;
|
||||||
|
|
||||||
|
import com.mybatisflex.core.BaseMapper;
|
||||||
|
import com.czg.mergedata.cur.entity.CurShopSongOrder;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点歌-店铺点歌订单 映射层。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-15
|
||||||
|
*/
|
||||||
|
public interface CurShopSongOrderMapper extends BaseMapper<CurShopSongOrder> {
|
||||||
|
|
||||||
|
@Select("truncate tb_shop_song_order")
|
||||||
|
void truncateTable();
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package com.czg.mergedata.cur.service;
|
||||||
|
|
||||||
|
import com.mybatisflex.core.service.IService;
|
||||||
|
import com.czg.mergedata.cur.entity.CurShopShareRecord;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺分享记录 服务层。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-15
|
||||||
|
*/
|
||||||
|
public interface CurShopShareRecordService extends IService<CurShopShareRecord> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.czg.mergedata.cur.service;
|
||||||
|
|
||||||
|
import com.czg.mergedata.common.resp.CzgResult;
|
||||||
|
import com.mybatisflex.core.service.IService;
|
||||||
|
import com.czg.mergedata.cur.entity.CurShopShare;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺分享 服务层。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-15
|
||||||
|
*/
|
||||||
|
public interface CurShopShareService extends IService<CurShopShare> {
|
||||||
|
|
||||||
|
CzgResult<String> mergeShopShare();
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package com.czg.mergedata.cur.service;
|
||||||
|
|
||||||
|
import com.mybatisflex.core.service.IService;
|
||||||
|
import com.czg.mergedata.cur.entity.CurShopSongOrder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点歌-店铺点歌订单 服务层。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-15
|
||||||
|
*/
|
||||||
|
public interface CurShopSongOrderService extends IService<CurShopSongOrder> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.czg.mergedata.cur.service;
|
||||||
|
|
||||||
|
import com.czg.mergedata.common.resp.CzgResult;
|
||||||
|
import com.mybatisflex.core.service.IService;
|
||||||
|
import com.czg.mergedata.cur.entity.CurShopSong;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点歌-歌曲表 服务层。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-15
|
||||||
|
*/
|
||||||
|
public interface CurShopSongService extends IService<CurShopSong> {
|
||||||
|
|
||||||
|
CzgResult<String> mergeSong();
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package com.czg.mergedata.cur.service.impl;
|
||||||
|
|
||||||
|
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||||
|
import com.czg.mergedata.cur.entity.CurShopShareRecord;
|
||||||
|
import com.czg.mergedata.cur.mapper.CurShopShareRecordMapper;
|
||||||
|
import com.czg.mergedata.cur.service.CurShopShareRecordService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺分享记录 服务层实现。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-15
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class CurShopShareRecordServiceImpl extends ServiceImpl<CurShopShareRecordMapper, CurShopShareRecord> implements CurShopShareRecordService{
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
package com.czg.mergedata.cur.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import com.czg.mergedata.common.resp.CzgResult;
|
||||||
|
import com.czg.mergedata.cur.entity.CurShopShareRecord;
|
||||||
|
import com.czg.mergedata.cur.mapper.CurShopShareRecordMapper;
|
||||||
|
import com.czg.mergedata.old.entity.OldShopShare;
|
||||||
|
import com.czg.mergedata.old.entity.OldShopShareRecord;
|
||||||
|
import com.czg.mergedata.old.service.OldShopShareRecordService;
|
||||||
|
import com.czg.mergedata.old.service.OldShopShareService;
|
||||||
|
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||||
|
import com.czg.mergedata.cur.entity.CurShopShare;
|
||||||
|
import com.czg.mergedata.cur.mapper.CurShopShareMapper;
|
||||||
|
import com.czg.mergedata.cur.service.CurShopShareService;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺分享 服务层实现。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-15
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class CurShopShareServiceImpl extends ServiceImpl<CurShopShareMapper, CurShopShare> implements CurShopShareService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private CurShopShareRecordMapper curShopShareRecordMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private OldShopShareService oldShopShareService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private OldShopShareRecordService oldShopShareRecordService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public CzgResult<String> mergeShopShare() {
|
||||||
|
getMapper().truncateTable();
|
||||||
|
curShopShareRecordMapper.truncateTable();
|
||||||
|
|
||||||
|
execShare();
|
||||||
|
execRecord();
|
||||||
|
|
||||||
|
return CzgResult.success("合并成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void execShare() {
|
||||||
|
List<OldShopShare> list = oldShopShareService.list();
|
||||||
|
|
||||||
|
List<CurShopShare> curShopShareList = new ArrayList<>();
|
||||||
|
for (OldShopShare oldShopShare : list) {
|
||||||
|
CurShopShare curShopShare = BeanUtil.toBean(oldShopShare, CurShopShare.class);
|
||||||
|
curShopShareList.add(curShopShare);
|
||||||
|
}
|
||||||
|
|
||||||
|
saveBatch(curShopShareList);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void execRecord() {
|
||||||
|
List<OldShopShareRecord> list = oldShopShareRecordService.list();
|
||||||
|
|
||||||
|
List<CurShopShareRecord> curShopShareRecordList = new ArrayList<>();
|
||||||
|
for (OldShopShareRecord oldShopShareRecord : list) {
|
||||||
|
CurShopShareRecord curShopShareRecord = BeanUtil.toBean(oldShopShareRecord, CurShopShareRecord.class);
|
||||||
|
curShopShareRecordList.add(curShopShareRecord);
|
||||||
|
}
|
||||||
|
|
||||||
|
curShopShareRecordMapper.insertBatch(curShopShareRecordList);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package com.czg.mergedata.cur.service.impl;
|
||||||
|
|
||||||
|
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||||
|
import com.czg.mergedata.cur.entity.CurShopSongOrder;
|
||||||
|
import com.czg.mergedata.cur.mapper.CurShopSongOrderMapper;
|
||||||
|
import com.czg.mergedata.cur.service.CurShopSongOrderService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点歌-店铺点歌订单 服务层实现。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-15
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class CurShopSongOrderServiceImpl extends ServiceImpl<CurShopSongOrderMapper, CurShopSongOrder> implements CurShopSongOrderService{
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
package com.czg.mergedata.cur.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import com.czg.mergedata.common.resp.CzgResult;
|
||||||
|
import com.czg.mergedata.cur.entity.CurShopSongOrder;
|
||||||
|
import com.czg.mergedata.cur.mapper.CurShopSongOrderMapper;
|
||||||
|
import com.czg.mergedata.old.entity.OldShopSong;
|
||||||
|
import com.czg.mergedata.old.entity.OldShopSongOrder;
|
||||||
|
import com.czg.mergedata.old.service.OldShopSongOrderService;
|
||||||
|
import com.czg.mergedata.old.service.OldShopSongService;
|
||||||
|
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||||
|
import com.czg.mergedata.cur.entity.CurShopSong;
|
||||||
|
import com.czg.mergedata.cur.mapper.CurShopSongMapper;
|
||||||
|
import com.czg.mergedata.cur.service.CurShopSongService;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点歌-歌曲表 服务层实现。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-15
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class CurShopSongServiceImpl extends ServiceImpl<CurShopSongMapper, CurShopSong> implements CurShopSongService {
|
||||||
|
@Resource
|
||||||
|
private CurShopSongOrderMapper curShopSongOrderMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private OldShopSongService oldShopSongService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private OldShopSongOrderService oldShopSongOrderService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public CzgResult<String> mergeSong() {
|
||||||
|
getMapper().truncateTable();
|
||||||
|
curShopSongOrderMapper.truncateTable();
|
||||||
|
|
||||||
|
mergeShopSong();
|
||||||
|
mergeShopSongOrder();
|
||||||
|
|
||||||
|
return CzgResult.success("合并成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void mergeShopSong() {
|
||||||
|
List<OldShopSong> list = oldShopSongService.list();
|
||||||
|
|
||||||
|
List<CurShopSong> curShopSongs = new ArrayList<>();
|
||||||
|
for (OldShopSong oldShopSong : list) {
|
||||||
|
CurShopSong bean = BeanUtil.toBean(oldShopSong, CurShopSong.class);
|
||||||
|
curShopSongs.add(bean);
|
||||||
|
}
|
||||||
|
saveBatch(curShopSongs);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void mergeShopSongOrder() {
|
||||||
|
List<OldShopSongOrder> list = oldShopSongOrderService.list();
|
||||||
|
if (list.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
List<CurShopSongOrder> curShopSongOrders = new ArrayList<>();
|
||||||
|
for (OldShopSongOrder oldShopSongOrder : list) {
|
||||||
|
CurShopSongOrder bean = BeanUtil.toBean(oldShopSongOrder, CurShopSongOrder.class);
|
||||||
|
curShopSongOrders.add(bean);
|
||||||
|
}
|
||||||
|
curShopSongOrderMapper.insertBatch(curShopSongOrders);
|
||||||
|
}
|
||||||
|
}
|
||||||
95
src/main/java/com/czg/mergedata/old/entity/OldShopShare.java
Normal file
95
src/main/java/com/czg/mergedata/old/entity/OldShopShare.java
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
package com.czg.mergedata.old.entity;
|
||||||
|
|
||||||
|
import com.mybatisflex.annotation.Id;
|
||||||
|
import com.mybatisflex.annotation.KeyType;
|
||||||
|
import com.mybatisflex.annotation.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺分享 实体类。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-15
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Table("tb_shop_share")
|
||||||
|
public class OldShopShare implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Id(keyType = KeyType.Auto)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺Id
|
||||||
|
*/
|
||||||
|
private Integer shopId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标题
|
||||||
|
*/
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分享封面图
|
||||||
|
*/
|
||||||
|
private String shareImg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邀请顶部图
|
||||||
|
*/
|
||||||
|
private String invitedImg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 被邀顶部图
|
||||||
|
*/
|
||||||
|
private String beInvitedImg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动开始时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime startTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动结束时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新用户获得券
|
||||||
|
*/
|
||||||
|
private String newCoupon;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邀请人数
|
||||||
|
*/
|
||||||
|
private Integer invitedNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 奖励券
|
||||||
|
*/
|
||||||
|
private String rewardCoupon;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取方法 get-新用户领取获得 use-新用户使用获得
|
||||||
|
*/
|
||||||
|
private String getMethod;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0 关闭 1 开启
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
package com.czg.mergedata.old.entity;
|
||||||
|
|
||||||
|
import com.mybatisflex.annotation.Id;
|
||||||
|
import com.mybatisflex.annotation.KeyType;
|
||||||
|
import com.mybatisflex.annotation.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实体类。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-15
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Table("tb_shop_share_record")
|
||||||
|
public class OldShopShareRecord implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Id(keyType = KeyType.Auto)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* tb_shop_share 主键Id
|
||||||
|
*/
|
||||||
|
private Integer shareId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺Id
|
||||||
|
*/
|
||||||
|
private Integer shopId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邀请人id
|
||||||
|
*/
|
||||||
|
private Integer invitedId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邀请人名称
|
||||||
|
*/
|
||||||
|
private String invitedName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 被邀请人Id
|
||||||
|
*/
|
||||||
|
private Integer beInvitedId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 奖励券获得方式 get/use 领取获得/使用获得
|
||||||
|
*/
|
||||||
|
private String method;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0 非新用户 1 未领取 2 已领取 3 已使用
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生效时间/获得奖励的时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime rewardTime;
|
||||||
|
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
}
|
||||||
93
src/main/java/com/czg/mergedata/old/entity/OldShopSong.java
Normal file
93
src/main/java/com/czg/mergedata/old/entity/OldShopSong.java
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
package com.czg.mergedata.old.entity;
|
||||||
|
|
||||||
|
import com.mybatisflex.annotation.Id;
|
||||||
|
import com.mybatisflex.annotation.KeyType;
|
||||||
|
import com.mybatisflex.annotation.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实体类。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-15
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Table("tb_shop_song")
|
||||||
|
public class OldShopSong implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Id(keyType = KeyType.Auto)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺id
|
||||||
|
*/
|
||||||
|
private Integer shopId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 歌曲图片
|
||||||
|
*/
|
||||||
|
private String img;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 歌曲名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原唱歌手
|
||||||
|
*/
|
||||||
|
private String originSinger;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 演出歌手id
|
||||||
|
*/
|
||||||
|
private Integer singerId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 演出歌手名称
|
||||||
|
*/
|
||||||
|
private String singer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单价
|
||||||
|
*/
|
||||||
|
private BigDecimal price;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点播次数
|
||||||
|
*/
|
||||||
|
private Integer salesNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 歌曲状态:1-开启;0-关闭
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
private Integer sort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
}
|
||||||
106
src/main/java/com/czg/mergedata/old/entity/OldShopSongOrder.java
Normal file
106
src/main/java/com/czg/mergedata/old/entity/OldShopSongOrder.java
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
package com.czg.mergedata.old.entity;
|
||||||
|
|
||||||
|
import com.mybatisflex.annotation.Id;
|
||||||
|
import com.mybatisflex.annotation.KeyType;
|
||||||
|
import com.mybatisflex.annotation.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实体类。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-15
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Table("tb_shop_song_order")
|
||||||
|
public class OldShopSongOrder implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Id(keyType = KeyType.Auto)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 歌曲id
|
||||||
|
*/
|
||||||
|
private Integer songId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 歌曲名称
|
||||||
|
*/
|
||||||
|
private String songName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户openId
|
||||||
|
*/
|
||||||
|
private String openId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付金额
|
||||||
|
*/
|
||||||
|
private BigDecimal payMoney;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态 -1 未支付 0 已取消 1 已支付 2 演唱中 3 已演唱
|
||||||
|
*/
|
||||||
|
private Integer state;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下单来源
|
||||||
|
*/
|
||||||
|
private Integer clientType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单编号
|
||||||
|
*/
|
||||||
|
private String orderNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点歌人
|
||||||
|
*/
|
||||||
|
private String fromName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收歌人
|
||||||
|
*/
|
||||||
|
private String toName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 祝福语
|
||||||
|
*/
|
||||||
|
private String note;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺id
|
||||||
|
*/
|
||||||
|
private Integer shopId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 歌曲实际价格
|
||||||
|
*/
|
||||||
|
private BigDecimal realMoney;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 平台订单号
|
||||||
|
*/
|
||||||
|
private String payOrderId;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.czg.mergedata.old.mapper;
|
||||||
|
|
||||||
|
import com.mybatisflex.annotation.UseDataSource;
|
||||||
|
import com.mybatisflex.core.BaseMapper;
|
||||||
|
import com.czg.mergedata.old.entity.OldShopShare;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺分享 映射层。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-15
|
||||||
|
*/
|
||||||
|
@UseDataSource("ds2")
|
||||||
|
public interface OldShopShareMapper extends BaseMapper<OldShopShare> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.czg.mergedata.old.mapper;
|
||||||
|
|
||||||
|
import com.mybatisflex.annotation.UseDataSource;
|
||||||
|
import com.mybatisflex.core.BaseMapper;
|
||||||
|
import com.czg.mergedata.old.entity.OldShopShareRecord;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 映射层。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-15
|
||||||
|
*/
|
||||||
|
@UseDataSource("ds2")
|
||||||
|
public interface OldShopShareRecordMapper extends BaseMapper<OldShopShareRecord> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.czg.mergedata.old.mapper;
|
||||||
|
|
||||||
|
import com.mybatisflex.annotation.UseDataSource;
|
||||||
|
import com.mybatisflex.core.BaseMapper;
|
||||||
|
import com.czg.mergedata.old.entity.OldShopSong;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 映射层。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-15
|
||||||
|
*/
|
||||||
|
@UseDataSource("ds2")
|
||||||
|
public interface OldShopSongMapper extends BaseMapper<OldShopSong> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.czg.mergedata.old.mapper;
|
||||||
|
|
||||||
|
import com.mybatisflex.annotation.UseDataSource;
|
||||||
|
import com.mybatisflex.core.BaseMapper;
|
||||||
|
import com.czg.mergedata.old.entity.OldShopSongOrder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 映射层。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-15
|
||||||
|
*/
|
||||||
|
@UseDataSource("ds2")
|
||||||
|
public interface OldShopSongOrderMapper extends BaseMapper<OldShopSongOrder> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package com.czg.mergedata.old.service;
|
||||||
|
|
||||||
|
import com.mybatisflex.core.service.IService;
|
||||||
|
import com.czg.mergedata.old.entity.OldShopShareRecord;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务层。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-15
|
||||||
|
*/
|
||||||
|
public interface OldShopShareRecordService extends IService<OldShopShareRecord> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package com.czg.mergedata.old.service;
|
||||||
|
|
||||||
|
import com.mybatisflex.core.service.IService;
|
||||||
|
import com.czg.mergedata.old.entity.OldShopShare;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺分享 服务层。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-15
|
||||||
|
*/
|
||||||
|
public interface OldShopShareService extends IService<OldShopShare> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package com.czg.mergedata.old.service;
|
||||||
|
|
||||||
|
import com.mybatisflex.core.service.IService;
|
||||||
|
import com.czg.mergedata.old.entity.OldShopSongOrder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务层。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-15
|
||||||
|
*/
|
||||||
|
public interface OldShopSongOrderService extends IService<OldShopSongOrder> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package com.czg.mergedata.old.service;
|
||||||
|
|
||||||
|
import com.mybatisflex.core.service.IService;
|
||||||
|
import com.czg.mergedata.old.entity.OldShopSong;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务层。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-15
|
||||||
|
*/
|
||||||
|
public interface OldShopSongService extends IService<OldShopSong> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package com.czg.mergedata.old.service.impl;
|
||||||
|
|
||||||
|
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||||
|
import com.czg.mergedata.old.entity.OldShopShareRecord;
|
||||||
|
import com.czg.mergedata.old.mapper.OldShopShareRecordMapper;
|
||||||
|
import com.czg.mergedata.old.service.OldShopShareRecordService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务层实现。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-15
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class OldShopShareRecordServiceImpl extends ServiceImpl<OldShopShareRecordMapper, OldShopShareRecord> implements OldShopShareRecordService{
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package com.czg.mergedata.old.service.impl;
|
||||||
|
|
||||||
|
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||||
|
import com.czg.mergedata.old.entity.OldShopShare;
|
||||||
|
import com.czg.mergedata.old.mapper.OldShopShareMapper;
|
||||||
|
import com.czg.mergedata.old.service.OldShopShareService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺分享 服务层实现。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-15
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class OldShopShareServiceImpl extends ServiceImpl<OldShopShareMapper, OldShopShare> implements OldShopShareService{
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package com.czg.mergedata.old.service.impl;
|
||||||
|
|
||||||
|
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||||
|
import com.czg.mergedata.old.entity.OldShopSongOrder;
|
||||||
|
import com.czg.mergedata.old.mapper.OldShopSongOrderMapper;
|
||||||
|
import com.czg.mergedata.old.service.OldShopSongOrderService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务层实现。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-15
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class OldShopSongOrderServiceImpl extends ServiceImpl<OldShopSongOrderMapper, OldShopSongOrder> implements OldShopSongOrderService{
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package com.czg.mergedata.old.service.impl;
|
||||||
|
|
||||||
|
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||||
|
import com.czg.mergedata.old.entity.OldShopSong;
|
||||||
|
import com.czg.mergedata.old.mapper.OldShopSongMapper;
|
||||||
|
import com.czg.mergedata.old.service.OldShopSongService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务层实现。
|
||||||
|
*
|
||||||
|
* @author mac
|
||||||
|
* @since 2025-03-15
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class OldShopSongServiceImpl extends ServiceImpl<OldShopSongMapper, OldShopSong> implements OldShopSongService{
|
||||||
|
|
||||||
|
}
|
||||||
7
src/main/resources/mapper/cur/ShopShareMapper.xml
Normal file
7
src/main/resources/mapper/cur/ShopShareMapper.xml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?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.czg.mergedata.cur.mapper.CurShopShareMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
7
src/main/resources/mapper/cur/ShopShareRecordMapper.xml
Normal file
7
src/main/resources/mapper/cur/ShopShareRecordMapper.xml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?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.czg.mergedata.cur.mapper.CurShopShareRecordMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
7
src/main/resources/mapper/cur/ShopSongMapper.xml
Normal file
7
src/main/resources/mapper/cur/ShopSongMapper.xml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?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.czg.mergedata.cur.mapper.CurShopSongMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
7
src/main/resources/mapper/cur/ShopSongOrderMapper.xml
Normal file
7
src/main/resources/mapper/cur/ShopSongOrderMapper.xml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?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.czg.mergedata.cur.mapper.CurShopSongOrderMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
7
src/main/resources/mapper/old/ShopShareMapper.xml
Normal file
7
src/main/resources/mapper/old/ShopShareMapper.xml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?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.czg.mergedata.old.mapper.OldShopShareMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
7
src/main/resources/mapper/old/ShopShareRecordMapper.xml
Normal file
7
src/main/resources/mapper/old/ShopShareRecordMapper.xml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?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.czg.mergedata.old.mapper.OldShopShareRecordMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
7
src/main/resources/mapper/old/ShopSongMapper.xml
Normal file
7
src/main/resources/mapper/old/ShopSongMapper.xml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?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.czg.mergedata.old.mapper.OldShopSongMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
7
src/main/resources/mapper/old/ShopSongOrderMapper.xml
Normal file
7
src/main/resources/mapper/old/ShopSongOrderMapper.xml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?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.czg.mergedata.old.mapper.OldShopSongOrderMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
16
收银机数据迁移关系.md
16
收银机数据迁移关系.md
@@ -170,3 +170,19 @@
|
|||||||
- tb_credit_buyer_order 表
|
- tb_credit_buyer_order 表
|
||||||
- tb_credit_payment_record 表
|
- tb_credit_payment_record 表
|
||||||
|
|
||||||
|
|
||||||
|
### 25. 店铺分享
|
||||||
|
> /merge/shopInfo/share
|
||||||
|
#### 执行表
|
||||||
|
- tb_shop_share 表
|
||||||
|
- tb_shop_share_record 表
|
||||||
|
|
||||||
|
|
||||||
|
### 26. 点歌
|
||||||
|
> /merge/shopInfo/song
|
||||||
|
#### 执行表
|
||||||
|
- tb_shop_song 表
|
||||||
|
- tb_shop_song_order 表
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user