数据同步商品、会员
This commit is contained in:
parent
558a0ef033
commit
673761800f
@ -536,6 +536,7 @@ public class SyncThirdDataServiceImpl implements SyncThirdDataService {
|
|||||||
return CommonResult.failed();
|
return CommonResult.failed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//1-品牌,2-分类,3-商品,4-会员
|
||||||
switch (syncType) {
|
switch (syncType) {
|
||||||
case 1:
|
case 1:
|
||||||
return syncProductBrand(jdbcTemplate);
|
return syncProductBrand(jdbcTemplate);
|
||||||
@ -553,7 +554,7 @@ public class SyncThirdDataServiceImpl implements SyncThirdDataService {
|
|||||||
private JdbcTemplate getJDBCTemplate(SyncConfig syncConfig) {
|
private JdbcTemplate getJDBCTemplate(SyncConfig syncConfig) {
|
||||||
|
|
||||||
switch (syncConfig.getSys_version()) {
|
switch (syncConfig.getSys_version()) {
|
||||||
case "hbposev9" :
|
case "hbposev9":
|
||||||
DriverManagerDataSource dataSource = new DriverManagerDataSource();
|
DriverManagerDataSource dataSource = new DriverManagerDataSource();
|
||||||
dataSource.setDriverClassName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
|
dataSource.setDriverClassName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
|
||||||
String url = String.format("jdbc:sqlserver://%s:%s;databaseName=%s",
|
String url = String.format("jdbc:sqlserver://%s:%s;databaseName=%s",
|
||||||
@ -567,13 +568,41 @@ public class SyncThirdDataServiceImpl implements SyncThirdDataService {
|
|||||||
return null;
|
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_no、card_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
|
* @return
|
||||||
*/
|
*/
|
||||||
public CommonResult syncProductBrand(JdbcTemplate syncAppO) {
|
public CommonResult syncProductBrand(JdbcTemplate template) {
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -582,27 +611,8 @@ public class SyncThirdDataServiceImpl implements SyncThirdDataService {
|
|||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public CommonResult syncProductClazz(JdbcTemplate syncAppO) {
|
public CommonResult syncProductClazz(JdbcTemplate template) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 同步商品
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public CommonResult syncProduct(JdbcTemplate syncAppO) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 同步会员
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public CommonResult syncVip(JdbcTemplate syncAppO) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user