|
@@ -25,6 +25,7 @@ import com.qmrb.system.service.SysUserService;
|
|
|
import com.qmrb.system.service.UserService;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.security.crypto.password.PasswordEncoder;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
@@ -62,6 +63,8 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
|
@Autowired
|
|
|
private PasswordEncoder passwordEncoder;
|
|
|
|
|
|
+ @Value("${default_qrcode_login_url}")
|
|
|
+ private String defaultQrcodeLoginUrl;
|
|
|
/**
|
|
|
* 分页查询
|
|
|
*/
|
|
@@ -91,6 +94,9 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
|
public ContractForm saveForm(@Valid ContractForm form) {
|
|
|
// 实体对象转换 form->entity
|
|
|
Contract entity = converter.form2Entity(form);
|
|
|
+ if(StringUtils.isBlank(form.getQrcodeLoginUrl())){
|
|
|
+ form.setQrcodeLoginUrl(defaultQrcodeLoginUrl);
|
|
|
+ }
|
|
|
// 持久化
|
|
|
this.save(entity);
|
|
|
// 创建协议时,创建客商用户
|