Merge branch 'master_wp' into master_zhp
# Conflicts: # ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/http/Channel.java # ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CustomerController.java # ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IMerchantService.java # ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MerchantServiceImpl.javapull/379/head
commit
17c9ba5cab
|
|
@ -26,8 +26,8 @@ public class Channel extends BaseEntity
|
|||
@Excel(name = "渠道签名")
|
||||
private String channelSign;
|
||||
|
||||
/** 渠道名称 */
|
||||
@Excel(name = "渠道名称")
|
||||
/** 渠道类型 1H5 2连登 3半流程 4全流程*/
|
||||
@Excel(name = "渠道类型")
|
||||
private String channelType;
|
||||
|
||||
/** 扣量比 */
|
||||
|
|
|
|||
|
|
@ -122,4 +122,5 @@ public class Customer extends BaseEntity
|
|||
@Excel(name = "芝麻分")
|
||||
private Integer zhiMa;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public class ChannelController extends BaseController
|
|||
*/
|
||||
@RequiresPermissions("system:channel:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
public AjaxResult getInfo(@PathVariable("id") Integer id)
|
||||
{
|
||||
return success(channelService.selectChannelById(id));
|
||||
}
|
||||
|
|
@ -67,7 +67,7 @@ public class ChannelController extends BaseController
|
|||
*/
|
||||
@RequiresPermissions("system:channel:add")
|
||||
@Log(title = "渠道配置", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
@RequestMapping(value = "/add", method = RequestMethod.POST)
|
||||
public AjaxResult add(@RequestBody Channel channel)
|
||||
{
|
||||
return toAjax(channelService.insertChannel(channel));
|
||||
|
|
@ -78,7 +78,7 @@ public class ChannelController extends BaseController
|
|||
*/
|
||||
@RequiresPermissions("system:channel:edit")
|
||||
@Log(title = "渠道配置", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
@RequestMapping(value = "/edit", method = RequestMethod.POST)
|
||||
public AjaxResult edit(@RequestBody Channel channel)
|
||||
{
|
||||
return toAjax(channelService.updateChannel(channel));
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||
|
||||
import com.ruoyi.common.core.constant.SecurityConstants;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.system.service.IMerchantService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.ruoyi.common.log.annotation.Log;
|
||||
|
|
@ -31,6 +32,9 @@ public class CustomerController extends BaseController
|
|||
@Autowired
|
||||
private ICustomerService customerService;
|
||||
|
||||
@Autowired
|
||||
private IMerchantService merchantService;
|
||||
|
||||
/**
|
||||
* 查询客户信息列表
|
||||
*/
|
||||
|
|
@ -105,7 +109,7 @@ public class CustomerController extends BaseController
|
|||
*/
|
||||
@RequiresPermissions("system:customer:add")
|
||||
@Log(title = "客户信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
@RequestMapping(value = "/add", method = RequestMethod.POST)
|
||||
public AjaxResult add(@RequestBody Customer customer)
|
||||
{
|
||||
return toAjax(customerService.insertCustomer(customer));
|
||||
|
|
@ -116,7 +120,7 @@ public class CustomerController extends BaseController
|
|||
*/
|
||||
@RequiresPermissions("system:customer:edit")
|
||||
@Log(title = "客户信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
@RequestMapping(value = "/edit", method = RequestMethod.POST)
|
||||
public AjaxResult edit(@RequestBody Customer customer)
|
||||
{
|
||||
return toAjax(customerService.updateCustomer(customer));
|
||||
|
|
@ -161,4 +165,14 @@ public class CustomerController extends BaseController
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取商户下渠道列表
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/getAllMerchantList", method = RequestMethod.GET)
|
||||
public AjaxResult getAllMerchantList()
|
||||
{
|
||||
return success(merchantService.findAllMerchantList());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ public class MerchantController extends BaseController
|
|||
*/
|
||||
@RequiresPermissions("system:merchant:add")
|
||||
@Log(title = "商户", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
@RequestMapping(value = "/add", method = RequestMethod.POST)
|
||||
public AjaxResult add(@RequestBody Merchant merchant)
|
||||
{
|
||||
return toAjax(merchantService.insertMerchant(merchant));
|
||||
|
|
@ -107,7 +107,7 @@ public class MerchantController extends BaseController
|
|||
*/
|
||||
@RequiresPermissions("system:merchant:edit")
|
||||
@Log(title = "商户", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
@RequestMapping(value = "/edit", method = RequestMethod.POST)
|
||||
public AjaxResult edit(@RequestBody Merchant merchant)
|
||||
{
|
||||
return toAjax(merchantService.updateMerchant(merchant));
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ public interface ChannelMapper extends BaseMapper<Channel>
|
|||
* @param id 渠道配置主键
|
||||
* @return 渠道配置
|
||||
*/
|
||||
public Channel selectChannelById(Long id);
|
||||
public Channel selectChannelById(Integer id);
|
||||
|
||||
/**
|
||||
* 查询渠道配置列表
|
||||
|
|
@ -35,7 +35,7 @@ public interface ChannelMapper extends BaseMapper<Channel>
|
|||
* @param channel 渠道配置
|
||||
* @return 结果
|
||||
*/
|
||||
public Long insertChannel(Channel channel);
|
||||
public int insertChannel(Channel channel);
|
||||
|
||||
/**
|
||||
* 修改渠道配置
|
||||
|
|
|
|||
|
|
@ -61,4 +61,11 @@ public interface MerchantMapper extends BaseMapper<Merchant>
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteMerchantByIds(Long[] ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取商户列表
|
||||
* @return
|
||||
*/
|
||||
public List<Merchant> findAllMerchantList();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ public interface IChannelService
|
|||
* @param id 渠道配置主键
|
||||
* @return 渠道配置
|
||||
*/
|
||||
public Channel selectChannelById(Long id);
|
||||
public Channel selectChannelById(Integer id);
|
||||
|
||||
/**
|
||||
* 查询渠道配置列表
|
||||
|
|
@ -34,7 +34,7 @@ public interface IChannelService
|
|||
* @param channel 渠道配置
|
||||
* @return 结果
|
||||
*/
|
||||
public Long insertChannel(Channel channel);
|
||||
public int insertChannel(Channel channel);
|
||||
|
||||
/**
|
||||
* 修改渠道配置
|
||||
|
|
|
|||
|
|
@ -78,4 +78,10 @@ public interface IMerchantService extends IService<Merchant>
|
|||
* @return
|
||||
*/
|
||||
AjaxResult getMatchMerchantList(HttpServletRequest request);
|
||||
/**
|
||||
* 获取所有的商户列表
|
||||
* @return
|
||||
*/
|
||||
public List<Merchant> findAllMerchantList();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ public class ChannelServiceImpl implements IChannelService
|
|||
* @return 渠道配置
|
||||
*/
|
||||
@Override
|
||||
public Channel selectChannelById(Long id)
|
||||
public Channel selectChannelById(Integer id)
|
||||
{
|
||||
return channelMapper.selectChannelById(id);
|
||||
}
|
||||
|
|
@ -63,13 +63,14 @@ public class ChannelServiceImpl implements IChannelService
|
|||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Long insertChannel(Channel channel)
|
||||
public int insertChannel(Channel channel)
|
||||
{
|
||||
if (StringUtils.isEmpty(channel.getChannelSign())) {
|
||||
channel.setChannelSign(RandomStringUtils.random(16, true, false));
|
||||
}
|
||||
channel.setCreateTime(DateUtils.getNowDate());
|
||||
Long i = channelMapper.insertChannel(channel);
|
||||
channel.setUpdateTime(DateUtils.getNowDate());
|
||||
int i = channelMapper.insertChannel(channel);
|
||||
//新增插入缓存
|
||||
Channel channelById = channelMapper.selectChannelById(i);
|
||||
redisService.setCacheObject(CacheConstants.CHANNEL_ID+i,channelById);
|
||||
|
|
|
|||
|
|
@ -130,6 +130,10 @@ public class MerchantServiceImpl extends ServiceImpl<MerchantMapper, Merchant> i
|
|||
return R.ok(merchants);
|
||||
}
|
||||
|
||||
public List<Merchant> findAllMerchantList(){
|
||||
return merchantMapper.findAllMerchantList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getMatchMerchantList(HttpServletRequest request) {
|
||||
String authorization = request.getHeader("Authorization");
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="id" column="id" />
|
||||
<result property="channelName" column="channel_name" />
|
||||
<result property="channelSign" column="channel_sign" />
|
||||
<result property="channelType" column="channel_type" />
|
||||
<result property="score" column="score" />
|
||||
<result property="htmlName" column="html_name" />
|
||||
<result property="htmlLocation" column="html_location" />
|
||||
|
|
@ -19,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectChannelVo">
|
||||
select id, channel_name, channel_sign, score, html_name, html_location, ips, period, create_time, update_time, remark from channel
|
||||
select id, channel_name, channel_sign,channel_type, score, html_name, html_location, ips, period, create_time, update_time, remark from channel
|
||||
</sql>
|
||||
<sql id="selectChannelIdName">
|
||||
select id, channel_name, channel_sign from channel
|
||||
|
|
@ -29,6 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<where>
|
||||
<if test="channelName != null and channelName != ''"> and channel_name like concat('%', #{channelName}, '%')</if>
|
||||
<if test="channelSign != null and channelSign != ''"> and channel_sign = #{channelSign}</if>
|
||||
<if test="channelType != null and channelType != ''"> and channel_type = #{channelType}</if>
|
||||
<if test="score != null "> and score = #{score}</if>
|
||||
<if test="htmlName != null and htmlName != ''"> and html_name like concat('%', #{htmlName}, '%')</if>
|
||||
<if test="htmlLocation != null and htmlLocation != ''"> and html_location = #{htmlLocation}</if>
|
||||
|
|
@ -37,7 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectChannelById" parameterType="java.lang.Long" resultMap="ChannelResult">
|
||||
<select id="selectChannelById" parameterType="java.lang.Integer" resultMap="ChannelResult">
|
||||
<include refid="selectChannelVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
|
@ -47,6 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="channelName != null">channel_name,</if>
|
||||
<if test="channelSign != null">channel_sign,</if>
|
||||
<if test="channelType != null">channel_type,</if>
|
||||
<if test="score != null">score,</if>
|
||||
<if test="htmlName != null">html_name,</if>
|
||||
<if test="htmlLocation != null">html_location,</if>
|
||||
|
|
@ -59,6 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="channelName != null">#{channelName},</if>
|
||||
<if test="channelSign != null">#{channelSign},</if>
|
||||
<if test="channelType != null">#{channelType},</if>
|
||||
<if test="score != null">#{score},</if>
|
||||
<if test="htmlName != null">#{htmlName},</if>
|
||||
<if test="htmlLocation != null">#{htmlLocation},</if>
|
||||
|
|
@ -75,6 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="channelName != null">channel_name = #{channelName},</if>
|
||||
<if test="channelSign != null">channel_sign = #{channelSign},</if>
|
||||
<if test="channelType != null">channel_type = #{channelType},</if>
|
||||
<if test="score != null">score = #{score},</if>
|
||||
<if test="htmlName != null">html_name = #{htmlName},</if>
|
||||
<if test="htmlLocation != null">html_location = #{htmlLocation},</if>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
<?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">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.CustomerMapper">
|
||||
|
||||
|
||||
<resultMap type="com.ruoyi.common.core.domain.http.Customer" id="CustomerResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="channelId" column="channel_id" />
|
||||
<result property="age" column="age" />
|
||||
<result property="sex" column="sex" />
|
||||
<result property="name" column="name" />
|
||||
|
|
@ -19,48 +20,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="lastLoginTime" column="last_login_time" />
|
||||
<result property="lastLoginIp" column="last_login_ip" />
|
||||
<result property="status" column="status" />
|
||||
<result property="socialSecurityNo" column="social_security_no" />
|
||||
<result property="socialSecurityLow" column="social_security_low" />
|
||||
<result property="socialSecurityHigh" column="social_security_high" />
|
||||
<result property="carNo" column="car_no" />
|
||||
<result property="carHave" column="car_have" />
|
||||
<result property="guaranteeSlipLow" column="guarantee_slip_low" />
|
||||
<result property="guaranteeSlipCentre" column="guarantee_slip_centre" />
|
||||
<result property="guaranteeSlipHigh" column="guarantee_slip_high" />
|
||||
<result property="educationMiddle" column="education_middle" />
|
||||
<result property="educationHighSchool" column="education_high_school" />
|
||||
<result property="educationPolytechnic" column="education_polytechnic" />
|
||||
<result property="educationJuniorCollege" column="education_junior_college" />
|
||||
<result property="educationUndergraduateCourse" column="education_undergraduate_course" />
|
||||
<result property="educationPostgraduate" column="education_postgraduate" />
|
||||
<result property="accumulationFundLow" column="accumulation_fund_low" />
|
||||
<result property="accumulationFundHigh" column="accumulation_fund_high" />
|
||||
<result property="hourseNo" column="hourse_no" />
|
||||
<result property="hourseFullPayment" column="hourse_full_payment" />
|
||||
<result property="hourseMortgaging" column="hourse_mortgaging" />
|
||||
<result property="officeWorker" column="office_worker" />
|
||||
<result property="civilServant" column="civil_servant" />
|
||||
<result property="privatePropertyOwners" column="private_property_owners" />
|
||||
<result property="selfEmployedPerson" column="self_employed_person" />
|
||||
<result property="otherOccupations" column="other_occupations" />
|
||||
<result property="huaBeiLow" column="hua_bei_low" />
|
||||
<result property="huaBeiMiddle" column="hua_bei_middle" />
|
||||
<result property="huaBeiHigh" column="hua_bei_high" />
|
||||
<result property="baiTiaoLow" column="bai_tiao_low" />
|
||||
<result property="baiTiaoMiddle" column="bai_tiao_middle" />
|
||||
<result property="baiTiaoHigh" column="bai_tiao_high" />
|
||||
<result property="socialSecurity" column="social_security" />
|
||||
<result property="car" column="car" />
|
||||
<result property="guaranteeSlip" column="guarantee_slip" />
|
||||
<result property="education" column="education" />
|
||||
<result property="accumulationFund" column="accumulation_fund" />
|
||||
<result property="hourse" column="hourse" />
|
||||
<result property="career" column="career" />
|
||||
<result property="huaBei" column="hua_bei" />
|
||||
<result property="baiTiao" column="bai_tiao" />
|
||||
<result property="zhiMa" column="zhi_ma" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCustomerVo">
|
||||
select id, age, sex, name, acturl_name, phone, phone_md5, is_auth, city, city_code, first_login_time, last_login_time, last_login_ip, status, social_security_no, social_security_low, social_security_high, car_no, car_have, guarantee_slip_low, guarantee_slip_centre, guarantee_slip_high, education_middle, education_high_school, education_polytechnic, education_junior_college, education_undergraduate_course, education_postgraduate, accumulation_fund_low, accumulation_fund_high, hourse_no, hourse_full_payment, hourse_mortgaging, office_worker, civil_servant, private_property_owners, self_employed_person, other_occupations, hua_bei_low, hua_bei_middle, hua_bei_high, bai_tiao_low, bai_tiao_middle, bai_tiao_high, zhi_ma, create_time, update_time from customer
|
||||
select id, channel_id, age, sex, name, acturl_name, phone, phone_md5, is_auth, city, city_code, first_login_time, last_login_time, last_login_ip, status, social_security, car, guarantee_slip, education, accumulation_fund, hourse, career, hua_bei, bai_tiao, zhi_ma, create_time, update_time from customer
|
||||
</sql>
|
||||
|
||||
<select id="selectCustomerList" parameterType="com.ruoyi.common.core.domain.http.Customer" resultMap="CustomerResult">
|
||||
<include refid="selectCustomerVo"/>
|
||||
<where>
|
||||
<where>
|
||||
<if test="channelId != null "> and channel_id = #{channelId}</if>
|
||||
<if test="age != null "> and age = #{age}</if>
|
||||
<if test="sex != null "> and sex = #{sex}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
|
|
@ -74,40 +55,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="lastLoginTime != null "> and last_login_time = #{lastLoginTime}</if>
|
||||
<if test="lastLoginIp != null "> and last_login_ip = #{lastLoginIp}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="socialSecurityNo != null "> and social_security_no = #{socialSecurityNo}</if>
|
||||
<if test="socialSecurityLow != null "> and social_security_low = #{socialSecurityLow}</if>
|
||||
<if test="socialSecurityHigh != null "> and social_security_high = #{socialSecurityHigh}</if>
|
||||
<if test="carNo != null "> and car_no = #{carNo}</if>
|
||||
<if test="carHave != null "> and car_have = #{carHave}</if>
|
||||
<if test="guaranteeSlipLow != null "> and guarantee_slip_low = #{guaranteeSlipLow}</if>
|
||||
<if test="guaranteeSlipCentre != null "> and guarantee_slip_centre = #{guaranteeSlipCentre}</if>
|
||||
<if test="guaranteeSlipHigh != null "> and guarantee_slip_high = #{guaranteeSlipHigh}</if>
|
||||
<if test="educationMiddle != null "> and education_middle = #{educationMiddle}</if>
|
||||
<if test="educationHighSchool != null "> and education_high_school = #{educationHighSchool}</if>
|
||||
<if test="educationPolytechnic != null "> and education_polytechnic = #{educationPolytechnic}</if>
|
||||
<if test="educationJuniorCollege != null "> and education_junior_college = #{educationJuniorCollege}</if>
|
||||
<if test="educationUndergraduateCourse != null "> and education_undergraduate_course = #{educationUndergraduateCourse}</if>
|
||||
<if test="educationPostgraduate != null "> and education_postgraduate = #{educationPostgraduate}</if>
|
||||
<if test="accumulationFundLow != null "> and accumulation_fund_low = #{accumulationFundLow}</if>
|
||||
<if test="accumulationFundHigh != null "> and accumulation_fund_high = #{accumulationFundHigh}</if>
|
||||
<if test="hourseNo != null "> and hourse_no = #{hourseNo}</if>
|
||||
<if test="hourseFullPayment != null "> and hourse_full_payment = #{hourseFullPayment}</if>
|
||||
<if test="hourseMortgaging != null "> and hourse_mortgaging = #{hourseMortgaging}</if>
|
||||
<if test="officeWorker != null "> and office_worker = #{officeWorker}</if>
|
||||
<if test="civilServant != null "> and civil_servant = #{civilServant}</if>
|
||||
<if test="privatePropertyOwners != null "> and private_property_owners = #{privatePropertyOwners}</if>
|
||||
<if test="selfEmployedPerson != null "> and self_employed_person = #{selfEmployedPerson}</if>
|
||||
<if test="otherOccupations != null "> and other_occupations = #{otherOccupations}</if>
|
||||
<if test="huaBeiLow != null "> and hua_bei_low = #{huaBeiLow}</if>
|
||||
<if test="huaBeiMiddle != null "> and hua_bei_middle = #{huaBeiMiddle}</if>
|
||||
<if test="huaBeiHigh != null "> and hua_bei_high = #{huaBeiHigh}</if>
|
||||
<if test="baiTiaoLow != null "> and bai_tiao_low = #{baiTiaoLow}</if>
|
||||
<if test="baiTiaoMiddle != null "> and bai_tiao_middle = #{baiTiaoMiddle}</if>
|
||||
<if test="baiTiaoHigh != null "> and bai_tiao_high = #{baiTiaoHigh}</if>
|
||||
<if test="socialSecurity != null "> and social_security = #{socialSecurity}</if>
|
||||
<if test="car != null "> and car = #{car}</if>
|
||||
<if test="guaranteeSlip != null "> and guarantee_slip = #{guaranteeSlip}</if>
|
||||
<if test="education != null "> and education = #{education}</if>
|
||||
<if test="accumulationFund != null "> and accumulation_fund = #{accumulationFund}</if>
|
||||
<if test="hourse != null "> and hourse = #{hourse}</if>
|
||||
<if test="career != null "> and career = #{career}</if>
|
||||
<if test="huaBei != null "> and hua_bei = #{huaBei}</if>
|
||||
<if test="baiTiao != null "> and bai_tiao = #{baiTiao}</if>
|
||||
<if test="zhiMa != null "> and zhi_ma = #{zhiMa}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectCustomerById" parameterType="java.lang.Long" resultMap="CustomerResult">
|
||||
<include refid="selectCustomerVo"/>
|
||||
where id = #{id}
|
||||
|
|
@ -116,6 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<insert id="insertCustomer" parameterType="com.ruoyi.common.core.domain.http.Customer" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into customer
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="channelId != null">channel_id,</if>
|
||||
<if test="age != null">age,</if>
|
||||
<if test="sex != null">sex,</if>
|
||||
<if test="name != null">name,</if>
|
||||
|
|
@ -129,41 +90,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="lastLoginTime != null">last_login_time,</if>
|
||||
<if test="lastLoginIp != null">last_login_ip,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="socialSecurityNo != null">social_security_no,</if>
|
||||
<if test="socialSecurityLow != null">social_security_low,</if>
|
||||
<if test="socialSecurityHigh != null">social_security_high,</if>
|
||||
<if test="carNo != null">car_no,</if>
|
||||
<if test="carHave != null">car_have,</if>
|
||||
<if test="guaranteeSlipLow != null">guarantee_slip_low,</if>
|
||||
<if test="guaranteeSlipCentre != null">guarantee_slip_centre,</if>
|
||||
<if test="guaranteeSlipHigh != null">guarantee_slip_high,</if>
|
||||
<if test="educationMiddle != null">education_middle,</if>
|
||||
<if test="educationHighSchool != null">education_high_school,</if>
|
||||
<if test="educationPolytechnic != null">education_polytechnic,</if>
|
||||
<if test="educationJuniorCollege != null">education_junior_college,</if>
|
||||
<if test="educationUndergraduateCourse != null">education_undergraduate_course,</if>
|
||||
<if test="educationPostgraduate != null">education_postgraduate,</if>
|
||||
<if test="accumulationFundLow != null">accumulation_fund_low,</if>
|
||||
<if test="accumulationFundHigh != null">accumulation_fund_high,</if>
|
||||
<if test="hourseNo != null">hourse_no,</if>
|
||||
<if test="hourseFullPayment != null">hourse_full_payment,</if>
|
||||
<if test="hourseMortgaging != null">hourse_mortgaging,</if>
|
||||
<if test="officeWorker != null">office_worker,</if>
|
||||
<if test="civilServant != null">civil_servant,</if>
|
||||
<if test="privatePropertyOwners != null">private_property_owners,</if>
|
||||
<if test="selfEmployedPerson != null">self_employed_person,</if>
|
||||
<if test="otherOccupations != null">other_occupations,</if>
|
||||
<if test="huaBeiLow != null">hua_bei_low,</if>
|
||||
<if test="huaBeiMiddle != null">hua_bei_middle,</if>
|
||||
<if test="huaBeiHigh != null">hua_bei_high,</if>
|
||||
<if test="baiTiaoLow != null">bai_tiao_low,</if>
|
||||
<if test="baiTiaoMiddle != null">bai_tiao_middle,</if>
|
||||
<if test="baiTiaoHigh != null">bai_tiao_high,</if>
|
||||
<if test="socialSecurity != null">social_security,</if>
|
||||
<if test="car != null">car,</if>
|
||||
<if test="guaranteeSlip != null">guarantee_slip,</if>
|
||||
<if test="education != null">education,</if>
|
||||
<if test="accumulationFund != null">accumulation_fund,</if>
|
||||
<if test="hourse != null">hourse,</if>
|
||||
<if test="career != null">career,</if>
|
||||
<if test="huaBei != null">hua_bei,</if>
|
||||
<if test="baiTiao != null">bai_tiao,</if>
|
||||
<if test="zhiMa != null">zhi_ma,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="channelId != null">#{channelId},</if>
|
||||
<if test="age != null">#{age},</if>
|
||||
<if test="sex != null">#{sex},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
|
|
@ -177,45 +118,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="lastLoginTime != null">#{lastLoginTime},</if>
|
||||
<if test="lastLoginIp != null">#{lastLoginIp},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="socialSecurityNo != null">#{socialSecurityNo},</if>
|
||||
<if test="socialSecurityLow != null">#{socialSecurityLow},</if>
|
||||
<if test="socialSecurityHigh != null">#{socialSecurityHigh},</if>
|
||||
<if test="carNo != null">#{carNo},</if>
|
||||
<if test="carHave != null">#{carHave},</if>
|
||||
<if test="guaranteeSlipLow != null">#{guaranteeSlipLow},</if>
|
||||
<if test="guaranteeSlipCentre != null">#{guaranteeSlipCentre},</if>
|
||||
<if test="guaranteeSlipHigh != null">#{guaranteeSlipHigh},</if>
|
||||
<if test="educationMiddle != null">#{educationMiddle},</if>
|
||||
<if test="educationHighSchool != null">#{educationHighSchool},</if>
|
||||
<if test="educationPolytechnic != null">#{educationPolytechnic},</if>
|
||||
<if test="educationJuniorCollege != null">#{educationJuniorCollege},</if>
|
||||
<if test="educationUndergraduateCourse != null">#{educationUndergraduateCourse},</if>
|
||||
<if test="educationPostgraduate != null">#{educationPostgraduate},</if>
|
||||
<if test="accumulationFundLow != null">#{accumulationFundLow},</if>
|
||||
<if test="accumulationFundHigh != null">#{accumulationFundHigh},</if>
|
||||
<if test="hourseNo != null">#{hourseNo},</if>
|
||||
<if test="hourseFullPayment != null">#{hourseFullPayment},</if>
|
||||
<if test="hourseMortgaging != null">#{hourseMortgaging},</if>
|
||||
<if test="officeWorker != null">#{officeWorker},</if>
|
||||
<if test="civilServant != null">#{civilServant},</if>
|
||||
<if test="privatePropertyOwners != null">#{privatePropertyOwners},</if>
|
||||
<if test="selfEmployedPerson != null">#{selfEmployedPerson},</if>
|
||||
<if test="otherOccupations != null">#{otherOccupations},</if>
|
||||
<if test="huaBeiLow != null">#{huaBeiLow},</if>
|
||||
<if test="huaBeiMiddle != null">#{huaBeiMiddle},</if>
|
||||
<if test="huaBeiHigh != null">#{huaBeiHigh},</if>
|
||||
<if test="baiTiaoLow != null">#{baiTiaoLow},</if>
|
||||
<if test="baiTiaoMiddle != null">#{baiTiaoMiddle},</if>
|
||||
<if test="baiTiaoHigh != null">#{baiTiaoHigh},</if>
|
||||
<if test="socialSecurity != null">#{socialSecurity},</if>
|
||||
<if test="car != null">#{car},</if>
|
||||
<if test="guaranteeSlip != null">#{guaranteeSlip},</if>
|
||||
<if test="education != null">#{education},</if>
|
||||
<if test="accumulationFund != null">#{accumulationFund},</if>
|
||||
<if test="hourse != null">#{hourse},</if>
|
||||
<if test="career != null">#{career},</if>
|
||||
<if test="huaBei != null">#{huaBei},</if>
|
||||
<if test="baiTiao != null">#{baiTiao},</if>
|
||||
<if test="zhiMa != null">#{zhiMa},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateCustomer" parameterType="com.ruoyi.common.core.domain.http.Customer">
|
||||
update customer
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="channelId != null">channel_id = #{channelId},</if>
|
||||
<if test="age != null">age = #{age},</if>
|
||||
<if test="sex != null">sex = #{sex},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
|
|
@ -229,36 +150,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="lastLoginTime != null">last_login_time = #{lastLoginTime},</if>
|
||||
<if test="lastLoginIp != null">last_login_ip = #{lastLoginIp},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="socialSecurityNo != null">social_security_no = #{socialSecurityNo},</if>
|
||||
<if test="socialSecurityLow != null">social_security_low = #{socialSecurityLow},</if>
|
||||
<if test="socialSecurityHigh != null">social_security_high = #{socialSecurityHigh},</if>
|
||||
<if test="carNo != null">car_no = #{carNo},</if>
|
||||
<if test="carHave != null">car_have = #{carHave},</if>
|
||||
<if test="guaranteeSlipLow != null">guarantee_slip_low = #{guaranteeSlipLow},</if>
|
||||
<if test="guaranteeSlipCentre != null">guarantee_slip_centre = #{guaranteeSlipCentre},</if>
|
||||
<if test="guaranteeSlipHigh != null">guarantee_slip_high = #{guaranteeSlipHigh},</if>
|
||||
<if test="educationMiddle != null">education_middle = #{educationMiddle},</if>
|
||||
<if test="educationHighSchool != null">education_high_school = #{educationHighSchool},</if>
|
||||
<if test="educationPolytechnic != null">education_polytechnic = #{educationPolytechnic},</if>
|
||||
<if test="educationJuniorCollege != null">education_junior_college = #{educationJuniorCollege},</if>
|
||||
<if test="educationUndergraduateCourse != null">education_undergraduate_course = #{educationUndergraduateCourse},</if>
|
||||
<if test="educationPostgraduate != null">education_postgraduate = #{educationPostgraduate},</if>
|
||||
<if test="accumulationFundLow != null">accumulation_fund_low = #{accumulationFundLow},</if>
|
||||
<if test="accumulationFundHigh != null">accumulation_fund_high = #{accumulationFundHigh},</if>
|
||||
<if test="hourseNo != null">hourse_no = #{hourseNo},</if>
|
||||
<if test="hourseFullPayment != null">hourse_full_payment = #{hourseFullPayment},</if>
|
||||
<if test="hourseMortgaging != null">hourse_mortgaging = #{hourseMortgaging},</if>
|
||||
<if test="officeWorker != null">office_worker = #{officeWorker},</if>
|
||||
<if test="civilServant != null">civil_servant = #{civilServant},</if>
|
||||
<if test="privatePropertyOwners != null">private_property_owners = #{privatePropertyOwners},</if>
|
||||
<if test="selfEmployedPerson != null">self_employed_person = #{selfEmployedPerson},</if>
|
||||
<if test="otherOccupations != null">other_occupations = #{otherOccupations},</if>
|
||||
<if test="huaBeiLow != null">hua_bei_low = #{huaBeiLow},</if>
|
||||
<if test="huaBeiMiddle != null">hua_bei_middle = #{huaBeiMiddle},</if>
|
||||
<if test="huaBeiHigh != null">hua_bei_high = #{huaBeiHigh},</if>
|
||||
<if test="baiTiaoLow != null">bai_tiao_low = #{baiTiaoLow},</if>
|
||||
<if test="baiTiaoMiddle != null">bai_tiao_middle = #{baiTiaoMiddle},</if>
|
||||
<if test="baiTiaoHigh != null">bai_tiao_high = #{baiTiaoHigh},</if>
|
||||
<if test="socialSecurity != null">social_security = #{socialSecurity},</if>
|
||||
<if test="car != null">car = #{car},</if>
|
||||
<if test="guaranteeSlip != null">guarantee_slip = #{guaranteeSlip},</if>
|
||||
<if test="education != null">education = #{education},</if>
|
||||
<if test="accumulationFund != null">accumulation_fund = #{accumulationFund},</if>
|
||||
<if test="hourse != null">hourse = #{hourse},</if>
|
||||
<if test="career != null">career = #{career},</if>
|
||||
<if test="huaBei != null">hua_bei = #{huaBei},</if>
|
||||
<if test="baiTiao != null">bai_tiao = #{baiTiao},</if>
|
||||
<if test="zhiMa != null">zhi_ma = #{zhiMa},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
|
|
@ -271,7 +171,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</delete>
|
||||
|
||||
<delete id="deleteCustomerByIds" parameterType="java.lang.String">
|
||||
delete from customer where id in
|
||||
delete from customer where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
|
|
|||
|
|
@ -54,9 +54,16 @@
|
|||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="com.ruoyi.common.core.domain.http.Merchant" id="MerchantIdNameResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="merchantName" column="merchant_name" />
|
||||
</resultMap>
|
||||
<sql id="selectMerchantVo">
|
||||
select id, merchant_type, merchant_name, merchant_describe, merchant_company, logo, status, limit_num, limit_type, channel_limit_type, age_limit_start, age_limit_end, phone_limit, social_security_no, social_security_low, social_security_high, car_no, car_have, guarantee_slip_low, guarantee_slip_centre, guarantee_slip_high, education_middle, education_high_school, education_polytechnic, education_junior_college, education_undergraduate_course, education_postgraduate, accumulation_fund_low, accumulation_fund_high, hourse_no, hourse_full_payment, hourse_mortgaging, office_worker, civil_servant, private_property_owners, self_employed_person, other_occupations, hua_bei_low, hua_bei_middle, hua_bei_high, bai_tiao_low, bai_tiao_middle, bai_tiao_high, zhi_ma, create_time, update_time, remark from merchant
|
||||
</sql>
|
||||
<sql id="findAllMerchant">
|
||||
select id, merchant_name from merchant
|
||||
</sql>
|
||||
|
||||
<select id="selectMerchantList" parameterType="com.ruoyi.common.core.domain.http.Merchant" resultMap="MerchantResult">
|
||||
<include refid="selectMerchantVo"/>
|
||||
|
|
@ -275,4 +282,8 @@
|
|||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="findAllMerchantList" resultMap="MerchantIdNameResult">
|
||||
<include refid="findAllMerchant"/>
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue