Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defclass |actions| ()
- ((|actionId| :col-type (or db-null integer) :initarg :action-id
- :reader |action-actionId|)
- (|userId| :col-type (or db-null integer) :initarg :user-id
- :reader |action-userId|)
- (|shopUserId| :col-type (or db-null integer) :initarg :shop-user-id
- :reader |action-shopUserId|)
- (|shopTransactionId| :col-type (or db-null integer) :initarg :shop-transaction-id
- :reader |action-shopTransactionId|)
- (|visitorId| :col-type (or db-null integer) :initarg :visitor-id
- :accessor |action-visitorId|)
- (|productId| :col-type (or db-null integer) :initarg :product-id
- :accessor |action-productId|)
- (|visitorIp| :col-type string :initarg :visitor-ip
- :accessor |action-visitorIp|)
- (|referer| :col-type string :initarg :referer
- :accessor |action-referer|)
- (|actionType| :col-type string :initarg :action-type
- :accessor |action-actionType|)
- (|createdAt| :col-type timestamp :initform (format-timestring nil (now))
- :accessor |action-createdAt|)
- (|updatedAt| :col-type timestamp :initform (format-timestring nil (now))
- :accessor |action-updatedAt|))
- (:metaclass dao-class)
- (:keys |actionId|))
- and then
- (with-db
- (insert-dao
- (make-instance '|actions|
- :user-id user-id
- :shop-user-id shop-user-id
- :shop-transaction-id (getf item-as-list :shop-transaction-id)
- :visitor-id (or redis-id :null)
- :visitor-ip (getf item-as-list :ip)
- :referer (or (getf item-as-list :referer) "direct")
- :action-type (if sale-in-ttl
- "conversion"
- "conversion-ttl-expired")
- :product-id :null)))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement