| | |
| | | import com.yeshi.fanli.exception.goods.RecommendUserGoodsException;
|
| | | import com.yeshi.fanli.service.inter.goods.CommonGoodsService;
|
| | | import com.yeshi.fanli.service.inter.goods.RecommendUserGoodsService;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | | @Service
|
| | | public class RecommendUserGoodsServiceImpl implements RecommendUserGoodsService {
|
| | |
| | | return recommendUserGoodsMapper.countRecommendGoodsByDevice(device);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void syncDeviceAndUid(Long uid, String targetDevice) {
|
| | |
|
| | | List<RecommendUserGoods> list = recommendUserGoodsMapper.listRecommendGoods(uid, 0, 20);
|
| | | for (RecommendUserGoods ru : list) {
|
| | | if (StringUtil.isNullOrEmpty(ru.getDevice())) {
|
| | | RecommendUserGoods update = new RecommendUserGoods();
|
| | | update.setId(ru.getId());
|
| | | update.setDevice(targetDevice);
|
| | | recommendUserGoodsMapper.updateByPrimaryKeySelective(update);
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|