Prechádzať zdrojové kódy

Merge branch 'feature/asyncOrder' of http://git.aseanbusiness.cn/qzyReal/market-server into feature/asyncOrder

qzy 2 mesiacov pred
rodič
commit
cba2b6aa70

+ 185 - 0
sp-service/level-one-server/src/main/java/com/pj/tb_people_tax_account/TbPeopleTaxAccount.java

@@ -0,0 +1,185 @@
+package com.pj.tb_people_tax_account;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.EqualsAndHashCode;
+
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+/**
+ * Model: tb_people_tax_account -- 边民-税务开户信息
+ * @author lbl
+ */
+@Data
+@Accessors(chain = true)
+@TableName(TbPeopleTaxAccount.TABLE_NAME)
+@EqualsAndHashCode(callSuper = false)
+public class TbPeopleTaxAccount extends Model<TbPeopleTaxAccount> implements Serializable {
+
+	// ---------- 模块常量 ----------
+	/**
+	 * 序列化版本id
+	 */
+	private static final long serialVersionUID = 1L;
+	/**
+	 * 此模块对应的表名
+	 */
+	public static final String TABLE_NAME = "tb_people_tax_account";
+	/**
+	 * 此模块对应的权限码
+	 */
+	public static final String PERMISSION_CODE = "tb-people-tax-account";
+	public static final String PERMISSION_CODE_ADD = "tb-people-tax-account-add";
+	public static final String PERMISSION_CODE_EDIT = "tb-people-tax-account-edit";
+	public static final String PERMISSION_CODE_DEL = "tb-people-tax-account-del";
+
+
+
+
+	// ---------- 表中字段 ----------
+	/**
+	 * 主键id
+	 */
+	@TableId(type = IdType.AUTO)
+	private String id;
+
+	/**
+	 * 边民表ID
+	 */
+	private Long peopleId;
+
+	/**
+	 * 个体户名称
+	 */
+	private String businessName;
+
+	/**
+	 * 社会统一信用代码
+	 */
+	private String dutyParagraph;
+
+	/**
+	 * 经营者(边民)
+	 */
+	private String name;
+
+	/**
+	 * 地址
+	 */
+	private String address;
+
+	/**
+	 * 组成形式
+	 */
+	private String form;
+
+	/**
+	 * 联系人
+	 */
+	private String contacts;
+
+	/**
+	 * 联系电话
+	 */
+	private String phone;
+
+	/**
+	 * 经营场所
+	 */
+	private String businessAddress;
+
+	/**
+	 * 经营范围
+	 */
+	private String businessScope;
+
+	/**
+	 * 经营状态
+	 */
+	private String businessStatus;
+
+	/**
+	 * 身份证
+	 */
+	private String idCard;
+
+	/**
+	 * 开户行
+	 */
+	private String bankName;
+
+	/**
+	 * 银行账号
+	 */
+	private String bankCode;
+
+	/**
+	 * 开票商
+	 */
+	private String invoiceBusiness;
+
+	/**
+	 * 开票人
+	 */
+	private String invoicePeople;
+
+	/**
+	 * 收款人
+	 */
+	private String payee;
+
+	/**
+	 * 复核人
+	 */
+	private String checker;
+
+	/**
+	 * 创建时间
+	 */
+	private Date createTime;
+
+	/**
+	 * 创建人编号
+	 */
+	private String createBy;
+
+	/**
+	 * 创建人名称
+	 */
+	private String createName;
+
+	/**
+	 * 更新时间
+	 */
+	private Date updateTime;
+
+	/**
+	 * 更新人编号
+	 */
+	private String updateBy;
+
+	/**
+	 * 更新人名称
+	 */
+	private String updateName;
+
+	/**
+	 * 互市区id
+	 */
+	private Long tradeAreaId;
+
+	/**
+	 * 互市区名称
+	 */
+	private String tradeAreaName;
+
+
+
+
+
+
+}

+ 88 - 0
sp-service/level-one-server/src/main/java/com/pj/tb_people_tax_account/TbPeopleTaxAccountController.java

@@ -0,0 +1,88 @@
+package com.pj.tb_people_tax_account;
+
+import java.util.List;
+import com.pj.utils.so.SoMap;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.*;
+
+import com.pj.utils.sg.*;
+import com.pj.project4sp.SP;
+
+import com.pj.current.satoken.StpUserUtil;
+import cn.dev33.satoken.annotation.SaCheckPermission;
+
+
+/**
+ * Controller: tb_people_tax_account -- 边民-税务开户信息
+ * @author lbl
+ */
+@RestController
+@RequestMapping("/TbPeopleTaxAccount/")
+public class TbPeopleTaxAccountController {
+
+	/** 底层 Service 对象 */
+	@Autowired
+	private TbPeopleTaxAccountService tbPeopleTaxAccountService;
+
+	/** 增 */
+	@RequestMapping("add")
+	@SaCheckPermission(TbPeopleTaxAccount.PERMISSION_CODE_ADD)
+	public AjaxJson add(TbPeopleTaxAccount t){
+
+		tbPeopleTaxAccountService.add(t);
+		t = tbPeopleTaxAccountService.getById(SP.publicMapper.getPrimarykey());
+		return AjaxJson.getSuccessData(t);
+	}
+
+	/** 删 */
+	@RequestMapping("delete")
+	@SaCheckPermission(TbPeopleTaxAccount.PERMISSION_CODE_DEL)
+	public AjaxJson delete(Long id){
+		 tbPeopleTaxAccountService.delete(id);
+		return AjaxJson.getSuccess();
+	}
+
+	/** 删 - 根据id列表 */
+	@RequestMapping("deleteByIds")
+	@SaCheckPermission(TbPeopleTaxAccount.PERMISSION_CODE_DEL)
+	public AjaxJson deleteByIds(){
+		List<Long> ids = SoMap.getRequestSoMap().getListByComma("ids", long.class);
+		int line = SP.publicMapper.deleteByIds(TbPeopleTaxAccount.TABLE_NAME, ids);
+		return AjaxJson.getByLine(line);
+	}
+
+	/** 改 */
+	@RequestMapping("update")
+	@SaCheckPermission(TbPeopleTaxAccount.PERMISSION_CODE_EDIT)
+	public AjaxJson update(TbPeopleTaxAccount t){
+		tbPeopleTaxAccountService.update(t);
+		return AjaxJson.getSuccess();
+	}
+
+	/** 查 - 根据id */
+	@RequestMapping("getById")
+		@SaCheckPermission(TbPeopleTaxAccount.PERMISSION_CODE)
+	public AjaxJson getById(String id){
+		TbPeopleTaxAccount t = tbPeopleTaxAccountService.getById(id);
+		return AjaxJson.getSuccessData(t);
+	}
+
+	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */
+	@RequestMapping("getList")
+		@SaCheckPermission(TbPeopleTaxAccount.PERMISSION_CODE)
+	public AjaxJson getList() {
+		SoMap so = SoMap.getRequestSoMap();
+		List<TbPeopleTaxAccount> list = tbPeopleTaxAccountService.getList(so.startPage());
+		return AjaxJson.getPageData(so.getDataCount(), list);
+	}
+
+
+
+
+
+
+
+
+
+}

+ 30 - 0
sp-service/level-one-server/src/main/java/com/pj/tb_people_tax_account/TbPeopleTaxAccountMapper.java

@@ -0,0 +1,30 @@
+package com.pj.tb_people_tax_account;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Mapper;
+
+import com.pj.utils.so.*;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.springframework.stereotype.Repository;
+
+/**
+ * Mapper: tb_people_tax_account -- 边民-税务开户信息
+ * @author lbl 
+ */
+
+@Mapper
+@Repository
+public interface TbPeopleTaxAccountMapper extends BaseMapper <TbPeopleTaxAccount> {
+
+
+
+	/**
+	 * 查集合 - 根据条件(参数为空时代表忽略指定条件)
+	 * @param so 参数集合 
+	 * @return 数据列表 
+	 */
+	List<TbPeopleTaxAccount> getList(SoMap so);
+
+
+}

+ 93 - 0
sp-service/level-one-server/src/main/java/com/pj/tb_people_tax_account/TbPeopleTaxAccountMapper.xml

