完成sms搜索
This commit is contained in:
parent
9d0fd4c142
commit
ce9088df99
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user