diff --git a/src/main/java/cn/chjyj/szwh/mapper/GoodsMapper.java b/src/main/java/cn/chjyj/szwh/mapper/GoodsMapper.java index ea16209..6f87afd 100644 --- a/src/main/java/cn/chjyj/szwh/mapper/GoodsMapper.java +++ b/src/main/java/cn/chjyj/szwh/mapper/GoodsMapper.java @@ -157,8 +157,8 @@ public interface GoodsMapper { /** * 商品撤销后,及时更新状态 - * @param islicode + * @param id 商品表中的自编号 * @return */ - int updateRevocationGoods(String islicode); + int updateRevocationGoods(String id); } diff --git a/src/main/java/cn/chjyj/szwh/service/impl/GoodsTaskServiceImpl.java b/src/main/java/cn/chjyj/szwh/service/impl/GoodsTaskServiceImpl.java index e72d579..5a3d0f4 100644 --- a/src/main/java/cn/chjyj/szwh/service/impl/GoodsTaskServiceImpl.java +++ b/src/main/java/cn/chjyj/szwh/service/impl/GoodsTaskServiceImpl.java @@ -93,7 +93,7 @@ public class GoodsTaskServiceImpl implements GoodsTaskService { //apply_out 为0时候, 执行代码 if(dbgoods.getApplyOut()==0){ //更新状态 - goodsMapper.updateRevocationGoods(islicode); + goodsMapper.updateRevocationGoods(dbgoods.getId().toString()); //构建操作日志 OperationLog oplog = new OperationLog(); oplog.setType("goods"); diff --git a/src/main/resources/mapper/szwh/GoodsMapper.xml b/src/main/resources/mapper/szwh/GoodsMapper.xml index 9088e86..4bb7648 100644 --- a/src/main/resources/mapper/szwh/GoodsMapper.xml +++ b/src/main/resources/mapper/szwh/GoodsMapper.xml @@ -289,7 +289,7 @@ update set goods_status = 2, apply_out =1 - where goods_status=1 and islicode=#{islicode} + where id=#{id} \ No newline at end of file diff --git a/src/test/java/cn/chjyj/szwh/NewTest.java b/src/test/java/cn/chjyj/szwh/NewTest.java index 931e96e..100c5ec 100644 --- a/src/test/java/cn/chjyj/szwh/NewTest.java +++ b/src/test/java/cn/chjyj/szwh/NewTest.java @@ -86,6 +86,14 @@ public class NewTest { }catch (Exception ex){ ex.printStackTrace(); } + } + @Test + public void m2test(){ + Calendar calendar = Calendar.getInstance(); + int wkday = calendar.get(Calendar.DAY_OF_WEEK); + System.out.println(wkday); + int day = wkday > 5 ? (wkday - 5 + 1) : 0; + System.out.println(day); } }