Commit e8f6bc15 by guojuxing

新增商户添加商品资源勾选

parent ee232041
......@@ -100,6 +100,11 @@ public class EnterpriseDTO implements Serializable{
*/
private Integer serviceStatus;
/**
* 商品资源 1:有 0:无
*/
private Integer goodsResource;
public Integer getEnterpriseId() {
return enterpriseId;
}
......@@ -211,4 +216,12 @@ public class EnterpriseDTO implements Serializable{
public void setServiceStatus(Integer serviceStatus) {
this.serviceStatus = serviceStatus;
}
public Integer getGoodsResource() {
return goodsResource;
}
public void setGoodsResource(Integer goodsResource) {
this.goodsResource = goodsResource;
}
}
......@@ -75,6 +75,11 @@ public class TabEnterprise {
*/
private Integer serviceStatus;
/**
* 商品资源 1:有 0:无
*/
private Integer goodsResource;
public Integer getEnterpriseId() {
return enterpriseId;
}
......@@ -186,4 +191,12 @@ public class TabEnterprise {
public void setServiceStatus(Integer serviceStatus) {
this.serviceStatus = serviceStatus;
}
public Integer getGoodsResource() {
return goodsResource;
}
public void setGoodsResource(Integer goodsResource) {
this.goodsResource = goodsResource;
}
}
\ No newline at end of file
......@@ -93,6 +93,11 @@ public class EnterpriseApiServiceImpl implements EnterpriseApiService {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "公司名称不能重复");
}
if (enterpriseDTO.getGoodsResource() == null) {
//默认没有商品资源
enterpriseDTO.setGoodsResource(0);
}
//新增商户信息
int enterpriseId = enterpriseService.saveEnterprise(enterpriseDTO);
//商户初始化配置信息生成
......
......@@ -16,10 +16,11 @@
<result column="version_code" jdbcType="VARCHAR" property="versionCode" />
<result column="version_name" jdbcType="VARCHAR" property="versionName" />
<result column="service_status" jdbcType="INTEGER" property="serviceStatus" />
<result column="goods_resource" jdbcType="INTEGER" property="goodsResource" />
</resultMap>
<sql id="Base_Column_List">
enterprise_id, enterprise_name, company_name, logo, area_id, address, status, create_time,
update_time, is_init_complete, audit_time, version_code, version_name, service_status
update_time, is_init_complete, audit_time, version_code, version_name, service_status, goods_resource
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
......@@ -35,12 +36,12 @@
insert into tab_enterprise (enterprise_id, enterprise_name, company_name,
logo, area_id, address,
status, create_time, update_time,
is_init_complete, audit_time, version_code, version_name, service_status)
is_init_complete, audit_time, version_code, version_name, service_status, goods_resource)
values (#{enterpriseId,jdbcType=INTEGER}, #{enterpriseName,jdbcType=VARCHAR}, #{companyName,jdbcType=VARCHAR},
#{logo,jdbcType=VARCHAR}, #{areaId,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{isInitComplete,jdbcType=INTEGER}, #{auditTime,jdbcType=TIMESTAMP}, #{versionCode,jdbcType=VARCHAR},
#{versionName,jdbcType=VARCHAR}, #{serviceStatus,jdbcType=INTEGER})
#{versionName,jdbcType=VARCHAR}, #{serviceStatus,jdbcType=INTEGER}, #{goodsResource,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabEnterprise" useGeneratedKeys="true" keyProperty="enterpriseId">
insert into tab_enterprise
......@@ -87,6 +88,9 @@
<if test="serviceStatus != null">
service_status,
</if>
<if test="goodsResource != null">
goods_resource,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="enterpriseId != null">
......@@ -131,6 +135,9 @@
<if test="serviceStatus != null">
#{serviceStatus,jdbcType=INTEGER},
</if>
<if test="goodsResource != null">
#{goodsResource,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabEnterprise">
......@@ -175,6 +182,9 @@
<if test="serviceStatus != null">
service_status = #{serviceStatus,jdbcType=INTEGER},
</if>
<if test="goodsResource != null">
goods_resource = #{goodsResource,jdbcType=INTEGER},
</if>
</set>
where enterprise_id = #{enterpriseId,jdbcType=INTEGER}
</update>
......@@ -193,6 +203,7 @@
version_code = #{versionCode,jdbcType=VARCHAR},
version_name = #{versionName,jdbcType=VARCHAR},
service_status = #{serviceStatus,jdbcType=INTEGER},
goods_resource = #{goodsResource,jdbcType=INTEGER}
where enterprise_id = #{enterpriseId,jdbcType=INTEGER}
</update>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment