完成sms搜索
This commit is contained in:
parent
861d5f0660
commit
208e21020a
@ -8,9 +8,6 @@ import com.xhpc.general.service.IXhpcAgreementService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 协议管理controller
|
||||
* program: ruoyi
|
||||
@ -60,5 +57,4 @@ public class XhpcAgreementController extends BaseController {
|
||||
return AjaxResult.success(iXhpcAgreementService.selectContent(type));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -29,4 +29,10 @@ public class XhpcSmsController extends BaseController {
|
||||
return xhpcSmsService.getLogonPhoneCode(phone);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/list")
|
||||
public AjaxResult list(Integer status,String phone){
|
||||
|
||||
return xhpcSmsService.getList(status, phone);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,6 +1,10 @@
|
||||
package com.xhpc.general.mapper;
|
||||
|
||||
import com.xhpc.general.domain.XhpcSms;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author yuyang
|
||||
@ -9,4 +13,6 @@ import com.xhpc.general.domain.XhpcSms;
|
||||
public interface XhpcSmsMapper {
|
||||
|
||||
int addXhpcSms(XhpcSms xhpcSms);
|
||||
|
||||
List<Map<String,Object>> getList(@Param("status") int status,@Param("phone")String phone);
|
||||
}
|
||||
|
||||
@ -15,4 +15,6 @@ public interface IXhpcSmsService {
|
||||
* @return
|
||||
*/
|
||||
AjaxResult getLogonPhoneCode(String phone);
|
||||
|
||||
AjaxResult getList(Integer status,String phone);
|
||||
}
|
||||
|
||||
@ -10,9 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Random;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
@ -128,4 +126,15 @@ public class XhpcSmsServiceImpl implements IXhpcSmsService{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getList(Integer status, String phone) {
|
||||
// List<Map<String,Object>> map=xhpcSmsMapper.getList(status,phone);
|
||||
// System.out.println();
|
||||
// System.out.println();
|
||||
// System.out.println(map.toString());
|
||||
// System.out.println();
|
||||
// System.out.println();
|
||||
return AjaxResult.success(xhpcSmsMapper.getList(status,phone));
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
<result property="smsId" column="sms_id"/>
|
||||
<result property="phone" column="phone"/>
|
||||
<result property="code" column="code"/>
|
||||
|
||||
<result property="templateId" column="template_id"/>
|
||||
<result property="accessKey" column="access_key"/>
|
||||
<result property="secretKey" column="secret_key"/>
|
||||
@ -92,4 +93,21 @@
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
<select id="getList" resultType="map">
|
||||
select
|
||||
phone,
|
||||
content,
|
||||
status,
|
||||
create_time
|
||||
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