Commit 77689011 by 1539136324@qq.com

开发分支合并修改素材分类不可编辑bug;修改个人活码添加设置和标签不可编辑bug;修改实体null值时属性不返回bug;

1 parent ddc37023
......@@ -19,7 +19,7 @@ public class JsonSerializerManage {
@Bean
public ObjectMapper jacksonObjectMapper(Jackson2ObjectMapperBuilder builder) {
ObjectMapper objectMapper = builder.createXmlMapper(false).build();
objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
// objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
SimpleModule module = new SimpleModule();
module.addSerializer(Long.class, ToStringSerializer.instance);
module.addSerializer(Long.TYPE, ToStringSerializer.instance);
......
......@@ -107,4 +107,9 @@ public class WeEmpleCode extends BaseEntity {
*/
@TableField(exist = false)
private String mobile;
/**
* 客户添加时是否需要经过确认自动成为好友 1:是 0:否
*/
private Integer isJoinConfirmFriends;
}
......@@ -168,11 +168,11 @@ public class WeEmpleCodeServiceImpl extends ServiceImpl<WeEmpleCodeMapper, WeEmp
if (this.baseMapper.updateWeEmpleCode(weEmpleCode) == 1) {
if (CollectionUtil.isNotEmpty(weEmpleCode.getWeEmpleCodeUseScops())) {
weEmpleCode.getWeEmpleCodeUseScops().forEach(item -> item.setEmpleCodeId(weEmpleCode.getId()));
iWeEmpleCodeUseScopService.updateBatchById(weEmpleCode.getWeEmpleCodeUseScops());
iWeEmpleCodeUseScopService.saveOrUpdateBatch(weEmpleCode.getWeEmpleCodeUseScops());
}
if (CollectionUtil.isNotEmpty(weEmpleCode.getWeEmpleCodeTags())) {
weEmpleCode.getWeEmpleCodeTags().forEach(item -> item.setEmpleCodeId(weEmpleCode.getId()));
weEmpleCodeTagService.updateBatchById(weEmpleCode.getWeEmpleCodeTags());
weEmpleCodeTagService.saveOrUpdateBatch(weEmpleCode.getWeEmpleCodeTags());
}
}
}
......
......@@ -35,14 +35,13 @@
<update id="updateWeCategory">
UPDATE we_category
<trim prefix="set" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="mediaType != null">media_type,</if>
<if test="name != null">name,</if>
<if test="parentId != null">parent_id,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="mediaType != null">media_type=#{mediaType},</if>
<if test="name != null">name=#{name},</if>
<if test="parentId != null">parent_id=#{parentId},</if>
<if test="createBy != null">create_by=#{createBy},</if>
<if test="createTime != null">create_time=#{createTime},</if>
<if test="updateBy != null">update_by=#{updateBy},</if>
<if test="updateTime != null">update_time=#{updateTime},</if>
</trim>
<where>
id=#{id}
......
......@@ -18,6 +18,7 @@
<result property="mediaId" column="media_id"/>
<result property="scanTimes" column="scan_times" />
<result property="state" column="state" />
<result property="isJoinConfirmFriends" column="is_join_confirm_friends" />
<collection property="weEmpleCodeUseScops" ofType="com.linkwechat.wecom.domain.WeEmpleCodeUseScop">
<result property="businessId" column="business_id"/>
<result property="businessName" column="business_name"/>
......@@ -35,26 +36,26 @@
<sql id="getQrcodeByUserIdVo">
select
wec.id,
wec.code_type,
wec.skip_verify,
wec.scenario,
wec.welcome_msg,
wec.create_by,
wec.create_time,
wec.del_flag,
wec.config_id,
wec.state,
wec.qr_code,
wec.scan_times
wec.id,
wec.code_type,
wec.skip_verify,
wec.scenario,
wec.welcome_msg,
wec.create_by,
wec.create_time,
wec.del_flag,
wec.config_id,
wec.state,
wec.qr_code,
wec.scan_times
from we_emple_code wec
left join we_emple_code_use_scop wecus on wec.id = wecus.emple_code_id
and wecus.business_id_type = 2
and wecus.del_flag = 0
left join we_emple_code_use_scop wecus on wec.id = wecus.emple_code_id
and wecus.business_id_type = 2
and wecus.del_flag = 0
</sql>
<sql id="selectWeEmpleCodeLsit">
select
select
wecode.id,
wecode.code_type,
wecode.media_id,
......@@ -72,24 +73,25 @@
wecusn.business_name,
wecusn.mobile,
wect.tag_id,
wect.tag_name
wect.tag_name,
wecode.is_join_confirm_friends
from
we_emple_code wecode
left join (
SELECT
wecus.emple_code_id, wecus.business_id, wecus.business_name,wu.mobile
FROM
we_emple_code_use_scop wecus
LEFT JOIN we_user wu ON
wu.user_id = wecus.business_id
WHERE
wecus.del_flag = 0
) as wecusn on
wecode.id = wecusn.emple_code_id
left join we_emple_code_tag wect on
wecode.id = wect.emple_code_id
left join (
SELECT
wecus.emple_code_id, wecus.business_id, wecus.business_name,wu.mobile
FROM
we_emple_code_use_scop wecus
LEFT JOIN we_user wu ON
wu.user_id = wecus.business_id
WHERE
wecus.del_flag = 0
) as wecusn on
wecode.id = wecusn.emple_code_id
left join we_emple_code_tag wect on
wecode.id = wect.emple_code_id
where 1=1 and wecode.del_flag = 0
</sql>
</sql>
<select id="selectWeEmpleCodeList" parameterType="WeEmpleCode" resultType="com.linkwechat.wecom.domain.WeEmpleCode">
<include refid="selectWeEmpleCodeLsit"/>
......@@ -149,7 +151,8 @@
<if test="qrCode != null">qr_code,</if>
<if test="mediaId != null">media_id,</if>
<if test="state != null">state,</if>
<if test="scanTimes != null">scan_times</if>
<if test="scanTimes != null">scan_times,</if>
<if test="isJoinConfirmFriends != null">is_join_confirm_friends,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
......@@ -164,7 +167,8 @@
<if test="qrCode != null">#{qrCode},</if>
<if test="mediaId != null">#{mediaId},</if>
<if test="state != null">#{state},</if>
<if test="scanTimes != null">#{scanTimes}</if>
<if test="scanTimes != null">#{scanTimes},</if>
<if test="isJoinConfirmFriends != null">#{isJoinConfirmFriends},</if>
</trim>
</insert>
......@@ -182,7 +186,8 @@
<if test="qrCode != null">qr_code = #{qrCode},</if>
<if test="mediaId != null">media_id = #{mediaId},</if>
<if test="state != null">state = #{state},</if>
<if test="scanTimes != null">scan_times = #{scanTimes}</if>
<if test="scanTimes != null">scan_times = #{scanTimes},</if>
<if test="isJoinConfirmFriends != null"> is_join_confirm_friends =#{isJoinConfirmFriends},</if>
</trim>
where id = #{id}
</update>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!