| | |
| | | @Select("SELECT * FROM tb_transition WHERE cus_id=#{cusId} AND pro_id =#{proId} and ISNULL(tj_num)") |
| | | public List<TbTransition> getTbTransitionListByCusIdAndPacIdAndProId(@Param("cusId") String cusId,@Param("proId") String proId); |
| | | |
| | | @Select("SELECT DISTINCT pac_id FROM tb_transition WHERE cus_id=#{cusId} AND !ISNULL(pac_id)") |
| | | @Select("SELECT DISTINCT pac_id FROM tb_transition WHERE cus_id=#{cusId} AND !ISNULL(pac_id) AND ISNULL(tj_num)") |
| | | String getTbTransitionPacIdByCusIdAndPac(String cusId); |
| | | |
| | | @Select("SELECT SUM(a.now_price) now_price FROM tb_transition a WHERE cus_id=#{cusId}") |
| | |
| | | "a.tj_num=#{tjNum}"+ |
| | | " WHERE a.cus_id=#{cusId} AND ISNULL(a.tj_num) ") |
| | | boolean updateTbTransitionPriceByCusId(@Param("cusId")String cusId,@Param("discount")BigDecimal discount,@Param("tjNum")String tjNum); |
| | | |
| | | |
| | | @Update("UPDATE tb_transition a SET \n" + |
| | | "a.tj_num=#{tjNum}"+ |
| | | " WHERE a.cus_id=#{cusId} AND ISNULL(a.tj_num) ") |
| | | boolean updateTbTransitionTjNumByCusId(@Param("cusId")String cusId,@Param("tjNum")String tjNum); |
| | | |
| | | |
| | | @Update("UPDATE tb_transition a SET \n" + |
| | |
| | | "\tLEFT JOIN tj_project c ON b.pro_id = c.pro_parent_id\n" + |
| | | "\tLEFT JOIN tj_package d ON a.pac_id=d.pac_id\n" + |
| | | "\t\n" + |
| | | "\tWHERE a.pac_id=#{pacId} and c.deleted=0") |
| | | "\tWHERE a.pac_id=#{pacId} and c.deleted=0 and c.pro_status=0") |
| | | void saveRedisTransitionByPacId(@Param("cusId") String cusId,@Param("cardId")String cardId,@Param("pacId") Long pacId); |
| | | |
| | | |
| | |
| | | "\ttj_project b \n" + |
| | | "\tON a.pro_parent_id = b.pro_id \n" + |
| | | "WHERE\n" + |
| | | "\ta.pro_id = #{proId}") |
| | | "\ta.pro_id = #{proId} and a.pro_status=0") |
| | | void saveRedisTransitionByProId(@Param("cusId")String cusId,@Param("cardId")String cardId,@Param("proId") Long proId); |
| | | |
| | | |
| | |
| | | "\ttj_grouping_pro a\n" + |
| | | "\tLEFT JOIN tj_project b ON a.pro_id = b.pro_id \n" + |
| | | "\tLEFT JOIN tj_project c ON c.pro_parent_id=b.pro_id\n" + |
| | | "WHERE 1=1 AND a.grouping_id =#{groupingId} and c.deleted=0 ") |
| | | "WHERE 1=1 AND a.grouping_id =#{groupingId} and c.deleted=0 and c.pro_status=0") |
| | | boolean saveTemoTransitionByGroupingId(@Param("cusId")String cusId,@Param("groupingId")String groupingId); |
| | | |
| | | |
| | |
| | | "JOIN tj_dw_grouping d ON d.id=a.grouping_id \n" + |
| | | "\tLEFT JOIN tj_project b ON a.pro_id = b.pro_id \n" + |
| | | "\tLEFT JOIN tj_project c ON c.pro_parent_id=b.pro_id\n" + |
| | | "WHERE 1=1 AND a.grouping_id =#{groupingId} and c.deleted=0 ") |
| | | "WHERE 1=1 AND a.grouping_id =#{groupingId} and c.deleted=0 and c.pro_status=0") |
| | | boolean ttsaveTemoTransitionByGroupingId(@Param("cusId")String cusId,@Param("cardId") String cardId,@Param("groupingId") String groupingId); |
| | | |
| | | |
| | |
| | | String ttpanduantaocanshifouchongfu(@Param("idCard") String idCard,@Param("pacId") Long pacId); |
| | | |
| | | |
| | | @Select("SELECT a.parent_pro_name pro_name,b.pro_type,SUM(a.now_price) now_price,SUM(a.ord_price) ord_price,b.pro_check_method,a.discount FROM tb_transition a " + |
| | | @Select("SELECT a.parent_pro_id,a.cus_id,a.parent_pro_name pro_name,b.pro_type,SUM(a.now_price) now_price,SUM(a.ord_price) ord_price,b.pro_check_method,a.discount FROM tb_transition a " + |
| | | "LEFT JOIN tj_project b ON b.pro_id=a.parent_pro_id WHERE ISNULL(a.tj_num) AND a.cus_id=#{idCard} GROUP BY a.parent_pro_id") |
| | | List<TbTransition> newgetTransitionList(String cusId); |
| | | |
| | | |
| | | @Select("SELECT * FROM tb_transition a WHERE a.tj_num=#{tjNumber} AND a.cus_id=#{idCard} AND a.now_price>0 AND a.discount !=10 ORDER BY a.create_time DESC LIMIT 1 \n") |
| | | TbTransition getOnwTbTransition(@Param("idCard") String idCard,@Param("tjNumber")String tjNumber); |
| | | } |