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