Commit 12471ecc authored by hubaoshan's avatar hubaoshan

1

parent 6934f120
...@@ -39,5 +39,6 @@ public interface WmsGoodsRepository extends CyBaseMapper<WmsGoods> { ...@@ -39,5 +39,6 @@ public interface WmsGoodsRepository extends CyBaseMapper<WmsGoods> {
List<OssInfo> findOss(@Param("entity") WmsGoods wmsGoods); List<OssInfo> findOss(@Param("entity") WmsGoods wmsGoods);
int delOssById(@Param("entity") WmsGoods wmsGoods);
} }
...@@ -31,6 +31,7 @@ public interface WmsGoodsService { ...@@ -31,6 +31,7 @@ public interface WmsGoodsService {
* @return * @return
*/ */
CyPersistModel remove(WmsGoods wmsGoods); CyPersistModel remove(WmsGoods wmsGoods);
CyPersistModel delOss(WmsGoods wmsGoods);
/** /**
* 逻辑删除 商品信息表 * 逻辑删除 商品信息表
......
...@@ -100,6 +100,15 @@ public class WmsGoodsServiceImpl extends ServiceImpl<WmsGoodsRepository, WmsGood ...@@ -100,6 +100,15 @@ public class WmsGoodsServiceImpl extends ServiceImpl<WmsGoodsRepository, WmsGood
return new CyPersistModel(line); return new CyPersistModel(line);
} }
@Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.DEFAULT)
@Override
public CyPersistModel delOss(WmsGoods wmsGoods) {
wmsGoods.setDeleted();
int line = baseMapper.delOssById(wmsGoods);
log.debug(CyUserUtil.getAuthenUsername() + "删除了ID为" +
wmsGoods.getBusinessId() + "的商品信息表信息");
return new CyPersistModel(line);
}
/** /**
* 修改 商品信息表 * 修改 商品信息表
* *
...@@ -110,9 +119,8 @@ public class WmsGoodsServiceImpl extends ServiceImpl<WmsGoodsRepository, WmsGood ...@@ -110,9 +119,8 @@ public class WmsGoodsServiceImpl extends ServiceImpl<WmsGoodsRepository, WmsGood
@Override @Override
public CyPersistModel merge(WmsGoods wmsGoods) { public CyPersistModel merge(WmsGoods wmsGoods) {
int line = baseMapper.updateById(wmsGoods); int line = baseMapper.updateById(wmsGoods);
// 删除一下 goods_oss by goods // 删除一下 goods_oss by goods
baseMapper.delOssById(wmsGoods);
//插入图片 //插入图片
if(StringUtils.isNotBlank(wmsGoods.getUrlIdList())){ if(StringUtils.isNotBlank(wmsGoods.getUrlIdList())){
List<Map<String, String>> params = new ArrayList<>(); List<Map<String, String>> params = new ArrayList<>();
......
...@@ -32,6 +32,10 @@ ...@@ -32,6 +32,10 @@
(#{item.gid},#{item.oid}) (#{item.gid},#{item.oid})
</foreach> </foreach>
</insert> </insert>
<delete id="delOssById">
delete from wms_goods_oss wgo
where wgo.goods_id = #{entity.businessId}
</delete>
<!--<cache type="${corePackag!}.util.RedisCache"/>--> <!--<cache type="${corePackag!}.util.RedisCache"/>-->
<select id="queryWmsGoods" resultMap="BaseResultMap"> <select id="queryWmsGoods" resultMap="BaseResultMap">
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
(#{item.flag},#{item.delFlag},#{item.createBy},#{item.createDate},#{item.updateBy},#{item.updateDate},#{item.remarks},#{item.io_type},#{item.deal_status},#{item.goods_counts},#{item.shipper},#{item.shipper_address},#{item.shipper_phone}, (#{item.flag},#{item.delFlag},#{item.createBy},#{item.createDate},#{item.updateBy},#{item.updateDate},#{item.remarks},#{item.io_type},#{item.deal_status},#{item.goods_counts},#{item.shipper},#{item.shipper_address},#{item.shipper_phone},
#{item.goods_check},#{item.salesman},#{item.maker},#{item.inGoods},#{item.outGoods},#{item.appCode}) #{item.goods_check},#{item.salesman},#{item.maker},#{item.inGoods},#{item.outGoods},#{item.appCode})
</foreach></insert> </foreach></insert>
<!--<cache type="${corePackag!}.util.RedisCache"/>--> <!--<cache type="${corePackag!}.util.RedisCache"/>-->
<select id="queryWmsGoodsApplys" resultMap="BaseResultMap"> <select id="queryWmsGoodsApplys" resultMap="BaseResultMap">
select * from wms_goods_apply select * from wms_goods_apply
......
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