Merge branch 'feature/bug-20250707' into feature/product
This commit is contained in:
commit
9d2cf28253
|
|
@ -68,7 +68,7 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getSimpleListByLanguage" resultType="com.nflg.mobilebroken.common.pojo.vo.ProductSeriesSimpleVO">
|
<select id="getSimpleListByLanguage" resultType="com.nflg.mobilebroken.common.pojo.vo.ProductSeriesSimpleVO">
|
||||||
select distinct batch_number,psi.name,sort
|
select distinct batch_number,psi.name,ps.sort
|
||||||
from product_series ps
|
from product_series ps
|
||||||
inner join product_series_info psi on ps.id=psi.series_id
|
inner join product_series_info psi on ps.id=psi.series_id
|
||||||
where state=1 and enable=1 and module_id=#{moduleId} and psi.language_code=#{language}
|
where state=1 and enable=1 and module_id=#{moduleId} and psi.language_code=#{language}
|
||||||
|
|
|
||||||
|
|
@ -91,6 +91,7 @@
|
||||||
and pt.enable = 1
|
and pt.enable = 1
|
||||||
and pt.series_number = #{batchNumber}
|
and pt.series_number = #{batchNumber}
|
||||||
AND pti.language_code = #{language}
|
AND pti.language_code = #{language}
|
||||||
|
order by pt.sort
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getListForSort" resultType="com.nflg.mobilebroken.common.pojo.vo.ProductTypeSearchVO">
|
<select id="getListForSort" resultType="com.nflg.mobilebroken.common.pojo.vo.ProductTypeSearchVO">
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||||
|
|
||||||
import javax.validation.ConstraintViolation;
|
import javax.validation.ConstraintViolation;
|
||||||
import javax.validation.ConstraintViolationException;
|
import javax.validation.ConstraintViolationException;
|
||||||
|
import java.sql.SQLException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
@ -24,6 +25,12 @@ import java.util.stream.Collectors;
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class GlobalRestControllerAdvice {
|
public class GlobalRestControllerAdvice {
|
||||||
|
|
||||||
|
@ExceptionHandler(SQLException.class)
|
||||||
|
public ApiResult<Void> handleSQLException(SQLException ex) {
|
||||||
|
log.error("数据库错误: ", ex);
|
||||||
|
return ApiResult.error(STATE.BusinessError,"数据库错误");
|
||||||
|
}
|
||||||
|
|
||||||
@ExceptionHandler(Exception.class)
|
@ExceptionHandler(Exception.class)
|
||||||
public ApiResult<Void> handleAllExceptions(Exception ex) {
|
public ApiResult<Void> handleAllExceptions(Exception ex) {
|
||||||
log.error("服务器内部错误: ", ex);
|
log.error("服务器内部错误: ", ex);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue