提交 b5078b3f authored 作者: sin's avatar sin

- 添加一个搜索功能呢

上级 bca1afd3
...@@ -10,10 +10,7 @@ import io.swagger.annotations.Api; ...@@ -10,10 +10,7 @@ import io.swagger.annotations.Api;
import org.apache.dubbo.config.annotation.Reference; import org.apache.dubbo.config.annotation.Reference;
import org.springframework.beans.factory.annotation.Autowired; 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.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/** /**
* 订单退货 * 订单退货
...@@ -35,4 +32,10 @@ public class AdminOrderReturnController { ...@@ -35,4 +32,10 @@ public class AdminOrderReturnController {
OrderReturnQueryDTO queryDTO = OrderReturnConvert.INSTANCE.convert(queryPO); OrderReturnQueryDTO queryDTO = OrderReturnConvert.INSTANCE.convert(queryPO);
return orderReturnService.orderReturnList(queryDTO); return orderReturnService.orderReturnList(queryDTO);
} }
@PostMapping("agree")
public CommonResult agree(@RequestParam("id") Integer id) {
CommonResult commonResult = orderReturnService.agree(id);
return commonResult;
}
} }
package cn.iocoder.mall.order.api.exception;
/**
* 订单退回 - 不存在
*
* @author Sin
* @time 2019/5/8 6:17 PM
*/
public class OrderReturnNonExistentException {
}
...@@ -57,4 +57,12 @@ public interface OrderReturnMapper { ...@@ -57,4 +57,12 @@ public interface OrderReturnMapper {
* @return * @return
*/ */
List<OrderReturnDO> selectList(OrderReturnQueryDTO queryDTO); List<OrderReturnDO> selectList(OrderReturnQueryDTO queryDTO);
/**
* 查询 - 根据 id 查询
*
* @param id
* @return
*/
OrderReturnDO selectById(Integer id);
} }
...@@ -140,4 +140,13 @@ public class OrderReturnServiceImpl implements OrderReturnService { ...@@ -140,4 +140,13 @@ public class OrderReturnServiceImpl implements OrderReturnService {
.setTotalCount(totalCount) .setTotalCount(totalCount)
); );
} }
@Override
public CommonResult agree(Integer id) {
OrderReturnDO orderReturnDO = orderReturnMapper.selectById(id);
if (orderReturnDO == null) {
}
return null;
}
} }
...@@ -145,4 +145,14 @@ ...@@ -145,4 +145,14 @@
<bind name="limitIndex" value="pageSize * (index - 1)"/> <bind name="limitIndex" value="pageSize * (index - 1)"/>
LIMIT #{limitIndex}, #{pageSize} LIMIT #{limitIndex}, #{pageSize}
</select> </select>
<!--
查询 - 根据 id 查询
-->
<select id="selectById" resultType="cn.iocoder.mall.order.biz.dataobject.OrderReturnDO">
SELECT
<include refid="FIELDS"/>
FROM `order_return`
WHERE id = #{id}
</select>
</mapper> </mapper>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论