fix
This commit is contained in:
@@ -32,5 +32,12 @@ public class TallyBookDAO {
|
||||
return tallyBookMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
public TallyBookDO getById(Long id){
|
||||
if(id == null){
|
||||
return null;
|
||||
}
|
||||
return tallyBookMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.alibaba.excel.util.CollectionUtils;
|
||||
import com.cool.store.entity.TallyBookDetailDO;
|
||||
import com.cool.store.mapper.TallyBookDetailMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/04/01/13:38
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Repository
|
||||
public class TallyBookDetailDAO {
|
||||
@Resource
|
||||
private TallyBookDetailMapper tallyBookDetailMapper;
|
||||
public Integer batchInsert(List<TallyBookDetailDO> tallyBookDetailDOList) {
|
||||
if (CollectionUtils.isEmpty(tallyBookDetailDOList)){
|
||||
return null;
|
||||
}
|
||||
return tallyBookDetailMapper.batchInsert(tallyBookDetailDOList);
|
||||
}
|
||||
|
||||
public Integer batchDeleteByTallyBookId(Long tallyBookId){
|
||||
Example example = new Example(TallyBookDetailDO.class);
|
||||
example.createCriteria().andEqualTo("tallyBookId",tallyBookId);
|
||||
return tallyBookDetailMapper.deleteByExample(example);
|
||||
}
|
||||
|
||||
public List<TallyBookDetailDO> getTallyBookDetailListByTallyBookId(Long tallyBookId){
|
||||
Example example = new Example(TallyBookDetailDO.class);
|
||||
example.createCriteria().andEqualTo("tallyBookId",tallyBookId);
|
||||
return tallyBookDetailMapper.selectByExample(example);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.TallyBookDetailDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/04/01/13:36
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
public interface TallyBookDetailMapper extends Mapper<TallyBookDetailDO> {
|
||||
|
||||
Integer batchInsert(@Param("list") List<TallyBookDetailDO> tallyBookDetailDOList);
|
||||
}
|
||||
@@ -31,6 +31,9 @@
|
||||
<result column="opportunity_point_code" jdbcType="VARCHAR" property="opportunityPointCode"/>
|
||||
<result column="opportunity_point_name" jdbcType="VARCHAR" property="opportunityPointName"/>
|
||||
<result column="open_shop_name" jdbcType="VARCHAR" property="openShopName"/>
|
||||
<result column="province_code" jdbcType="VARCHAR" property="provinceCode"/>
|
||||
<result column="city_code" jdbcType="VARCHAR" property="cityCode"/>
|
||||
<result column="district_code" jdbcType="VARCHAR" property="districtCode"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="allColumn">
|
||||
@@ -38,7 +41,8 @@
|
||||
development_manager, operate_user_id,
|
||||
development_time, point_status, point_score, select_status, submit_audit_count, point_source, deleted,
|
||||
create_time, update_time,
|
||||
province, city, district, township, opportunity_point_code, opportunity_point_name,open_shop_name
|
||||
province, city, district, township, opportunity_point_code, opportunity_point_name,open_shop_name,
|
||||
province_code, city_code, district_code
|
||||
</sql>
|
||||
|
||||
<select id="getMyPointData" resultType="com.cool.store.vo.point.PointHomePageDataVO">
|
||||
@@ -107,6 +111,9 @@
|
||||
#{regionId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="request.areaCode!=null and request.areaCode!=''">
|
||||
and (province_code = #{request.areaCode} || city_code = #{request.areaCode} || county_code = #{request.areaCode})
|
||||
</if>
|
||||
order by id desc
|
||||
</select>
|
||||
<select id="getSelectedShopNum" resultType="com.cool.store.dto.point.LineCountDTO">
|
||||
@@ -205,6 +212,9 @@
|
||||
<if test="request.storageStatus != null ">
|
||||
and storage_status = #{request.storageStatus}
|
||||
</if>
|
||||
<if test="request.areaCode!=null and request.areaCode!=''">
|
||||
and (province_code = #{request.areaCode} || city_code = #{request.areaCode} || county_code = #{request.areaCode})
|
||||
</if>
|
||||
order by id desc
|
||||
</select>
|
||||
<select id="getDataByShopIdAndLineId" resultType="com.cool.store.entity.PointInfoDO">
|
||||
|
||||
@@ -142,6 +142,10 @@
|
||||
<if test="request.status != null and request.status == 3">
|
||||
and pr.status in (5, 6)
|
||||
</if>
|
||||
<if test="request.areaCode!=null and request.areaCode 1=''">
|
||||
and (p.province_code = #{request.areaCode} or p.city_code = #{request.areaCode} or p.area_code = #{request.areaCode})
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
<update id="updateStatusByPointIdAndLineId">
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<!--mybatis-3-mapper.dtd:约束文件的名称,限制和检查在当前文件中出现的标签和属性符合mybatis的要求-->
|
||||
<!--namespace:命名空间,要有唯一的值,要求使用dao接口的权限定名称(一个dao接口对应一个mapper,namespace指明对应哪个dao接口)-->
|
||||
<mapper namespace="com.cool.store.mapper.TallyBookDetailMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.TallyBookDetailDO">
|
||||
<id column="id" property="id" jdbcType="BIGINT"/>
|
||||
<result column="tally_book_id" property="tallyBookId" jdbcType="BIGINT"/>
|
||||
<result column="field_name" property="fieldName" jdbcType="VARCHAR"/>
|
||||
<result column="field_value" property="fieldValue" jdbcType="DECIMAL"/>
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
<insert id="batchInsert">
|
||||
insert into xfsg_tally_book_detail (tally_book_id, field_name, field_value, create_time, update_time)
|
||||
values
|
||||
<foreach collection="tallyBookDetailDOList" item="item" separator=",">
|
||||
(#{item.tallyBookId,jdbcType=BIGINT},
|
||||
#{item.fieldName,jdbcType=VARCHAR},
|
||||
#{item.fieldValue,jdbcType=DECIMAL},
|
||||
#{item.createTime,jdbcType=TIMESTAMP},
|
||||
#{item.updateTime,jdbcType=TIMESTAMP})
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
@@ -12,19 +12,12 @@
|
||||
<result property="shopId" column="shop_id" jdbcType="BIGINT" />
|
||||
<result property="year" column="year" jdbcType="INTEGER" />
|
||||
<result property="month" column="month" jdbcType="INTEGER" />
|
||||
<result property="employeeSalary" column="employee_salary" jdbcType="DECIMAL" />
|
||||
<result property="administrativeExpenses" column="administrative_expenses" jdbcType="DECIMAL" />
|
||||
<result property="travelExpense" column="travel_expense" jdbcType="DECIMAL" />
|
||||
<result property="promotionExpense" column="promotion_expense" jdbcType="DECIMAL" />
|
||||
<result property="utilities" column="utilities" jdbcType="DECIMAL" />
|
||||
<result property="socialInsurancePremium" column="social_insurance_premium" jdbcType="DECIMAL" />
|
||||
<result property="staffDormitoryFee" column="staff_dormitory_fee" jdbcType="DECIMAL" />
|
||||
<result property="consumablesCost" column="consumables_cost" jdbcType="DECIMAL" />
|
||||
<result property="totalCost" column="total_cost" jdbcType="DECIMAL" />
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP" />
|
||||
<result property="createUser" column="create_user" jdbcType="VARCHAR" />
|
||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP" />
|
||||
<result property="updateUser" column="update_user" jdbcType="VARCHAR" />
|
||||
<result property="status" column="status" jdbcType="TINYINT"/>
|
||||
<result property="total" column="total" jdbcType="DECIMAL"/>
|
||||
<result property="operatorName" column="operator_name" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user