思迅查询去除淘汰商品

This commit is contained in:
liyj 2025-07-18 16:15:59 +08:00
parent 5891ecd7c0
commit bb709ab69d
4 changed files with 14 additions and 3 deletions

View File

@ -98,6 +98,7 @@ public class DynamicTaskScheduler {
sxDataService.SyncCategory(dataBaseInfo,commentModel);
sxDataService.SyncGoods(dataBaseInfo,commentModel);//todo 暂时同步全部的商品如果后期修改需要增加服务器的字段
sxDataService.SyncVipList(dataBaseInfo,commentModel);
sxDataService.syncAtiveShops(dataBaseInfo,commentModel);
isRuning=false;
}

View File

@ -38,7 +38,16 @@ public class WebController {
public void syncCategory(){
log.info("syncCategory");
//sxDataService.getAppSign();
sxDataService.SyncCategory(new DataBaseInfo(),sxDataService.getCommentModel());
CommentModel commentModel= sxDataService.getCommentModel();
DataBaseInfo dataBaseInfo=sxDataService.getDataBaseInfo(commentModel);
if(dataBaseInfo==null){
log.error("syncGoods dataBaseInfo is null");
return;
}
if(ObjectUtil.isNotEmpty(dataBaseInfo.getRefreshTime())){
commentModel.setSyncTime(DateUtil.formatDateTime(dataBaseInfo.getRefreshTime()));
}
sxDataService.SyncCategory(dataBaseInfo,sxDataService.getCommentModel());
}
@RequestMapping("/syncGoods")

View File

@ -24,7 +24,7 @@ import java.util.*;
public class SxDataDao extends BaseDao{
private final static String T_BD_ITEM_CLS="t_bd_item_cls";//商品分类
private final static String T_BD_ITEM_INFO="t_bd_item_info";//商品表
private final static String T_BD_ITEM_INFO="t_bd_item_info b";//商品表
private final static String T_RM_VIP_INFO="t_rm_vip_info";//会员表
private final static String ITEM_CLSNO="item_clsno";//商品分类排序字段

View File

@ -295,7 +295,8 @@ public class SxDataServiceImp extends SxDataAbstService implements SxDataService
* @param commentModel
*/
private void syncAllGoods(DataBaseInfo dataBaseInfo, CommentModel commentModel){
String where="where 1=1";
//String where="where 1=1";
String where="where b.status='1'";
Integer total =0;
String parentId=getAndCacheTree(dataBaseInfo,dataBaseInfo.getCategoryName());//加载缓存用的
if(DicEnum.SYNCTYPE_02.getCode().equals(dataBaseInfo.getSyncType())){