diff --git a/ant-design-vue-jeecg/src/views/shopping/pages/gerenzhongxin.vue b/ant-design-vue-jeecg/src/views/shopping/pages/gerenzhongxin.vue
index cd5e9a5f..0a3ef3bc 100644
--- a/ant-design-vue-jeecg/src/views/shopping/pages/gerenzhongxin.vue
+++ b/ant-design-vue-jeecg/src/views/shopping/pages/gerenzhongxin.vue
@@ -5,7 +5,8 @@
-
welcome, 用户名
+
请登录
+
welcome, {{this.userInfo().username}}
量体数据
@@ -90,14 +91,20 @@
import Header from "../components/Header/HeaderView";
import Footer from "../components/Footer/FooterView"
import {mapGetters} from 'vuex'
- import { getFileAccessHttpUrl,getAction } from "@/api/manage"
+ import { getFileAccessHttpUrl} from "@/api/manage"
+ import { httpAction, getAction } from '@/api/manage'
export default {
name: "gerenzhongxin",
components: { Header,Footer },
data() {0
return {
+ model:{
+ username1: ""
+ },
+
current: ['allorders'],//目前打开的菜单
key:'',//当前选择的订单状态(待支付、待收货等)
+ allOrders2:[],
allOrders1:[
{
id:1,
@@ -143,22 +150,60 @@
}
],//所有订单,包括未支付、未收获等
allOrders:[],//目前展示的订单
+
+
+ url: {
+ list: "/starehouse/starehouse/list",
+ getusername: "/sys/user/getusername",
+ findgoods: "/sys/user/findgoods"
+
+ },
+
+
};
},
+
+ created() {
+ this.getusername();
+ this.getallgoods();
+
+ },
mounted() {
if(this.current[0] == 'allorders'){
- this.allOrders = this.allOrders1
+ /*this.allOrders = this.allOrders1*/
+ this.allOrders = this.allOrders2
}
},
methods: {
- ...mapGetters(["nickname", "avatar","userInfo"]),
+ getallgoods(){
+ getAction(this.url.findgoods).then((res) => {
+ if(res.success) {
+ this.allOrders2 = res.result;
+ console.log("===========")
+ console.log(res.result)
+ console.log(this.allOrders2)
+ console.log("===========")
+ this.visible = true;
+ } else {
+ console.log("-----------")
+ }
+ });
+ },
+ getusername(){
+ getAction(this.url.getusername).then((res) => {
+ if(res.success) {
+ this.model.username1 = res.result;
+ console.log(res.message)
+ this.visible = true;
+ } else {
+ }
+ });
+ },
+ ...mapGetters(["nickname", "avatar", "userInfo", "addRouters", "username", "permissionList"]),
//获取用户头像
getAvatar(){
return getFileAccessHttpUrl(this.avatar())
},
-
-
-
callback(key) {
console.log(key);
},
@@ -195,16 +240,20 @@
this.current.shift()
this.current.push(key.key)
if(key.key == 'allorders'){
- this.allOrders = this.allOrders1
+ /* this.allOrders = this.allOrders1*/
+ this.allOrders = this.allOrders2
}
else if(key.key == 'daizhifu'){
- this.allOrders = this.allOrders1.filter(item=>item.pay == false)
+ /* this.allOrders = this.allOrders1.filter(item=>item.pay == false)*/
+ this.allOrders = this.allOrders2.filter(item=>item.pay == false)
}
else if(key.key == 'daishouhuo'){
- this.allOrders = this.allOrders1.filter(item=>item.receipt == false && item.pay == true)
+ /*this.allOrders = this.allOrders1.filter(item=>item.receipt == false && item.pay == true)*/
+ this.allOrders = this.allOrders2.filter(item=>item.receipt == false && item.pay == true)
}
else if(key.key == 'yiwancheng'){
- this.allOrders = this.allOrders1.filter(item=>item.receipt == true)
+ /*this.allOrders = this.allOrders1.filter(item=>item.receipt == true)*/
+ this.allOrders = this.allOrders2.filter(item=>item.receipt == true)
}else{
this.allOrders=[]
}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysUserController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysUserController.java
index d09d1523..0714c81e 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysUserController.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysUserController.java
@@ -33,6 +33,8 @@ import org.jeecg.modules.system.entity.*;
import org.jeecg.modules.system.model.DepartIdModel;
import org.jeecg.modules.system.model.SysUserSysDepartModel;
import org.jeecg.modules.system.service.*;
+import org.jeecg.modules.system.vo.Grzx1;
+import org.jeecg.modules.system.vo.Grzx2;
import org.jeecg.modules.system.vo.SysDepartUsersVO;
import org.jeecg.modules.system.vo.SysUserRoleVO;
import org.jeecg.modules.team.entity.Groupx;
@@ -1491,4 +1493,58 @@ public class SysUserController {
}
+
+ /**
+ * 根据用户名修改手机号
+ *
+ * @param json
+ * @return
+ */
+ @RequestMapping(value = "/getusername", method = RequestMethod.GET)
+ public Result> changMobile1() {
+ LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+ String username = loginUser.getUsername();
+ return Result.ok(username);
+
+ }
+
+
+ /**
+ * 个人中心
+ *
+ * @param json
+ * @return
+ */
+ @RequestMapping(value = "/findgoods", method = RequestMethod.GET)
+ public Result> findgoods() {
+ LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+ String userid = loginUser.getUsername();
+ List gr1 = new ArrayList<>();
+ List gr2 = new ArrayList<>();
+ gr1 =sysUserService.getallgr1(userid);
+ for (int i=0;i queryById(@RequestParam(name="id",required=true) String id) {
+ Groupx groupx = groupxService.getById(id);
+ return Result.OK(groupx);
+ }*/
+
+
}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/SysUserMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/SysUserMapper.java
index 28cf9f8e..5fc009d7 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/SysUserMapper.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/SysUserMapper.java
@@ -8,6 +8,7 @@ import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.system.entity.SysUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.system.model.SysUserSysDepartModel;
+import org.jeecg.modules.system.vo.Grzx1;
import org.jeecg.modules.system.vo.SysUserDepVo;
import java.util.List;
@@ -152,4 +153,6 @@ public interface SysUserMapper extends BaseMapper {
* @return
*/
List queryByDepIds(@Param("departIds") List departIds, @Param("username") String username);
+
+ List getallgr1(String userid);
}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/SysUserMapper.xml b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/SysUserMapper.xml
index 500261b4..95dc9543 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/SysUserMapper.xml
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/SysUserMapper.xml
@@ -45,7 +45,7 @@
and username = #{username}
-
+
UPDATE sys_user SET org_code = #{orgCode} where username = #{username}
@@ -55,7 +55,7 @@
-
+
-
\ No newline at end of file
+
+
+
+
+
+
+
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/ISysUserService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/ISysUserService.java
index aa6e0986..78feb05a 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/ISysUserService.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/ISysUserService.java
@@ -9,6 +9,7 @@ import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.vo.SysUserCacheInfo;
import org.jeecg.modules.system.entity.SysUser;
import org.jeecg.modules.system.model.SysUserSysDepartModel;
+import org.jeecg.modules.system.vo.Grzx1;
import org.springframework.transaction.annotation.Transactional;
import java.util.Collection;
@@ -253,4 +254,5 @@ public interface ISysUserService extends IService {
/** userId转为username */
List userIdToUsername(Collection userIdList);
+ List getallgr1(String userid);
}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java
index 825226ee..6970cbf7 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java
@@ -20,6 +20,7 @@ import org.jeecg.modules.system.entity.*;
import org.jeecg.modules.system.mapper.*;
import org.jeecg.modules.system.model.SysUserSysDepartModel;
import org.jeecg.modules.system.service.ISysUserService;
+import org.jeecg.modules.system.vo.Grzx1;
import org.jeecg.modules.system.vo.SysUserDepVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheEvict;
@@ -542,4 +543,9 @@ public class SysUserServiceImpl extends ServiceImpl impl
return userList.stream().map(SysUser::getUsername).collect(Collectors.toList());
}
+ @Override
+ public List getallgr1(String userid) {
+ return userMapper.getallgr1(userid);
+ }
+
}