修改PC短信端列表
This commit is contained in:
parent
af0b78f4a6
commit
9d0fd4c142
@ -2,6 +2,7 @@ package com.xhpc.general.controller;
|
|||||||
|
|
||||||
import com.xhpc.common.core.web.controller.BaseController;
|
import com.xhpc.common.core.web.controller.BaseController;
|
||||||
import com.xhpc.common.core.web.domain.AjaxResult;
|
import com.xhpc.common.core.web.domain.AjaxResult;
|
||||||
|
import com.xhpc.common.core.web.page.TableDataInfo;
|
||||||
import com.xhpc.general.service.IXhpcSmsService;
|
import com.xhpc.general.service.IXhpcSmsService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
@ -9,6 +10,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author yuyang
|
* @author yuyang
|
||||||
* @date 2021/8/1 23:42
|
* @date 2021/8/1 23:42
|
||||||
@ -29,10 +33,11 @@ public class XhpcSmsController extends BaseController {
|
|||||||
return xhpcSmsService.getLogonPhoneCode(phone);
|
return xhpcSmsService.getLogonPhoneCode(phone);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping(value = "/list")
|
@GetMapping(value = "/getList")
|
||||||
public AjaxResult list(Integer status,String phone){
|
public TableDataInfo getList(Integer status, String phone){
|
||||||
|
startPage();
|
||||||
return xhpcSmsService.getList(status, phone);
|
List<Map<String, Object>> list = xhpcSmsService.getList();
|
||||||
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,5 +14,6 @@ public interface XhpcSmsMapper {
|
|||||||
|
|
||||||
int addXhpcSms(XhpcSms xhpcSms);
|
int addXhpcSms(XhpcSms xhpcSms);
|
||||||
|
|
||||||
List<Map<String,Object>> getList(@Param("status") int status,@Param("phone")String phone);
|
|
||||||
|
List<Map<String,Object>> getList();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,9 @@ package com.xhpc.general.service;
|
|||||||
|
|
||||||
import com.xhpc.common.core.web.domain.AjaxResult;
|
import com.xhpc.common.core.web.domain.AjaxResult;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author yuyang
|
* @author yuyang
|
||||||
* @date 2021/7/30 18:45
|
* @date 2021/7/30 18:45
|
||||||
@ -16,5 +19,5 @@ public interface IXhpcSmsService {
|
|||||||
*/
|
*/
|
||||||
AjaxResult getLogonPhoneCode(String phone);
|
AjaxResult getLogonPhoneCode(String phone);
|
||||||
|
|
||||||
AjaxResult getList(Integer status,String phone);
|
List<Map<String, Object>> getList();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -93,6 +93,12 @@ public class XhpcSmsServiceImpl implements IXhpcSmsService{
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Map<String, Object>> getList() {
|
||||||
|
return xhpcSmsMapper.getList();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
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<>();
|
HashMap<String, String> params = new HashMap<>();
|
||||||
params.put("account", ACCOUNT);
|
params.put("account", ACCOUNT);
|
||||||
@ -127,14 +133,5 @@ 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,7 +8,6 @@
|
|||||||
<result property="smsId" column="sms_id"/>
|
<result property="smsId" column="sms_id"/>
|
||||||
<result property="phone" column="phone"/>
|
<result property="phone" column="phone"/>
|
||||||
<result property="code" column="code"/>
|
<result property="code" column="code"/>
|
||||||
|
|
||||||
<result property="templateId" column="template_id"/>
|
<result property="templateId" column="template_id"/>
|
||||||
<result property="accessKey" column="access_key"/>
|
<result property="accessKey" column="access_key"/>
|
||||||
<result property="secretKey" column="secret_key"/>
|
<result property="secretKey" column="secret_key"/>
|
||||||
@ -94,20 +93,10 @@
|
|||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
<select id="getList" resultType="map">
|
<select id="getList" resultType="map">
|
||||||
select
|
select
|
||||||
phone,
|
*
|
||||||
content,
|
|
||||||
status,
|
|
||||||
create_time
|
|
||||||
from xhpc_sms
|
from xhpc_sms
|
||||||
where del_flag=0
|
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>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user