fix: 完善账户管理,增删改只能从对应入口进行操作。
This commit is contained in:
@@ -11,6 +11,7 @@ import com.ruoyi.invest.domain.vo.BankCardLendVo;
|
||||
import com.ruoyi.invest.mapper.AccountsMapper;
|
||||
import com.ruoyi.invest.mapper.BankCardLendMapper;
|
||||
import com.ruoyi.invest.service.IBankCardLendService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -127,6 +128,11 @@ public class BankCardLendServiceImpl implements IBankCardLendService
|
||||
{
|
||||
bankCard.setUpdateBy(SecurityUtils.getUsername());
|
||||
bankCard.setUpdateTime(DateUtils.getNowDate());
|
||||
|
||||
Accounts accounts = new Accounts();
|
||||
BeanUtils.copyProperties(bankCard, accounts);
|
||||
accountsMapper.updateAccounts(accounts);
|
||||
|
||||
return bankCardLendMapper.updateBankCardLend(bankCard);
|
||||
}
|
||||
|
||||
@@ -139,6 +145,7 @@ public class BankCardLendServiceImpl implements IBankCardLendService
|
||||
@Override
|
||||
public int deleteBankCardLendByIds(Long[] ids)
|
||||
{
|
||||
accountsMapper.removeAccountsByIds(ids);
|
||||
return bankCardLendMapper.removeBankCardLendByIds(ids);
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.ruoyi.invest.domain.vo.FutureStocksVo;
|
||||
import com.ruoyi.invest.mapper.AccountsMapper;
|
||||
import com.ruoyi.invest.mapper.FutureStocksMapper;
|
||||
import com.ruoyi.invest.service.IFutureStocksService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -130,6 +131,10 @@ public class FutureStocksServiceImpl implements IFutureStocksService
|
||||
{
|
||||
futureStocks.setUpdateBy(SecurityUtils.getUsername());
|
||||
futureStocks.setUpdateTime(DateUtils.getNowDate());
|
||||
Accounts accounts = new Accounts();
|
||||
BeanUtils.copyProperties(futureStocks, accounts);
|
||||
accounts.setType("5");
|
||||
accountsMapper.updateAccounts(accounts);
|
||||
return futureStocksMapper.updateFutureStocks(futureStocks);
|
||||
}
|
||||
|
||||
@@ -142,6 +147,7 @@ public class FutureStocksServiceImpl implements IFutureStocksService
|
||||
@Override
|
||||
public int deleteFutureStocksByIds(Long[] ids)
|
||||
{
|
||||
accountsMapper.removeAccountsByIds(ids);
|
||||
return futureStocksMapper.removeFutureStocksByIds(ids);
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.ruoyi.invest.domain.vo.PosMachineVo;
|
||||
import com.ruoyi.invest.mapper.AccountsMapper;
|
||||
import com.ruoyi.invest.mapper.PosMachineMapper;
|
||||
import com.ruoyi.invest.service.IPosMachineService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -108,6 +109,10 @@ public class PosMachineServiceImpl implements IPosMachineService
|
||||
{
|
||||
posMachine.setUpdateBy(SecurityUtils.getUsername());
|
||||
posMachine.setUpdateTime(DateUtils.getNowDate());
|
||||
Accounts accounts = new Accounts();
|
||||
BeanUtils.copyProperties(posMachine, accounts);
|
||||
accounts.setType("6");
|
||||
accountsMapper.updateAccounts(accounts);
|
||||
return posMachineMapper.updatePosMachine(posMachine);
|
||||
}
|
||||
|
||||
@@ -120,6 +125,7 @@ public class PosMachineServiceImpl implements IPosMachineService
|
||||
@Override
|
||||
public int deletePosMachineByIds(Long[] ids)
|
||||
{
|
||||
accountsMapper.removeAccountsByIds(ids);
|
||||
return posMachineMapper.removePosMachineByIds(ids);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user