修改刷卡记录、充值记录、充值、灌溉记录、用户充值卡信息的权限;取消充值时对用户卡是否存在的验证

This commit is contained in:
童丽然 2025-01-06 11:05:35 +08:00
parent 77216fb4c1
commit 92f5863df3
5 changed files with 13 additions and 7 deletions

View File

@ -138,6 +138,12 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
.antMatchers("/pay/getresult").permitAll()
// 除上面外的所有请求全部需要鉴权认证
.antMatchers("/device/operation/**").permitAll()
.antMatchers("/rechargecard/cards/**").permitAll()
.antMatchers("/rechargecard/records/**").permitAll()
.antMatchers("/iot/swipe/records/**").permitAll()
.antMatchers("/rechargecard/record/**").permitAll()
.antMatchers("/rechargecard/user/**").permitAll()
.antMatchers("/pay/**").permitAll()
.anyRequest().authenticated()
// // oauth

View File

@ -48,7 +48,7 @@
<if test="userId != null "> and user_id = #{userId}</if>
<if test="deviceNumber != null and deviceNumber != ''"> and device_number = #{deviceNumber}</if>
<if test="cardSwipeType != null "> and card_swipe_type = #{cardSwipeType}</if>
card_number = #{cardNumber}
<if test="cardNumber != null "> and card_number = #{cardNumber} </if>
<if test="deptId != null "> and dept_id = #{deptId}</if>
<if test="cardSwipeTime != null "> and card_swipe_time = #{cardSwipeTime}</if>
<if test="amountDue != null "> and amount_due = #{amountDue}</if>

View File

@ -105,10 +105,10 @@ public class NgUserRechargeRecordsServiceImpl implements INgUserRechargeRecordsS
public int insertNgUserRechargeRecordsWeChat(WeChatRecharge rechargecardUser) {
// 根据id查询用户充值卡信息
UserRechargeCards info = userRechargeCardsMapper.selectUserRechargeCardsByCardnumber(String.valueOf(rechargecardUser.getCardnumber()));
if (info == null) {
/*if (info == null) {
// 如果没有找到对应的记录返回0或者一个错误码
throw new ServiceException("卡号不存在!");
}
}*/
NgUserRechargeRecords ngUserRechargeRecords=new NgUserRechargeRecords();
if(info.getUserId()!=null)
{

View File

@ -215,10 +215,10 @@ public class UserConsumptionDetailsServiceImpl implements IUserConsumptionDetail
userConsumptionDetails.setCardNumber(String.valueOf(recharge.getCardnumber()));
// 根据id查询用户充值卡信息
UserRechargeCards info = userRechargeCardsMapper.selectUserRechargeCardsByCardnumber(String.valueOf(recharge.getCardnumber()));
if (info == null) {
/*if (info == null) {
// 如果没有找到对应的记录返回0或者一个错误码
throw new ServiceException("卡号不存在!");
}
}*/
if(info.getUserId()!=null)
{
userConsumptionDetails.setUserId(info.getUserId());

View File

@ -224,10 +224,10 @@ public class UserRechargeCardsServiceImpl implements IUserRechargeCardsService
// 根据id查询用户充值卡信息
UserRechargeCards info = userRechargeCardsMapper.selectUserRechargeCardsByCardnumber(String.valueOf(rechargecardUser.getCardnumber()));
if (info == null) {
/*if (info == null) {
// 如果没有找到对应的记录返回0或者一个错误码
throw new ServiceException("卡号不存在!");
}
}*/
UserConsumptionDetails userConsumptionDetails=new UserConsumptionDetails();
userConsumptionDetails.setUserId(info.getUserId());