Commit f7abffa4 authored by Quxl's avatar Quxl

查询申报项目列表

parent 01dc024b
package com.egolm.film.api.member;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -7,6 +11,9 @@ import org.springframework.web.bind.annotation.ResponseBody;
import com.egolm.common.bean.Rjx;
import com.egolm.film.api.member.model.ApplyModel;
import com.egolm.film.api.member.service.MemberService;
import com.egolm.film.login.service.MemberTokenService;
import com.egolm.film.model.LoginToken;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
......@@ -17,12 +24,21 @@ import io.swagger.annotations.ApiOperation;
@Controller
@RequestMapping("member/apply")
public class MemberApplyController {
@Autowired
private MemberService memberService;
@Autowired
private MemberTokenService tokenService;
@ResponseBody
@PostMapping("list")
@ApiOperation("申报项目查询")
public Object list() {
return Rjx.jsonOk();
LoginToken loginToken = tokenService.getToken();
Integer member_id = (Integer)loginToken.getId();
List<Map<String, Object>> list = memberService.queryListByMemberID(member_id);
return Rjx.jsonOk().setData(list);
}
@ResponseBody
......
package com.egolm.film.api.member.service;
import java.util.List;
import java.util.Map;
import com.egolm.film.bean.Fc_member;
public interface MemberService {
......@@ -18,4 +21,6 @@ public interface MemberService {
void updateMember(Integer id, String email, String realname, String address, String company, String tel);
List<Map<String, Object>> queryListByMemberID(Integer member_id);
}
package com.egolm.film.api.member.service.impl;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -54,4 +57,10 @@ public class MemberServiceImpl implements MemberService {
jdbcTemplate.executeUpdate(sql, email, realname, address, company, tel, id);
}
@Override
public List<Map<String, Object>> queryListByMemberID(Integer member_id) {
String sql = "select * from fc_member_film where member_id = ?";
return jdbcTemplate.queryForList(sql, member_id);
}
}
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