From ebe1a5b7aff27fb05ed4f343a8e66e6f42fc034b Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Sat, 16 Jan 2021 16:01:36 +0800 Subject: [PATCH] modify --- zq-erp/src/main/java/com/matrix/system/hive/bean/SysVipLevel.java | 8 ++++++++ zq-erp/src/main/resources/mybatis/mapper/hive/SysVipLevelDao.xml | 16 ++++++++++++++-- zq-erp/src/main/java/com/matrix/system/hive/action/CardLevelController.java | 1 + 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/CardLevelController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/CardLevelController.java index 43aece2..b92149f 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/action/CardLevelController.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/action/CardLevelController.java @@ -43,6 +43,7 @@ public @ResponseBody AjaxResult addOrModify(SysVipLevel vipLevel) { SysUsers users = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); vipLevel.setShopId(users.getShopId()); + vipLevel.setCompanyId(users.getCompanyId()); if (vipLevel.getId() != null) { return modify(cardLevelService, vipLevel, "会员卡信息"); diff --git a/zq-erp/src/main/java/com/matrix/system/hive/bean/SysVipLevel.java b/zq-erp/src/main/java/com/matrix/system/hive/bean/SysVipLevel.java index 5b3f178..e235061 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/bean/SysVipLevel.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/bean/SysVipLevel.java @@ -54,7 +54,15 @@ private Long shopId; + private Long companyId; + public Long getCompanyId() { + return companyId; + } + + public void setCompanyId(Long companyId) { + this.companyId = companyId; + } public Long getShopId() { return shopId; diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysVipLevelDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysVipLevelDao.xml index 5adb97d..efcb7f3 100644 --- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysVipLevelDao.xml +++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysVipLevelDao.xml @@ -13,6 +13,7 @@ <result property="effectDate" column="EFFECT_DATE" /> <result property="bigclass" column="BIGCLASS" /> <result property="shopId" column="shop_id" /> + <result property="companyId" column="company_id" /> </resultMap> <!-- 插入方法 --> <insert id="insert" parameterType="SysVipLevel" @@ -25,7 +26,8 @@ REMARK, EFFECT_DATE, BIGCLASS, - shop_id + shop_id, + company_id ) VALUES ( #{id}, @@ -35,7 +37,8 @@ #{remark}, #{effectDate}, #{bigclass}, - #{shopId} + #{shopId}, + #{companyId} ) </insert> @@ -123,6 +126,9 @@ <if test="record.shopId != null and record.shopId !='' "> and shop_id = #{record.shopId} </if> + <if test="record.companyId != null and record.companyId !='' "> + and company_id = #{record.companyId} + </if> </if> <if test="pageVo !=null"><!-- 判断pageVo对象是否为空 --> <if test="pageVo.sort !=null and pageVo.order !=null"> @@ -165,6 +171,9 @@ </if> <if test="record.shopId != null and record.shopId !='' "> and shop_id = #{record.shopId} + </if> + <if test="record.companyId != null and record.companyId !='' "> + and company_id = #{record.companyId} </if> </if> </select> @@ -223,6 +232,9 @@ <if test="record.shopId != null and record.shopId !='' "> and shop_id = #{record.shopId} </if> + <if test="record.companyId != null and record.companyId !='' "> + and company_id = #{record.companyId} + </if> </if> </select> </mapper> \ No newline at end of file -- Gitblit v1.9.1