yonge 4 سال پیش
والد
کامیت
20e37c3e53

+ 10 - 0
cms/src/main/java/com/ym/mec/cms/controller/queryinfo/NewsInformationQueryInfo.java

@@ -27,6 +27,8 @@ public class NewsInformationQueryInfo extends QueryInfo {
 	@ApiModelProperty(value = "租客编号", required = false)
 	private Integer tenantId;
 	
+	private String clientName;
+	
 	private Date date;
 
 	public Integer getType() {
@@ -84,4 +86,12 @@ public class NewsInformationQueryInfo extends QueryInfo {
 	public void setTenantId(Integer tenantId) {
 		this.tenantId = tenantId;
 	}
+
+	public String getClientName() {
+		return clientName;
+	}
+
+	public void setClientName(String clientName) {
+		this.clientName = clientName;
+	}
 }

+ 14 - 8
cms/src/main/resources/config/mybatis/SysNewsInformationMapper.xml

@@ -48,14 +48,16 @@
 			<if test="search != null">
 				and title_ like '%' #{search} '%'
 			</if>
-			<choose>
-				<when test="memo != null and memo != ''">
-					and memo_ = #{memo}
-				</when>
-				<otherwise>
-					and (memo_ is null or memo_ = '')
-				</otherwise>
-			</choose>
+			<if test="clientName != 'manage'">
+				<choose>
+					<when test="memo != null and memo != ''">
+						and memo_ = #{memo}
+					</when>
+					<otherwise>
+						and (memo_ is null or memo_ = '')
+					</otherwise>
+				</choose>
+			</if>
 		</where>
 	</sql>
 	
@@ -187,6 +189,7 @@
 		<if test="tenantId != null">
 			and tenant_id_ = #{tenantId}
 		</if>
+		<if test="clientName != 'manage'">
 			<choose>
 				<when test="memo != null and memo != ''">
 					and memo_ = #{memo}
@@ -195,6 +198,7 @@
 					and (memo_ is null or memo_ = '')
 				</otherwise>
 			</choose>
+		</if>
 		order by status_ desc,order_ desc,update_time_ desc
 		<include refid="global.limit" />
 	</select>
@@ -221,6 +225,7 @@
 		<if test="tenantId != null">
 			and tenant_id_ = #{tenantId}
 		</if>
+		<if test="clientName != 'manage'">
 			<choose>
 				<when test="memo != null and memo != ''">
 					and memo_ = #{memo}
@@ -229,5 +234,6 @@
 					and (memo_ is null or memo_ = '')
 				</otherwise>
 			</choose>
+		</if>
 	</select>
 </mapper>