|
|
@ -16,6 +16,8 @@ import org.jeecg.common.system.vo.LoginUser; |
|
|
|
import org.jeecg.modules.base.service.BaseCommonService; |
|
|
|
import org.jeecg.modules.base.service.BaseCommonService; |
|
|
|
import org.jeecg.modules.demo.customercollectgoods.entity.Customercollectgoods; |
|
|
|
import org.jeecg.modules.demo.customercollectgoods.entity.Customercollectgoods; |
|
|
|
import org.jeecg.modules.demo.customercollectgoods.service.ICustomercollectgoodsService; |
|
|
|
import org.jeecg.modules.demo.customercollectgoods.service.ICustomercollectgoodsService; |
|
|
|
|
|
|
|
import org.jeecg.modules.demo.customerinvoice.entity.CustomerInvoice; |
|
|
|
|
|
|
|
import org.jeecg.modules.demo.customerinvoice.service.ICustomerInvoiceService; |
|
|
|
import org.jeecg.modules.demo.customerreceivingaddress.entity.CustomerReceivingAddress; |
|
|
|
import org.jeecg.modules.demo.customerreceivingaddress.entity.CustomerReceivingAddress; |
|
|
|
import org.jeecg.modules.demo.customerreceivingaddress.service.ICustomerReceivingAddressService; |
|
|
|
import org.jeecg.modules.demo.customerreceivingaddress.service.ICustomerReceivingAddressService; |
|
|
|
import org.jeecg.modules.demo.customershoppingcart.entity.CustomerShoppingCart; |
|
|
|
import org.jeecg.modules.demo.customershoppingcart.entity.CustomerShoppingCart; |
|
|
@ -44,6 +46,9 @@ import java.util.stream.Collectors; |
|
|
|
@RequestMapping("/getuserpersion") |
|
|
|
@RequestMapping("/getuserpersion") |
|
|
|
public class ApeopersionController { |
|
|
|
public class ApeopersionController { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
|
|
private ICustomerInvoiceService customerInvoiceService; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
private ISysUserService sysUserService; |
|
|
|
private ISysUserService sysUserService; |
|
|
|
|
|
|
|
|
|
|
@ -244,6 +249,7 @@ public class ApeopersionController { |
|
|
|
if (flag.equals("false")){ |
|
|
|
if (flag.equals("false")){ |
|
|
|
//寻找之前的排序的最后一个
|
|
|
|
//寻找之前的排序的最后一个
|
|
|
|
CustomerReceivingAddress cus = customerReceivingAddressService.getcreatbuyuser(Username); |
|
|
|
CustomerReceivingAddress cus = customerReceivingAddressService.getcreatbuyuser(Username); |
|
|
|
|
|
|
|
//开始组装数据
|
|
|
|
CustomerReceivingAddress cus2 =new CustomerReceivingAddress(); |
|
|
|
CustomerReceivingAddress cus2 =new CustomerReceivingAddress(); |
|
|
|
cus2.setUserId(loginUser.getId()); |
|
|
|
cus2.setUserId(loginUser.getId()); |
|
|
|
cus2.setCityId((String)map.get("addr")); |
|
|
|
cus2.setCityId((String)map.get("addr")); |
|
|
@ -251,6 +257,7 @@ public class ApeopersionController { |
|
|
|
cus2.setAddress((String)map.get("detailed")); |
|
|
|
cus2.setAddress((String)map.get("detailed")); |
|
|
|
cus2.setMobile((String)map.get("phone")); |
|
|
|
cus2.setMobile((String)map.get("phone")); |
|
|
|
cus2.setSort(cus.getSort()+1); |
|
|
|
cus2.setSort(cus.getSort()+1); |
|
|
|
|
|
|
|
//将组装好的数据以新增的形式添加数据库
|
|
|
|
customerReceivingAddressService.save(cus2); |
|
|
|
customerReceivingAddressService.save(cus2); |
|
|
|
} else if (flag.equals("true")){ |
|
|
|
} else if (flag.equals("true")){ |
|
|
|
//寻找之前的排序的最后一个
|
|
|
|
//寻找之前的排序的最后一个
|
|
|
@ -294,6 +301,14 @@ public class ApeopersionController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//这个是获取个人中心的发票列表
|
|
|
|
|
|
|
|
@RequestMapping(value = "/findbill", method = RequestMethod.GET) |
|
|
|
|
|
|
|
public Result<?> findbill() { |
|
|
|
|
|
|
|
//这里方便获取当前登陆信息
|
|
|
|
|
|
|
|
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
|
|
|
|
|
|
|
//这里获取当前登陆的用户名
|
|
|
|
|
|
|
|
String username = loginUser.getUsername(); |
|
|
|
|
|
|
|
List<CustomerInvoice> fapiao= customerInvoiceService.getfapiao(username); |
|
|
|
|
|
|
|
return Result.OK(fapiao); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|