|
@@ -32,6 +32,7 @@ type ApprovalCommon struct {
|
|
|
// @Param CurrentIndex query int true "当前页页码,从1开始"
|
|
|
// @Param Status query string true "状态:'待审批','已审批','驳回','已撤回'"
|
|
|
// @Param KeyWord query string true "搜索关键词"
|
|
|
+// @Param Keyword query string true "搜索关键词"
|
|
|
// @Success 200 {object} approval.CompanyApprovalListResp
|
|
|
// @router /list [get]
|
|
|
func (this *ApprovalCommon) List() {
|
|
@@ -41,7 +42,11 @@ func (this *ApprovalCommon) List() {
|
|
|
pageSize, _ := this.GetInt("PageSize")
|
|
|
currentIndex, _ := this.GetInt("CurrentIndex")
|
|
|
status := this.GetString("Status")
|
|
|
+ keyword := this.GetString("Keyword")
|
|
|
keyWord := this.GetString("KeyWord")
|
|
|
+ if keyword == "" {
|
|
|
+ keyword = keyWord
|
|
|
+ }
|
|
|
|
|
|
var startSize int
|
|
|
if pageSize <= 0 {
|
|
@@ -72,8 +77,8 @@ func (this *ApprovalCommon) List() {
|
|
|
pars = append(pars, sysUser.AdminId)
|
|
|
}
|
|
|
|
|
|
- if keyWord != "" {
|
|
|
- condition += ` AND (a.company_name LIKE '%` + keyWord + `%' OR a.credit_code LIKE '%` + keyWord + `%') `
|
|
|
+ if keyword != "" {
|
|
|
+ condition += ` AND (a.company_name LIKE '%` + keyword + `%' OR a.credit_code LIKE '%` + keyWord + `%') `
|
|
|
}
|
|
|
|
|
|
total, err := company_approval.GetApprovalCount(condition, pars)
|