| | |
| | | if (param.getStates() != null) { |
| | | sql.append(" and states =:states "); |
| | | paramts.put("states", param.getStates()); |
| | | } else { |
| | | sql.append(" and states !=3 "); |
| | | } |
| | | sql.append(" ORDER BY CREATE_DATE DESC "); |
| | | |
| | |
| | | |
| | | return this.get(sql.toString(), paramts, new BaseGoodsTemplate()); |
| | | } |
| | | |
| | | /** |
| | | * 修改状态 |
| | | * @author 卢庆阳 |
| | | * @date 2023/10/25 |
| | | */ |
| | | public int updateStatus(BaseGoodsTemplate goodsTemplate) { |
| | | return this.update(goodsTemplate); |
| | | } |
| | | |
| | | /** |
| | | * @Description 根据物品id删除物品 |
| | | * @Author 卢庆阳 |
| | | * @Date 2023/10/25 |
| | | */ |
| | | public int updateById(BaseGoodsTemplate goodsTemplate, S_user_core currentUser) { |
| | | goodsTemplate.setStates(Constants.STATES_DELETED); |
| | | //删除时间 |
| | | goodsTemplate.setDTime(DateUtils.getDateTimeNumber(System.currentTimeMillis())); |
| | | //删除人id和删除人姓名 |
| | | goodsTemplate.setDUserId(currentUser.getId()); |
| | | goodsTemplate.setDUserName(currentUser.getUser_name()); |
| | | return this.update(goodsTemplate); |
| | | } |
| | | } |