@@ -0,0 +1,93 @@
+<?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">
+<mapper namespace="com.pj.tb_people_tax_account.TbPeopleTaxAccountMapper">
+
+
+
+
+	<!-- ================================== 查询相关 ================================== -->
+	<!-- select id, people_id, business_name, duty_paragraph, name, address, form, contacts, phone, business_address, business_scope, business_status, id_card, bank_name, bank_code, invoice_business, invoice_people, payee, checker, create_time, create_by, create_name, update_time, update_by, update_name from tb_people_tax_account  -->
+
+	<!-- 通用映射:自动模式 -->
+	<resultMap id="model" autoMapping="true" type="com.pj.tb_people_tax_account.TbPeopleTaxAccount"></resultMap>
+
+	<!-- 公共查询sql片段 -->
+	<sql id="select_sql">
+		select *
+		from tb_people_tax_account
+	</sql>
+
+
+	<!-- 查集合 - 根据条件(参数为空时代表忽略指定条件) [G] -->
+	<select id="getList" resultMap="model">
+		<include refid="select_sql"></include>
+		<where>
+			<if test=' this.has("id") '> and id = #{id} </if>
+			<if test=' this.has("peopleId") '> and people_id = #{peopleId} </if>
+			<if test=' this.has("businessName") '> and business_name = #{businessName} </if>
+			<if test=' this.has("dutyParagraph") '> and duty_paragraph = #{dutyParagraph} </if>
+			<if test=' this.has("name") '> and name = #{name} </if>
+			<if test=' this.has("address") '> and address = #{address} </if>
+			<if test=' this.has("form") '> and form = #{form} </if>
+			<if test=' this.has("contacts") '> and contacts = #{contacts} </if>
+			<if test=' this.has("phone") '> and phone = #{phone} </if>
+			<if test=' this.has("businessAddress") '> and business_address = #{businessAddress} </if>
+			<if test=' this.has("businessScope") '> and business_scope = #{businessScope} </if>
+			<if test=' this.has("businessStatus") '> and business_status = #{businessStatus} </if>
+			<if test=' this.has("idCard") '> and id_card = #{idCard} </if>
+			<if test=' this.has("bankName") '> and bank_name = #{bankName} </if>
+			<if test=' this.has("bankCode") '> and bank_code = #{bankCode} </if>
+			<if test=' this.has("invoiceBusiness") '> and invoice_business = #{invoiceBusiness} </if>
+			<if test=' this.has("invoicePeople") '> and invoice_people = #{invoicePeople} </if>
+			<if test=' this.has("payee") '> and payee = #{payee} </if>
+			<if test=' this.has("checker") '> and checker = #{checker} </if>
+			<if test=' this.has("createTime") '> and create_time = #{createTime} </if>
+			<if test=' this.has("createBy") '> and create_by = #{createBy} </if>
+			<if test=' this.has("createName") '> and create_name = #{createName} </if>
+			<if test=' this.has("updateTime") '> and update_time = #{updateTime} </if>
+			<if test=' this.has("updateBy") '> and update_by = #{updateBy} </if>
+			<if test=' this.has("updateName") '> and update_name = #{updateName} </if>
+			<if test=' this.has("tradeAreaId") '> and trade_area_id = #{tradeAreaId} </if>
+			<if test=' this.has("tradeAreaName") '> and trade_area_name = #{tradeAreaName} </if>
+		</where>
+		order by
+		<choose>
+			<when test='sortType == 1'> id desc </when>
+			<when test='sortType == 2'> people_id desc </when>
+			<when test='sortType == 3'> business_name desc </when>
+			<when test='sortType == 4'> duty_paragraph desc </when>
+			<when test='sortType == 5'> name desc </when>
+			<when test='sortType == 6'> address desc </when>
+			<when test='sortType == 7'> form desc </when>
+			<when test='sortType == 8'> contacts desc </when>
+			<when test='sortType == 9'> phone desc </when>
+			<when test='sortType == 10'> business_address desc </when>
+			<when test='sortType == 11'> business_scope desc </when>
+			<when test='sortType == 12'> business_status desc </when>
+			<when test='sortType == 13'> id_card desc </when>
+			<when test='sortType == 14'> bank_name desc </when>
+			<when test='sortType == 15'> bank_code desc </when>
+			<when test='sortType == 16'> invoice_business desc </when>
+			<when test='sortType == 17'> invoice_people desc </when>
+			<when test='sortType == 18'> payee desc </when>
+			<when test='sortType == 19'> checker desc </when>
+			<when test='sortType == 20'> create_time desc </when>
+			<when test='sortType == 21'> create_by desc </when>
+			<when test='sortType == 22'> create_name desc </when>
+			<when test='sortType == 23'> update_time desc </when>
+			<when test='sortType == 24'> update_by desc </when>
+			<when test='sortType == 25'> update_name desc </when>
+			<otherwise> id desc </otherwise>
+		</choose>
+	</select>
+
+
+
+
+
+
+
+
+
+
+</mapper>

+ 53 - 0
sp-service/level-one-server/src/main/java/com/pj/tb_people_tax_account/TbPeopleTaxAccountService.java

@@ -0,0 +1,53 @@
+package com.pj.tb_people_tax_account;
+
+import java.util.Date;
+import java.util.List;
+import com.pj.utils.so.SoMap;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.transaction.annotation.Transactional;
+import com.pj.utils.sg.*;
+
+/**
+ * Service: tb_people_tax_account -- 边民-税务开户信息
+ * @author lbl
+ */
+@Service
+@Transactional(rollbackFor = Exception.class)
+public class TbPeopleTaxAccountService extends ServiceImpl<TbPeopleTaxAccountMapper, TbPeopleTaxAccount> implements IService<TbPeopleTaxAccount>{
+
+	/** 底层 Mapper 对象 */
+	@Autowired
+	TbPeopleTaxAccountMapper tbPeopleTaxAccountMapper;
+
+	/** 增 */
+	void add(TbPeopleTaxAccount t){
+		t.setCreateTime(new Date());
+		save(t);
+	}
+
+	/** 删 */
+	void delete(Long id){
+		removeById(id);
+	}
+
+	/** 改 */
+	void update(TbPeopleTaxAccount t){
+		updateById(t);
+
+	}
+
+	/** 查 */
+	TbPeopleTaxAccount getById(String id){
+		return super.getById(id);
+	}
+
+	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */
+	List<TbPeopleTaxAccount> getList(SoMap so) {
+		return tbPeopleTaxAccountMapper.getList(so);
+	}
+
+
+}