feat:完善项目信息

This commit is contained in:
henry
2022-01-13 15:23:27 +08:00
parent e3909112ce
commit 0494bbf5d0
18 changed files with 396 additions and 15 deletions

View File

@ -91,7 +91,7 @@ func (c *Instance) Index(tenantID uint64, title, contact, contactMobile string,
_industry := make([]string, 0)
for _, v := range v.GetIndustryAttribute() {
_industry = append(_industry, config.GetIndustryInfo(v, "-"))
_industry = append(_industry, config.GetIndustryInfo(v, "-", "/"))
}
list = append(list, &InstanceInfo{
ID: v.GetEncodeID(),
@ -226,11 +226,17 @@ func (c *Instance) Delete(id uint64) error {
return model2.Delete(mActivityInstance.ActivityInstance)
}
func (c *Instance) Joins(activityID uint64, page, pageSize int) (*controller.ReturnPages, error) {
func (c *Instance) Joins(activityID uint64, name string, page, pageSize int) (*controller.ReturnPages, error) {
mActivityJoin := model.NewActivityJoin()
where := []*model2.ModelWhere{model2.NewWhere("j.activity_id", activityID)}
if name != "" {
where = append(where, model2.NewWhereLike("u_i.name", name))
}
var count int64
out, err := mActivityJoin.Join(page, pageSize, &count, model2.NewWhere("j.activity_id", activityID))
out, err := mActivityJoin.Join(page, pageSize, &count, where...)
if err != nil {
return nil, err