天天看點

Product API buffer

Created by Jerry Wang, last modified on Apr 23, 2014

function group COM_PRODUCT裡有三個次元的buffer:

Product API buffer

M buffer: 包含目前正在編輯的product 資訊。如果product check沒有error,M buffer的内容會move到 T buffer。

T buffer: 包含通過check之後的product 資訊。

O buffer: 來自database的product 資訊。

在ui上點了search button之後三個buffer的狀态:

Product API buffer

在使用function module COM_PRODUCT_READ_SINGEM讀取單個product資料時,總是先試圖從M buffer中取值,

Product API buffer

再試T buffer:

Product API buffer

在檢查一個product是否在DB存在時,首先檢查O buffer,如果有說明該product在DB存在。如果O buffer裡沒有但是T buffer裡有,說明該product是目前session剛建立還沒有save。

Product API buffer

當在UI上修改了product attribute敲回車之後,

Product API buffer

會把目前編輯的product 資訊存到M buffer裡:

Product API buffer

若該product attribute沒有error,則save時會将M buffer的資訊移除。

Product API buffer
crm

繼續閱讀