记得上下班打卡 | git大法好,push需谨慎

Commit ec0c0915 authored by 胡佳晨's avatar 胡佳晨

修改快递价格

parent 509398d5
......@@ -27,23 +27,24 @@ public class KylinGetShunFengPriceController {
@GetMapping("getPrice")
@ApiOperation("运费查询")
public ResponseDto<String> getFreightCharge(String adcode, String productCode){
public ResponseDto<String> getFreightCharge(String adcode, String productCode) {
/* String substring = adcode.substring(0, 3);
if(substring.equals("110") || substring.equals("120") || substring.equals("130")){
if (expressType.equals("1")){
return ResponseDto.success("23.00");
}
}*/
Object obj = redisUtil.get(KylinRedisConst.RETURN_ADDRESS_CODE + adcode + KylinRedisConst.EXPRESS_TYPE + productCode);
if (obj != null){
KylinFreightChargeDao k= (KylinFreightChargeDao)obj;
Object obj = redisUtil.get(KylinRedisConst.RETURN_ADDRESS_CODE + adcode + KylinRedisConst.EXPRESS_TYPE + productCode);
if (obj != null) {
KylinFreightChargeDao k = (KylinFreightChargeDao) obj;
//运费为0元时返23元
if (k.getPrice().equals("0.00")){
if (k.getPrice().equals("0.00")) {
return ResponseDto.success("23.00");
}
return ResponseDto.success(k.getPrice());
}else {
} else {
//查询不到运费数据时返回23元
log.error("[ERROR]=" + KylinRedisConst.RETURN_ADDRESS_CODE + adcode + KylinRedisConst.EXPRESS_TYPE + productCode);
return ResponseDto.success("23.00");
// return ResponseDto.failure("查询失败");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment