app后台--我的--完成--查看个人作品.
This commit is contained in:
parent
a33a91749e
commit
b073520b3d
@ -1105,6 +1105,48 @@ public class AppSystemController extends BaseController {
|
||||
return getDataTable(orderListDtoList);
|
||||
}
|
||||
|
||||
// 查看个人作品---所有不是草稿的作品
|
||||
@GetMapping("/getUserPublishWorkList")
|
||||
public TableDataInfo getUserPublishWorkList() {
|
||||
|
||||
|
||||
// 获取所有 work_status != "0" 的作品
|
||||
startPage();
|
||||
List<UserWork> userWorkList = userWorkService.selectUserPublishWorkList(getUserId());
|
||||
return getDataTable(userWorkList);
|
||||
|
||||
}
|
||||
|
||||
// 查看个人作品---草稿作品
|
||||
@GetMapping("/getUserDraftWorkList")
|
||||
public TableDataInfo getUserDraftWorkList() {
|
||||
|
||||
UserWork userWork = new UserWork();
|
||||
|
||||
userWork.setWorkStatus("0");
|
||||
userWork.setUserId(getUserId());
|
||||
|
||||
// 获取所有 work_status = "0" 的作品
|
||||
startPage();
|
||||
List<UserWork> userWorkList = userWorkService.selectUserWorkList(userWork);
|
||||
|
||||
return getDataTable(userWorkList);
|
||||
|
||||
}
|
||||
|
||||
// 查看个人作品详情
|
||||
@GetMapping("/getUserWork/{workId}")
|
||||
public AjaxResult getUserWork(@PathVariable("workId") Long workId) {
|
||||
|
||||
UserWork userWork = userWorkService.selectUserWorkByWorkId(workId);
|
||||
|
||||
|
||||
|
||||
|
||||
return AjaxResult.success(userWork);
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 获取系统资源位列表, 附带搜索功能
|
||||
@GetMapping("/getAllSource")
|
||||
|
||||
@ -25,6 +25,9 @@ public class OrderInfoDto {
|
||||
|
||||
private String workDetail;
|
||||
|
||||
// 作品状态
|
||||
private String workStatus;
|
||||
|
||||
private String city;
|
||||
private String scenic;
|
||||
private String part;
|
||||
@ -202,5 +205,13 @@ public class OrderInfoDto {
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public String getWorkStatus() {
|
||||
return workStatus;
|
||||
}
|
||||
|
||||
public void setWorkStatus(String workStatus) {
|
||||
this.workStatus = workStatus;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -26,12 +26,18 @@ public class OrderListDto {
|
||||
private String way;
|
||||
private String orderDetail;
|
||||
|
||||
// 订单状态
|
||||
private String status;
|
||||
|
||||
// 作品状态
|
||||
private String workStatus;
|
||||
|
||||
private String avatar;
|
||||
|
||||
private List<OrderInfoDto> orderInfoList;
|
||||
|
||||
|
||||
|
||||
public Long getOrderId() {
|
||||
return orderId;
|
||||
}
|
||||
@ -153,6 +159,14 @@ public class OrderListDto {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
|
||||
public String getWorkStatus() {
|
||||
return workStatus;
|
||||
}
|
||||
|
||||
public void setWorkStatus(String workStatus) {
|
||||
this.workStatus = workStatus;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -30,6 +30,10 @@ public interface UserWorkMapper
|
||||
*/
|
||||
public List<UserWork> selectUserWorkList(UserWork userWork);
|
||||
|
||||
|
||||
public List<UserWork> selectUserPublishWorkList(Long userId);
|
||||
|
||||
|
||||
/**
|
||||
* 新增用户作品
|
||||
*
|
||||
|
||||
@ -29,6 +29,12 @@ public interface IUserWorkService
|
||||
*/
|
||||
public List<UserWork> selectUserWorkList(UserWork userWork);
|
||||
|
||||
/*
|
||||
* 获取所有不是草稿的作品
|
||||
* */
|
||||
public List<UserWork> selectUserPublishWorkList(Long userId);
|
||||
|
||||
|
||||
/**
|
||||
* 新增用户作品
|
||||
*
|
||||
|
||||
@ -46,6 +46,11 @@ public class UserWorkServiceImpl implements IUserWorkService
|
||||
return userWorkMapper.selectUserWorkList(userWork);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserWork> selectUserPublishWorkList(Long userId){
|
||||
return userWorkMapper.selectUserPublishWorkList(userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户作品
|
||||
*
|
||||
|
||||
@ -25,6 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="workDetail" column="detail"/>
|
||||
<result property="workName" column="work_name"/>
|
||||
<result property="workAddress" column="work_address"/>
|
||||
<result property="workStatus" column="work_status" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="coordinate" column="coordinate" />
|
||||
<result property="refundTime" column="refund_time"/>
|
||||
@ -53,7 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
<select id="getOrderInfoDtoList" resultMap="OrderInfoDtoResult" >
|
||||
|
||||
select o.order_info_id, o.source_id, o.work_id, s.city, s.scenic, s.part,w.work_name ,w.detail, w.work_address, o.status, w.user_id, s.coordinate, o.refund_time, o.id
|
||||
select o.order_info_id, o.source_id, o.work_id, s.city, s.scenic, s.part,w.work_name ,w.detail, w.work_address,w.work_status, o.status, w.user_id, s.coordinate, o.refund_time, o.id
|
||||
from order_info o
|
||||
left join sys_source s on o.source_id = s.source_id
|
||||
left join user_work w on o.work_id = w.work_id
|
||||
|
||||
@ -62,6 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="workAddress" column="work_address"/>
|
||||
<result property="coordinate" column="coordinate" />
|
||||
<result property="refundTime" column="refund_time"/>
|
||||
<!-- <result property="workS"-->
|
||||
<result property="id" column="id"/>
|
||||
|
||||
</resultMap>
|
||||
@ -96,7 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
select count(*) from sys_order where source_id = #{sourceId} and #{endTime} >= sys_order.start_time and sys_order.end_time >= #{startTime}
|
||||
</select>
|
||||
<select id="getOrderListDto" resultMap="OrderListDtoResult">
|
||||
select o.order_id, o.user_id, o.source_id, o.create_time, o.start_time, o.end_time, o.order_info_id, o.money, o.way, o.detail, o.status, o.refund, u.nick_name, u.phonenumber, u.avatar
|
||||
select o.order_id, o.user_id, o.source_id, o.create_time, o.start_time, o.end_time, o.order_info_id, o.money, o.way, o.detail, o.status , o.refund, u.nick_name, u.phonenumber, u.avatar
|
||||
from sys_order o
|
||||
left join sys_user u
|
||||
on o.user_id = u.user_id
|
||||
|
||||
@ -176,5 +176,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
|
||||
|
||||
</select>
|
||||
<select id="selectUserPublishWorkList" resultMap="UserWorkResult" parameterType="Long">
|
||||
|
||||
select *
|
||||
from user_work
|
||||
where work_status != "0" and user_id = #{userId}
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
@ -35,7 +35,7 @@ module.exports = {
|
||||
proxy: {
|
||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
target: `http://localhost:8080`,
|
||||
target: `http://localhost:8081`,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||
|
||||
Loading…
Reference in New Issue
Block a user