Merge branch 'feature/bug-20250707' into feature/product

This commit is contained in:
曹鹏飞 2025-07-14 10:51:19 +08:00
commit 9d2cf28253
3 changed files with 9 additions and 1 deletions

View File

@ -68,7 +68,7 @@
</select>
<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
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}

View File

@ -91,6 +91,7 @@
and pt.enable = 1
and pt.series_number = #{batchNumber}
AND pti.language_code = #{language}
order by pt.sort
</select>
<select id="getListForSort" resultType="com.nflg.mobilebroken.common.pojo.vo.ProductTypeSearchVO">

View File

@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.RestControllerAdvice;
import javax.validation.ConstraintViolation;
import javax.validation.ConstraintViolationException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
@ -24,6 +25,12 @@ import java.util.stream.Collectors;
@Slf4j
public class GlobalRestControllerAdvice {
@ExceptionHandler(SQLException.class)
public ApiResult<Void> handleSQLException(SQLException ex) {
log.error("数据库错误: ", ex);
return ApiResult.error(STATE.BusinessError,"数据库错误");
}
@ExceptionHandler(Exception.class)
public ApiResult<Void> handleAllExceptions(Exception ex) {
log.error("服务器内部错误: ", ex);