| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.hive.bean.MoneyCardUse; |
| | | import com.matrix.system.hive.bean.SysProjUse; |
| | | import com.matrix.system.hive.dao.MoneyCardUseDao; |
| | | import com.matrix.system.hive.dao.ShoppingGoodsDao; |
| | | import com.matrix.system.hive.service.SysProjUseService; |
| | | import com.matrix.system.hive.service.imp.SysVipInfoServiceImpl; |
| | | import com.matrix.system.score.dao.ScoreVipDetailDao; |
| | | import com.matrix.system.score.service.ScoreVipDetailService; |
| | |
| | | import org.springframework.test.annotation.Rollback; |
| | | import org.springframework.test.context.junit4.SpringRunner; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.IOException; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | |
| | | |
| | | @Autowired |
| | | MoneyCardUseDao moneyCardUseDao; |
| | | @Resource |
| | | private SysProjUseService projUseService; |
| | | @Autowired |
| | | private ShoppingGoodsDao shoppingGoodsDao; |
| | | |
| | | @Test |
| | | public void testGetVipInfo(){ |
| | | |
| | | Long vipId = 111L; |
| | | AjaxResult result = AjaxResult.buildSuccessInstance("查询成功"); |
| | | SysProjUse queryUse = new SysProjUse(); |
| | | queryUse.setVipId(vipId); |
| | | queryUse.setType(Dictionary.SHOPPING_GOODS_TYPE_XM); |
| | | queryUse.setTaocanId(-1L); |
| | | queryUse.setStatus(Dictionary.TAOCAN_STATUS_YX); |
| | | List<SysProjUse> projList = projUseService.findInPage(queryUse, null); |
| | | //切换到套餐查询条件 |
| | | queryUse.setTaocanId(null); |
| | | queryUse.setType(Dictionary.SHOPPING_GOODS_TYPE_TC); |
| | | List<SysProjUse> taoCanList = projUseService.findInPage(queryUse, null); |
| | | taoCanList.forEach(item->{ |
| | | item.setTaocanProjUse(projUseService.selectTaocanProjUse(item.getId(), queryUse.getStatus())); |
| | | item.setProjInfo(shoppingGoodsDao.selectById(item.getProjId())); |
| | | }); |
| | | result.putInMap("projList", projList); |
| | | result.putInMap("taoCanList", taoCanList); |
| | | } |
| | | |
| | | |
| | | @Test |