|
|
@@ -2,56 +2,70 @@
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.xingxi.web.controller.master.product.mapper.ProdAttrVoMapper">
|
|
|
<resultMap type="ProdAttrVo" id="ProdAttrVoResult">
|
|
|
- <result property="id" column="id" />
|
|
|
- <result property="prodClassId" column="prodClassId" />
|
|
|
- <result property="prodName" column="prodName" />
|
|
|
- <result property="ipId" column="ipId" />
|
|
|
- <result property="designerId" column="designerId" />
|
|
|
- <result property="description" column="description" />
|
|
|
- <result property="prodStatus" column="prodStatus" />
|
|
|
- <result property="thirdIdConfirmFlag" column="thirdIdConfirmFlag" />
|
|
|
- <result property="delFlag" column="delFlag" />
|
|
|
- <result property="createUser" column="createUser" />
|
|
|
- <result property="createTime" column="createTime" />
|
|
|
- <result property="updateUser" column="updateUser" />
|
|
|
- <result property="updateTime" column="updateTime" />
|
|
|
- <result property="prodClass" column="className" />
|
|
|
- <result property="ipName" column="ipName" />
|
|
|
- <result property="designerName" column="designerName" />
|
|
|
+ <result property="prodAttrId" column="prodAttrId" />
|
|
|
+ <result property="prodId" column="prodId" />
|
|
|
+ <result property="attrName" column="attrName" />
|
|
|
+ <result property="attrType" column="attrType" />
|
|
|
+ <result property="delFlag" column="delFlag" />
|
|
|
+ <result property="createTime" column="createTime" />
|
|
|
+ <result property="createUser" column="createUser" />
|
|
|
+ <result property="updateUser" column="updateUser" />
|
|
|
+ <result property="updateTime" column="updateTime" />
|
|
|
+ <result property="jointId" column="jointId" />
|
|
|
+ <result property="prodAttrJointId" column="prodAttrJointId" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectProdAttrVo">
|
|
|
- select m_prod.id
|
|
|
- , m_prod.prodClassId
|
|
|
- , m_prod.prodName
|
|
|
- , m_prod.ipId
|
|
|
- , m_prod.designerId
|
|
|
- , m_prod.description
|
|
|
- , m_prod.prodStatus
|
|
|
- , m_prod.thirdIdConfirmFlag
|
|
|
- , m_prod_class.className
|
|
|
- , m_designer.designerName
|
|
|
- , m_ipinfo.ipName
|
|
|
- from m_prod
|
|
|
- inner join m_prod_class on m_prod.prodClassId = m_prod_class.prodClassId
|
|
|
- inner join m_designer on m_prod.designerId = m_designer.id
|
|
|
- inner join m_ipinfo on m_prod.ipId = m_ipinfo.ipId
|
|
|
+ select m_prod_attr.prodAttrId
|
|
|
+ , m_prod_attr.prodId
|
|
|
+ , m_prod_attr.attrName
|
|
|
+ , m_prod_attr.attrType
|
|
|
+ , m_prod_attr.delFlag
|
|
|
+ , m_prod_attr.createUser
|
|
|
+ , m_prod_attr.createTime
|
|
|
+ , m_prod_attr.updateUser
|
|
|
+ , m_prod_attr.updateTime
|
|
|
+ from m_prod_attr
|
|
|
</sql>
|
|
|
|
|
|
+ <select id="selectProdAttrVoByProdAttrId" parameterType="Long" resultMap="ProdAttrVoResult">
|
|
|
+ <include refid="selectProdAttrVo"/>
|
|
|
+ where prodAttrId = #{prodAttrId}
|
|
|
+ </select>
|
|
|
+
|
|
|
<select id="selectProdAttrVoList" parameterType="ProdAttrVo" resultMap="ProdAttrVoResult">
|
|
|
<include refid="selectProdAttrVo"/>
|
|
|
<where>
|
|
|
- <if test="prodClassId != null "> and m_prod.prodClassId = #{prodClassId}</if>
|
|
|
- <if test="prodName != null and prodName != ''"> and m_prod.prodName like concat('%', #{prodName}, '%')</if>
|
|
|
- <if test="ipId != null "> and ipId = #{ipId}</if>
|
|
|
- <if test="designerId != null "> and m_prod.designerId = #{designerId}</if>
|
|
|
- <if test="description != null and description != ''"> and m_prod.description = #{description}</if>
|
|
|
- <if test="prodStatus != null and prodStatus != ''"> and m_prod.prodStatus = #{prodStatus}</if>
|
|
|
- <if test="thirdIdConfirmFlag != null and thirdIdConfirmFlag != ''"> and m_prod.thirdIdConfirmFlag = #{thirdIdConfirmFlag}</if>
|
|
|
- <if test="delFlag != null and delFlag != ''"> and m_prod.delFlag = #{delFlag}</if>
|
|
|
- <if test="prodClass != null and prodClass != ''"> and m_prod_class.className like concat('%', #{prodClass}, '%')</if>
|
|
|
- <if test="designerName != null and designerName != ''"> and m_designer.designerName like concat('%', #{designerName}, '%')</if>
|
|
|
- <if test="ipName != null and ipName != ''"> and m_ipinfo.ipName like concat('%', #{ipName}, '%')</if>
|
|
|
+ <if test="prodId != null "> and m_prod_attr.prodId = #{prodId}</if>
|
|
|
+ <if test="prodAttrId != null "> and m_prod_attr.prodAttrId = #{prodAttrId}</if>
|
|
|
+ <if test="attrType != null "> and m_prod_attr.attrType = #{attrType}</if>
|
|
|
+ <if test="attrName != null and attrName != ''"> and m_prod_attr.attrName like concat('%', #{attrName}, '%')</if>
|
|
|
+ <if test="delFlag != null and delFlag != ''"> and m_prod_attr.delFlag = #{delFlag}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectProdAttrJointList" parameterType="ProdAttrVo" resultMap="ProdAttrVoResult">
|
|
|
+ select m_prod_attr.prodAttrId
|
|
|
+ , m_prod_attr.prodId
|
|
|
+ , m_prod_attr.attrName
|
|
|
+ , m_prod_attr.attrType
|
|
|
+ , m_prod_attr.delFlag
|
|
|
+ , m_prod_attr.createUser
|
|
|
+ , m_prod_attr.createTime
|
|
|
+ , m_prod_attr.updateUser
|
|
|
+ , m_prod_attr.updateTime
|
|
|
+ , m_prod_attr_joint.prodAttrId as jointId
|
|
|
+ , m_prod_attr_joint.prodAttrJointId
|
|
|
+ from m_prod_attr
|
|
|
+ left join m_prod_attr_joint on m_prod_attr.prodId = m_prod_attr_joint.jointProdId and m_prod_attr.prodAttrId = m_prod_attr_joint.jointProdAttrId
|
|
|
+ <if test="jointId != null "> and m_prod_attr_joint.prodAttrId = #{jointId}</if>
|
|
|
+ <if test="delFlag != null and delFlag != ''"> and m_prod_attr_joint.delFlag = #{delFlag}</if>
|
|
|
+ <where>
|
|
|
+ <if test="prodId != null "> and m_prod_attr.prodId = #{prodId}</if>
|
|
|
+ <if test="prodAttrId != null "> and m_prod_attr.prodAttrId = #{prodAttrId}</if>
|
|
|
+ <if test="attrType != null "> and m_prod_attr.attrType = #{attrType}</if>
|
|
|
+ <if test="attrName != null and attrName != ''"> and m_prod_attr.attrName like concat('%', #{attrName}, '%')</if>
|
|
|
+ <if test="delFlag != null and delFlag != ''"> and m_prod_attr.delFlag = #{delFlag}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
</mapper>
|