This commit is contained in:
parent
1037acfb14
commit
a00f87418d
|
|
@ -14,7 +14,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author clay
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@ public class Result<T> {
|
|||
|
||||
private T data;// 成功时返回的数据
|
||||
|
||||
private String errorMsg;// 错误信息
|
||||
private String msg;// 错误信息
|
||||
|
||||
private int errorCode;
|
||||
private int code;
|
||||
|
||||
public Result() {
|
||||
}
|
||||
|
|
@ -29,10 +29,10 @@ public class Result<T> {
|
|||
}
|
||||
|
||||
// 错误时的构造器
|
||||
public Result(boolean success, int errorCode, String errorMsg) {
|
||||
public Result(boolean success, int code, String msg) {
|
||||
this.success = success;
|
||||
this.errorMsg = errorMsg;
|
||||
this.errorCode = errorCode;
|
||||
this.msg = msg;
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public boolean isSuccess() {
|
||||
|
|
@ -51,20 +51,19 @@ public class Result<T> {
|
|||
this.data = data;
|
||||
}
|
||||
|
||||
public String getErrorMsg() {
|
||||
return errorMsg;
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setErrorMsg(String errorMsg) {
|
||||
this.errorMsg = errorMsg;
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public int getErrorCode() {
|
||||
return errorCode;
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setErrorCode(int errorCode) {
|
||||
this.errorCode = errorCode;
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* @author clay
|
||||
|
|
@ -40,6 +41,7 @@ public class MailConfigServiceImpl implements MailConfigService {
|
|||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public ServerResult editMailConfig(MailConfig mailConfig) {
|
||||
try {
|
||||
Integer statr = mailConfigDao.updateMailConfig(mailConfig);
|
||||
|
|
|
|||
|
|
@ -6,16 +6,16 @@
|
|||
<select id="getMailConfig" resultType="live.tomey.api.express.entity.MailConfig">
|
||||
SELECT * FROM w_mailconfig WHERE id = 1
|
||||
</select>
|
||||
<select id="updateMailConfig" resultType="updateMailConfig">
|
||||
<update id="updateMailConfig" parameterType="live.tomey.api.express.entity.MailConfig">
|
||||
UPDATE w_mailconfig SET
|
||||
w_mailconfig.sender = #{mailConfig.sender},
|
||||
w_mailconfig.personal = #{mailConfig.personal},
|
||||
w_mailconfig.email_smtp_host = #{mailConfig.emailSmtpHost},
|
||||
w_mailconfig.email_smtp_port = #{mailConfig.emailSmtpPort},
|
||||
w_mailconfig.username = #{mailConfig.username},
|
||||
w_mailconfig.password = #{mailConfig.password},
|
||||
w_mailconfig.encryption = #{mailConfig.encryption},
|
||||
w_mailconfig.state = #{mailConfig.sender}
|
||||
w_mailconfig.sender = #{mailConfig.sender},
|
||||
w_mailconfig.personal = #{mailConfig.personal},
|
||||
w_mailconfig.email_smtp_host = #{mailConfig.emailSmtpHost},
|
||||
w_mailconfig.email_smtp_port = #{mailConfig.emailSmtpPort},
|
||||
w_mailconfig.username = #{mailConfig.username},
|
||||
w_mailconfig.password = #{mailConfig.password},
|
||||
w_mailconfig.encryption = #{mailConfig.encryption},
|
||||
w_mailconfig.state = #{mailConfig.state}
|
||||
WHERE w_mailconfig.id = 1
|
||||
</select>
|
||||
</update>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue