显式抛出2
This commit is contained in:
@@ -7,6 +7,7 @@ import com.czg.exception.CzgException;
|
|||||||
import com.mybatisflex.core.paginate.Page;
|
import com.mybatisflex.core.paginate.Page;
|
||||||
import com.mybatisflex.core.service.IService;
|
import com.mybatisflex.core.service.IService;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -14,6 +15,8 @@ import java.util.List;
|
|||||||
* @author Administrator
|
* @author Administrator
|
||||||
*/
|
*/
|
||||||
public interface ShopInfoService extends IService<ShopInfo> {
|
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> get(PageDTO pageDTO, String shopName, Integer status, Integer isHeadShop);
|
||||||
|
|
||||||
Page<ShopInfo> getShopByMainId(PageDTO pageDTO, String shopName, Integer status);
|
Page<ShopInfo> getShopByMainId(PageDTO pageDTO, String shopName, Integer status);
|
||||||
@@ -22,7 +25,7 @@ public interface ShopInfoService extends IService<ShopInfo> {
|
|||||||
|
|
||||||
Boolean edit(ShopInfoEditDTO shopInfoEditDTO);
|
Boolean edit(ShopInfoEditDTO shopInfoEditDTO);
|
||||||
|
|
||||||
ShopDetailDTO detail(Long id);
|
ShopDetailDTO detail(Long id) throws CzgException;
|
||||||
|
|
||||||
ShopInfoByCodeDTO getByCode(String tableCode, String lat, String lng, boolean checkState);
|
ShopInfoByCodeDTO getByCode(String tableCode, String lat, String lng, boolean checkState);
|
||||||
|
|
||||||
|
|||||||
@@ -121,8 +121,6 @@ public class ShopInfoServiceImpl extends ServiceImpl<ShopInfoMapper, ShopInfo> i
|
|||||||
if (isHeadShop != null) {
|
if (isHeadShop != null) {
|
||||||
queryWrapper.eq(ShopInfo::getIsHeadShop, isHeadShop);
|
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));
|
List<ShopInfo> shopAllList = getMapper().selectListByQuery(query().select(ShopInfo::getId, ShopInfo::getShopName));
|
||||||
Map<Long, String> shopKv = shopAllList.stream().collect(Collectors.toMap(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
|
@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();
|
ShopInfo shopInfo = queryChain().eq(ShopInfo::getId, id == null ? StpKit.USER.getShopId() : id).one();
|
||||||
if (shopInfo == null) {
|
if (shopInfo == null) {
|
||||||
throw new CzgException("店铺信息不存在");
|
throw new CzgException("店铺信息不存在");
|
||||||
|
|||||||
Reference in New Issue
Block a user