فهرست منبع

Merge branch 'dev_v1.3.4_20220909' of http://git.dayaedu.com/yonge/cooleshow into dev_v1.3.4_20220909

liujunchi 2 سال پیش
والد
کامیت
f87db48f95

+ 19 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/search/ActivityPlanSearch.java

@@ -2,10 +2,12 @@ package com.yonge.cooleshow.biz.dal.dto.search;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
+import com.yonge.cooleshow.biz.dal.enums.MK;
 import com.yonge.cooleshow.common.enums.ActivityTypeEnum;
 import com.yonge.toolset.base.page.QueryInfo;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.format.annotation.DateTimeFormat;
 
 import java.util.Date;
@@ -36,11 +38,20 @@ public class ActivityPlanSearch extends QueryInfo{
 	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
 	private Date endTime;
 
+	// 活动编号匹配
+	@ApiModelProperty("活动ID ")
+	private Long activityId;
+
 	public String getActivityName() {
 		return activityName;
 	}
 
 	public void setActivityName(String activityName) {
+
+		if (StringUtils.isNotEmpty(activityName) && activityName.matches(MK.EXP_INT)) {
+			setActivityId(Long.parseLong(activityName));
+		}
+
 		this.activityName = activityName;
 	}
 
@@ -91,4 +102,12 @@ public class ActivityPlanSearch extends QueryInfo{
 	public void setEndTime(Date endTime) {
 		this.endTime = endTime;
 	}
+
+	public Long getActivityId() {
+		return activityId;
+	}
+
+	public void setActivityId(Long activityId) {
+		this.activityId = activityId;
+	}
 }

+ 1 - 1
cooleshow-user/user-biz/src/main/resources/config/mybatis/ActivityPlanMapper.xml

@@ -70,7 +70,7 @@
         LEFT JOIN  sys_user u on t.update_by_ = u.id_
         <where>
             <if test="param.activityName != null and param.activityName != ''">
-                and t.activity_name_ like concat('%',#{param.activityName},'%')
+                and (t.activity_name_ like concat('%',#{param.activityName},'%') <if test="param.activityId != null"> OR t.id_ = #{param.activityId}</if> )
             </if>
             <if test="param.draftFlag != null">
                 and t.draft_flag_ = #{param.draftFlag}