显式抛出2

This commit is contained in:
2025-11-14 10:13:29 +08:00
parent 595ef332ac
commit 11a3d708c7
2 changed files with 5 additions and 4 deletions

View File

@@ -7,6 +7,7 @@ import com.czg.exception.CzgException;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
@@ -14,6 +15,8 @@ import java.util.List;
* @author Administrator
*/
public interface ShopInfoService extends IService<ShopInfo> {
ShopInfo getById(Serializable id) throws CzgException;
Page<ShopInfo> get(PageDTO pageDTO, String shopName, Integer status, Integer isHeadShop);
Page<ShopInfo> getShopByMainId(PageDTO pageDTO, String shopName, Integer status);
@@ -22,7 +25,7 @@ public interface ShopInfoService extends IService<ShopInfo> {
Boolean edit(ShopInfoEditDTO shopInfoEditDTO);
ShopDetailDTO detail(Long id);
ShopDetailDTO detail(Long id) throws CzgException;
ShopInfoByCodeDTO getByCode(String tableCode, String lat, String lng, boolean checkState);

View File

@@ -121,8 +121,6 @@ public class ShopInfoServiceImpl extends ServiceImpl<ShopInfoMapper, ShopInfo> i
if (isHeadShop != null) {
queryWrapper.eq(ShopInfo::getIsHeadShop, isHeadShop);
}
CzgResult<SysParamsDTO> shopOrderPayBaseUrl = sysParamsService.getParamsByCode("shop_order_pay_base_url");
CzgResult<SysParamsDTO> shopOrderPayBaseUrl2 = sysParamsService.getParamsByCode("ali_account_app_id");
List<ShopInfo> shopAllList = getMapper().selectListByQuery(query().select(ShopInfo::getId, ShopInfo::getShopName));
Map<Long, String> shopKv = shopAllList.stream().collect(Collectors.toMap(ShopInfo::getId, ShopInfo::getShopName));
@@ -321,7 +319,7 @@ public class ShopInfoServiceImpl extends ServiceImpl<ShopInfoMapper, ShopInfo> i
}
@Override
public ShopDetailDTO detail(Long id) {
public ShopDetailDTO detail(Long id) throws CzgException {
ShopInfo shopInfo = queryChain().eq(ShopInfo::getId, id == null ? StpKit.USER.getShopId() : id).one();
if (shopInfo == null) {
throw new CzgException("店铺信息不存在");