注解整理
1、实体类中:
@Data
@Entity
@Table(name="vm_card_type")
@GeneratedValue(strategy = GenerationType.AUTO,generator = "SEQ_vm_card_trans_log")
@SequenceGenerator(name = "SEQ_vm_card_trans_log",sequenceName = "SEQ_vm_card_trans_log")
@Id
@Column(name = "id")
例如:
@Data
@Entity
@Table(name="vm_card_type")
public class CardType {
@Id
@GeneratedValue(strategy = GenerationType.AUTO,generator = "SEQ_vm_card_trans_log")
@SequenceGenerator(name = "SEQ_vm_card_trans_log",sequenceName = "SEQ_vm_card_trans_log")
@Column(name = "id")
private Long id;//卡种类id
@Column(name = "type_name")
private String typeName;//卡种类(0-磁条卡,1-IC卡)
}
2、controller中:
@RestController
@RequestMapping("/cardType")
@Autowired
@ApiPermission
@GetMapping("/getCardType")
@PostMapping("/addCardType")
@PutMapping("/updateCardType")
@DeleteMapping("/deleteCardType/{id}")
3、service中:
@Service
例如:
@Service
public class CardTypeService implements ICardTypeService {
}
4、dao中:
@Repository
@Transactional(readOnly=true)
例如:
public interface CardTypeDao extends IBaseRepository<CardType,Long> {
}