完成sms搜索

This commit is contained in:
little-cat-sweet 2021-08-04 16:03:31 +08:00
parent 9d0fd4c142
commit ce9088df99
5 changed files with 17 additions and 8 deletions

View File

@ -36,7 +36,7 @@ public class XhpcSmsController extends BaseController {
@GetMapping(value = "/getList")
public TableDataInfo getList(Integer status, String phone){
startPage();
List<Map<String, Object>> list = xhpcSmsService.getList();
List<Map<String, Object>> list = xhpcSmsService.getList(status, phone);
return getDataTable(list);
}

View File

@ -15,5 +15,5 @@ public interface XhpcSmsMapper {
int addXhpcSms(XhpcSms xhpcSms);
List<Map<String,Object>> getList();
List<Map<String,Object>> getList(@Param("status") Integer status,@Param("phone") String phone);
}

View File

@ -19,5 +19,5 @@ public interface IXhpcSmsService {
*/
AjaxResult getLogonPhoneCode(String phone);
List<Map<String, Object>> getList();
List<Map<String, Object>> getList(Integer status,String phone);
}

View File

@ -94,12 +94,12 @@ public class XhpcSmsServiceImpl implements IXhpcSmsService{
}
@Override
public List<Map<String, Object>> getList() {
return xhpcSmsMapper.getList();
public List<Map<String, Object>> getList(Integer status, String phone) {
return xhpcSmsMapper.getList(status,phone);
}
private static HashMap<String, String> assembleSmsReq(String phone,String content) {
private static HashMap<String, String> assembleSmsReq(String phone, String content) {
HashMap<String, String> params = new HashMap<>();
params.put("account", ACCOUNT);
params.put("password", PASSWD);

View File

@ -95,8 +95,17 @@
<select id="getList" resultType="map">
select
*
phone,
content,
status,
create_time as createTime
from xhpc_sms
where del_flag=0
<if test="null!=status">
and status=#{status}
</if>
<if test="null!=phone and ''!=phone">
and phone like concat('%',#{phone},'%')
</if>
</select>
</mapper>