|
@@ -33,7 +33,7 @@ func NewTreeContractDao(engine *xorm.Engine) *TreeContractDao {
|
|
|
|
|
|
func (d *TreeContractDao) GetDetail(id int) *viewmodels.TreeSectionDetail {
|
|
|
data := &viewmodels.TreeSectionDetail{}
|
|
|
- _, _ = d.engine.Sql("select t.name, s.content, f.ext, f.path, f.id as fid from cm_tree_contracts as t left join cm_contracts as s on t.contract_id = s.id left join cm_upload as f on t.contract_id = f.id where t.id = ?", id).Get(data)
|
|
|
+ _, _ = d.engine.Sql("select t.name, s.content, f.ext, f.path as filepath, f.id as fid, f.name as filename from cm_tree_contracts as t left join cm_contracts as s on t.contract_id = s.id left join cm_upload as f on t.contract_id = f.id where t.id = ?", id).Get(data)
|
|
|
fmt.Println(data)
|
|
|
if data.Fid != "" {
|
|
|
fid, _ := comm.AesEncrypt(data.Fid, conf.SignSecret)
|