|
|
@ -140,18 +140,28 @@ public class GoodsServiceImpl implements GoodsService { |
|
|
} else { |
|
|
} else { |
|
|
istatus = 4; |
|
|
istatus = 4; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Goods goods = new Goods(); |
|
|
//商品起止时间
|
|
|
//商品起止时间
|
|
|
String cstart = sdjson.getString("contractualPeriodStart"); |
|
|
String cstart = sdjson.getString("contractualPeriodStart"); |
|
|
String curTime = new SimpleDateFormat("HH:mm:ss").format(new Date()); |
|
|
String curTime = new SimpleDateFormat("HH:mm:ss").format(new Date()); |
|
|
String ncstart = cstart + " " + curTime; |
|
|
String ncstart = cstart + " " + curTime; |
|
|
|
|
|
//转换为date
|
|
|
//
|
|
|
|
|
|
String cend = nsdjson.getString("contractualPeriodEnd"); |
|
|
String cend = nsdjson.getString("contractualPeriodEnd"); |
|
|
String ncend = cend + " 23:59:59"; |
|
|
String ncend = cend + " 23:59:59"; |
|
|
Goods goods = new Goods(); |
|
|
try { |
|
|
//起止时间转为timestamp
|
|
|
//起止时间转为timestamp
|
|
|
goods.setContractualStartTime(Timestamp.valueOf(ncstart)); |
|
|
SimpleDateFormat tsdf = new SimpleDateFormat("yyyyMMddHHmmss"); |
|
|
goods.setContractualtimeEndTime(Timestamp.valueOf(ncend)); |
|
|
//开始
|
|
|
|
|
|
Timestamp ncst = new Timestamp(tsdf.parse(ncstart).getTime()); |
|
|
|
|
|
//截至
|
|
|
|
|
|
Timestamp ncet = new Timestamp(tsdf.parse(ncend).getTime()); |
|
|
|
|
|
goods.setContractualStartTime(ncst); |
|
|
|
|
|
goods.setContractualtimeEndTime(ncet); |
|
|
|
|
|
}catch (Exception ex){ |
|
|
|
|
|
// do nothing
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
goods.setGoodsDetailId(goodsDetail.getId()); |
|
|
goods.setGoodsDetailId(goodsDetail.getId()); |
|
|
goods.setContractStatus(nsdjson.getInteger("contractStatus")); |
|
|
goods.setContractStatus(nsdjson.getInteger("contractStatus")); |
|
|
goods.setGoodsStatus(istatus); |
|
|
goods.setGoodsStatus(istatus); |
|
|
|