thj.go 642 B

12345678910111213141516171819
  1. package model
  2. import "mtp20_assisted/global"
  3. // Get 通过采购成交单ID获取信息
  4. func (t *Thjpurchasetradedetail) Get() (has bool, err error) {
  5. return global.M2A_DB.Where("WRTRADEDETAILID = ?", t.WRTRADEDETAILID).Get(t)
  6. }
  7. // Get 通过预售申请ID获取信息
  8. func (t *Wrpresaleinfo) Get() (has bool, err error) {
  9. return global.M2A_DB.Where("PRESALEAPPLYID = ?", t.PRESALEAPPLYID).Get(t)
  10. }
  11. // UpdateContractAddrBuy 更新预售模板合同
  12. func (t *Thjpurchasetradedetail) UpdateContractAddrBuy() (err error) {
  13. _, err = global.M2A_DB.Where("WRTRADEDETAILID = ?", t.WRTRADEDETAILID).Cols("CONTRACTADDRBUY").Update(t)
  14. return
  15. }