Commit 42fc7340 authored by jiaorz's avatar jiaorz

Merge remote-tracking branch 'origin/base-modify' into base-modify

parents 588f3010 9e602f6e
......@@ -6,7 +6,7 @@ import java.util.Set;
public class ReferralCodeUtil {
//验证码长度
private static final int LEN = 8;
private static final int LEN = 6;
//验证码字符初始列表
private static final char STUFFS[] = {
'E','5','F','C','D','G','3','H',
......@@ -21,7 +21,7 @@ public class ReferralCodeUtil {
static {
PERMUTATION = permutation(LEN);
MAX_COMBINATION = combination(_stuffs.length, LEN);
MAX_COMBINATION = combination(36, LEN);
}
// public static void resetStuffs() {
......
......@@ -934,7 +934,7 @@ public class AppPermissionService {
rsUserDetail.setUpdatetime(now);
rsUserDetail.setIsdel(0);
//生成邀请码 长度改为8 不然重复率太高
rsUserDetail.setCode(UUIDUtils.genCodes(8));
rsUserDetail.setCode(ReferralCodeUtil.encode(userid));
//设置来源
rsUserDetail.setChannel(UserSourceEnum.APPLET.getCode());
rsUserDetail.setCrtHost(getIp());
......
......@@ -145,4 +145,7 @@ public class VehicleModel implements Serializable {
@ApiModelProperty(value = "购买价格")
private BigDecimal buyPrice;
@Column(name = "status")
@ApiModelProperty(value = "状态 0--下架;1--上架")
private Integer status;
}
......@@ -26,6 +26,8 @@ public class VehicleModelQueryCondition {
private String takeALieTheNumber;
@ApiModelProperty(value = "是否删除")
private Integer isDel;
@ApiModelProperty(value = "状态")
private Integer status;
@ApiModelProperty("分类逗号分割")
String catasStr;
@ApiModelProperty(value = "分类列表", hidden = true)
......
......@@ -46,6 +46,8 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import static com.github.wxiaoqi.security.common.constant.CommonConstants.SYS_TRUE;
@RestController
@RequestMapping("vehicleModel")
@Api(value = "车型controller", tags = {"车型操作接口"})
......@@ -112,6 +114,10 @@ public class VehicleModelController extends BaseController<VehicleModelBiz, Vehi
vmqc.setIsDel(0);
}
if (vmqc.getStatus()==null) {
vmqc.setStatus(SYS_TRUE);
}
if (vmqc == null || vmqc.getPage() == null || vmqc.getLimit() == null || vmqc.getPage() < 0 || vmqc.getLimit() <= 0) {
return ObjectRestResponse.createDefaultFail();
}
......@@ -125,7 +131,6 @@ public class VehicleModelController extends BaseController<VehicleModelBiz, Vehi
}
/**
* 添加车型
*
......@@ -307,27 +312,4 @@ public class VehicleModelController extends BaseController<VehicleModelBiz, Vehi
return baseBiz.goodList(page,limit);
}
/**
* 车型列表查
*
* @param vmqc 条件
* @return
*/
@ApiOperation("车型列表")
@PostMapping(value = "/app/findVehicleModelPage")
public ObjectRestResponse<VehicleModelVo> findVehicleModelPage(
@RequestBody @ApiParam("查询条件") VehicleModelQueryCondition vmqc ) {
if (vmqc.getIsDel()==null) {
vmqc.setIsDel(0);
}
if (vmqc == null || vmqc.getPage() == null || vmqc.getLimit() == null || vmqc.getPage() < 0 || vmqc.getLimit() <= 0) {
return ObjectRestResponse.createDefaultFail();
}
return vehicleModelBiz.findVehicleModelPage(vmqc);
}
}
\ No newline at end of file
......@@ -382,6 +382,7 @@
<include refid="searchUsableSql"/>
and vm.id is not null
and vm.status = 1
and bc.id is not null
GROUP BY model_id, company_id
<if test="lon != null and lat != null">, distance</if>
......
......@@ -17,6 +17,9 @@
<if test="isDel !=null ">
and isdel=#{isDel}
</if>
<if test="status != null">
and status = #{status}
</if>
<if test="vehicleName !=null and vehicleName !=''">
AND vmqc.name LIKE CONCAT('%',#{vehicleName},'%')
</if>
......
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