mirror of
https://github.com/weizhiqiang1995/erp-pro.git
synced 2024-12-27 18:34:28 +08:00
feat: 获取购物车信息增加selected状态选择
This commit is contained in:
parent
426517a0ff
commit
9152701784
2 changed files with 4 additions and 0 deletions
|
@ -38,6 +38,8 @@ public class ShopTradeCartController {
|
|||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@ApiOperation(id = "queryShopTradeCartList", value = "获取购物车信息", method = "POST", allUse = "2")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(id = "selected", name = "selected", value = "选中状态,0:未选中,1:选中")})
|
||||
@RequestMapping("/post/ShopTradeCartController/queryShopTradeCartList")
|
||||
public void queryShopTradeCartList(InputObject inputObject, OutputObject outputObject) {
|
||||
shopTradeCartService.queryShopTradeCartList(inputObject, outputObject);
|
||||
|
|
|
@ -71,10 +71,12 @@ public class ShopTradeCartServiceImpl extends SkyeyeBusinessServiceImpl<ShopTrad
|
|||
|
||||
@Override
|
||||
public void queryShopTradeCartList(InputObject inputObject, OutputObject outputObject) {
|
||||
String selected = inputObject.getParams().get("selected").toString();
|
||||
String userId = InputObject.getLogParamsStatic().get("id").toString();
|
||||
// 查询用户购物车列表
|
||||
QueryWrapper<ShopTradeCart> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq(MybatisPlusUtil.toColumns(ShopTradeCart::getCreateId), userId);
|
||||
wrapper.eq(MybatisPlusUtil.toColumns(ShopTradeCart::getSelected), selected);
|
||||
wrapper.orderByDesc(MybatisPlusUtil.toColumns(ShopTradeCart::getCreateTime));
|
||||
List<ShopTradeCart> beans = list(wrapper);
|
||||
iMaterialNormsService.setDataMation(beans, ShopTradeCart::getNormsId);
|
||||
|
|
Loading…
Reference in a new issue