装修阶段
This commit is contained in:
@@ -17,13 +17,28 @@ public class DecorationDesignInfoDAO {
|
||||
@Resource
|
||||
DecorationDesignInfoMapper decorationDesignInfoMapper;
|
||||
|
||||
private DecorationDesignInfoDO getById(Long id){
|
||||
public DecorationDesignInfoDO getById(Long id){
|
||||
if(id == null){
|
||||
return null;
|
||||
}
|
||||
return decorationDesignInfoMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public Integer insertSelective(DecorationDesignInfoDO decorationDesignInfoDO){
|
||||
return decorationDesignInfoMapper.insertSelective(decorationDesignInfoDO);
|
||||
}
|
||||
|
||||
public Integer updateByPrimaryKey(DecorationDesignInfoDO decorationDesignInfoDO){
|
||||
return decorationDesignInfoMapper.updateByPrimaryKey(decorationDesignInfoDO);
|
||||
}
|
||||
|
||||
public DecorationDesignInfoDO getByShopId(Long shopId){
|
||||
if(shopId == null){
|
||||
return null;
|
||||
}
|
||||
return decorationDesignInfoMapper.selectByShopId(shopId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -4,4 +4,13 @@ import com.cool.store.entity.DecorationDesignInfoDO;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
public interface DecorationDesignInfoMapper extends Mapper<DecorationDesignInfoDO> {
|
||||
|
||||
|
||||
/**
|
||||
* 查询店铺的设计数据
|
||||
* @param shopId
|
||||
* @return
|
||||
*/
|
||||
DecorationDesignInfoDO selectByShopId(Long shopId);
|
||||
|
||||
}
|
||||
@@ -15,4 +15,16 @@
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
||||
</resultMap>
|
||||
|
||||
<select id="selectByShopId" resultMap="BaseResultMap">
|
||||
select
|
||||
*
|
||||
from decoration_design_info where shop_id = #{shopId} and deleted = 0
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -72,6 +72,7 @@
|
||||
<if test="request.businessLeaderMobile != null">business_leader_mobile,</if>
|
||||
<if test="request.financialManagerName != null">financial_manager_name,</if>
|
||||
<if test="request.financialManagerMobile != null">financial_manager_mobile,</if>
|
||||
<if test="request.businessLicense != null">business_license,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="request.auditId != null">#{request.auditId},</if>
|
||||
@@ -103,6 +104,7 @@
|
||||
<if test="request.businessLeaderMobile != null">#{request.businessLeaderMobile},</if>
|
||||
<if test="request.financialManagerName != null">#{request.financialManagerName},</if>
|
||||
<if test="request.financialManagerMobile != null">#{request.financialManagerMobile},</if>
|
||||
<if test="request.businessLicense != null">#{request.businessLicense},</if>
|
||||
</trim>
|
||||
ON DUPLICATE KEY UPDATE
|
||||
<trim suffixOverrides=",">
|
||||
@@ -135,6 +137,7 @@
|
||||
<if test="request.businessLeaderMobile != null">business_leader_mobile = #{request.businessLeaderMobile},</if>
|
||||
<if test="request.financialManagerName != null">financial_manager_name = #{request.financialManagerName},</if>
|
||||
<if test="request.financialManagerMobile != null">financial_manager_mobile = #{request.financialManagerMobile},</if>
|
||||
<if test="request.businessLicense != null">business_license = #{request.businessLicense},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user