|
|
@ -5,8 +5,11 @@ import io.swagger.annotations.ApiOperation; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.jeecg.api.bean.PageBean; |
|
|
|
import org.jeecg.api.service.AppletAddressService; |
|
|
|
import org.jeecg.api.service.AppletOrderService; |
|
|
|
import org.jeecg.api.service.impl.AppletOrderServiceImpl; |
|
|
|
import org.jeecg.common.api.vo.Result; |
|
|
|
import org.jeecg.modules.commonAddress.entity.CommonAddress; |
|
|
|
import org.jeecg.modules.commonAddress.service.ICommonAddressService; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
@ -19,6 +22,10 @@ public class AppletAddressController { |
|
|
|
|
|
|
|
@Resource |
|
|
|
private AppletAddressService appletInfoService; |
|
|
|
@Resource |
|
|
|
private AppletOrderServiceImpl appletOrderService; |
|
|
|
@Resource |
|
|
|
private ICommonAddressService addressService; |
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value="获取地址列表", notes="获取地址列表") |
|
|
@ -57,4 +64,15 @@ public class AppletAddressController { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value="判断地址是否包邮", notes="判断地址是否包邮") |
|
|
|
@GetMapping("/isAddress") |
|
|
|
public Result<?> isAddress(String id){ |
|
|
|
|
|
|
|
CommonAddress byId = addressService.getById(id); |
|
|
|
|
|
|
|
boolean b = appletOrderService.calculateFreeShipping(byId); |
|
|
|
|
|
|
|
return Result.OK(b); |
|
|
|
} |
|
|
|
|
|
|
|
} |