| | |
| | | package com.consum.base.service; |
| | | |
| | | import com.walker.jdbc.service.BaseServiceImpl; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @ClassName LGoodsUserRecordServiceImpl |
| | |
| | | public int updSetNotLast(List<Long> outGoodsIds) { |
| | | return this.update(updSetNotLast + StringUtils.join(outGoodsIds, ",") + ")", new String[]{}); |
| | | } |
| | | |
| | | /** |
| | | * 通过 调拨单ID 或者 分发记录表id 删除 |
| | | */ |
| | | private static String DEL_BY_TRANDS_AND_RECORDID = "delete from L_GOODS_USER_RECORD where 1=1"; |
| | | |
| | | public int delByTrandsAndRecordId(Long transBusinessId, Long procureModelUserRecordId) { |
| | | if (transBusinessId == null && procureModelUserRecordId == null) { |
| | | return 0; |
| | | } |
| | | ArrayList<Object> params = new ArrayList<>(); |
| | | StringBuilder sql = new StringBuilder(DEL_BY_TRANDS_AND_RECORDID); |
| | | if (transBusinessId != null) { |
| | | sql.append(" and TRANS_BUSINESS_ID =?"); |
| | | params.add(transBusinessId); |
| | | } |
| | | if (procureModelUserRecordId != null) { |
| | | sql.append(" and PROCURE_MODEL_USER_RECORD_ID =?"); |
| | | params.add(procureModelUserRecordId); |
| | | } |
| | | return update(sql.toString(), params.toArray()); |
| | | } |
| | | |
| | | |
| | | } |