Commit 38fd9473 by jinxin

Merge branch 'bugfix/2023-03-14' into 'master'

Bugfix/2023 03 14

See merge request !1105
parents b28495e8 ce038279
......@@ -72,6 +72,18 @@ public class MiniprogramSettingDTO implements Serializable {
private Date updateTime;
private Integer miniprogramType;
/**
* 是否同步更新欢迎语 0否1是
*/
public Integer renewWelcome;
public Integer getRenewWelcome() {
return renewWelcome;
}
public void setRenewWelcome(Integer renewWelcome) {
this.renewWelcome = renewWelcome;
}
public Integer getMiniprogramType() {
return miniprogramType;
......
......@@ -57,4 +57,6 @@ public interface TabHaobanWelcomeMediaMapper {
*/
List<TabHaobanWelcomeMedia> listByWelcomeId(@Param("welcomeId") String welcomeId);
int updateByMiniProgramId(@Param("mediaUrl") String mediaUrl,@Param("miniProgramId") String miniProgramId);
}
......@@ -72,6 +72,18 @@ public class TabMiniprogramSetting implements Serializable {
private Date updateTime;
private Integer miniprogramType;
/**
* 是否同步更新欢迎语 0否1是
*/
public Integer renewWelcome;
public Integer getRenewWelcome() {
return renewWelcome;
}
public void setRenewWelcome(Integer renewWelcome) {
this.renewWelcome = renewWelcome;
}
public Integer getMiniprogramType() {
return miniprogramType;
......
......@@ -4,6 +4,7 @@ import java.util.Date;
import java.util.List;
import java.util.Objects;
import com.gic.haoban.manage.service.dao.mapper.TabHaobanWelcomeMediaMapper;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -42,6 +43,9 @@ public class MiniprogramSettingServiceImpl implements MiniprogramSettingService
@Autowired
private WxEnterpriseService wxEnterpriseService;
@Autowired
private TabHaobanWelcomeMediaMapper tabHaobanWelcomeMediaMapper;
@Override
public TabMiniprogramSetting getById(String miniprogramSettingId) {
TabMiniprogramSetting miniprogramSetting = tabMiniprogramSettingMapper.selectByPrimaryKey(miniprogramSettingId);
......@@ -84,6 +88,10 @@ public class MiniprogramSettingServiceImpl implements MiniprogramSettingService
miniprogramSetting.setMediaTime(date);
miniprogramSetting.setUpdateTime(new Date());
tabMiniprogramSettingMapper.updateByPrimaryKeySelective(miniprogramSetting);
//判断是否需要更新欢迎语里面冗余小程序的封面
if(null!=miniprogramSetting.getRenewWelcome() && miniprogramSetting.getRenewWelcome()==1){
tabHaobanWelcomeMediaMapper.updateByMiniProgramId(miniprogramSetting.getImageUrl(),miniprogramSetting.getMiniprogramSettingId());
}
}
}
......
......@@ -122,4 +122,10 @@
where welcome_id = #{welcomeId}
</update>
<update id="updateByMiniProgramId">
update tab_haoban_welcome_media
set media_url = #{mediaUrl}
where mini_program_id = #{miniProgramId} and media_type = 5
</update>
</mapper>
......@@ -49,6 +49,18 @@ public class MiniprogramSettingQo implements Serializable {
* 类型 0默认 1自定义
*/
private Integer miniprogramType = 0;
/**
* 是否同步更新欢迎语 0否1是
*/
public Integer renewWelcome;
public Integer getRenewWelcome() {
return renewWelcome;
}
public void setRenewWelcome(Integer renewWelcome) {
this.renewWelcome = renewWelcome;
}
public Integer getMiniprogramType() {
return miniprogramType;
......
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