案例新增接口 新加参数model

master
xiaoCJ 5 months ago
parent feac6e293f
commit 87cf7769bc

@ -176,11 +176,12 @@ public class CaseController {
@AnonymousAccess
private ResultEntity<PageInfo<CaseInfo>> getCaseInfoList(@RequestParam Integer index,
@RequestParam Integer size,
@RequestParam(required = false) String schoolId,
@RequestParam(required = false) String model,
@RequestParam(required = false) String schoolId,
@RequestParam(required = false) String keyWord,
@RequestParam(required = false) String type) {
PageHelper.startPage(index, size);
List<CaseInfo> caseInfoList = caseInfoMapper.getCaseInfoList(schoolId, keyWord, type);
List<CaseInfo> caseInfoList = caseInfoMapper.getCaseInfoList(model, schoolId, keyWord, type);
PageInfo pageInfo = new PageInfo(caseInfoList);
return new ResultEntity<PageInfo<CaseInfo>>(pageInfo);
}

@ -2,12 +2,11 @@ package com.sztzjy.money_management.mapper;
import com.sztzjy.money_management.entity.CaseInfo;
import com.sztzjy.money_management.entity.CaseInfoExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface CaseInfoMapper {
long countByExample(CaseInfoExample example);
@ -38,7 +37,8 @@ public interface CaseInfoMapper {
int updateByPrimaryKey(CaseInfo record);
List<CaseInfo> getCaseInfoList(@Param("schoolId") String schoolId,
List<CaseInfo> getCaseInfoList(@Param("model") String model,
@Param("schoolId") String schoolId,
@Param("keyWord") String keyWord,
@Param("type") String type);
}

@ -354,6 +354,9 @@
<if test="schoolId != null and schoolId != ''">
AND source IN ('999999999', #{schoolId})
</if>
<if test="model != null and model != ''">
AND model =#{model}
</if>
<if test="keyWord != null and keyWord != ''">
AND
(customer_name LIKE CONCAT('%', #{keyWord}, '%') OR id_card LIKE CONCAT('%', #{keyWord}, '%'))

Loading…
Cancel
Save