|
@@ -1,7 +1,7 @@
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
-<mapper namespace="ProductInfoMapper">
|
|
|
- <resultMap id="BaseResultMap" type="ProductInfo">
|
|
|
+<mapper namespace="com.hcloud.microserver.system.bank.dao.ProductInfoMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.hcloud.microserver.system.facade.carbon.entity.ProductInfo">
|
|
|
<id column="guid" jdbcType="CHAR" property="guid"/>
|
|
|
<result column="fk_product_type" jdbcType="CHAR" property="fkProductType"/>
|
|
|
<result column="fk_carbon_rule" jdbcType="CHAR" property="fkCarbonRule"/>
|
|
@@ -21,13 +21,13 @@
|
|
|
<result column="modified_user" jdbcType="CHAR" property="modifiedUser"/>
|
|
|
<result column="modified_time" jdbcType="TIMESTAMP" property="modifiedTime"/>
|
|
|
<association property="productType" column="fk_product_type"
|
|
|
- select="ProductTypeMapper.selectByPrimaryKey"/>
|
|
|
+ select="com.hcloud.microserver.system.bank.dao.ProductTypeMapper.selectByPrimaryKey"/>
|
|
|
<association property="povertyArea" column="fk_poverty_area"
|
|
|
- select="PovertyAreaMapper.selectByPrimaryKey"/>
|
|
|
+ select="com.hcloud.microserver.system.bank.dao.PovertyAreaMapper.selectByPrimaryKey"/>
|
|
|
<collection property="productExpansions" column="guid"
|
|
|
- select="ProductExpansionMapper.selectByProductGuid"/>
|
|
|
+ select="com.hcloud.microserver.system.bank.dao.ProductExpansionMapper.selectByProductGuid"/>
|
|
|
<collection property="productBelongs" column="guid"
|
|
|
- select="ProductBelongMapper.selectByProductGuid"/>
|
|
|
+ select="com.hcloud.microserver.system.bank.dao.ProductBelongMapper.selectByProductGuid"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="Base_Column_List">
|
|
@@ -45,7 +45,7 @@
|
|
|
delete from t_product_info
|
|
|
where guid = #{guid,jdbcType=CHAR}
|
|
|
</delete>
|
|
|
- <insert id="insert" parameterType="ProductInfo">
|
|
|
+ <insert id="insert" parameterType="com.hcloud.microserver.system.facade.carbon.entity.ProductInfo">
|
|
|
insert into t_product_info (guid, fk_product_type, fk_carbon_rule,
|
|
|
fk_poverty_area, product_name, product_code,
|
|
|
carbon_generate_date, product_validate_num, carbon_refresh_time,
|
|
@@ -61,7 +61,7 @@
|
|
|
#{createTime,jdbcType=TIMESTAMP}, #{modifiedUser,jdbcType=CHAR}, #{modifiedTime,jdbcType=TIMESTAMP}
|
|
|
)
|
|
|
</insert>
|
|
|
- <insert id="insertSelective" parameterType="ProductInfo">
|
|
|
+ <insert id="insertSelective" parameterType="com.hcloud.microserver.system.facade.carbon.entity.ProductInfo">
|
|
|
insert into t_product_info
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="guid != null">
|
|
@@ -176,7 +176,7 @@
|
|
|
</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
- <update id="updateByPrimaryKeySelective" parameterType="ProductInfo">
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.hcloud.microserver.system.facade.carbon.entity.ProductInfo">
|
|
|
update t_product_info
|
|
|
<set>
|
|
|
<if test="fkProductType != null">
|
|
@@ -233,7 +233,7 @@
|
|
|
</set>
|
|
|
where guid = #{guid,jdbcType=CHAR}
|
|
|
</update>
|
|
|
- <update id="updateByPrimaryKey" parameterType="ProductInfo">
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.hcloud.microserver.system.facade.carbon.entity.ProductInfo">
|
|
|
update t_product_info
|
|
|
set fk_product_type = #{fkProductType,jdbcType=CHAR},
|
|
|
fk_carbon_rule = #{fkCarbonRule,jdbcType=CHAR},
|
|
@@ -256,26 +256,26 @@
|
|
|
</update>
|
|
|
|
|
|
|
|
|
- <select id="selectListByPage" parameterType="ProductInfoForm" resultMap="BaseResultMap">
|
|
|
+ <select id="selectListByPage" parameterType="com.hcloud.microserver.system.facade.carbon.forms.ProductInfoForm" resultMap="BaseResultMap">
|
|
|
select
|
|
|
- product.guid,
|
|
|
- product.fk_product_type,
|
|
|
- product.fk_carbon_rule,
|
|
|
- product.fk_poverty_area,
|
|
|
- product.product_name,
|
|
|
- product.product_code,
|
|
|
- product.carbon_generate_date,
|
|
|
- product.product_validate_num,
|
|
|
- product.carbon_refresh_time,
|
|
|
- product.carbon_sink,
|
|
|
- product.product_imgs,
|
|
|
- product.is_enable,
|
|
|
- product.remark,
|
|
|
- product.state,
|
|
|
- product.create_user,
|
|
|
- product.create_time,
|
|
|
- product.modified_user,
|
|
|
- product.modified_time
|
|
|
+ product.guid,
|
|
|
+ product.fk_product_type,
|
|
|
+ product.fk_carbon_rule,
|
|
|
+ product.fk_poverty_area,
|
|
|
+ product.product_name,
|
|
|
+ product.product_code,
|
|
|
+ product.carbon_generate_date,
|
|
|
+ product.product_validate_num,
|
|
|
+ product.carbon_refresh_time,
|
|
|
+ product.carbon_sink,
|
|
|
+ product.product_imgs,
|
|
|
+ product.is_enable,
|
|
|
+ product.remark,
|
|
|
+ product.state,
|
|
|
+ product.create_user,
|
|
|
+ product.create_time,
|
|
|
+ product.modified_user,
|
|
|
+ product.modified_time
|
|
|
from t_product_info product
|
|
|
<where>
|
|
|
product.state = 1
|
|
@@ -338,7 +338,7 @@
|
|
|
update t_product_info set state = 0
|
|
|
where fk_product_type = #{productTypeGuid,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
-
|
|
|
+
|
|
|
<select id="selectProductGuidsByFarmerGuids" parameterType="list" resultType="string">
|
|
|
select fk_product_guid from t_product_belong
|
|
|
where state = 1 and fk_farmer_guid in
|
|
@@ -347,4 +347,30 @@
|
|
|
</foreach>
|
|
|
group by fk_product_guid;
|
|
|
</select>
|
|
|
+
|
|
|
+ <!-- 查询产品详情 lym -->
|
|
|
+ <!--<select id="findById" parameterType="String" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ product.guid,
|
|
|
+ product.fk_product_type,
|
|
|
+ product.fk_carbon_rule,
|
|
|
+ product.fk_poverty_area,
|
|
|
+ product.product_name,
|
|
|
+ product.product_code,
|
|
|
+ product.carbon_generate_date,
|
|
|
+ product.product_validate_num,
|
|
|
+ product.carbon_refresh_time,
|
|
|
+ product.carbon_sink,
|
|
|
+ product.product_imgs,
|
|
|
+ product.is_enable,
|
|
|
+ product.remark,
|
|
|
+ product.state,
|
|
|
+ product.create_user,
|
|
|
+ product.create_time,
|
|
|
+ product.modified_user,
|
|
|
+ product.modified_time
|
|
|
+ from t_product_info product
|
|
|
+ WHERE product.state = 1
|
|
|
+ AND product.guid = #{guid}
|
|
|
+ </select>-->
|
|
|
</mapper>
|