jyy
2021-06-19 756e16e090b15c7fd8648f55f5451367face6abc
zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml
@@ -52,6 +52,7 @@
      <result property="goodsName" column="goodsName" />
      <result property="cateName" column="cateName" />
      <result property="achieveRuleName" column="achieveRuleName" />
   </resultMap>
@@ -68,6 +69,7 @@
      e.name as pro_name,
      b.ZK_TOTAL as zk_total,
      a.his_consume,
      er.name as achieveRuleName,
      a.free_consume,
      f.su_name meiliao,
      g.su_name guwen,
@@ -88,6 +90,7 @@
      left join sys_vip_info c on a.vip_id=c.id
      left join sys_vip_level d on c.LEVEL_ID=d.id
      left join shopping_goods e on a.shopping_goods_id=e.id
      left join achieve_rule er on e.achieve_rule_id=er.id
      LEFT JOIN sys_users f on a.beault_id=f.su_id
      LEFT JOIN sys_users g on a.sale_id = g.su_id
      LEFT JOIN sys_shop_info h ON a.SHOP_ID = h.ID
@@ -95,6 +98,7 @@
      left join sys_proj_services l on a.service_order_id=l.id
      left join sys_order_item j on a.order_item_id=j.ID
      <where>
         and   a.company_id = #{record.companyId}
         <if test="record!=null">
            <if
               test="(record.shopId!=null and record.shopId!='') or  (record.shopId!='' and record.shopId==0)  ">
@@ -118,9 +122,7 @@
            <if test="record.beaultId != null and record.beaultId !='' ">
               and   a.beault_id = #{record.beaultId}
            </if>
            <if test="record.companyId != null and record.companyId !='' ">
               and   a.company_id = #{record.companyId}
            </if>
            <if test="record.beaultId != null and record.beaultId !='' ">
               and   a.beault_id = #{record.beaultId}
            </if>
@@ -1045,7 +1047,7 @@
         b.code goodsNo,
         b.name goodsName,
         c.su_name meiliao,
         d.count*d.zk_price zk_total
         TRUNCATE(d.count*d.zk_price,2) zk_total
      from achieve_new a
      left join shopping_goods b on a.shopping_goods_id=b.id
      left join sys_users c on a.beault_id=c.su_id
@@ -1181,7 +1183,7 @@
         </if>
      </where>
      GROUP BY g.su_id , f.su_id, a.order_type, h.id,a.achieveType
      GROUP BY g.su_id , f.su_id, a.order_type, h.id,a.achieveType,u.name
      <if test="record.sort !=null and record.sort!=''"> order by ${record.sort} ${record.order}</if>
   </select>