Commit 3e69c63f authored by maliang's avatar maliang

类属性修改

parent 2473cec9
...@@ -2,10 +2,17 @@ package com.boot.security.server.dao; ...@@ -2,10 +2,17 @@ package com.boot.security.server.dao;
import com.boot.security.server.model.BaseSettlement; import com.boot.security.server.model.BaseSettlement;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import java.util.List; import java.util.List;
@Mapper @Mapper
public interface CopyrightDao { public interface CopyrightDao {
public List<BaseSettlement> selectTableListMonth(List<BaseSettlement> copyrightIdList); List<BaseSettlement> selectTableListMonth(List<BaseSettlement> copyrightIdList);
List<BaseSettlement> selectCopyrightAll();
@Update("update settlement_status set status=#{status},status_name=#{statusName} where report_time=#{reportTime} and copyright_id=#{copyrightId}")
int updateSettlementStatus(@Param("copyrightId") Integer copyrightId,@Param("report_time") String reportTime,@Param("status") Integer status,@Param("statusName") String statusName);
} }
...@@ -23,6 +23,24 @@ public class BaseSettlement { ...@@ -23,6 +23,24 @@ public class BaseSettlement {
private String total_ad_amount; // private String total_ad_amount; //
private String jiesuan_ad_amount; // private String jiesuan_ad_amount; //
private String kouliang_ad_amount; // private String kouliang_ad_amount; //
private Integer status;
private String status_name;
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public String getStatus_name() {
return status_name;
}
public void setStatus_name(String status_name) {
this.status_name = status_name;
}
public String getReport_date() { public String getReport_date() {
return report_date; return report_date;
......
...@@ -3,20 +3,20 @@ ...@@ -3,20 +3,20 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.boot.security.server.dao.CopyrightDao"> <mapper namespace="com.boot.security.server.dao.CopyrightDao">
<select id="selectTableListMonth" resultType="com.boot.security.server.model.BaseSettlement" > <select id="selectTableListMonth" resultType="com.boot.security.server.model.BaseSettlement" parameterType="java.util.List">
SELECT SELECT
a.report_date AS report_date,a.copyright_id,a.copyright_name, a.report_date AS report_date,a.copyright_id,a.copyright_name,
a.total_amount,IFNULL(b.total_ad_amount,0) total_ad_amount a.total_amount,IFNULL(b.total_ad_amount,0) total_ad_amount,c.status_name
FROM report_book_settlement_month a FROM report_book_settlement_month a
LEFT JOIN report_book_advert_month b LEFT JOIN report_book_advert_month b
ON a.report_date=b.report_date AND a.batch_id=b.batch_id AND a.batch_name=b.batch_name ON a.report_date=b.report_date AND a.batch_id=b.batch_id AND a.batch_name=b.batch_name
WHERE left join
<![CDATA[ settlement_status c
a.report_date >= #{startTime} and a.report_date <= #{endTime} on a.report_date=c.report_date and a.copyright_id=c.copyright_id
]]>
<if test="copyrightIdList != null and copyrightIdList.size>0"> <if test="copyrightIdList != null and copyrightIdList.size>0">
and a.copyright_id in WHERE
a.copyright_id in
<foreach collection="copyrightIdList" item="item" open="(" close=")" separator=","> <foreach collection="copyrightIdList" item="item" open="(" close=")" separator=",">
#{item} #{item}
</foreach> </foreach>
...@@ -24,4 +24,12 @@ ...@@ -24,4 +24,12 @@
ORDER BY a.total_amount DESC ; ORDER BY a.total_amount DESC ;
</select> </select>
<select id="selectCopyrightAll" resultType="com.boot.security.server.model.BaseSettlement" >
SELECT a.copyright_id,a.copyright_name
FROM report_book_settlement_month a
LEFT JOIN report_book_advert_month b
ON a.report_date=b.report_date AND a.batch_id=b.batch_id AND a.batch_name=b.batch_name
group by a.copyright_id,a.copyright_name
</select>
</mapper> </mapper>
\ No newline at end of file
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