|
|
|
@ -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; |
|
|
|
@ -82,6 +85,10 @@ 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("添加成功!"); |
|
|
|
|
} |
|
|
|
|