修复tradebill服务无法启动问题,
修复卡查询用户接口,增加模糊查询与绑定过滤
This commit is contained in:
parent
21c5754d06
commit
70f3c8b6f4
@ -2,6 +2,7 @@ package com.xhpc.card.mapper;
|
|||||||
|
|
||||||
import com.xhpc.card.domain.SearchCardUserQueryCondition;
|
import com.xhpc.card.domain.SearchCardUserQueryCondition;
|
||||||
import com.xhpc.card.pojo.XhpcAppUser;
|
import com.xhpc.card.pojo.XhpcAppUser;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -26,7 +27,7 @@ public interface XhpcAppUserMapper {
|
|||||||
* @date 2022/1/28 16:30
|
* @date 2022/1/28 16:30
|
||||||
* @since version-1.0
|
* @since version-1.0
|
||||||
*/
|
*/
|
||||||
Long selectCount(SearchCardUserQueryCondition queryCondition);
|
Long selectCount(@Param("queryCondition") SearchCardUserQueryCondition queryCondition, @Param("userIdList") List<Integer> userIdList);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据条件查询记录
|
* 根据条件查询记录
|
||||||
@ -35,7 +36,7 @@ public interface XhpcAppUserMapper {
|
|||||||
* @date 2022/1/28 16:29
|
* @date 2022/1/28 16:29
|
||||||
* @since version-1.0
|
* @since version-1.0
|
||||||
*/
|
*/
|
||||||
List<XhpcAppUser> selectByCondition(SearchCardUserQueryCondition queryCondition);
|
List<XhpcAppUser> selectByCondition(@Param("queryCondition") SearchCardUserQueryCondition queryCondition, @Param("userIdList") List<Integer> userIdList);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据手机号查找C端用户充值记录
|
* 根据手机号查找C端用户充值记录
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import com.xhpc.card.pojo.XhpcIcCardInfo;
|
|||||||
import com.xhpc.common.domain.IccardInfo;
|
import com.xhpc.common.domain.IccardInfo;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
public interface XhpcCardMapper {
|
public interface XhpcCardMapper {
|
||||||
@ -42,4 +43,13 @@ public interface XhpcCardMapper {
|
|||||||
*/
|
*/
|
||||||
Map<String, Object> selectByAccount(@Param("userAccount") String userAccount, @Param("userType") Integer userType);
|
Map<String, Object> selectByAccount(@Param("userAccount") String userAccount, @Param("userType") Integer userType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询出指定类型的用户
|
||||||
|
*
|
||||||
|
* @author WH
|
||||||
|
* @date 2022/3/1 17:53
|
||||||
|
* @since version-1.0
|
||||||
|
*/
|
||||||
|
List<Integer> selectUserIdsByUserType(Integer userType);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -36,7 +36,7 @@ public interface XhpcCommunityPersonnelMapper {
|
|||||||
* @date 2022/2/8 10:44
|
* @date 2022/2/8 10:44
|
||||||
* @since version-1.0
|
* @since version-1.0
|
||||||
*/
|
*/
|
||||||
List<XhpcCommunityPersonnel> selectByCondition(SearchCardUserQueryCondition queryCondition);
|
List<XhpcCommunityPersonnel> selectByCondition(@Param("queryCondition") SearchCardUserQueryCondition queryCondition, @Param("userIdList") List<Integer> userIdList);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据分页条件,查询出符合条件记录的总条数
|
* 根据分页条件,查询出符合条件记录的总条数
|
||||||
@ -45,7 +45,7 @@ public interface XhpcCommunityPersonnelMapper {
|
|||||||
* @date 2022/2/8 10:51
|
* @date 2022/2/8 10:51
|
||||||
* @since version-1.0
|
* @since version-1.0
|
||||||
*/
|
*/
|
||||||
Long selectCount(SearchCardUserQueryCondition queryCondition);
|
Long selectCount(@Param("queryCondition") SearchCardUserQueryCondition queryCondition, @Param("userIdList") List<Integer> usrIdList);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据运营商id、分页条件、查询符合的记录
|
* 根据运营商id、分页条件、查询符合的记录
|
||||||
@ -53,7 +53,7 @@ public interface XhpcCommunityPersonnelMapper {
|
|||||||
* @param operatorId 运营商id
|
* @param operatorId 运营商id
|
||||||
* @return 符合条件的所有记录
|
* @return 符合条件的所有记录
|
||||||
*/
|
*/
|
||||||
List<XhpcCommunityPersonnel> selectByOperatorId(@Param("operatorId") Long operatorId, @Param("currentPage") Long currentPage, @Param("items") Long items);
|
List<XhpcCommunityPersonnel> selectByOperatorId(@Param("operatorId") Long operatorId, @Param("currentPage") Long currentPage, @Param("items") Long items, @Param("userIdList") List<Integer> userIdList);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据运营商id、分页条件、查询符合的记录的个数
|
* 根据运营商id、分页条件、查询符合的记录的个数
|
||||||
@ -61,7 +61,7 @@ public interface XhpcCommunityPersonnelMapper {
|
|||||||
* @param operatorId 运营商id
|
* @param operatorId 运营商id
|
||||||
* @return 符合条件个数
|
* @return 符合条件个数
|
||||||
*/
|
*/
|
||||||
Long selectCountByOperatorId(@Param("operatorId") Long operatorId);
|
Long selectCountByOperatorId(@Param("operatorId") Long operatorId, @Param("userIdList") List<Integer> userIdList);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* query record by userAccount
|
* query record by userAccount
|
||||||
|
|||||||
@ -36,7 +36,7 @@ public interface XhpcCustomersPersonnelMapper {
|
|||||||
* @date 2022/2/8 14:39
|
* @date 2022/2/8 14:39
|
||||||
* @since version-1.0
|
* @since version-1.0
|
||||||
*/
|
*/
|
||||||
List<XhpcCustomersPersonnel> selectByCondition(SearchCardUserQueryCondition queryCondition);
|
List<XhpcCustomersPersonnel> selectByCondition(@Param("queryCondition") SearchCardUserQueryCondition queryCondition, @Param("userIdList") List<Integer> userIdList);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据条件查询所有记录个数
|
* 根据条件查询所有记录个数
|
||||||
@ -45,7 +45,7 @@ public interface XhpcCustomersPersonnelMapper {
|
|||||||
* @date 2022/2/8 14:43
|
* @date 2022/2/8 14:43
|
||||||
* @since version-1.0
|
* @since version-1.0
|
||||||
*/
|
*/
|
||||||
Long selectCount(SearchCardUserQueryCondition queryCondition);
|
Long selectCount(@Param("queryCondition") SearchCardUserQueryCondition queryCondition, @Param("userIdList") List<Integer> userIdList);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据运营商id、分页条件、查询对应的记录
|
* 根据运营商id、分页条件、查询对应的记录
|
||||||
@ -55,7 +55,7 @@ public interface XhpcCustomersPersonnelMapper {
|
|||||||
* @param items 当前要显示的条数
|
* @param items 当前要显示的条数
|
||||||
* @return 对应的记录
|
* @return 对应的记录
|
||||||
*/
|
*/
|
||||||
List<XhpcCustomersPersonnel> selectByOperatorId(@Param("operatorId") Long operatorId, @Param("currentPage") Long currentPage, @Param("items") Long items);
|
List<XhpcCustomersPersonnel> selectByOperatorId(@Param("operatorId") Long operatorId, @Param("currentPage") Long currentPage, @Param("items") Long items, @Param("userIdList") List<Integer> userIdList);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据运营商id,查询符合条件的总条数
|
* 根据运营商id,查询符合条件的总条数
|
||||||
@ -63,7 +63,7 @@ public interface XhpcCustomersPersonnelMapper {
|
|||||||
* @param operatorId
|
* @param operatorId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Long selectCountByOperatorId(Long operatorId);
|
Long selectCountByOperatorId(@Param("operatorId") Long operatorId, @Param("userIdList") List<Integer> userIdList);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* query record by user account
|
* query record by user account
|
||||||
|
|||||||
@ -193,6 +193,10 @@ public class XhpcCardServiceImpl implements IXhpcCardService {
|
|||||||
if (dataDTO.getClassification() == 0) {
|
if (dataDTO.getClassification() == 0) {
|
||||||
//离线用户类型为10
|
//离线用户类型为10
|
||||||
dataDTO.setUserType(10L);
|
dataDTO.setUserType(10L);
|
||||||
|
int userIndex = (int) data.get("userIndex");
|
||||||
|
TIccardUsers tIccardUser = tIccardUsersMapper.selectByPrimaryKey(userIndex);
|
||||||
|
String phone = tIccardUser.getPhone();
|
||||||
|
dataDTO.setUserAccount(phone);
|
||||||
} else {
|
} else {
|
||||||
dataDTO.setUserType((Long) data.get("user_type"));
|
dataDTO.setUserType((Long) data.get("user_type"));
|
||||||
}
|
}
|
||||||
@ -247,8 +251,9 @@ public class XhpcCardServiceImpl implements IXhpcCardService {
|
|||||||
//(0 C端用户 2社区用户 3 B端用户)
|
//(0 C端用户 2社区用户 3 B端用户)
|
||||||
switch (queryCondition.getUserType()) {
|
switch (queryCondition.getUserType()) {
|
||||||
case 0:
|
case 0:
|
||||||
List<XhpcAppUser> appUserList = xhpcAppUserMapper.selectByCondition(queryCondition);
|
List<Integer> userIdList = xhpcCardMapper.selectUserIdsByUserType(queryCondition.getUserType());
|
||||||
Long allCount = xhpcAppUserMapper.selectCount(queryCondition);
|
List<XhpcAppUser> appUserList = xhpcAppUserMapper.selectByCondition(queryCondition, userIdList);
|
||||||
|
Long allCount = xhpcAppUserMapper.selectCount(queryCondition, userIdList);
|
||||||
searchCardResponse.setTotalItems(allCount);
|
searchCardResponse.setTotalItems(allCount);
|
||||||
for (XhpcAppUser xhpcAppUser : appUserList) {
|
for (XhpcAppUser xhpcAppUser : appUserList) {
|
||||||
SearchCardResponse.DataDTO dataDTO = new SearchCardResponse.DataDTO();
|
SearchCardResponse.DataDTO dataDTO = new SearchCardResponse.DataDTO();
|
||||||
@ -256,10 +261,11 @@ public class XhpcCardServiceImpl implements IXhpcCardService {
|
|||||||
dataDTO.setUserType(0);
|
dataDTO.setUserType(0);
|
||||||
searchCardResponse.getData().add(dataDTO);
|
searchCardResponse.getData().add(dataDTO);
|
||||||
}
|
}
|
||||||
break;
|
return R.ok(searchCardResponse);
|
||||||
case 2:
|
case 2:
|
||||||
List<XhpcCommunityPersonnel> xhpcCommunityPersonnelList = xhpcCommunityPersonnelMapper.selectByCondition(queryCondition);
|
List<Integer> userIdList1 = xhpcCardMapper.selectUserIdsByUserType(queryCondition.getUserType());
|
||||||
Long allCount1 = xhpcCommunityPersonnelMapper.selectCount(queryCondition);
|
List<XhpcCommunityPersonnel> xhpcCommunityPersonnelList = xhpcCommunityPersonnelMapper.selectByCondition(queryCondition, userIdList1);
|
||||||
|
Long allCount1 = xhpcCommunityPersonnelMapper.selectCount(queryCondition, userIdList1);
|
||||||
searchCardResponse.setTotalItems(allCount1);
|
searchCardResponse.setTotalItems(allCount1);
|
||||||
for (XhpcCommunityPersonnel xhpcCommunityPersonnel : xhpcCommunityPersonnelList) {
|
for (XhpcCommunityPersonnel xhpcCommunityPersonnel : xhpcCommunityPersonnelList) {
|
||||||
SearchCardResponse.DataDTO dataDTO = new SearchCardResponse.DataDTO();
|
SearchCardResponse.DataDTO dataDTO = new SearchCardResponse.DataDTO();
|
||||||
@ -267,10 +273,11 @@ public class XhpcCardServiceImpl implements IXhpcCardService {
|
|||||||
dataDTO.setUserType(2);
|
dataDTO.setUserType(2);
|
||||||
searchCardResponse.getData().add(dataDTO);
|
searchCardResponse.getData().add(dataDTO);
|
||||||
}
|
}
|
||||||
break;
|
return R.ok(searchCardResponse);
|
||||||
case 3:
|
case 3:
|
||||||
List<XhpcCustomersPersonnel> xhpcCustomersPersonnelList = xhpcCustomersPersonnelMapper.selectByCondition(queryCondition);
|
List<Integer> userIdList2 = xhpcCardMapper.selectUserIdsByUserType(queryCondition.getUserType());
|
||||||
Long allCount2 = xhpcCustomersPersonnelMapper.selectCount(queryCondition);
|
List<XhpcCustomersPersonnel> xhpcCustomersPersonnelList = xhpcCustomersPersonnelMapper.selectByCondition(queryCondition, userIdList2);
|
||||||
|
Long allCount2 = xhpcCustomersPersonnelMapper.selectCount(queryCondition, userIdList2);
|
||||||
searchCardResponse.setTotalItems(allCount2);
|
searchCardResponse.setTotalItems(allCount2);
|
||||||
for (XhpcCustomersPersonnel xhpcCustomersPersonnel : xhpcCustomersPersonnelList) {
|
for (XhpcCustomersPersonnel xhpcCustomersPersonnel : xhpcCustomersPersonnelList) {
|
||||||
SearchCardResponse.DataDTO dataDTO = new SearchCardResponse.DataDTO();
|
SearchCardResponse.DataDTO dataDTO = new SearchCardResponse.DataDTO();
|
||||||
@ -278,7 +285,7 @@ public class XhpcCardServiceImpl implements IXhpcCardService {
|
|||||||
dataDTO.setUserType(3);
|
dataDTO.setUserType(3);
|
||||||
searchCardResponse.getData().add(dataDTO);
|
searchCardResponse.getData().add(dataDTO);
|
||||||
}
|
}
|
||||||
break;
|
return R.ok(searchCardResponse);
|
||||||
default:
|
default:
|
||||||
return R.fail("没有此用户类型");
|
return R.fail("没有此用户类型");
|
||||||
}
|
}
|
||||||
@ -291,8 +298,9 @@ public class XhpcCardServiceImpl implements IXhpcCardService {
|
|||||||
//2社区用户 3 B端用户)
|
//2社区用户 3 B端用户)
|
||||||
switch (queryCondition.getUserType()) {
|
switch (queryCondition.getUserType()) {
|
||||||
case 2:
|
case 2:
|
||||||
List<XhpcCommunityPersonnel> xhpcCommunityPersonnelList = xhpcCommunityPersonnelMapper.selectByOperatorId(operatorId, queryCondition.getCurrentPage(), queryCondition.getItems());
|
List<Integer> userIdList = xhpcCardMapper.selectUserIdsByUserType(queryCondition.getUserType());
|
||||||
Long allCount1 = xhpcCommunityPersonnelMapper.selectCountByOperatorId(operatorId);
|
List<XhpcCommunityPersonnel> xhpcCommunityPersonnelList = xhpcCommunityPersonnelMapper.selectByOperatorId(operatorId, queryCondition.getCurrentPage(), queryCondition.getItems(), userIdList);
|
||||||
|
Long allCount1 = xhpcCommunityPersonnelMapper.selectCountByOperatorId(operatorId, userIdList);
|
||||||
searchCardResponse.setTotalItems(allCount1);
|
searchCardResponse.setTotalItems(allCount1);
|
||||||
for (XhpcCommunityPersonnel xhpcCommunityPersonnel : xhpcCommunityPersonnelList) {
|
for (XhpcCommunityPersonnel xhpcCommunityPersonnel : xhpcCommunityPersonnelList) {
|
||||||
SearchCardResponse.DataDTO dataDTO = new SearchCardResponse.DataDTO();
|
SearchCardResponse.DataDTO dataDTO = new SearchCardResponse.DataDTO();
|
||||||
@ -300,10 +308,11 @@ public class XhpcCardServiceImpl implements IXhpcCardService {
|
|||||||
dataDTO.setUserType(2);
|
dataDTO.setUserType(2);
|
||||||
searchCardResponse.getData().add(dataDTO);
|
searchCardResponse.getData().add(dataDTO);
|
||||||
}
|
}
|
||||||
break;
|
return R.ok(searchCardResponse);
|
||||||
case 3:
|
case 3:
|
||||||
List<XhpcCustomersPersonnel> xhpcCustomersPersonnelList = xhpcCustomersPersonnelMapper.selectByOperatorId(operatorId, queryCondition.getCurrentPage(), queryCondition.getItems());
|
List<Integer> userIdList2 = xhpcCardMapper.selectUserIdsByUserType(queryCondition.getUserType());
|
||||||
Long allCount2 = xhpcCustomersPersonnelMapper.selectCountByOperatorId(operatorId);
|
List<XhpcCustomersPersonnel> xhpcCustomersPersonnelList = xhpcCustomersPersonnelMapper.selectByOperatorId(operatorId, queryCondition.getCurrentPage(), queryCondition.getItems(), userIdList2);
|
||||||
|
Long allCount2 = xhpcCustomersPersonnelMapper.selectCountByOperatorId(operatorId, userIdList2);
|
||||||
searchCardResponse.setTotalItems(allCount2);
|
searchCardResponse.setTotalItems(allCount2);
|
||||||
for (XhpcCustomersPersonnel xhpcCustomersPersonnel : xhpcCustomersPersonnelList) {
|
for (XhpcCustomersPersonnel xhpcCustomersPersonnel : xhpcCustomersPersonnelList) {
|
||||||
SearchCardResponse.DataDTO dataDTO = new SearchCardResponse.DataDTO();
|
SearchCardResponse.DataDTO dataDTO = new SearchCardResponse.DataDTO();
|
||||||
@ -311,7 +320,7 @@ public class XhpcCardServiceImpl implements IXhpcCardService {
|
|||||||
dataDTO.setUserType(3);
|
dataDTO.setUserType(3);
|
||||||
searchCardResponse.getData().add(dataDTO);
|
searchCardResponse.getData().add(dataDTO);
|
||||||
}
|
}
|
||||||
break;
|
return R.ok(searchCardResponse);
|
||||||
default:
|
default:
|
||||||
return R.fail("没有此用户类型");
|
return R.fail("没有此用户类型");
|
||||||
}
|
}
|
||||||
@ -328,14 +337,40 @@ public class XhpcCardServiceImpl implements IXhpcCardService {
|
|||||||
}
|
}
|
||||||
//build an association
|
//build an association
|
||||||
XhpcIcCardInfo xhpcIcCardInfo = new XhpcIcCardInfo();
|
XhpcIcCardInfo xhpcIcCardInfo = new XhpcIcCardInfo();
|
||||||
|
SysUser sysUser = tokenService.getLoginUser().getSysUser();
|
||||||
|
String tenantId = sysUser.getTenantId();
|
||||||
|
xhpcIcCardInfo.setTenantId(tenantId);
|
||||||
|
//获取指定用户类型的id
|
||||||
|
switch (bindCardInfo.getUserType()) {
|
||||||
|
case 0:
|
||||||
|
XhpcAppUser xhpcAppUser = xhpcAppUserMapper.selectByPhone(bindCardInfo.getUserAccount());
|
||||||
|
Long appUserId = xhpcAppUser.getAppUserId();
|
||||||
|
xhpcIcCardInfo.setUserId(appUserId);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
XhpcCommunityPersonnel xhpcCommunityPersonnel = xhpcCommunityPersonnelMapper.selectByAccount(bindCardInfo.getUserAccount());
|
||||||
|
Long communityPersonnelId = xhpcCommunityPersonnel.getCommunityPersonnelId();
|
||||||
|
xhpcIcCardInfo.setUserId(communityPersonnelId);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
XhpcCustomersPersonnel xhpcCustomersPersonnel = xhpcCustomersPersonnelMapper.selectByAccount(bindCardInfo.getUserAccount());
|
||||||
|
Long customersId = xhpcCustomersPersonnel.getCustomersId();
|
||||||
|
xhpcCustomersPersonnel.setCustomersId(customersId);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return R.fail("没有此用户类型");
|
||||||
|
}
|
||||||
xhpcIcCardInfo.setTIccardInfoId(String.valueOf(bindCardInfo.getCardRecordId()));
|
xhpcIcCardInfo.setTIccardInfoId(String.valueOf(bindCardInfo.getCardRecordId()));
|
||||||
xhpcIcCardInfo.setUseStatus(1L);
|
xhpcIcCardInfo.setUseStatus(1L);
|
||||||
xhpcIcCardInfo.setCreateTime(new Date());
|
xhpcIcCardInfo.setCreateTime(new Date());
|
||||||
TIccardInfo tIccardInfo = tIccardInfoMapper.selectByPrimaryKey(bindCardInfo.getCardRecordId());
|
|
||||||
xhpcIcCardInfo.setUserId(Long.valueOf(tIccardInfo.getUserindex()));
|
|
||||||
xhpcIcCardInfo.setUserAccount(bindCardInfo.getUserAccount());
|
xhpcIcCardInfo.setUserAccount(bindCardInfo.getUserAccount());
|
||||||
xhpcIcCardInfo.setUserType(bindCardInfo.getUserType());
|
xhpcIcCardInfo.setUserType(bindCardInfo.getUserType());
|
||||||
|
TIccardInfo tIccardInfo = new TIccardInfo();
|
||||||
|
tIccardInfo.setId(bindCardInfo.getCardRecordId());
|
||||||
|
tIccardInfo.setStatus(1);
|
||||||
|
tIccardInfoMapper.updateByPrimaryKeySelective(tIccardInfo);
|
||||||
xhpcCardMapper.insertSelective(xhpcIcCardInfo);
|
xhpcCardMapper.insertSelective(xhpcIcCardInfo);
|
||||||
|
//todo 增加绑定日志
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -615,6 +650,7 @@ public class XhpcCardServiceImpl implements IXhpcCardService {
|
|||||||
//1.find card record according card id
|
//1.find card record according card id
|
||||||
//2.完成联网卡表的状态改变
|
//2.完成联网卡表的状态改变
|
||||||
//3.完成朱老师那边的卡表状态改变
|
//3.完成朱老师那边的卡表状态改变
|
||||||
|
//4.释放关联用户
|
||||||
//4.写日志到log表中
|
//4.写日志到log表中
|
||||||
XhpcIcCardInfo xhpcIcCardInfo = xhpcCardMapper.selectBytCardId(String.valueOf(cardRecordId));
|
XhpcIcCardInfo xhpcIcCardInfo = xhpcCardMapper.selectBytCardId(String.valueOf(cardRecordId));
|
||||||
if (xhpcIcCardInfo.getDelFlag() == 1) {
|
if (xhpcIcCardInfo.getDelFlag() == 1) {
|
||||||
|
|||||||
@ -94,6 +94,7 @@
|
|||||||
</if>
|
</if>
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
order by t_card.id desc
|
||||||
limit #{currentPage},#{items}
|
limit #{currentPage},#{items}
|
||||||
</select>
|
</select>
|
||||||
<select id="selectTotalCountBy" resultType="java.lang.Long">
|
<select id="selectTotalCountBy" resultType="java.lang.Long">
|
||||||
|
|||||||
@ -41,8 +41,14 @@
|
|||||||
select count(app_user_id)
|
select count(app_user_id)
|
||||||
from xhpc_app_user
|
from xhpc_app_user
|
||||||
<where>
|
<where>
|
||||||
<if test="userAccount!=null and userAccount!='' ">
|
<if test="queryCondition.userAccount!=null and queryCondition.userAccount!='' ">
|
||||||
and phone = #{userAccount}
|
and phone like concat('%',#{queryCondition.userAccount},'%')
|
||||||
|
</if>
|
||||||
|
<if test="userIdList!=null and userIdList.size()!=0">
|
||||||
|
and app_user_id not in
|
||||||
|
<foreach collection="userIdList" item="userId" open="(" close=")" separator=",">
|
||||||
|
#{userId}
|
||||||
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
@ -51,11 +57,17 @@
|
|||||||
<include refid="Base_Column_List"/>
|
<include refid="Base_Column_List"/>
|
||||||
from xhpc_app_user
|
from xhpc_app_user
|
||||||
<where>
|
<where>
|
||||||
<if test="userAccount!=null and userAccount!='' ">
|
<if test="queryCondition.userAccount!=null and queryCondition.userAccount!='' ">
|
||||||
and phone = #{userAccount}
|
and phone like concat('%',#{queryCondition.userAccount},'%')
|
||||||
|
</if>
|
||||||
|
<if test="userIdList!=null and userIdList.size()!=0">
|
||||||
|
and app_user_id not in
|
||||||
|
<foreach collection="userIdList" item="userId" open="(" close=")" separator=",">
|
||||||
|
#{userId}
|
||||||
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
limit #{currentPage},#{items}
|
limit #{queryCondition.currentPage},#{queryCondition.items}
|
||||||
</select>
|
</select>
|
||||||
<select id="selectByPhone" resultMap="BaseResultMap">
|
<select id="selectByPhone" resultMap="BaseResultMap">
|
||||||
select
|
select
|
||||||
|
|||||||
@ -233,4 +233,10 @@
|
|||||||
WHERE o.user_account = #{userAccount}
|
WHERE o.user_account = #{userAccount}
|
||||||
AND o.user_type = #{userType}
|
AND o.user_type = #{userType}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectUserIdsByUserType" resultType="java.lang.Integer">
|
||||||
|
SELECT user_id
|
||||||
|
FROM xhpc_ic_card_info
|
||||||
|
WHERE user_type = #{userType}
|
||||||
|
and del_flag = 0
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@ -54,18 +54,30 @@
|
|||||||
<include refid="Base_Column_List"/>
|
<include refid="Base_Column_List"/>
|
||||||
from xhpc_community_personnel
|
from xhpc_community_personnel
|
||||||
<where>
|
<where>
|
||||||
<if test="userAccount!=null and userAccount!='' ">
|
<if test="queryCondition.userAccount!=null and queryCondition.userAccount!='' ">
|
||||||
and account = #{userAccount}
|
and account like concat('%',#{queryCondition.userAccount},'%')
|
||||||
|
</if>
|
||||||
|
<if test="userIdList!=null and userIdList.size()!=0">
|
||||||
|
and communitiy_personnel_id not in
|
||||||
|
<foreach collection="userIdList" item="userId" open="(" close=")" separator=",">
|
||||||
|
#{userId}
|
||||||
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
limit #{currentPage},#{items}
|
limit #{queryCondition.currentPage},#{queryCondition.items}
|
||||||
</select>
|
</select>
|
||||||
<select id="selectCount" resultType="java.lang.Long">
|
<select id="selectCount" resultType="java.lang.Long">
|
||||||
select count(community_personnel_id)
|
select count(community_personnel_id)
|
||||||
from xhpc_community_personnel
|
from xhpc_community_personnel
|
||||||
<where>
|
<where>
|
||||||
<if test="userAccount!=null and userAccount!='' ">
|
<if test="queryCondition.userAccount!=null and queryCondition.userAccount!='' ">
|
||||||
and account = #{userAccount}
|
and account like concat('%',#{queryCondition.userAccount},'%')
|
||||||
|
</if>
|
||||||
|
<if test="userIdList!=null and userIdList.size()!=0">
|
||||||
|
and communitiy_personnel_id not in
|
||||||
|
<foreach collection="userIdList" item="userId" open="(" close=")" separator=",">
|
||||||
|
#{userId}
|
||||||
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
@ -73,14 +85,27 @@
|
|||||||
select
|
select
|
||||||
<include refid="Base_Column_List"/>
|
<include refid="Base_Column_List"/>
|
||||||
from xhpc_community_personnel
|
from xhpc_community_personnel
|
||||||
where create_type = 2 and create_id = #{operatorId}
|
where create_type = 2
|
||||||
|
and create_id = #{operatorId}
|
||||||
|
<if test="userIdList!=null and userIdList.size()!=0">
|
||||||
|
and community_personnel_id not in
|
||||||
|
<foreach collection="userIdList" item="userId" open="(" close=")" separator=",">
|
||||||
|
#{userId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
limit #{currentPage},#{items}
|
limit #{currentPage},#{items}
|
||||||
</select>
|
</select>
|
||||||
<select id="selectCountByOperatorId" resultType="java.lang.Long">
|
<select id="selectCountByOperatorId" resultType="java.lang.Long">
|
||||||
select count(community_personnel_id)
|
select count(community_personnel_id)
|
||||||
from xhpc_community_personnel
|
from xhpc_community_personnel
|
||||||
where create_type = 2
|
where create_type = 2
|
||||||
and create_id = #{operatorId}
|
and create_id = #{operatorId}
|
||||||
|
<if test="userIdList!=null and userIdList.size()!=0">
|
||||||
|
and community_personnel_id not in
|
||||||
|
<foreach collection="userIdList" item="userId" open="(" close=")" separator=",">
|
||||||
|
#{userId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
<select id="selectByAccount" resultMap="BaseResultMap">
|
<select id="selectByAccount" resultMap="BaseResultMap">
|
||||||
select
|
select
|
||||||
|
|||||||
@ -54,18 +54,30 @@
|
|||||||
<include refid="Base_Column_List"/>
|
<include refid="Base_Column_List"/>
|
||||||
from xhpc_customers_personnel
|
from xhpc_customers_personnel
|
||||||
<where>
|
<where>
|
||||||
<if test="userAccount!=null and userAccount!='' ">
|
<if test="queryCondition.userAccount!=null and queryCondition.userAccount!='' ">
|
||||||
and account = #{userAccount}
|
and account like concat('%',#{queryCondition.userAccount},'%')
|
||||||
|
</if>
|
||||||
|
<if test="userIdList!=null and userIdList.size()!=0">
|
||||||
|
and customers_personnel_id not in
|
||||||
|
<foreach collection="userIdList" item="userId" open="(" close=")" separator=",">
|
||||||
|
#{userId}
|
||||||
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
limit #{currentPage},#{items}
|
limit #{queryCondition.currentPage},#{queryCondition.items}
|
||||||
</select>
|
</select>
|
||||||
<select id="selectCount" resultType="java.lang.Long">
|
<select id="selectCount" resultType="java.lang.Long">
|
||||||
select count(customers_personnel_id)
|
select count(customers_personnel_id)
|
||||||
from xhpc_customers_personnel
|
from xhpc_customers_personnel
|
||||||
<where>
|
<where>
|
||||||
<if test="userAccount!=null and userAccount!='' ">
|
<if test="queryCondition.userAccount!=null and queryCondition.userAccount!='' ">
|
||||||
and account = #{userAccount}
|
and account like concat('%',#{queryCondition.userAccount},'%')
|
||||||
|
</if>
|
||||||
|
<if test="userIdList!=null and userIdList.size()!=0">
|
||||||
|
and customers_personnel_id not in
|
||||||
|
<foreach collection="userIdList" item="userId" open="(" close=")" separator=",">
|
||||||
|
#{userId}
|
||||||
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
@ -74,13 +86,25 @@
|
|||||||
<include refid="Base_Column_List"/>
|
<include refid="Base_Column_List"/>
|
||||||
from xhpc_customers_personnel
|
from xhpc_customers_personnel
|
||||||
where create_type = 2 and create_id = #{operatorId}
|
where create_type = 2 and create_id = #{operatorId}
|
||||||
|
<if test="userIdList!=null and userIdList.size()!=0">
|
||||||
|
and customers_personnel_id not in
|
||||||
|
<foreach collection="userIdList" item="userId" open="(" close=")" separator=",">
|
||||||
|
#{userId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
limit #{currentPage},#{items}
|
limit #{currentPage},#{items}
|
||||||
</select>
|
</select>
|
||||||
<select id="selectCountByOperatorId" resultType="java.lang.Long">
|
<select id="selectCountByOperatorId" resultType="java.lang.Long">
|
||||||
select count(customers_personnel_id)
|
select count(customers_personnel_id)
|
||||||
from xhpc_customers_personnel
|
from xhpc_customers_personnel
|
||||||
where create_type = 2
|
where create_type = 2
|
||||||
and create_id = #{operatorId}
|
and create_id = #{operatorId}
|
||||||
|
<if test="userIdList!=null and userIdList.size()!=0">
|
||||||
|
and customers_personnel_id not in
|
||||||
|
<foreach collection="userIdList" item="userId" open="(" close=")" separator=",">
|
||||||
|
#{userId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
<select id="selectByAccount" resultMap="BaseResultMap">
|
<select id="selectByAccount" resultMap="BaseResultMap">
|
||||||
select
|
select
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
package com.xhpc.tradebill;
|
package com.xhpc;
|
||||||
|
|
||||||
import com.xhpc.common.security.annotation.EnableCustomConfig;
|
import com.xhpc.common.security.annotation.EnableCustomConfig;
|
||||||
import com.xhpc.common.security.annotation.EnableRyFeignClients;
|
import com.xhpc.common.security.annotation.EnableRyFeignClients;
|
||||||
Loading…
x
Reference in New Issue
Block a user