|
|
@@ -25,7 +25,7 @@ func (d *BizObjectAttrRepo) GetPage(m map[string]interface{}) (*viewmodels.PageR
|
|
|
sqlSelect := ` SELECT A.* ,
|
|
|
B.object_code `
|
|
|
sqlFrom := ` FROM biz_object_attr AS A
|
|
|
- LEFT JOIN biz_object_attr AS B ON(A.biz_id = B.biz_id AND A.object_id = B.object_id) `
|
|
|
+ LEFT JOIN biz_object AS B ON(A.biz_id = B.biz_id AND A.object_id = B.object_id) `
|
|
|
sqlWhere := ` WHERE A.deleted_flag = 0 `
|
|
|
if keywords, ok := m["keywords"]; ok {
|
|
|
sqlWhere += ` AND A.attr_title like ` + "'%" + fmt.Sprintf("%s", keywords) + "%'"
|
|
|
@@ -59,7 +59,7 @@ func (d *BizObjectAttrRepo) GetList(m map[string]interface{}) ([]viewmodels.BizO
|
|
|
sqlSelect := ` SELECT A.* ,
|
|
|
B.object_code `
|
|
|
sqlFrom := ` FROM biz_object_attr AS A
|
|
|
- LEFT JOIN biz_object_attr AS B ON(A.biz_id = B.biz_id AND A.object_id = B.object_id) `
|
|
|
+ LEFT JOIN biz_object AS B ON(A.biz_id = B.biz_id AND A.object_id = B.object_id) `
|
|
|
sqlWhere := ` WHERE A.deleted_flag = 0 `
|
|
|
if keywords, ok := m["keywords"]; ok {
|
|
|
sqlWhere += ` AND A.attr_title like ` + "'%" + fmt.Sprintf("%s", keywords) + "%'"
|
|
|
@@ -79,7 +79,7 @@ func (d *BizObjectAttrRepo) GetAll() ([]viewmodels.BizObjectAttrInfo, error) {
|
|
|
sqlSelect := ` SELECT A.* ,
|
|
|
B.object_code `
|
|
|
sqlFrom := ` FROM biz_object_attr AS A
|
|
|
- LEFT JOIN biz_object_attr AS B ON(A.biz_id = B.biz_id AND A.object_id = B.object_id) `
|
|
|
+ LEFT JOIN biz_object AS B ON(A.biz_id = B.biz_id AND A.object_id = B.object_id) `
|
|
|
sqlWhere := ` WHERE A.deleted_flag = 0 `
|
|
|
sqlOrderBy := ` ORDER BY A.sort_no `
|
|
|
|
|
|
@@ -96,7 +96,7 @@ func (d *BizObjectAttrRepo) GetListById(bizId, objectId int64) ([]viewmodels.Biz
|
|
|
sqlSelect := ` SELECT A.* ,
|
|
|
B.object_code `
|
|
|
sqlFrom := ` FROM biz_object_attr AS A
|
|
|
- LEFT JOIN biz_object_attr AS B ON(A.biz_id = B.biz_id AND A.object_id = B.object_id) `
|
|
|
+ LEFT JOIN biz_object AS B ON(A.biz_id = B.biz_id AND A.object_id = B.object_id) `
|
|
|
sqlWhere := ` WHERE A.deleted_flag = 0 `
|
|
|
sqlWhere += fmt.Sprintf(" AND A.biz_id = %d", bizId)
|
|
|
sqlWhere += fmt.Sprintf(" AND A.object_id = %d", objectId)
|
|
|
@@ -115,7 +115,7 @@ func (d *BizObjectAttrRepo) GetById(bizId, objectId, attrId int64) (*viewmodels.
|
|
|
sqlSelect := ` SELECT A.* ,
|
|
|
B.object_code `
|
|
|
sqlFrom := ` FROM biz_object_attr AS A
|
|
|
- LEFT JOIN biz_object_attr AS B ON(A.biz_id = B.biz_id AND A.object_id = B.object_id) `
|
|
|
+ LEFT JOIN biz_object AS B ON(A.biz_id = B.biz_id AND A.object_id = B.object_id) `
|
|
|
sqlWhere := ` WHERE A.deleted_flag = 0 `
|
|
|
sqlWhere += fmt.Sprintf(" AND A.biz_id = %d", bizId)
|
|
|
sqlWhere += fmt.Sprintf(" AND A.object_id = %d", objectId)
|