发卡管理增加状态字段,修改冻结接口
This commit is contained in:
parent
e6561066a3
commit
6fadbb070d
@ -68,7 +68,7 @@ public class XhpcCardClientUserController extends BaseController {
|
||||
* 修改状态
|
||||
*/
|
||||
@GetMapping("/getXhpcCardClientUserStatus")
|
||||
public AjaxResult getXhpcCardClientUserStatus(Integer usersID,Integer status) {
|
||||
public AjaxResult getXhpcCardClientUserStatus(@RequestParam("usersID") Integer usersID,@RequestParam("status") Integer status) {
|
||||
return xhpcCardClientUserService.getXhpcCardClientUserStatus(usersID,status);
|
||||
}
|
||||
|
||||
|
||||
@ -62,4 +62,9 @@ public class CardClientUser {
|
||||
*逻辑删除字段(0,存在,1为删除)
|
||||
*/
|
||||
private Integer delFlag;
|
||||
|
||||
/**
|
||||
* 状态(0-正常,1-冻结)
|
||||
*/
|
||||
private Integer status;
|
||||
}
|
||||
|
||||
@ -65,12 +65,12 @@ public class XhpcCardClientUserServiceImpl extends BaseService implements IXhpcC
|
||||
}
|
||||
if(cardClientUser.getUsersID()==null){
|
||||
Map<String, Object> xhpcCardClientUserById = xhpcCardClientUserMapper.getXhpcCardClientUserById(1,null, cardClientUser.getUsersName());
|
||||
if(xhpcCardClientUserById !=null &&( false ==(boolean)xhpcCardClientUserById.get("delFlag") || "0".equals(xhpcCardClientUserById.get("delFlag").toString()))){
|
||||
if(xhpcCardClientUserById !=null &&"0".equals(xhpcCardClientUserById.get("delFlag").toString())){
|
||||
return AjaxResult.error("用户名称已存在");
|
||||
}
|
||||
}else{
|
||||
Map<String, Object> xhpcCardClientUserById = xhpcCardClientUserMapper.getXhpcCardClientUserById(1,cardClientUser.getUsersID(), cardClientUser.getUsersName());
|
||||
if(xhpcCardClientUserById !=null &&( false ==(boolean)xhpcCardClientUserById.get("delFlag") || "0".equals(xhpcCardClientUserById.get("delFlag").toString()))){
|
||||
if(xhpcCardClientUserById !=null && "0".equals(xhpcCardClientUserById.get("delFlag").toString())){
|
||||
return AjaxResult.error("用户名称已存在");
|
||||
}
|
||||
}
|
||||
@ -136,12 +136,12 @@ public class XhpcCardClientUserServiceImpl extends BaseService implements IXhpcC
|
||||
public AjaxResult getXhpcCardClientUserStatus(Integer usersID, Integer status) {
|
||||
CardClientUser cardClientUser =new CardClientUser();
|
||||
cardClientUser.setUsersID(usersID);
|
||||
cardClientUser.setDelFlag(status);
|
||||
cardClientUser.setStatus(status);
|
||||
int i = xhpcCardClientUserMapper.updateXhpcCardClientUser(cardClientUser);
|
||||
if(i==0){
|
||||
return AjaxResult.error("状态改变失败");
|
||||
}else{
|
||||
return AjaxResult.error("状态改变成功");
|
||||
return AjaxResult.success("状态改变成功");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,10 +14,10 @@ spring:
|
||||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 172.31.183.135:8848
|
||||
server-addr: 127.0.0.1:8848
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 172.31.183.135:8848
|
||||
server-addr: 127.0.0.1:8848
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
||||
@ -26,7 +26,8 @@
|
||||
ope.name as operatorName,
|
||||
ope.corp_no as corpNo,
|
||||
ccu.tenant_id as tenantId,
|
||||
ccu.usersTime as usersTime
|
||||
ccu.usersTime as usersTime,
|
||||
ccu.status as status
|
||||
from t_iccard_client_users ccu
|
||||
join xhpc_operator ope on ope.corp_no = ccu.corpNo
|
||||
where ccu.del_flag=0
|
||||
@ -60,6 +61,9 @@
|
||||
<if test="null != usersPhone and ''!=usersPhone">
|
||||
usersPhone,
|
||||
</if>
|
||||
<if test="usersEmail!= null and usersEmail != ''">
|
||||
usersEmail,
|
||||
</if>
|
||||
<if test="null != usersAdress and ''!=usersAdress">
|
||||
usersAdress,
|
||||
</if>
|
||||
@ -75,7 +79,7 @@
|
||||
<if test="null != corpName and ''!=corpName ">
|
||||
corpName,
|
||||
</if>
|
||||
usersTime,
|
||||
usersTime, status,
|
||||
<if test="null != tenantId and '' != tenantId">
|
||||
tenant_id
|
||||
</if>
|
||||
@ -90,6 +94,9 @@
|
||||
<if test="null != usersPhone and ''!=usersPhone">
|
||||
#{usersPhone},
|
||||
</if>
|
||||
<if test="usersEmail!= null and usersEmail != ''">
|
||||
#{usersEmail},
|
||||
</if>
|
||||
<if test="null != usersAdress and ''!=usersAdress">
|
||||
#{usersAdress},
|
||||
</if>
|
||||
@ -105,7 +112,7 @@
|
||||
<if test="null != corpName and ''!=corpName ">
|
||||
#{corpNameand},
|
||||
</if>
|
||||
sysdate(),
|
||||
sysdate(), 0,
|
||||
<if test="null != tenantId and '' != tenantId">
|
||||
#{tenantId}
|
||||
</if>
|
||||
@ -123,18 +130,19 @@
|
||||
select
|
||||
ccu.usersID as usersID,
|
||||
ccu.usersName as usersName,
|
||||
ccu.usersName as usersPhone,
|
||||
ccu.usersName as usersEmail,
|
||||
ccu.usersName as usersAdress,
|
||||
ccu.usersPwd as usersPwd,
|
||||
ccu.usersPhone as usersPhone,
|
||||
ccu.usersEmail as usersEmail,
|
||||
ccu.usersAdress as usersAdress,
|
||||
ccu.usersLevel as usersLevel,
|
||||
ope.name as operatorName,
|
||||
ope.corp_no as corpNo,
|
||||
ccu.tenant_id as tenantId,
|
||||
ccu.del_flag as delFlag,
|
||||
concat(ccu.del_flag, "") as delFlag,
|
||||
ccu.usersTime as usersTime
|
||||
from t_iccard_client_users ccu
|
||||
join xhpc_operator ope on ope.corp_no = ccu.corpNo
|
||||
where 1=1
|
||||
where ccu.status=0
|
||||
<if test="type==0">
|
||||
<if test="usersID !=null">
|
||||
and ccu.usersID=#{usersID}
|
||||
@ -162,6 +170,9 @@
|
||||
<if test="null != usersPhone and ''!=usersPhone">
|
||||
usersPhone= #{usersPhone},
|
||||
</if>
|
||||
<if test="usersEmail!= null and usersEmail != ''">
|
||||
usersEmail = #{usersEmail},
|
||||
</if>
|
||||
<if test="null != usersAdress and ''!=usersAdress">
|
||||
usersAdress=#{usersAdress},
|
||||
</if>
|
||||
@ -180,6 +191,9 @@
|
||||
<if test="null != usersTime">
|
||||
usersTime=#{usersTime},
|
||||
</if>
|
||||
<if test="null != status">
|
||||
status=#{status},
|
||||
</if>
|
||||
<if test="null != tenantId and '' != tenantId">
|
||||
tenant_id= #{tenantId}
|
||||
</if>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user