Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
4fc6fb50d2
@ -7,6 +7,7 @@ import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.io.IOException;
|
||||
@ -38,5 +39,15 @@ public class ShopBaseDistrictController {
|
||||
public CommonResult getAppDistrict() throws IOException {
|
||||
return CommonResult.success(shopBaseDistrictService.getAppDistrictByFilePath());
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "地区表-根据父id查找子列表", notes = "地区表-根据父id查找子列表")
|
||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
||||
public CommonResult list(@RequestParam(name = "district_parent_id", defaultValue = "0") Integer district_parent_id ){
|
||||
return CommonResult.success(shopBaseDistrictService.getDistrictByParentIdList(district_parent_id));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -85,4 +85,5 @@ public interface ShopBaseDistrictService extends IBaseService<ShopBaseDistrict>
|
||||
*/
|
||||
String getDistrictIdPathByNamePath(String districtNamePath);
|
||||
|
||||
List<ShopBaseDistrict> getDistrictByParentIdList(Integer district_parent_id);
|
||||
}
|
||||
|
||||
@ -465,5 +465,12 @@ public class ShopBaseDistrictServiceImpl extends BaseServiceImpl<ShopBaseDistric
|
||||
return String.join("/", ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ShopBaseDistrict> getDistrictByParentIdList(Integer district_parent_id) {
|
||||
QueryWrapper<ShopBaseDistrict> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("district_parent_id", district_parent_id);
|
||||
return this.list(queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@ import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.suisung.mall.common.api.CommonResult;
|
||||
import com.suisung.mall.common.modules.distribution.ShopDistributionUserOrder;
|
||||
import com.suisung.mall.shop.base.service.ShopBaseDistrictService;
|
||||
import com.suisung.mall.shop.distribution.service.ShopDistributionUserOrderService;
|
||||
import com.suisung.mall.shop.product.service.ShopOpenService;
|
||||
import io.swagger.annotations.Api;
|
||||
@ -26,6 +27,9 @@ public class ShopOpenController {
|
||||
@Autowired
|
||||
private ShopDistributionUserOrderService shopDistributionUserOrderService;
|
||||
|
||||
@Autowired
|
||||
private ShopBaseDistrictService shopBaseDistrictService;
|
||||
|
||||
@ApiOperation(value = "商品兑换", notes = "商品兑换")
|
||||
@RequestMapping(value = "/exchange", method = RequestMethod.POST)
|
||||
public CommonResult exchange(@RequestParam(name = "user_id") Integer user_id,
|
||||
@ -63,5 +67,13 @@ public class ShopOpenController {
|
||||
return CommonResult.success(shopDistributionUserOrderService.lists(queryWrapper, pageNum, pageSize));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "地区表-根据父id查找子列表", notes = "地区表-根据父id查找子列表")
|
||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
||||
public CommonResult list(@RequestParam(name = "district_parent_id", defaultValue = "0") Integer district_parent_id ){
|
||||
return CommonResult.success(shopBaseDistrictService.getDistrictByParentIdList(district_parent_id));
|
||||
}
|
||||
}
|
||||
|
||||
1
sql/shop/dev/20251231_dml.sql
Normal file
1
sql/shop/dev/20251231_dml.sql
Normal file
@ -0,0 +1 @@
|
||||
INSERT INTO `admin_base_protocol` (`ctl`, `met`, `db`, `rights_id`, `log`, `path`,`comment`) VALUES ('/mobile/shop/shop-base-district/list', 'index', 'master', '', '0', '/mobile/shop/shop-base-district/list','地区查询列表');
|
||||
Loading…
Reference in New Issue
Block a user