Commit f54e92e0 by ivan Lan

Fix the create of system order log

parent ee4072cf
......@@ -4,6 +4,7 @@ module Shotengai
def self.included(base)
add_event_callbacks
base.include AASM
# base.extend Shotengai::AASM_DLC::ClassMethods
end
def self.add_event_callbacks
......@@ -45,5 +46,20 @@ module Shotengai
end
end
# module ClassMethods
# def aasm *arg, &block
# super(*arg, &block)
# # @aasm[:default].instance_eval(&@aasm_patch) if @aasm_patch # new DSL
# # @aasm_patch = nil
# # p '-------'
# # sleep 1
# # @aasm[:default]
# end
# def add_aasm_patch &block
# @aasm[:default].instance_eval(&@block)
# end
# end
end
end
......@@ -94,19 +94,19 @@ module Shotengai
end
def set_pay_time
self.update!(pay_time: Time.now)
update_column(:pay_time, Time.now)
end
def set_delivery_time
update!(delivery_time: Time.now)
update_column(:delivery_time, Time.now)
end
def set_receipt_time
update!(receipt_time: Time.now)
update_column(:receipt_time, Time.now)
end
def set_seq
self.update!(seq: create_seq)
update_column(:seq, create_seq)
end
def create_seq
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment