提交 16643d79 作者: 刘明祎

根据uid修改客服别名和客服头像接口

上级 ba4fe9ac
流水线 #9081 已通过 于阶段
in 2 分 30 秒
package com.mmc.iuav.user.model.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AliasAndImgVo implements Serializable {
@ApiModelProperty(value = "被绑定用户id")
private Integer userAccountId;
@ApiModelProperty(value = "客服别名",example = "投诉建议")
private String serviceAlias;
@ApiModelProperty(value = "客服头像")
private String serviceImg;
}
...@@ -156,4 +156,11 @@ public class CompanyController extends BaseController { ...@@ -156,4 +156,11 @@ public class CompanyController extends BaseController {
public ResultBody listUserAndRoleByCompanyId(@RequestParam Integer companyInfoId) { public ResultBody listUserAndRoleByCompanyId(@RequestParam Integer companyInfoId) {
return companyService.listUserAndRoleByCompanyId(companyInfoId); return companyService.listUserAndRoleByCompanyId(companyInfoId);
} }
@ApiOperation(value = "修改添加客服别名客服头像")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@PostMapping("updateAliasImgByUid")
public ResultBody updateAliasImgByUid(@RequestBody AliasAndImgVo aliasAndImgVo) {
return companyService.updateAliasImgByUid(aliasAndImgVo);
}
} }
...@@ -226,4 +226,6 @@ public interface CompanyDao { ...@@ -226,4 +226,6 @@ public interface CompanyDao {
List<CompanyMemberDO> selectUserAndRoleList(Integer companyInfoId); List<CompanyMemberDO> selectUserAndRoleList(Integer companyInfoId);
List<Integer> getBindCompanyUserIdList(Integer backUserId); List<Integer> getBindCompanyUserIdList(Integer backUserId);
void updateAliasImgByUid(Integer userAccountId, String serviceAlias, String serviceImg);
} }
...@@ -5,6 +5,7 @@ import com.mmc.iuav.user.entity.CompanyBackUserDO; ...@@ -5,6 +5,7 @@ import com.mmc.iuav.user.entity.CompanyBackUserDO;
import com.mmc.iuav.user.entity.CompanyInfoDO; import com.mmc.iuav.user.entity.CompanyInfoDO;
import com.mmc.iuav.user.model.dto.LoginSuccessDTO; import com.mmc.iuav.user.model.dto.LoginSuccessDTO;
import com.mmc.iuav.user.model.qo.CompanyInfoQO; import com.mmc.iuav.user.model.qo.CompanyInfoQO;
import com.mmc.iuav.user.model.vo.AliasAndImgVo;
import com.mmc.iuav.user.model.vo.CompanyInfoVO; import com.mmc.iuav.user.model.vo.CompanyInfoVO;
import com.mmc.iuav.user.model.vo.CompanyMemberVO; import com.mmc.iuav.user.model.vo.CompanyMemberVO;
...@@ -187,4 +188,6 @@ public interface CompanyService { ...@@ -187,4 +188,6 @@ public interface CompanyService {
* @return * @return
*/ */
Integer getCompanyBindUserId(Integer userId1,Integer userId2,Integer backUserId); Integer getCompanyBindUserId(Integer userId1,Integer userId2,Integer backUserId);
ResultBody updateAliasImgByUid(AliasAndImgVo aliasAndImgVo);
} }
...@@ -11,6 +11,7 @@ import com.mmc.iuav.user.dao.UserServiceDao; ...@@ -11,6 +11,7 @@ import com.mmc.iuav.user.dao.UserServiceDao;
import com.mmc.iuav.user.entity.*; import com.mmc.iuav.user.entity.*;
import com.mmc.iuav.user.model.dto.LoginSuccessDTO; import com.mmc.iuav.user.model.dto.LoginSuccessDTO;
import com.mmc.iuav.user.model.qo.CompanyInfoQO; import com.mmc.iuav.user.model.qo.CompanyInfoQO;
import com.mmc.iuav.user.model.vo.AliasAndImgVo;
import com.mmc.iuav.user.model.vo.CompanyInfoVO; import com.mmc.iuav.user.model.vo.CompanyInfoVO;
import com.mmc.iuav.user.model.vo.CompanyMemberVO; import com.mmc.iuav.user.model.vo.CompanyMemberVO;
import com.mmc.iuav.user.model.vo.UserAccountVO; import com.mmc.iuav.user.model.vo.UserAccountVO;
...@@ -366,5 +367,13 @@ public class CompanyServiceImpl implements CompanyService { ...@@ -366,5 +367,13 @@ public class CompanyServiceImpl implements CompanyService {
} }
} }
@Override
public ResultBody updateAliasImgByUid(AliasAndImgVo aliasAndImgVo) {
Integer userAccountId = aliasAndImgVo.getUserAccountId();
String serviceAlias = aliasAndImgVo.getServiceAlias();
String serviceImg = aliasAndImgVo.getServiceImg();
companyDao.updateAliasImgByUid(userAccountId, serviceAlias, serviceImg);
return ResultBody.success();
}
} }
...@@ -104,6 +104,19 @@ ...@@ -104,6 +104,19 @@
update company_member set is_leader = #{i} where user_account_id = #{fromUserAccountId} and company_info_id = #{companyInfoId} update company_member set is_leader = #{i} where user_account_id = #{fromUserAccountId} and company_info_id = #{companyInfoId}
</update> </update>
<update id="updateAliasImgByUid">
update company_member
<set>
<if test="serviceAlias != null">
service_alias = #{serviceAlias},
</if>
<if test="serviceImg != null">
service_img = #{serviceImg},
</if>
</set>
where user_account_id = #{userAccountId}
</update>
<delete id="unbindCompanyMember"> <delete id="unbindCompanyMember">
delete from company_member where user_account_id = #{userAccountId} and company_info_id = #{companyInfoId} delete from company_member where user_account_id = #{userAccountId} and company_info_id = #{companyInfoId}
</delete> </delete>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论