From 444da68b958e53c7fa122db62723fce25368ee1d Mon Sep 17 00:00:00 2001 From: yujian <yujian@163.com> Date: 星期五, 29 十一月 2019 11:17:57 +0800 Subject: [PATCH] vip 配置信息 + 会员验证 --- fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandInfoServiceImpl.java | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandInfoServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandInfoServiceImpl.java index 38fcb3d..7dbbd2e 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandInfoServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandInfoServiceImpl.java @@ -119,7 +119,8 @@ BrandInfo resultObj = new BrandInfo(); resultObj.setId(record.getId()); - resultObj.setWeight(Double.valueOf(record.getId())); + resultObj.setOrder(Integer.valueOf(record.getId().toString())); + resultObj.setWeight(500.00); brandInfoMapper.updateByPrimaryKeySelective(resultObj); } else { BrandInfo resultObj = brandInfoMapper.selectByPrimaryKey(id); @@ -145,6 +146,7 @@ record.setShopTotal(resultObj.getShopTotal()); } + record.setOrder(resultObj.getOrder()); record.setWeight(resultObj.getWeight()); record.setCreateTime(resultObj.getCreateTime()); record.setUpdateTime(new Date()); @@ -226,18 +228,18 @@ if (resultObj == null) throw new BrandInfoException(1, "鎿嶄綔鏁版嵁宸蹭笉瀛樺湪"); - Double oldOrder = resultObj.getWeight(); + Integer oldOrder = resultObj.getOrder(); BrandInfo changeObj = brandInfoMapper.getByAdjoinOrder(resultObj.getBrandClass().getId(),oldOrder, moveType); if (changeObj == null ) throw new BrandInfoException(1, "宸茬粡鍦ㄦ渶杈圭紭锛屾棤鍙氦鎹㈢殑浣嶇疆"); BrandInfo changeObj1 = new BrandInfo(); changeObj1.setId(id); - changeObj1.setWeight(changeObj.getWeight()); + changeObj1.setOrder(changeObj.getOrder()); BrandInfo changeObj2 = new BrandInfo(); changeObj2.setId(changeObj.getId()); - changeObj2.setWeight(oldOrder); + changeObj2.setOrder(oldOrder); brandInfoMapper.updateByPrimaryKeySelective(changeObj1); brandInfoMapper.updateByPrimaryKeySelective(changeObj2); @@ -370,6 +372,7 @@ brandInfo.setGoodsTotal(numInfo.getGoodsTotal()); brandInfo.setShopTotal(numInfo.getShopTotal()); brandInfo.setUpdateTime(new Date()); + brandInfo.setWeight(Math.random() * 1000); brandInfoMapper.updateByPrimaryKeySelective(brandInfo); } } -- Gitblit v1.8.0