| | |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.nq.common.ServerResponse; |
| | | import com.nq.dao.StockMapper; |
| | | import com.nq.dao.UserStockSubscribeMapper; |
| | | import com.nq.pojo.Stock; |
| | | import com.nq.pojo.StockSubscribe; |
| | | import com.nq.pojo.UserStockSubscribe; |
| | | import com.nq.service.IStockSubscribeService; |
| | | import com.nq.dao.StockSubscribeMapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | implements IStockSubscribeService { |
| | | @Resource |
| | | StockSubscribeMapper stockSubscribeMapper; |
| | | |
| | | @Autowired |
| | | UserStockSubscribeMapper userStockSubscribeMapper; |
| | | |
| | | @Autowired |
| | | StockMapper stockMapper; |
| | |
| | | } |
| | | //修改新股 |
| | | int resultCount = this.stockSubscribeMapper.updateById(model); |
| | | //修改用户申购的新股代码 |
| | | List<UserStockSubscribe> userStockSubscribes = userStockSubscribeMapper |
| | | .selectList(new LambdaQueryWrapper<UserStockSubscribe>() |
| | | .eq(UserStockSubscribe::getNewCode, stockSubscribe.getCode())); |
| | | for (UserStockSubscribe u : userStockSubscribes) { |
| | | u.setNewCode(model.getCode()); |
| | | userStockSubscribeMapper.updateById(u); |
| | | } |
| | | if (resultCount > 0) { |
| | | return ServerResponse.createBySuccessMsg("修改新股成功"); |
| | | } |