Subversion Repositories SmartDukaan

Rev

Rev 2279 | Rev 4141 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2279 Rev 2977
Line 2... Line 2...
2
 
2
 
3
import java.text.SimpleDateFormat;
3
import java.text.SimpleDateFormat;
4
import java.util.Date;
4
import java.util.Date;
5
import java.util.List;
5
import java.util.List;
6
import java.util.Map;
6
import java.util.Map;
-
 
7
import java.util.Map.Entry;
7
 
8
 
8
import org.springframework.beans.factory.annotation.Autowired;
9
import org.springframework.beans.factory.annotation.Autowired;
9
import org.springframework.stereotype.Service;
10
import org.springframework.stereotype.Service;
10
import org.springframework.transaction.annotation.Transactional;
11
import org.springframework.transaction.annotation.Transactional;
11
 
12
 
Line 29... Line 30...
29
	}
30
	}
30
	
31
	
31
	@Transactional
32
	@Transactional
32
	public void updatePayment(Payment payment, Map<String, String> attributes){
33
	public void updatePayment(Payment payment, Map<String, String> attributes){
33
		paymentMapper.updatePayment(payment);
34
		paymentMapper.updatePayment(payment);
34
		for(String key: attributes.keySet()){
35
		for(Entry<String, String> entry: attributes.entrySet()){
35
			paymentMapper.insertPaymentAttribute(payment.getId(), key, attributes.get(key));
36
			paymentMapper.insertPaymentAttribute(payment.getId(), entry.getKey(), entry.getValue());
36
		}
37
		}
37
	}
38
	}
38
	
39
	
39
	public List<Payment> getPayments(long tFromTime, long tToTime, int status, long gatewayId){
40
	public List<Payment> getPayments(long tFromTime, long tToTime, int status, long gatewayId){
40
		SimpleDateFormat mysqlDateFormatter = new SimpleDateFormat("yyyy-MM-dd 00:00:00");
41
		SimpleDateFormat mysqlDateFormatter = new SimpleDateFormat("yyyy-MM-dd 00:00:00");