|
@@ -101,10 +101,12 @@ public class SysUserManager {
|
|
|
*/
|
|
|
public Boolean bindProdToUserCert(SysUserDTO.OnProdBind resource, HnqzUser user) {
|
|
|
|
|
|
- String products = resource.getProductIds().stream().map(Objects::toString).collect(Collectors.joining(","));
|
|
|
- userCertificateService.update(Wrappers.<SysUserCertificate>lambdaUpdate()
|
|
|
- .set(SysUserCertificate::getProducts, products)
|
|
|
- .eq(SysUserCertificate::getCertificateId, resource.getCertId()));
|
|
|
+ if (CollUtil.isNotEmpty(resource.getProductIds())) {
|
|
|
+ String products = resource.getProductIds().stream().map(Objects::toString).collect(Collectors.joining(","));
|
|
|
+ userCertificateService.update(Wrappers.<SysUserCertificate>lambdaUpdate()
|
|
|
+ .set(SysUserCertificate::getProducts, products)
|
|
|
+ .eq(SysUserCertificate::getCertificateId, resource.getCertId()));
|
|
|
+ }
|
|
|
|
|
|
// 启用业务员
|
|
|
userService.update(Wrappers.<SysUser>lambdaUpdate()
|