数据同步商品、会员

This commit is contained in:
Yimi 2025-03-08 18:41:36 +08:00
parent 558a0ef033
commit 673761800f

View File

@ -536,6 +536,7 @@ public class SyncThirdDataServiceImpl implements SyncThirdDataService {
return CommonResult.failed();
}
//1-品牌2-分类3-商品4-会员
switch (syncType) {
case 1:
return syncProductBrand(jdbcTemplate);
@ -553,7 +554,7 @@ public class SyncThirdDataServiceImpl implements SyncThirdDataService {
private JdbcTemplate getJDBCTemplate(SyncConfig syncConfig) {
switch (syncConfig.getSys_version()) {
case "hbposev9" :
case "hbposev9":
DriverManagerDataSource dataSource = new DriverManagerDataSource();
dataSource.setDriverClassName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
String url = String.format("jdbc:sqlserver://%s:%s;databaseName=%s",
@ -567,13 +568,41 @@ public class SyncThirdDataServiceImpl implements SyncThirdDataService {
return null;
}
/**
* 同步商品
*
* @return
*/
public CommonResult syncProduct(JdbcTemplate template) {
//商品编码 item_no商品名称 item_name零售价 sale_price会员价 vip_price
String sql = "SELECT item_no, item_name, sale_price, vip_price FROM t_bd_item_info";
List<String> oList = template.queryForList(sql, String.class);
//todo 第三方 商品同步接口
return null;
}
/**
* 同步会员
*
* @return
*/
public CommonResult syncVip(JdbcTemplate template) {
//会员卡号card_nocard_id会员姓名vip_name手机号vip_tel | mobile性别 vip_sex生日 birthday
String sql = "SELECT card_no, card_id, vip_name, vip_tel, vip_sex, birthday FROM t_rm_vip_info";
List<String> oList = template.queryForList(sql, String.class);
//todo 第三方 会员同步接口
return null;
}
/**
* 同步商品品牌
*
* @return
*/
public CommonResult syncProductBrand(JdbcTemplate syncAppO) {
public CommonResult syncProductBrand(JdbcTemplate template) {
return null;
}
@ -582,27 +611,8 @@ public class SyncThirdDataServiceImpl implements SyncThirdDataService {
*
* @return
*/
public CommonResult syncProductClazz(JdbcTemplate syncAppO) {
public CommonResult syncProductClazz(JdbcTemplate template) {
return null;
}
/**
* 同步商品
*
* @return
*/
public CommonResult syncProduct(JdbcTemplate syncAppO) {
return null;
}
/**
* 同步会员
*
* @return
*/
public CommonResult syncVip(JdbcTemplate syncAppO) {
return null;
}
}