Merge remote-tracking branch 'origin/dev/feat/partner1.3_20230828' into dev/feat/partner1.3_20230828

This commit is contained in:
俞扬
2023-08-11 18:24:41 +08:00
3 changed files with 34 additions and 14 deletions

View File

@@ -5,6 +5,7 @@
<id column="id" property="id" />
<result column="mobile" property="mobile" />
<result column="remark" property="remark" />
<result column="edit_user_id" property="editUserId" />
<result column="create_user_id" property="createUserId" />
<result column="update_user_id" property="updateUserId" />
<result column="deleted" property="deleted" />
@@ -12,7 +13,7 @@
<result column="update_time" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
id, mobile, remark, create_user_id, update_user_id, deleted, create_time, update_time
id, mobile, remark, edit_user_id, create_user_id, update_user_id, deleted, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
@@ -28,10 +29,13 @@
<if test="id != null">
id = #{id}
</if>
<if test="mobile != null">
<if test="mobile != null and mobile != ''">
and mobile = #{mobile}
</if>
<if test="remark != null">
<if test="editUserId != null and editUserId != ''">
and edit_user_id = #{editUserId}
</if>
<if test="remark != null and remark != ''">
and remark = #{remark}
</if>
<if test="createUserId != null">
@@ -53,10 +57,10 @@
where id = #{id}
</delete>
<insert id="insert" parameterType="com.cool.store.entity.HyOutboundMobileDO">
insert into hy_outbound_mobile (id, mobile, remark,
insert into hy_outbound_mobile (id, mobile, edit_user_id, remark,
create_user_id, update_user_id, deleted,
create_time, update_time)
values (#{id}, #{mobile}, #{remark},
values (#{id}, #{mobile}, #{editUserId}, #{remark},
#{createUserId}, #{updateUserId}, #{deleted},
#{createTime}, #{updateTime})
</insert>
@@ -66,10 +70,13 @@
<if test="id != null">
id,
</if>
<if test="mobile != null">
<if test="mobile != null and mobile != ''">
mobile,
</if>
<if test="remark != null">
<if test="editUserId != null and editUserId != ''">
edit_user_id,
</if>
<if test="remark != null and remark != ''">
remark,
</if>
<if test="createUserId != null">
@@ -92,12 +99,15 @@
<if test="id != null">
#{id},
</if>
<if test="mobile != null">
<if test="mobile != null and mobile != ''">
#{mobile},
</if>
<if test="remark != null">
<if test="remark != null and remark != ''">
#{remark},
</if>
<if test="editUserId != null and editUserId != ''">
#{editUserId},
</if>
<if test="createUserId != null">
#{createUserId},
</if>
@@ -118,12 +128,15 @@
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.HyOutboundMobileDO">
update hy_outbound_mobile
<set>
<if test="mobile != null">
<if test="mobile != null and mobile != ''">
mobile = #{mobile},
</if>
<if test="remark != null">
<if test="remark != null and remark != ''">
remark = #{remark},
</if>
<if test="editUserId != null and editUserId != ''">
edit_user_id = #{editUserId},
</if>
<if test="createUserId != null">
create_user_id = #{createUserId},
</if>
@@ -145,6 +158,7 @@
<update id="updateByPrimaryKey" parameterType="com.cool.store.entity.HyOutboundMobileDO">
update hy_outbound_mobile
set mobile = #{mobile},
edit_user_id = #{editUserId},
remark = #{remark},
create_user_id = #{createUserId},
update_user_id = #{updateUserId},
@@ -158,8 +172,8 @@
<select id="getOutboundNumberList" resultType="com.cool.store.vo.HyOutboundVo">
SELECT t1.id, t1.mobile as outboundNumber, t2.name as updaterName, t2.mobile as updaterMobile, t1.update_time as update_time
FROM hy_outbound_mobile t1
LEFT JOIN enterprise_user t2 ON t1.update_user_id = t2.user_id
LEFT JOIN enterprise_user t2 ON t1.edit_user_id = t2.user_id
WHERE t2.deleted = 0 AND t1.deleted = 0
AND t1.update_user_id = #{userId}
AND t1.edit_user_id = #{userId}
</select>
</mapper>

View File

@@ -25,6 +25,9 @@ public class HyOutboundMobileDO {
@ApiModelProperty("")
private String mobile;
@ApiModelProperty("编辑人user_identerprise_user.user_id")
private String editUserId;
@ApiModelProperty("备注(保留字段)")
private String remark;

View File

@@ -47,6 +47,7 @@ public class HyOutboundServiceImpl implements HyOutboundService {
String userId = CurrentUserHolder.getUserId();
HyOutboundMobileDO hyOutboundMobile = new HyOutboundMobileDO();
hyOutboundMobile.setMobile(dto.getOutboundNumber());
hyOutboundMobile.setEditUserId(userId);
hyOutboundMobile.setCreateUserId(userId);
hyOutboundMobile.setUpdateUserId(userId);
outboundMobileMapper.insertSelective(hyOutboundMobile);
@@ -65,7 +66,7 @@ public class HyOutboundServiceImpl implements HyOutboundService {
HyOutboundMobileDO hyOutboundMobile = new HyOutboundMobileDO();
hyOutboundMobile.setId(dto.getId());
hyOutboundMobile.setMobile(dto.getNewOutboundNumber());
hyOutboundMobile.setCreateUserId(userId);
hyOutboundMobile.setEditUserId(userId);
hyOutboundMobile.setUpdateUserId(userId);
outboundMobileMapper.updateByPrimaryKeySelective(hyOutboundMobile);
}
@@ -77,7 +78,9 @@ public class HyOutboundServiceImpl implements HyOutboundService {
@Override
public void deleteOutboundNumber(DeleteNumberDTO dto) {
HyOutboundMobileDO hyOutboundMobile = new HyOutboundMobileDO();
String userId = CurrentUserHolder.getUserId();
hyOutboundMobile.setId(dto.getId());
hyOutboundMobile.setUpdateUserId(userId);
hyOutboundMobile.setDeleted(true);
outboundMobileMapper.updateByPrimaryKeySelective(hyOutboundMobile);
}