Commit f94d0670 authored by Quxl's avatar Quxl

查询保存补充申报信息

parent 27b6850e
...@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.ResponseBody; ...@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
import com.egolm.common.bean.Rjx; import com.egolm.common.bean.Rjx;
import com.egolm.film.api.member.service.MemberService; import com.egolm.film.api.member.service.MemberService;
import com.egolm.film.bean.Fc_member_film; import com.egolm.film.bean.Fc_member_film;
import com.egolm.film.bean.Fc_member_film_all;
import com.egolm.film.bean.Fc_member_film_director; import com.egolm.film.bean.Fc_member_film_director;
import com.egolm.film.bean.Fc_member_film_issuer; import com.egolm.film.bean.Fc_member_film_issuer;
import com.egolm.film.bean.Fc_member_film_playactor; import com.egolm.film.bean.Fc_member_film_playactor;
...@@ -103,7 +104,7 @@ public class MemberApplyController { ...@@ -103,7 +104,7 @@ public class MemberApplyController {
@ResponseBody @ResponseBody
@PostMapping("doApply") @PostMapping("doApply")
@ApiOperation("提交申报") @ApiOperation("提交申报")
@ApiImplicitParams({@ApiImplicitParam(paramType = "query", dataType = "string", required = true, name = "id")}) @ApiImplicitParams({@ApiImplicitParam(paramType = "query", dataType = "long", required = true, name = "id")})
public Object doApply(Long id) { public Object doApply(Long id) {
LoginToken loginToken = tokenService.getToken(); LoginToken loginToken = tokenService.getToken();
Integer member_id = (Integer)loginToken.getId(); Integer member_id = (Integer)loginToken.getId();
...@@ -111,4 +112,20 @@ public class MemberApplyController { ...@@ -111,4 +112,20 @@ public class MemberApplyController {
return Rjx.jsonOk(); return Rjx.jsonOk();
} }
@ResponseBody
@PostMapping("more")
@ApiOperation("获取更多影片信息")
@ApiImplicitParams({@ApiImplicitParam(paramType = "query", dataType = "string", required = true, name = "no")})
public Object more(String no) {
Fc_member_film_all more = memberService.queryMoreByNo(no);
return Rjx.jsonOk().setData(more);
}
@ResponseBody
@PostMapping("more")
@ApiOperation("获取更多影片信息")
public Object more(Fc_member_film_all more) {
memberService.saveOrUpdateMore(more);
return Rjx.jsonOk();
}
} }
...@@ -5,6 +5,7 @@ import java.util.Map; ...@@ -5,6 +5,7 @@ import java.util.Map;
import com.egolm.film.bean.Fc_member; import com.egolm.film.bean.Fc_member;
import com.egolm.film.bean.Fc_member_film; import com.egolm.film.bean.Fc_member_film;
import com.egolm.film.bean.Fc_member_film_all;
import com.egolm.film.bean.Fc_member_film_director; import com.egolm.film.bean.Fc_member_film_director;
import com.egolm.film.bean.Fc_member_film_issuer; import com.egolm.film.bean.Fc_member_film_issuer;
import com.egolm.film.bean.Fc_member_film_playactor; import com.egolm.film.bean.Fc_member_film_playactor;
...@@ -40,4 +41,8 @@ public interface MemberService { ...@@ -40,4 +41,8 @@ public interface MemberService {
void doApply(Integer member_id, Long member_film_id); void doApply(Integer member_id, Long member_film_id);
void saveOrUpdateMore(Fc_member_film_all more);
Fc_member_film_all queryMoreByNo(String no);
} }
...@@ -10,6 +10,7 @@ import com.egolm.common.jdbc.JdbcTemplate; ...@@ -10,6 +10,7 @@ import com.egolm.common.jdbc.JdbcTemplate;
import com.egolm.film.api.member.service.MemberService; import com.egolm.film.api.member.service.MemberService;
import com.egolm.film.bean.Fc_member; import com.egolm.film.bean.Fc_member;
import com.egolm.film.bean.Fc_member_film; import com.egolm.film.bean.Fc_member_film;
import com.egolm.film.bean.Fc_member_film_all;
import com.egolm.film.bean.Fc_member_film_director; import com.egolm.film.bean.Fc_member_film_director;
import com.egolm.film.bean.Fc_member_film_issuer; import com.egolm.film.bean.Fc_member_film_issuer;
import com.egolm.film.bean.Fc_member_film_playactor; import com.egolm.film.bean.Fc_member_film_playactor;
...@@ -97,4 +98,18 @@ public class MemberServiceImpl implements MemberService { ...@@ -97,4 +98,18 @@ public class MemberServiceImpl implements MemberService {
jdbcTemplate.executeUpdate("update fc_member_film set state = ?, apply_state = ? where id = ? and member_id = ?", 2, 2, member_film_id, member_id); jdbcTemplate.executeUpdate("update fc_member_film set state = ?, apply_state = ? where id = ? and member_id = ?", 2, 2, member_film_id, member_id);
} }
@Override
public void saveOrUpdateMore(Fc_member_film_all more) {
if(more.getId() == null) {
jdbcTemplate.save(more);
} else {
jdbcTemplate.update(more);
}
}
@Override
public Fc_member_film_all queryMoreByNo(String film_no) {
return jdbcTemplate.queryForBean("select * from fc_member_film_all where film_no = ?", Fc_member_film_all.class, film_no);
}
} }
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