提交 | 用户 | 时间
|
58d006
|
1 |
package com.mandi.fendan.mapper; |
A |
2 |
|
|
3 |
import java.util.List; |
|
4 |
import java.util.Map; |
|
5 |
|
|
6 |
import org.apache.ibatis.annotations.Delete; |
|
7 |
import org.apache.ibatis.annotations.Insert; |
|
8 |
import org.apache.ibatis.annotations.Param; |
|
9 |
import org.apache.ibatis.annotations.Select; |
|
10 |
import org.apache.ibatis.annotations.Update; |
|
11 |
|
|
12 |
import com.mandi.basicconfig.persist.Ncywdy; |
|
13 |
import com.mandi.fendan.persist.Fd_Company; |
|
14 |
import com.mandi.fendan.persist.Fd_Company_Ywdy; |
|
15 |
|
|
16 |
public interface Fd_CompanyMapper{ |
|
17 |
@Select("select a.* from fd_company a where a.id=#{id}") |
|
18 |
public Fd_Company get(String id); |
|
19 |
@Select("select a.* from fd_company a where a.companyNo=#{companyNo}") |
|
20 |
public Fd_Company getByCompanyNo(String companyNo); |
|
21 |
|
|
22 |
@Select("select top 1 a.* from fd_company a where a.hasSPR=#{hasSPR}") |
|
23 |
public Fd_Company getFdcbyhasSPR(boolean hasSPR); |
|
24 |
|
|
25 |
@Delete("delete from fd_company where id=#{id}") |
|
26 |
public int del(String id); |
|
27 |
@Delete("delete from fd_company where companyNo=#{companyNo}") |
|
28 |
public int delByCompanyNo(String companyNo); |
|
29 |
|
|
30 |
@Update("update fd_company set cname=#{cname},companyNo=#{companyNo},ctime=#{ctime},hdpinyin=#{hdpinyin},name=#{name},note=#{note},pinyin=#{pinyin},hasSPR=#{hasSPR} where id=#{id} ") |
|
31 |
public int update(Fd_Company fd_company); |
|
32 |
@Insert("insert into fd_company (id,cname,companyNo,ctime,hdpinyin,name,note,pinyin,hasSPR) values (#{id},#{cname},#{companyNo},#{ctime},#{hdpinyin},#{name},#{note},#{pinyin},#{hasSPR})") |
|
33 |
public int insert(Fd_Company fd_company); |
|
34 |
|
|
35 |
/** |
|
36 |
* 列表分页查询 |
|
37 |
* @param mp |
|
38 |
* @return |
|
39 |
*/ |
|
40 |
public List<Fd_Company> getList1(Map<String, Object> mp); |
|
41 |
public List<Fd_Company> getList(Map<String, Object> mp); |
|
42 |
public int getPages(Map<String, Object> mp); |
|
43 |
|
|
44 |
@Select("select * from fd_company ") |
|
45 |
public List<Fd_Company> getall(); |
|
46 |
|
|
47 |
@Select("select * from fd_company_ywdy where companyNo=#{companyNo}") |
|
48 |
public List<Fd_Company_Ywdy> getcynexuslist(String companyNo); |
|
49 |
@Select("select b.code code,b.name name from fd_company_ywdy a LEFT JOIN nc_ywdy b on a.ywdyNo=b.code where companyNo=#{companyNo} ") |
|
50 |
public List<Ncywdy> getncYwdylist(String companyNo); |
|
51 |
@Delete("delete from fd_company_ywdy where companyNo=#{companyNo}") |
|
52 |
public int delCYnexus(String companyNo); |
|
53 |
@Insert("insert into fd_company_ywdy (companyNo,ywdyNo) values (#{companyNo},#{ywdyNo})") |
|
54 |
public int insertCYnexus(@Param("companyNo")String companyNo,@Param("ywdyNo") String ywdyNo); |
|
55 |
|
|
56 |
} |