|
|
|
@ -9,8 +9,11 @@ import java.io.UnsupportedEncodingException; |
|
|
|
|
import java.net.URLDecoder; |
|
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
|
|
|
|
|
|
import org.apache.shiro.SecurityUtils; |
|
|
|
|
import org.jeecg.common.api.vo.Result; |
|
|
|
|
import org.jeecg.common.system.query.QueryGenerator; |
|
|
|
|
import org.jeecg.common.system.vo.LoginUser; |
|
|
|
|
import org.jeecg.common.util.oConvertUtils; |
|
|
|
|
import org.jeecg.modules.demo.customerreceivingaddress.entity.CustomerReceivingAddress; |
|
|
|
|
import org.jeecg.modules.demo.customerreceivingaddress.service.ICustomerReceivingAddressService; |
|
|
|
@ -49,7 +52,7 @@ import org.jeecg.common.aspect.annotation.AutoLog; |
|
|
|
|
public class CustomerReceivingAddressController extends JeecgController<CustomerReceivingAddress, ICustomerReceivingAddressService> { |
|
|
|
|
@Autowired |
|
|
|
|
private ICustomerReceivingAddressService customerReceivingAddressService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 分页列表查询 |
|
|
|
|
* |
|
|
|
@ -71,7 +74,7 @@ public class CustomerReceivingAddressController extends JeecgController<Customer |
|
|
|
|
IPage<CustomerReceivingAddress> pageList = customerReceivingAddressService.page(page, queryWrapper); |
|
|
|
|
return Result.OK(pageList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 添加 |
|
|
|
|
* |
|
|
|
@ -82,10 +85,14 @@ public class CustomerReceivingAddressController extends JeecgController<Customer |
|
|
|
|
@ApiOperation(value="顾客地址表-添加", notes="顾客地址表-添加") |
|
|
|
|
@PostMapping(value = "/add") |
|
|
|
|
public Result<?> add(@RequestBody CustomerReceivingAddress customerReceivingAddress) { |
|
|
|
|
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
|
|
|
|
if(customerReceivingAddress.getReceiver()=="" || customerReceivingAddress.getReceiver()==null ){ |
|
|
|
|
customerReceivingAddress.setReceiver(loginUser.getUsername()); |
|
|
|
|
} |
|
|
|
|
customerReceivingAddressService.save(customerReceivingAddress); |
|
|
|
|
return Result.OK("添加成功!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 编辑 |
|
|
|
|
* |
|
|
|
@ -99,7 +106,7 @@ public class CustomerReceivingAddressController extends JeecgController<Customer |
|
|
|
|
customerReceivingAddressService.updateById(customerReceivingAddress); |
|
|
|
|
return Result.OK("编辑成功!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 通过id删除 |
|
|
|
|
* |
|
|
|
@ -113,7 +120,7 @@ public class CustomerReceivingAddressController extends JeecgController<Customer |
|
|
|
|
customerReceivingAddressService.removeById(id); |
|
|
|
|
return Result.OK("删除成功!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 批量删除 |
|
|
|
|
* |
|
|
|
@ -127,7 +134,7 @@ public class CustomerReceivingAddressController extends JeecgController<Customer |
|
|
|
|
this.customerReceivingAddressService.removeByIds(Arrays.asList(ids.split(","))); |
|
|
|
|
return Result.OK("批量删除成功!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 通过id查询 |
|
|
|
|
* |
|
|
|
|