Commit 41ef2769 by 张新旗

代码永远再路上

parent 2608aa50
package com.soss.system.service.impl; package com.soss.system.service.impl;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList; import java.util.*;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
...@@ -46,6 +43,8 @@ public class GoodsServiceImpl implements IGoodsService ...@@ -46,6 +43,8 @@ public class GoodsServiceImpl implements IGoodsService
private OrderMapper orderMapper; private OrderMapper orderMapper;
@Autowired @Autowired
private GoodsCategoryMapper goodsCategoryMapper; private GoodsCategoryMapper goodsCategoryMapper;
@Autowired
private ShopRecommendMapper shopRecommendMapper;
/** /**
...@@ -305,6 +304,8 @@ public class GoodsServiceImpl implements IGoodsService ...@@ -305,6 +304,8 @@ public class GoodsServiceImpl implements IGoodsService
for (ShopGoods shopGoods1 : shopGoodsList) { for (ShopGoods shopGoods1 : shopGoodsList) {
shopGoodsMapper.deleteShopGoodsById(shopGoods1.getId()); shopGoodsMapper.deleteShopGoodsById(shopGoods1.getId());
shopGoodsSkuMapper.deleteShopGoodsSkuByGoodsId(shopGoods1.getGoodsId()); shopGoodsSkuMapper.deleteShopGoodsSkuByGoodsId(shopGoods1.getGoodsId());
List<String> goodsIds = Arrays.asList(String.valueOf(shopGoods1.getGoodsId()));
shopRecommendMapper.deleteByShopIdGoods(shopGoods1.getShopId(),goodsIds);
} }
return i+""; return i+"";
......
...@@ -128,7 +128,6 @@ public class ShopServiceImpl implements IShopService ...@@ -128,7 +128,6 @@ public class ShopServiceImpl implements IShopService
for (String id : ids) { for (String id : ids) {
Shop shop = new Shop(); Shop shop = new Shop();
shop.setId(Long.parseLong(id)); shop.setId(Long.parseLong(id));
shop.setIsDefault(1L);
shop.setState("3"); shop.setState("3");
shopMapper.updateShop(shop); shopMapper.updateShop(shop);
} }
......
...@@ -47,6 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -47,6 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="code != null and code != ''"> and code = #{code}</if> <if test="code != null and code != ''"> and code = #{code}</if>
</where> </where>
order by created_at desc
</select> </select>
<select id="selectGoodsById" parameterType="String" resultMap="GoodsResult"> <select id="selectGoodsById" parameterType="String" resultMap="GoodsResult">
......
...@@ -88,6 +88,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -88,6 +88,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update> </update>
<select id="selectSpec" resultMap="GoodsSkuResult"> <select id="selectSpec" resultMap="GoodsSkuResult">
<include refid="selectGoodsSkuVo"/> <include refid="selectGoodsSkuVo"/>
where rule_list like concat('%',#{query},'%') where
is_deleted ='0' and
rule_list like concat('%',#{query},'%')
</select> </select>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment