Commit 32a01e87 by lpx

# 商家端获取行程列表接口国际化需求

parent 5e339eca
...@@ -28,6 +28,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -28,6 +28,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -71,6 +72,7 @@ public class McStrokeController extends BaseController { ...@@ -71,6 +72,7 @@ public class McStrokeController extends BaseController {
/** /**
* 发送推送信息给APP端 * 发送推送信息给APP端
*
* @param id * @param id
* @param pushType * @param pushType
* @param title * @param title
...@@ -89,8 +91,8 @@ public class McStrokeController extends BaseController { ...@@ -89,8 +91,8 @@ public class McStrokeController extends BaseController {
@OperationLog(name = "行程分页列表", type = OperationLogType.PAGE) @OperationLog(name = "行程分页列表", type = OperationLogType.PAGE)
@ApiOperation(value = "行程分页列表") @ApiOperation(value = "行程分页列表")
@RequiresPermissions("merchant:order:view") @RequiresPermissions("merchant:order:view")
public ApiResult<Paging<McStrokeQueryVo>> getMyStrokePageList(@Validated @RequestBody McStrokePageParam mcStrokePageParam) throws Exception { public ApiResult<Paging<McStrokeQueryVo>> getMyStrokePageList(@Validated @RequestBody McStrokePageParam mcStrokePageParam, @RequestHeader(required = false) String language) throws Exception {
Paging<McStrokeQueryVo> paging = strokeService.getMcStrokePageList(mcStrokePageParam); Paging<McStrokeQueryVo> paging = strokeService.getMcStrokePageList(mcStrokePageParam,language);
return ApiResult.ok(paging); return ApiResult.ok(paging);
} }
......
...@@ -65,11 +65,12 @@ public interface StrokeMapper extends BaseMapper<Stroke> { ...@@ -65,11 +65,12 @@ public interface StrokeMapper extends BaseMapper<Stroke> {
* @param page * @param page
* @param mcStrokePageParam * @param mcStrokePageParam
* @param mcId * @param mcId
* @param language
* @return * @return
*/ */
IPage<McStrokeQueryVo> getMcStrokePageList( IPage<McStrokeQueryVo> getMcStrokePageList(
@Param("page") Page page, @Param("mcStrokePageParam") McStrokePageParam mcStrokePageParam, @Param("page") Page page, @Param("mcStrokePageParam") McStrokePageParam mcStrokePageParam,
@Param("mcId") long mcId); @Param("mcId") long mcId, @Param("language") String language);
/** /**
* 收款记录 * 收款记录
...@@ -90,6 +91,6 @@ public interface StrokeMapper extends BaseMapper<Stroke> { ...@@ -90,6 +91,6 @@ public interface StrokeMapper extends BaseMapper<Stroke> {
* @param id * @param id
* @return * @return
*/ */
McStrokeQueryVo getStrokeInfo(@Param("mcId") Long mcId,@Param("id") Long id); McStrokeQueryVo getStrokeInfo(@Param("mcId") Long mcId, @Param("id") Long id);
} }
...@@ -73,9 +73,10 @@ public interface StrokeService extends BaseService<Stroke> { ...@@ -73,9 +73,10 @@ public interface StrokeService extends BaseService<Stroke> {
* 商家端,分页获取行程接口 * 商家端,分页获取行程接口
* *
* @param mcStrokePageParam * @param mcStrokePageParam
* @param language
* @return * @return
*/ */
Paging<McStrokeQueryVo> getMcStrokePageList(McStrokePageParam mcStrokePageParam); Paging<McStrokeQueryVo> getMcStrokePageList(McStrokePageParam mcStrokePageParam, String language);
/** /**
* 收款记录 * 收款记录
......
...@@ -111,10 +111,10 @@ public class StrokeServiceImpl extends BaseServiceImpl<StrokeMapper, Stroke> imp ...@@ -111,10 +111,10 @@ public class StrokeServiceImpl extends BaseServiceImpl<StrokeMapper, Stroke> imp
} }
@Override @Override
public Paging<McStrokeQueryVo> getMcStrokePageList(McStrokePageParam mcStrokePageParam) { public Paging<McStrokeQueryVo> getMcStrokePageList(McStrokePageParam mcStrokePageParam, String language) {
Page<StrokeQueryVo> page = new PageInfo<>(mcStrokePageParam); Page<StrokeQueryVo> page = new PageInfo<>(mcStrokePageParam);
JwtToken jwtToken = (JwtToken) SecurityUtils.getSubject().getPrincipal(); JwtToken jwtToken = (JwtToken) SecurityUtils.getSubject().getPrincipal();
IPage<McStrokeQueryVo> mcStrokePageList = strokeMapper.getMcStrokePageList(page, mcStrokePageParam, jwtToken.getMcId()); IPage<McStrokeQueryVo> mcStrokePageList = strokeMapper.getMcStrokePageList(page, mcStrokePageParam, jwtToken.getMcId(), language);
return new Paging<McStrokeQueryVo>(mcStrokePageList); return new Paging<McStrokeQueryVo>(mcStrokePageList);
} }
......
...@@ -18,8 +18,6 @@ ...@@ -18,8 +18,6 @@
user_id, user_id,
mu.username AS merchantName, mu.username AS merchantName,
arrive_plain_type_id, arrive_plain_type_id,
back_outset_airport_name,
back_arrive_airport_name,
payment_status, payment_status,
audit_status, audit_status,
user_recharge_bank, user_recharge_bank,
...@@ -56,8 +54,6 @@ ...@@ -56,8 +54,6 @@
outset_airport_name, outset_airport_name,
arrive_airport_name, arrive_airport_name,
arrive_plain_type_id, arrive_plain_type_id,
back_outset_airport_name,
back_arrive_airport_name,
payment_status,audit_status, payment_status,audit_status,
user_recharge_money, user_recharge_money,
user_recharge_bank, user_recharge_bank,
...@@ -164,8 +160,6 @@ ...@@ -164,8 +160,6 @@
s.money, s.money,
s.user_id, s.user_id,
s.arrive_plain_type_id, s.arrive_plain_type_id,
s.back_outset_airport_name,
s.back_arrive_airport_name,
s.choose_plain_type, s.choose_plain_type,
s.payment_status, s.payment_status,
s.audit_status, s.audit_status,
...@@ -177,10 +171,20 @@ ...@@ -177,10 +171,20 @@
s.user_recharge_time, s.user_recharge_time,
s.is_discount, s.is_discount,
s.payment_channel, s.payment_channel,
ctco.city_name_cn as city_outset_name, <choose>
ctco.airport_name_cn as outset_airport_name, <when test="language !='zh_CN'">
ctca.city_name_cn as city_arrive_name, ctco.city_name_en as city_outset_name,
ctca.airport_name_cn as arrive_airport_name, ctco.airport_name_en as outset_airport_name,
ctca.city_name_en as city_arrive_name,
ctca.airport_name_en as arrive_airport_name,
</when>
<otherwise>
ctco.city_name_cn as city_outset_name,
ctco.airport_name_cn as outset_airport_name,
ctca.city_name_cn as city_arrive_name,
ctca.airport_name_cn as arrive_airport_name,
</otherwise>
</choose>
CONCAT( au.surname, au.name) AS applicant, CONCAT( au.surname, au.name) AS applicant,
pt.name AS plain_type_name, pt.name AS plain_type_name,
au.phone AS phone_number au.phone AS phone_number
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment