commit
394524cbb3
@ -3,6 +3,7 @@ package com.stdiet.web.controller.custom;
|
||||
import com.stdiet.common.annotation.Log;
|
||||
import com.stdiet.common.core.controller.BaseController;
|
||||
import com.stdiet.common.core.domain.AjaxResult;
|
||||
import com.stdiet.common.core.domain.entity.SysUser;
|
||||
import com.stdiet.common.core.page.TableDataInfo;
|
||||
import com.stdiet.common.enums.BusinessType;
|
||||
import com.stdiet.common.utils.SecurityUtils;
|
||||
@ -15,10 +16,10 @@ import com.stdiet.custom.service.ISysCustomerHealthyService;
|
||||
import com.stdiet.custom.service.ISysCustomerPhysicalSignsService;
|
||||
import com.stdiet.custom.service.ISysCustomerService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.SecurityConfig;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -46,11 +47,16 @@ public class SysCustomerController extends BaseController {
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SysCustomer sysCustomer) {
|
||||
startPage();
|
||||
String remark = SecurityUtils.getLoginUser().getUser().getRemark();
|
||||
if (StringUtils.isNotEmpty(remark) && remark.contains("|") && sysCustomer.getChannelId() == null) {
|
||||
sysCustomer.setChannels(remark.split("\\|"));
|
||||
List<SysCustomer> list = new ArrayList<>();
|
||||
if (SecurityUtils.getLoginUser().getUser().getRoles().get(0).getRoleKey().equals("partner")) {
|
||||
String remark = SecurityUtils.getLoginUser().getUser().getRemark();
|
||||
if (StringUtils.isEmpty(remark)) {
|
||||
return getDataTable(list);
|
||||
} else if (remark.contains("|") && sysCustomer.getChannelId() == null) {
|
||||
sysCustomer.setChannels(remark.split("\\|"));
|
||||
}
|
||||
}
|
||||
List<SysCustomer> list = sysCustomerService.selectSysCustomerList(sysCustomer);
|
||||
list = sysCustomerService.selectSysCustomerList(sysCustomer);
|
||||
if (list != null && list.size() > 0) {
|
||||
for (SysCustomer sysCus : list) {
|
||||
if (StringUtils.isNotEmpty(sysCus.getPhone())) {
|
||||
|
@ -21,6 +21,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.net.URLDecoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -49,12 +50,17 @@ public class SysOrderController extends OrderBaseController {
|
||||
public OrderTableDataInfo list(SysOrder sysOrder) {
|
||||
startPage();
|
||||
dealOrderType(sysOrder);
|
||||
String remark = SecurityUtils.getLoginUser().getUser().getRemark();
|
||||
if (StringUtils.isNotEmpty(remark) && remark.contains("|") && StringUtils.isEmpty(sysOrder.getAccount())) {
|
||||
sysOrder.setAccRange(remark.split("\\|"));
|
||||
List<SysOrder> list = new ArrayList<>();
|
||||
if (SecurityUtils.getLoginUser().getUser().getRoles().get(0).getRoleKey().equals("partner")) {
|
||||
String remark = SecurityUtils.getLoginUser().getUser().getRemark();
|
||||
if (StringUtils.isEmpty(remark)) {
|
||||
return getOrderDataTable(list, new BigDecimal(0));
|
||||
} else if (remark.contains("|") && StringUtils.isEmpty(sysOrder.getAccount())) {
|
||||
sysOrder.setAccRange(remark.split("\\|"));
|
||||
}
|
||||
}
|
||||
|
||||
List<SysOrder> list = sysOrderService.selectSysOrderList(sysOrder);
|
||||
list = sysOrderService.selectSysOrderList(sysOrder);
|
||||
List<SysUser> userList = userService.selectAllUser();
|
||||
BigDecimal totalAmount = sysOrderService.selectAllOrderAmount(sysOrder);
|
||||
if (totalAmount == null) {
|
||||
|
@ -526,7 +526,7 @@ export default {
|
||||
this.fansChannelOptions = response.data;
|
||||
});
|
||||
this.getDicts("cus_account").then((response) => {
|
||||
if (this.userRemark && this.userRemark.includes("|")) {
|
||||
if (this.isPartner) {
|
||||
const accRange = this.userRemark.split("|");
|
||||
this.accountIdOptions = accRange.reduce((arr, accId) => {
|
||||
const tarObj = response.data.find((obj) => obj.dictValue === accId);
|
||||
@ -542,6 +542,9 @@ export default {
|
||||
this.getList();
|
||||
},
|
||||
computed: {
|
||||
isPartner() {
|
||||
return this.roles && this.roles.includes("partner");
|
||||
},
|
||||
...mapGetters([
|
||||
// 售前字典
|
||||
"preSaleIdOptions",
|
||||
@ -553,6 +556,8 @@ export default {
|
||||
"nutriAssisIdOptions",
|
||||
//
|
||||
"userRemark",
|
||||
//
|
||||
"roles",
|
||||
]),
|
||||
},
|
||||
methods: {
|
||||
|
@ -587,7 +587,7 @@ export default {
|
||||
return this.device === "mobile";
|
||||
},
|
||||
isPartner() {
|
||||
return this.userRemark && this.userRemark.includes("|");
|
||||
return this.roles && this.roles.includes("partner");
|
||||
},
|
||||
...mapGetters([
|
||||
// 售前字典
|
||||
@ -611,6 +611,8 @@ export default {
|
||||
//
|
||||
"userRemark",
|
||||
//
|
||||
"roles",
|
||||
//
|
||||
"device",
|
||||
]),
|
||||
},
|
||||
@ -620,7 +622,7 @@ export default {
|
||||
this.payTypeIdOptions = response.data;
|
||||
});
|
||||
this.getDicts("cus_account").then((response) => {
|
||||
if (this.userRemark && this.userRemark.includes("|")) {
|
||||
if (this.isPartner) {
|
||||
const accRange = this.userRemark.split("|");
|
||||
this.accountIdOptions = accRange.reduce((arr, accId) => {
|
||||
const tarObj = response.data.find((obj) => obj.dictValue === accId);
|
||||
|
Loading…
x
Reference in New Issue
Block a user