提交 f17699c8 作者: 张小凤

Service(update)

上级 ddb9ed74
...@@ -61,6 +61,9 @@ public class ServiceDO implements Serializable { ...@@ -61,6 +61,9 @@ public class ServiceDO implements Serializable {
@ApiModelProperty(value = "逻辑删除字段") @ApiModelProperty(value = "逻辑删除字段")
private Integer isDeleted; private Integer isDeleted;
@ApiModelProperty(value = "单位id")
private Integer unitId;
public ServiceDO(ServiceVO param, Integer accountId) { public ServiceDO(ServiceVO param, Integer accountId) {
this(param); this(param);
this.accountId = accountId; this.accountId = accountId;
...@@ -76,6 +79,7 @@ public class ServiceDO implements Serializable { ...@@ -76,6 +79,7 @@ public class ServiceDO implements Serializable {
this.shareCard = param.getShareCard(); this.shareCard = param.getShareCard();
this.video = param.getVideo(); this.video = param.getVideo();
this.serviceIntroduction = param.getServiceIntroduction(); this.serviceIntroduction = param.getServiceIntroduction();
this.unitId=param.getUnitId();
} }
public ServiceDO(Integer id, Integer accountId) { public ServiceDO(Integer id, Integer accountId) {
......
...@@ -67,4 +67,7 @@ public class ServiceVO implements Serializable { ...@@ -67,4 +67,7 @@ public class ServiceVO implements Serializable {
@ApiModelProperty(value = "服务介绍") @ApiModelProperty(value = "服务介绍")
private String serviceIntroduction; private String serviceIntroduction;
@ApiModelProperty(value = "单位id")
private Integer unitId;
} }
...@@ -106,9 +106,9 @@ ...@@ -106,9 +106,9 @@
<!--新增所有列--> <!--新增所有列-->
<insert id="insert" keyProperty="id" useGeneratedKeys="true" parameterType="com.mmc.pms.entity.ServiceDO"> <insert id="insert" keyProperty="id" useGeneratedKeys="true" parameterType="com.mmc.pms.entity.ServiceDO">
insert into service(service_name, application_id, industry_id, display_state, cover_plan, share_card, video, insert into service(service_name, application_id, industry_id, display_state, cover_plan, share_card, video,
service_introduction, account_id) service_introduction, account_id,unit_id)
values (#{serviceName}, #{applicationId}, #{industryId}, #{displayState}, #{coverPlan}, #{shareCard}, values (#{serviceName}, #{applicationId}, #{industryId}, #{displayState}, #{coverPlan}, #{shareCard},
#{video}, #{serviceIntroduction}, #{accountId}) #{video}, #{serviceIntroduction}, #{accountId},#{unitId})
</insert> </insert>
<!--通过主键修改数据--> <!--通过主键修改数据-->
...@@ -148,6 +148,9 @@ ...@@ -148,6 +148,9 @@
<if test="accountId != null"> <if test="accountId != null">
account_id = #{accountId}, account_id = #{accountId},
</if> </if>
<if test="unitId != null">
unit_id = #{unitId},
</if>
</set> </set>
where id = #{id} where id = #{id}
</update> </update>
...@@ -283,4 +286,4 @@ ...@@ -283,4 +286,4 @@
</if> </if>
</where> </where>
</select> </select>
</mapper> </mapper>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论